Commit 67f3fa9c authored by salix5's avatar salix5 Committed by GitHub

update continuous cards, part 2 (#1694)

The continuous spell/trap cards has this property:
"The effect resolution will do nothing if the card is no longer on the field."
It is checked by the flag CHAIN_CONTINUOUS_CARD in field::solve_chain().

It is a property of continuous spell/trap cards, not the effect itself.
When a monster copies that effect, the monster effect will not have this property.
Therefore, it should NOT be written in the script.
parent 8b82a865
......@@ -44,7 +44,6 @@ function c10131855.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c10131855.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
local g=Group.CreateGroup()
......
......@@ -49,7 +49,6 @@ function c10833828.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c10833828.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10833828.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
......@@ -110,7 +109,6 @@ function c10833828.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c10833828.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c10833828.spfilter2,nil,e)
aux.FCheckAdditional=c10833828.fcheck1(c:GetFieldID())
......
......@@ -69,7 +69,6 @@ function c11163040.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c11163040.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local cc=tc:GetControler()
......
......@@ -77,7 +77,6 @@ function c1197847.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c1197847.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c1197847.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
......
......@@ -90,7 +90,6 @@ function c12644061.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c12644061.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
......
......@@ -64,7 +64,6 @@ function c12760674.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function c12760674.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ec=c:GetEquipTarget()
local tc=ec:GetBattleTarget()
if ec and tc and ec:IsFaceup() and tc:IsFaceup() then
......
......@@ -37,7 +37,6 @@ function c13629812.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c13629812.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
local val=aux.SequenceToGlobal(tc:GetControler(),LOCATION_MZONE,tc:GetSequence())
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and tc:IsLocation(LOCATION_REMOVED) then
......
......@@ -25,7 +25,6 @@ function c13955608.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c13955608.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,13955608,0,TYPES_EFFECT_TRAP_MONSTER,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_TRAP+TYPE_EFFECT)
......
......@@ -48,7 +48,6 @@ function c15447747.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c15447747.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local mg=Duel.GetMatchingGroup(c15447747.matfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c15447747.lkfilter,tp,LOCATION_EXTRA,0,1,1,nil,mg)
......
......@@ -58,7 +58,6 @@ function c16269385.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c16269385.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
......@@ -77,7 +76,6 @@ function c16269385.atktg2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c16269385.atkop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
......
......@@ -36,7 +36,6 @@ function c17722185.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c17722185.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
c:RegisterFlagEffect(17722185,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local flag=e:GetLabel()
local e1=Effect.CreateEffect(c)
......
......@@ -63,7 +63,6 @@ function c17787975.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c17787975.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=c:GetFirstCardTarget()
if not tc then return false end
local at=Duel.GetAttacker()
......
......@@ -59,7 +59,6 @@ function c17874674.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c17874674.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
......
......@@ -54,7 +54,6 @@ function c19814508.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function c19814508.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
......
......@@ -49,7 +49,6 @@ function c20426907.distg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c20426907.disop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
......@@ -35,7 +35,6 @@ function c20590515.filter(c)
end
function c20590515.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,20590515,0,TYPES_NORMAL_TRAP_MONSTER,500,1800,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
......
......@@ -32,7 +32,6 @@ function c20960340.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c20960340.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local atk=Duel.GetLP(tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,20960340,0,TYPES_EFFECT_TRAP_MONSTER,atk,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end
......
......@@ -53,7 +53,6 @@ function c21702241.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c21702241.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ec=c:GetEquipTarget()
Duel.Damage(ec:GetControler(),ec:GetBaseAttack(),REASON_EFFECT)
end
......@@ -49,7 +49,6 @@ function c21768554.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c21768554.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) then return end
local tc=g:GetFirst()
......
......@@ -25,7 +25,6 @@ function c21843307.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
if not ec:IsRelateToEffect(e) then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,ec:GetCode(),0,TYPES_NORMAL_TRAP_MONSTER,0,0,ec:GetLevel(),RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP,0,0,ec:GetLevel(),0,0)
......
......@@ -37,7 +37,6 @@ function c23626223.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c23626223.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,23626223,0,TYPES_EFFECT_TRAP_MONSTER,0,2500,7,RACE_ROCK,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -102,7 +102,6 @@ function c24010609.gselect(g,ft)
end
function c24010609.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c24010609.setfilter),tp,LOCATION_GRAVE,0,nil)
local ct=e:GetHandler():GetFlagEffectLabel(24010609) or 0
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
......
......@@ -23,7 +23,6 @@ function c26905245.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c26905245.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,26905245,0,TYPES_EFFECT_TRAP_MONSTER,0,3000,10,RACE_AQUA,ATTRIBUTE_WATER) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -69,7 +69,6 @@ function c27918963.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c27918963.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if e:GetLabel()==0 then
local g=Duel.GetMatchingGroup(c27918963.filter1,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
......
......@@ -29,7 +29,6 @@ function c28053763.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c28053763.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
......@@ -42,7 +42,6 @@ end
function c28529976.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c28529976.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp)
local tc=g:GetFirst()
......
......@@ -21,7 +21,6 @@ function c28649820.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c28649820.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,28649820,0,TYPES_NORMAL_TRAP_MONSTER,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
......
......@@ -55,7 +55,6 @@ function c28927782.eftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c28927782.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if e:GetLabel()==0 then
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
......
......@@ -23,7 +23,6 @@ function c30834988.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c30834988.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=eg:Filter(Card.IsRelateToEffect,nil,e)
Duel.ChangePosition(g,POS_FACEUP_ATTACK)
local tc=g:GetFirst()
......
......@@ -28,7 +28,6 @@ function c3129635.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c3129635.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,3129635,0,TYPES_EFFECT_TRAP_MONSTER,1800,1000,4,RACE_ROCK,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -54,7 +54,6 @@ function c33971095.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c33971095.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
......@@ -72,7 +71,6 @@ function c33971095.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function c33971095.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetAttacker()
if tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
......
......@@ -60,7 +60,6 @@ function c34029630.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c34029630.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and c:IsCanRemoveCounter(tp,0x1,1,REASON_EFFECT) and tc:IsCanAddCounter(0x1,1) then
c:RemoveCounter(tp,0x1,1,REASON_EFFECT)
......
......@@ -50,7 +50,6 @@ function c34884015.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c34884015.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
local tc=tg:GetFirst()
......@@ -98,7 +97,6 @@ function c34884015.exptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c34884015.expop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(34884015,4))
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -40,7 +40,6 @@ end
function c35011819.activate1(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()~=1 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT)
Duel.NegateActivation(ct-1)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
......@@ -28,7 +28,6 @@ function c35100834.eqfilter(c,tp)
end
function c35100834.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,35100834,0,TYPES_EFFECT_TRAP_MONSTER,0,0,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -93,7 +93,6 @@ function c35884610.atcon(e,tp,eg,ep,ev,re,r,rp)
end
function c35884610.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=e:GetHandler():GetEquipTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -39,7 +39,6 @@ function c36415522.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c36415522.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not Duel.NegateAttack() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -42,7 +42,6 @@ function c36560997.attg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c36560997.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c36560997.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
......
......@@ -36,7 +36,6 @@ function c37209439.negcon(e,tp,eg,ep,ev,re,r,rp)
end
function c37209439.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -50,7 +50,6 @@ function c39712330.target1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c39712330.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if e:GetLabel()~=1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c39712330.filter,tp,LOCATION_HAND,0,1,1,nil)
......
......@@ -69,7 +69,6 @@ function c41359411.dircost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c41359411.dirop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_DIRECT_ATTACK)
......
......@@ -32,7 +32,6 @@ function c42167046.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c42167046.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst()
while tc do
......
......@@ -63,7 +63,6 @@ function c42199039.dttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c42199039.dtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
......
......@@ -59,7 +59,6 @@ function c42237854.tgfilter(c,e)
end
function c42237854.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,42237854,0,TYPES_EFFECT_TRAP_MONSTER,0,0,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -68,7 +68,6 @@ function c42776855.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function c42776855.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=c:GetFirstCardTarget()
if not tc then return false end
local bc=tc:GetBattleTarget()
......
......@@ -45,7 +45,6 @@ function c43664494.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c43664494.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,43664495,0x120,TYPES_TOKEN_MONSTER,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,43664495)
......
......@@ -45,7 +45,6 @@ function c43959432.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c43959432.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,43959432,0,TYPES_EFFECT_TRAP_MONSTER,1000,1000,4,RACE_ROCK,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -38,7 +38,6 @@ function c44822037.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c44822037.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,44822037,0,TYPES_EFFECT_TRAP_MONSTER,1800,1800,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -28,7 +28,6 @@ function c46984349.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c46984349.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local lv=e:GetLabel()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,46984349,0,TYPES_NORMAL_TRAP_MONSTER,0,0,lv,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then return end
......
......@@ -27,7 +27,6 @@ function c47233801.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c47233801.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local dam=c:GetFlagEffectLabel(47233801)
if dam==nil then
c:RegisterFlagEffect(47233801,RESET_EVENT+RESETS_STANDARD,0,0,200)
......
......@@ -68,7 +68,6 @@ function c4740489.atcon(e,tp,eg,ep,ev,re,r,rp)
end
function c4740489.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=e:GetLabelObject()
if tc:IsRelateToBattle() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
......@@ -49,7 +49,6 @@ function c47598941.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c47598941.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c47598941.filter,tp,LOCATION_DECK,0,1,1,nil)
......
......@@ -33,7 +33,6 @@ function c47810543.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c47810543.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c47810543.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
......
......@@ -70,7 +70,6 @@ function c48308134.posfilter(c)
end
function c48308134.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c48308134.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
......
......@@ -36,7 +36,6 @@ function c4904633.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c4904633.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,4904633,0,TYPES_EFFECT_TRAP_MONSTER,1450,1950,9,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -88,7 +88,6 @@ function c49306994.disfilter(c)
end
function c49306994.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c49306994.disfilter,tp,0,LOCATION_ONFIELD,c)
local tc=g:GetFirst()
while tc do
......
......@@ -29,7 +29,6 @@ function c49514333.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c49514333.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,49514333,0,TYPES_EFFECT_TRAP_MONSTER,1000,1800,4,RACE_ROCK,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -46,7 +46,6 @@ function c50277973.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c50277973.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local rac=e:GetLabel()
local att=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
......
......@@ -49,7 +49,6 @@ function c51053997.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c51053997.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local ct=1
......
......@@ -40,7 +40,6 @@ function c51670553.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c51670553.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
......
......@@ -72,7 +72,6 @@ function c53363708.postg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c53363708.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=c:GetEquipTarget()
if tc and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
......
......@@ -31,7 +31,6 @@ function c54407825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c54407825.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
......
......@@ -64,7 +64,6 @@ function c54828837.protcon(e,tp,eg,ep,ev,re,r,rp)
end
function c54828837.protop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
......@@ -28,7 +28,6 @@ function c55838342.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c55838342.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,55838342,0,TYPES_EFFECT_TRAP_MONSTER,300,2100,2,RACE_INSECT,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -57,7 +57,6 @@ function c5641251.lvlcon(e,tp,eg,ep,ev,re,r,rp)
end
function c5641251.lvlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if not bc then return false end
......
......@@ -35,7 +35,6 @@ function c56460688.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c56460688.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Remove(tg,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local g=Duel.GetOperatedGroup()
......
......@@ -23,7 +23,6 @@ function c56995655.con(e,tp,eg,ep,ev,re,r,rp)
end
function c56995655.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1,nil)
local tc=g:GetFirst()
if not tc then return end
......
......@@ -47,7 +47,6 @@ function c58012707.spfilter(c,e,tp,code)
end
function c58012707.dmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
......
......@@ -55,7 +55,6 @@ function c59258334.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c59258334.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:GetCounter(0x100e)>0 and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
......
......@@ -89,7 +89,6 @@ function c60168186.filter(c,tp,typ)
end
function c60168186.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=eg:Filter(c60168186.filter,nil,tp,e:GetLabel())
local tc=g:GetFirst()
while tc do
......
......@@ -86,7 +86,6 @@ function c60226558.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c60226558.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ec=c:GetEquipTarget()
if ec:IsControler(1-tp) or ec:IsImmuneToEffect(e) then return end
local chkf=tp
......
......@@ -31,7 +31,6 @@ function c60433216.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1)
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,60433216,0,TYPES_NORMAL_TRAP_MONSTER+TYPE_TUNER,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER+TYPE_TRAP)
......
......@@ -27,7 +27,6 @@ function c60675348.filter(c)
end
function c60675348.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c60675348.filter,tp,LOCATION_DECK,0,nil)
local ct=0
if Duel.CheckLocation(tp,LOCATION_PZONE,0) then ct=ct+1 end
......
......@@ -66,7 +66,6 @@ function c61529473.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c61529473.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
......
......@@ -49,7 +49,6 @@ function c61557074.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c61557074.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c61557074.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
......
......@@ -48,7 +48,6 @@ function c61583217.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c61583217.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
......
......@@ -46,7 +46,6 @@ function c61840587.sfilter(c,e,tp)
end
function c61840587.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(c61840587.sfilter,nil,e,tp)
local sct=sg:GetCount()
......
......@@ -30,7 +30,6 @@ function c62437430.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c62437430.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c62437430.filter),tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then
......
......@@ -29,7 +29,6 @@ function c62784717.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c62784717.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local res=Duel.TossCoin(tp,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -59,7 +59,6 @@ function c63881033.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c63881033.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c63881033.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
......
......@@ -32,7 +32,6 @@ function c6430659.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c6430659.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
......
......@@ -44,7 +44,6 @@ end
function c6471156.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c6471156.lvfilter,tp,LOCATION_MZONE,0,nil,0)
local lc=g:GetFirst()
while lc do
......
......@@ -59,7 +59,6 @@ function c65959844.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c65959844.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c65959844.rmfilter,tp,LOCATION_MZONE,0,1,1,nil)
local rc=g:GetFirst()
......
......@@ -69,7 +69,6 @@ function c66719533.filter(c)
end
function c66719533.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c66719533.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
......
......@@ -38,7 +38,6 @@ function c67007102.filter(c)
end
function c67007102.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,67007102,0,TYPES_NORMAL_TRAP_MONSTER,800,2500,8,RACE_ZOMBIE,ATTRIBUTE_LIGHT) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
......
......@@ -42,7 +42,6 @@ function c69217334.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c69217334.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
local ec=tc
if not tc:IsRelateToEffect(e) then ec=nil end
......
......@@ -47,7 +47,6 @@ function c69553552.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c69553552.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
......
......@@ -51,7 +51,6 @@ function c70406920.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c70406920.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,70406920,0,TYPES_EFFECT_TRAP_MONSTER,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
......@@ -115,7 +115,6 @@ function c71645242.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c71645242.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local dg=Duel.GetMatchingGroup(c71645242.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
dg:AddCard(c)
if Duel.Destroy(dg,REASON_EFFECT)==dg:GetCount() then
......
......@@ -47,7 +47,6 @@ function c72043279.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c72043279.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=e:GetLabelObject()
if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then
local e1=Effect.CreateEffect(c)
......
......@@ -48,7 +48,6 @@ function c73206827.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c73206827.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local res=Duel.TossCoin(tp,1)
if res==0 then
c:RegisterFlagEffect(73206828,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2)
......
......@@ -29,7 +29,6 @@ function c75223115.actfilter(c,tp)
end
function c75223115.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c75223115.actfilter,tp,LOCATION_DECK,0,nil,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(75223115,0)) then
Duel.BreakEffect()
......
......@@ -73,7 +73,6 @@ function c75304793.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c75304793.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ct=Duel.GetMatchingGroupCount(c75304793.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct==0 then return end
if e:GetLabel()==0 then
......
......@@ -71,7 +71,6 @@ function c75702749.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c75702749.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c75702749.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
......
......@@ -89,7 +89,6 @@ function c75987257.poscon(e,tp,eg,ep,ev,re,r,rp)
end
function c75987257.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ec=c:GetEquipTarget()
if ec then
Duel.ChangePosition(ec,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
......
......@@ -50,7 +50,6 @@ function c76136345.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c76136345.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c76136345.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
......
......@@ -77,7 +77,6 @@ function c77565204.filter2(c,m)
end
function c77565204.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local mg=Duel.GetMatchingGroup(c77565204.filter1,tp,LOCATION_DECK,0,nil,e)
local sg=Duel.GetMatchingGroup(c77565204.filter2,tp,LOCATION_EXTRA,0,nil,mg)
if sg:GetCount()>0 then
......
......@@ -30,7 +30,6 @@ function c77584012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c77584012.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local code=e:GetLabel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -38,7 +38,6 @@ function c77778835.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c77778835.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c77778835.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 then return end
......
......@@ -27,7 +27,6 @@ function c79852326.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c79852326.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,79852326,0,TYPES_EFFECT_TRAP_MONSTER,1800,500,4,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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