Commit eea9ea94 authored by mercury233's avatar mercury233

update

parent 996d1e1f
...@@ -17,7 +17,7 @@ function c16708652.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c16708652.condition(e,tp,eg,ep,ev,re,r,rp)
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end end
function c16708652.filter(c) function c16708652.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x11) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() and c:IsSetCard(0x11)
end end
function c16708652.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c16708652.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -15,10 +15,13 @@ end ...@@ -15,10 +15,13 @@ end
function c16947147.spcon(e,tp,eg,ep,ev,re,r,rp) function c16947147.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp and Duel.GetAttackTarget()==nil return Duel.GetAttacker():GetControler()~=tp and Duel.GetAttackTarget()==nil
end end
function c16947147.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end
function c16947147.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c16947147.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) if chk==0 then return Duel.IsExistingMatchingCard(c16947147.filter,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK) local g=Duel.GetMatchingGroup(c16947147.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
...@@ -26,7 +29,7 @@ function c16947147.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +29,7 @@ function c16947147.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK) local g=Duel.GetMatchingGroup(c16947147.filter,tp,0,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE) Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end end
end end
...@@ -17,7 +17,8 @@ function c17243896.initial_effect(c) ...@@ -17,7 +17,8 @@ function c17243896.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c17243896.filter(c,e,tp) function c17243896.filter(c,e,tp)
return c:IsPosition(POS_FACEUP_ATTACK) and c:GetSummonPlayer()==1-tp and (not e or c:IsRelateToEffect(e)) return c:IsPosition(POS_FACEUP_ATTACK) and c:GetSummonPlayer()==1-tp and c:IsCanChangePosition()
and (not e or c:IsRelateToEffect(e))
end end
function c17243896.condition(e,tp,eg,ep,ev,re,r,rp) function c17243896.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
......
...@@ -71,7 +71,7 @@ function c2250266.cond(e) ...@@ -71,7 +71,7 @@ function c2250266.cond(e)
return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefensePos() return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefensePos()
end end
function c2250266.filter(c) function c2250266.filter(c)
return c:IsFaceup() and c:IsAttackPos() return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end end
function c2250266.tgd2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c2250266.tgd2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c2250266.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c2250266.filter(chkc) end
......
...@@ -14,10 +14,11 @@ function c24673894.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,10 +14,11 @@ function c24673894.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() return tp~=Duel.GetTurnPlayer()
end end
function c24673894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c24673894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker() local tc=Duel.GetAttacker()
if chkc then return chkc==tg end if chkc then return chkc==tc end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end if chk==0 then return tc:IsLocation(LOCATION_MZONE) and tc:IsAttackPos()
Duel.SetTargetCard(tg) and tc:IsCanChangePosition() and tc:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tc)
end end
function c24673894.activate(e,tp,eg,ep,ev,re,r,rp) function c24673894.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
......
...@@ -43,7 +43,8 @@ function c33103459.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,8 @@ function c33103459.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33103459)~=0 return e:GetHandler():GetFlagEffect(33103459)~=0
end end
function c33103459.filter(c) function c33103459.filter(c)
return c:IsFaceup() and c:IsSetCard(0x9f) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackBelow(1000) return c:IsFaceup() and c:IsSetCard(0x9f) and c:IsAttackBelow(1000)
and c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end end
function c33103459.thfilter(c) function c33103459.thfilter(c)
return c:IsSetCard(0x99) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x99) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
...@@ -24,7 +24,8 @@ function c37390589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -24,7 +24,8 @@ function c37390589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
else return false end else return false end
end end
local b1=Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp local b1=Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp
and Duel.GetAttacker():IsLocation(LOCATION_MZONE) and Duel.GetAttacker():IsCanBeEffectTarget(e) and Duel.GetAttacker():IsLocation(LOCATION_MZONE) and Duel.GetAttacker():IsAttackPos()
and Duel.GetAttacker():IsCanChangePosition() and Duel.GetAttacker():IsCanBeEffectTarget(e)
local b2=Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) local b2=Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local opt=0 local opt=0
......
...@@ -10,7 +10,7 @@ function c39440937.initial_effect(c) ...@@ -10,7 +10,7 @@ function c39440937.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c39440937.filter(c) function c39440937.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsType(TYPE_SYNCHRO) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsType(TYPE_SYNCHRO) and c:IsCanChangePosition()
end end
function c39440937.target(e,tp,eg,ep,ev,re,r,rp,chk) function c39440937.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c39440937.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c39440937.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
...@@ -18,7 +18,7 @@ function c41307269.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +18,7 @@ function c41307269.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c41307269.cfilter,1,nil,tp) return eg:IsExists(c41307269.cfilter,1,nil,tp)
end end
function c41307269.filter(c) function c41307269.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x9a) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x9a) and c:IsCanChangePosition()
end end
function c41307269.target(e,tp,eg,ep,ev,re,r,rp,chk) function c41307269.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c41307269.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c41307269.filter,tp,LOCATION_MZONE,0,1,nil) end
......
...@@ -65,6 +65,9 @@ function c48308134.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,6 +65,9 @@ function c48308134.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c48308134.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c48308134.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end end
function c48308134.posfilter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c48308134.spop(e,tp,eg,ep,ev,re,r,rp) function c48308134.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
...@@ -76,7 +79,7 @@ function c48308134.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +79,7 @@ function c48308134.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_ATTACK) local g=Duel.GetMatchingGroup(c48308134.posfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(48308134,1)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(48308134,1)) then
Duel.BreakEffect() Duel.BreakEffect()
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -63,7 +63,8 @@ function c50418970.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,8 @@ function c50418970.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c50418970.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c50418970.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipTarget():IsAttackPos() end local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec and ec:IsAttackPos() and ec:IsCanChangePosition() end
end end
function c50418970.posop(e,tp,eg,ep,ev,re,r,rp) function c50418970.posop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -35,7 +35,7 @@ function c57288064.filter(c,tp) ...@@ -35,7 +35,7 @@ function c57288064.filter(c,tp)
and Duel.IsExistingMatchingCard(c57288064.posfilter,tp,0,LOCATION_MZONE,1,nil,atk) and Duel.IsExistingMatchingCard(c57288064.posfilter,tp,0,LOCATION_MZONE,1,nil,atk)
end end
function c57288064.posfilter(c,atk) function c57288064.posfilter(c,atk)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackBelow(atk) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() and c:IsAttackBelow(atk)
end end
function c57288064.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57288064.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c57288064.filter(chkc,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c57288064.filter(chkc,tp) end
......
...@@ -10,12 +10,15 @@ function c60306104.initial_effect(c) ...@@ -10,12 +10,15 @@ function c60306104.initial_effect(c)
e1:SetOperation(c60306104.operation) e1:SetOperation(c60306104.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c60306104.filter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c60306104.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60306104.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c60306104.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c60306104.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c60306104.operation(e,tp,eg,ep,ev,re,r,rp) function c60306104.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c60306104.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0) Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0)
end end
...@@ -11,10 +11,10 @@ function c61968753.initial_effect(c) ...@@ -11,10 +11,10 @@ function c61968753.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c61968753.filter1(c) function c61968753.filter1(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCode(79979666) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() and c:IsCode(79979666)
end end
function c61968753.filter2(c) function c61968753.filter2(c)
return c:IsPosition(POS_FACEUP_ATTACK) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end end
function c61968753.spfilter(c,e,tp) function c61968753.spfilter(c,e,tp)
return c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -13,7 +13,7 @@ function c62868900.initial_effect(c) ...@@ -13,7 +13,7 @@ function c62868900.initial_effect(c)
end end
function c62868900.condition(e,tp,eg,ep,ev,re,r,rp) function c62868900.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
return tc:IsControler(tp) and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsSetCard(0xc008) return tc:IsControler(tp) and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsCanChangePosition() and tc:IsSetCard(0xc008)
end end
function c62868900.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c62868900.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc==eg:GetFirst() end if chkc then return chkc==eg:GetFirst() end
......
...@@ -11,7 +11,7 @@ function c66742250.initial_effect(c) ...@@ -11,7 +11,7 @@ function c66742250.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c66742250.filter(c) function c66742250.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsType(TYPE_EFFECT) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsType(TYPE_EFFECT) and c:IsCanChangePosition()
end end
function c66742250.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c66742250.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66742250.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c66742250.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
...@@ -9,13 +9,16 @@ function c68625727.initial_effect(c) ...@@ -9,13 +9,16 @@ function c68625727.initial_effect(c)
e1:SetOperation(c68625727.posop) e1:SetOperation(c68625727.posop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c68625727.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end
function c68625727.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c68625727.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) end if chk==0 then return Duel.IsExistingMatchingCard(c68625727.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK) local g=Duel.GetMatchingGroup(c68625727.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c68625727.posop(e,tp,eg,ep,ev,re,r,rp) function c68625727.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_FACEUP_ATTACK) local g=Duel.GetMatchingGroup(c68625727.filter,tp,0,LOCATION_MZONE,nil)
if Duel.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 then if Duel.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local oc=og:GetFirst() local oc=og:GetFirst()
......
...@@ -26,10 +26,11 @@ function c75987257.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,10 +26,11 @@ function c75987257.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c75987257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75987257.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker() local tc=Duel.GetAttacker()
if chkc then return chkc==tg end if chkc then return chkc==tc end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end if chk==0 then return tc:IsLocation(LOCATION_MZONE) and tc:IsAttackPos()
Duel.SetTargetCard(tg) and tc:IsCanChangePosition() and tc:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tc)
end end
function c75987257.operation(e,tp,eg,ep,ev,re,r,rp) function c75987257.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -30,7 +30,7 @@ function c76359406.poscon(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,7 @@ function c76359406.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c76359406.posfilter(c) function c76359406.posfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsCanChangePosition()
end end
function c76359406.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c76359406.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76359406.posfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c76359406.posfilter,tp,0,LOCATION_MZONE,1,nil) end
......
...@@ -17,7 +17,7 @@ function c78184733.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c78184733.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c78184733.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c78184733.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c78184733.filter(c) function c78184733.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end end
function c78184733.target(e,tp,eg,ep,ev,re,r,rp,chk) function c78184733.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c78184733.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c78184733.filter,tp,0,LOCATION_MZONE,1,nil) end
......
...@@ -10,7 +10,7 @@ function c82828051.initial_effect(c) ...@@ -10,7 +10,7 @@ function c82828051.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c82828051.filter(c) function c82828051.filter(c)
return c:IsFaceup() and c:IsAttackPos() return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end end
function c82828051.target(e,tp,eg,ep,ev,re,r,rp,chk) function c82828051.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c82828051.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c82828051.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
...@@ -48,13 +48,16 @@ function c91449532.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,13 +48,16 @@ function c91449532.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
function c91449532.filter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c91449532.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c91449532.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c91449532.filter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c91449532.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c91449532.posop(e,tp,eg,ep,ev,re,r,rp) function c91449532.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c91449532.filter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_DEFENSE) Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end end
......
...@@ -67,11 +67,14 @@ end ...@@ -67,11 +67,14 @@ end
function c91718579.poscon(e,tp,eg,ep,ev,re,r,rp) function c91718579.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c91718579.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end
function c91718579.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c91718579.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsPosition(POS_FACEUP_ATTACK) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c91718579.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) end if chk==0 then return Duel.IsExistingTarget(c91718579.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsPosition,tp,0,LOCATION_MZONE,1,1,nil,POS_FACEUP_ATTACK) local g=Duel.SelectTarget(tp,c91718579.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end end
function c91718579.posop(e,tp,eg,ep,ev,re,r,rp) function c91718579.posop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -33,13 +33,16 @@ end ...@@ -33,13 +33,16 @@ end
function c94344242.spfilter(c,e,tp) function c94344242.spfilter(c,e,tp)
return c:GetLevel()==3 and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:GetLevel()==3 and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c94344242.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end
function c94344242.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94344242.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsPosition(POS_FACEUP_ATTACK) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c94344242.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_ATTACK) and Duel.IsExistingTarget(c94344242.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c94344242.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c94344242.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK)
local g=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,0,1,1,nil,POS_FACEUP_ATTACK) local g=Duel.SelectTarget(tp,c94344242.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
......
...@@ -12,11 +12,14 @@ end ...@@ -12,11 +12,14 @@ end
function c95254840.condition(e,tp,eg,ep,ev,re,r,rp) function c95254840.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
end end
function c95254840.filter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c95254840.target(e,tp,eg,ep,ev,re,r,rp,chk) function c95254840.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c95254840.filter,tp,LOCATION_MZONE,0,1,nil) end
end end
function c95254840.activate(e,tp,eg,ep,ev,re,r,rp) function c95254840.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c95254840.filter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_DEFENSE) Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end end
......
...@@ -18,8 +18,11 @@ function c96700602.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,8 +18,11 @@ function c96700602.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_SYNCHRO) local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_SYNCHRO)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c96700602.filter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c96700602.target(e,tp,eg,ep,ev,re,r,rp,chk) function c96700602.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c96700602.filter,tp,0,LOCATION_MZONE,1,nil) end
local tc=eg:GetFirst() local tc=eg:GetFirst()
if tc:IsLocation(LOCATION_MZONE) then if tc:IsLocation(LOCATION_MZONE) then
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
...@@ -28,7 +31,7 @@ function c96700602.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +31,7 @@ function c96700602.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c96700602.operation(e,tp,eg,ep,ev,re,r,rp) function c96700602.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c96700602.filter,tp,0,LOCATION_MZONE,nil)
if Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0)~=0 then if Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0)~=0 then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Damage(1-tp,tc:GetDefense(),REASON_EFFECT) Duel.Damage(1-tp,tc:GetDefense(),REASON_EFFECT)
......
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