Commit f7ce0bdd authored by POLYMER's avatar POLYMER

fix

parent fa140797
--幻想时间 白枭骑士 --幻想时间 白枭骑士
local m=21192025 local m=21192025
local cm=_G["c"..m] local cm=_G["c"..m]
local setcard=0x3917 local setcard=0x3907
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -89,7 +89,7 @@ function cm.systg(f1,f2,minc,maxc) ...@@ -89,7 +89,7 @@ function cm.systg(f1,f2,minc,maxc)
end end
end end
function cm.w(c,tp) function cm.w(c,tp)
return c:IsSetCard(setcard) and c:IsControler(tp) return c:IsSetCard(setcard) and c:IsControler(tp) and c:IsType(TYPE_SYNCHRO)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.w,1,nil,tp) return eg:IsExists(cm.w,1,nil,tp)
......
...@@ -35,28 +35,25 @@ function c22060130.initial_effect(c) ...@@ -35,28 +35,25 @@ function c22060130.initial_effect(c)
end end
end end
function c22060130.regop1(e,tp,eg,ep,ev,re,r,rp) function c22060130.regop1(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do local p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER)
if tc:IsType(TYPE_MONSTER) then if re:IsActiveType(TYPE_MONSTER) then
Duel.RegisterFlagEffect(tp,22060131,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(p,22060131,RESET_PHASE+PHASE_END,0,1)
end
end end
end end
function c22060130.regop2(e,tp,eg,ep,ev,re,r,rp) function c22060130.regop2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do local p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER)
if tc:IsType(TYPE_SPELL) then if re:IsActiveType(TYPE_SPELL) then
Duel.RegisterFlagEffect(tp,22060132,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(p,22060132,RESET_PHASE+PHASE_END,0,1)
end
end end
end end
function c22060130.regop3(e,tp,eg,ep,ev,re,r,rp) function c22060130.regop3(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do local p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER)
if tc:IsType(TYPE_TRAP) then if re:IsActiveType(TYPE_TRAP) then
Duel.RegisterFlagEffect(tp,22060133,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(p,22060133,RESET_PHASE+PHASE_END,0,1)
end
end end
end end
function c22060130.condition(e,tp,eg,ep,ev,re,r,rp) function c22060130.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetFlagEffect(tp,22060131)>0 and Duel.GetFlagEffect(tp,22060132)>0 and Duel.GetFlagEffect(tp,22060133)>0 return Duel.GetTurnPlayer()~=tp and Duel.GetFlagEffect(1-tp,22060131)>0 and Duel.GetFlagEffect(1-tp,22060132)>0 and Duel.GetFlagEffect(1-tp,22060133)>0
end end
function c22060130.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c22060130.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -9,6 +9,7 @@ function cm.initial_effect(c) ...@@ -9,6 +9,7 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND) e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetHintTiming(TIMING_END_PHASE+TIMINGS_CHECK_MONSTER,0)
e1:SetCondition(cm.con) e1:SetCondition(cm.con)
e1:SetCost(aux.bfgcost) e1:SetCost(aux.bfgcost)
e1:SetTarget(cm.tg) e1:SetTarget(cm.tg)
...@@ -21,7 +22,6 @@ function cm.initial_effect(c) ...@@ -21,7 +22,6 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,m+100) e2:SetCountLimit(1,m+100)
e2:SetRange(LOCATION_REMOVED) e2:SetRange(LOCATION_REMOVED)
e2:SetHintTiming(TIMING_END_PHASE+TIMINGS_CHECK_MONSTER,0)
e2:SetCondition(cm.con2) e2:SetCondition(cm.con2)
e2:SetTarget(cm.tg2) e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2) e2:SetOperation(cm.op2)
......
...@@ -80,7 +80,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +80,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_CHANGE_DAMAGE) e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1) e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END,2) e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetValue(function (e,re,val,r,rp) e2:SetValue(function (e,re,val,r,rp)
if val>1 then Duel.Hint(HINT_CARD,0,id) end if val>1 then Duel.Hint(HINT_CARD,0,id) end
......
...@@ -19,10 +19,10 @@ function s.initial_effect(c) ...@@ -19,10 +19,10 @@ function s.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.regop) e2:SetOperation(s.regop)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
c:RegisterEffect(e2) --c:RegisterEffect(e2)
--set --set
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCategory(CATEGORY_NEGATE) e3:SetCategory(CATEGORY_NEGATE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
...@@ -36,7 +36,7 @@ function s.initial_effect(c) ...@@ -36,7 +36,7 @@ function s.initial_effect(c)
--to hand --to hand
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,3)) e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_TOHAND) e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
...@@ -87,12 +87,12 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -87,12 +87,12 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) then if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and Duel.ChangePosition(tc,POS_FACEUP_ATTACK,POS_FACEDOWN_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE)>0 then
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
end end
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler())
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
...@@ -75,7 +75,7 @@ function s.spcon(e,c) ...@@ -75,7 +75,7 @@ function s.spcon(e,c)
local st=0 local st=0
local g1=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_ONFIELD,0,nil,c) local g1=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_ONFIELD,0,nil,c)
if st2>st1 then if st2>st1 then
local g2=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_EXTRA,0,nil,c) local g2=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_EXTRA,0,c,c)
st=math.min(st2-st1,g2:GetCount()) st=math.min(st2-st1,g2:GetCount())
end end
return g1:GetCount()+st>=4 return g1:GetCount()+st>=4
...@@ -84,12 +84,12 @@ function s.fselect(g,tp,sc,st) ...@@ -84,12 +84,12 @@ function s.fselect(g,tp,sc,st)
return Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=st return Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=st
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c) function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_ONFIELD,0,nil,c) local g1=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_ONFIELD,0,c,c)
local st1=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD+LOCATION_HAND,0) local st1=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD+LOCATION_HAND,0)
local st2=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) local st2=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
local st=0 local st=0
if st2>st1 then if st2>st1 then
local g2=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_EXTRA,0,nil,c) local g2=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_EXTRA,0,c,c)
g1=g1:__bxor(g2) g1=g1:__bxor(g2)
st=math.min(st2-st1,g2:GetCount()) st=math.min(st2-st1,g2:GetCount())
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment