Commit 9ddefd57 authored by VanillaSalt's avatar VanillaSalt

fix

parent 7e979fc8
......@@ -29,8 +29,7 @@ function c14920218.initial_effect(c)
c:RegisterEffect(e4)
end
function c14920218.pcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return tc and tc:IsSetCard(0x98)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x98)
end
function c14920218.pfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and (c:IsSetCard(0x98) or c:IsSetCard(0x99)) and not c:IsCode(14920218) and c:IsAbleToHand()
......
......@@ -17,8 +17,7 @@ function c15146890.initial_effect(c)
c:RegisterEffect(e2)
end
function c15146890.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return tc and tc:IsSetCard(0x98)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x98)
end
function c15146890.cfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsDiscardable()
......
......@@ -44,8 +44,7 @@ function c17330916.initial_effect(c)
c:RegisterEffect(e5)
end
function c17330916.sccon(e)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or not tc:IsSetCard(0x9f)
return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0x9f)
end
function c17330916.reg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -57,8 +57,7 @@ function c17979378.atkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c17979378.sccon(e)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or not tc:IsSetCard(0xaf)
return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0xaf)
end
function c17979378.filter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
......
......@@ -40,8 +40,7 @@ function c20281581.initial_effect(c)
c:RegisterEffect(e4)
end
function c20281581.descon(e)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc
return not Duel.IsExistingMatchingCard(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())
end
function c20281581.rdcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
......
......@@ -64,9 +64,11 @@ end
function c20409757.aclimit(e,re,tp)
return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c20409757.slfilter(c)
return c:IsSetCard(0x98) or c:IsSetCard(0x99)
end
function c20409757.slcon(e)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or (not tc:IsSetCard(0x98) and not tc:IsSetCard(0x99))
return not Duel.IsExistingMatchingCard(c20409757.slfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())
end
function c20409757.filter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_PZONE)
......
......@@ -13,8 +13,7 @@ function c24019092.initial_effect(c)
c:RegisterEffect(e2)
end
function c24019092.thcon(e,tp,eg,ep,ev,re,r,rp)
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8)
end
function c24019092.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
......
......@@ -13,8 +13,7 @@ function c24131534.initial_effect(c)
c:RegisterEffect(e2)
end
function c24131534.thcon(e,tp,eg,ep,ev,re,r,rp)
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8)
end
function c24131534.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
......
......@@ -13,8 +13,7 @@ function c50407691.initial_effect(c)
c:RegisterEffect(e2)
end
function c50407691.thcon(e,tp,eg,ep,ev,re,r,rp)
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8)
end
function c50407691.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
......
......@@ -35,8 +35,8 @@ function c51391183.initial_effect(c)
end
function c51391183.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
if chk==0 then return tc and tc:IsSetCard(0x10ec) and tc:IsCanBeEffectTarget(e) end
if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x10ec) end
local tc=Duel.GetFirstMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,e:GetHandler(),0x10ec)
Duel.SetTargetCard(tc)
end
function c51391183.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -17,8 +17,7 @@ function c51531505.initial_effect(c)
c:RegisterEffect(e2)
end
function c51531505.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return tc and tc:IsSetCard(0x98)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x98)
end
function c51531505.cfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsDiscardable()
......
......@@ -67,8 +67,7 @@ function c5399521.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c5399521.slcon(e)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or not tc:IsSetCard(0x1066)
return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0x1066)
end
function c5399521.spcon(e,c)
if c==nil then return true end
......
......@@ -21,9 +21,11 @@ function c56675280.initial_effect(c)
e2:SetOperation(c56675280.spop)
c:RegisterEffect(e2)
end
function c56675280.scfilter(c)
return (c:IsSetCard(0x98) or c:IsSetCard(0x99) or c:IsSetCard(0x9f)) and not c:IsCode(56675280)
end
function c56675280.sccon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return tc and (tc:IsSetCard(0x98) or tc:IsSetCard(0x99) or tc:IsSetCard(0x9f)) and not tc:IsCode(56675280)
return Duel.IsExistingMatchingCard(c56675280.scfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c56675280.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetLeftScale()~=7 end
......
......@@ -30,12 +30,12 @@ function c59762399.initial_effect(c)
end
function c59762399.spcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil and tc
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c59762399.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,c):GetFirst()
local tc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,c)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
......@@ -43,7 +43,7 @@ end
function c59762399.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,c):GetFirst()
local tc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,c)
if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -13,8 +13,7 @@ function c61639289.initial_effect(c)
c:RegisterEffect(e2)
end
function c61639289.thcon(e,tp,eg,ep,ev,re,r,rp)
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8)
end
function c61639289.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
......
......@@ -13,8 +13,7 @@ function c67273917.initial_effect(c)
c:RegisterEffect(e2)
end
function c67273917.thcon(e,tp,eg,ep,ev,re,r,rp)
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8)
end
function c67273917.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
......
......@@ -44,8 +44,7 @@ function c69610326.pcfilter(c)
return c:IsSetCard(0x10f8) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c69610326.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence()
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c69610326.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c69610326.pcop(e,tp,eg,ep,ev,re,r,rp)
......@@ -59,8 +58,7 @@ function c69610326.pcop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(c69610326.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local seq=c:GetSequence()
if not Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1]) then return end
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c69610326.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -22,9 +22,11 @@ function c72714461.initial_effect(c)
e3:SetOperation(c72714461.scop)
c:RegisterEffect(e3)
end
function c72714461.cfilter(c)
return c:IsSetCard(0x98) or c:IsSetCard(0x9f)
end
function c72714461.pencon(e,tp,eg,ep,ev,re,r,rp)
local sc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return sc and (sc:IsSetCard(0x98) or sc:IsSetCard(0x9f))
return Duel.IsExistingMatchingCard(c72714461.cfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c72714461.penfilter(c)
return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) and not c:IsCode(72714461) and not c:IsForbidden()
......
......@@ -24,10 +24,13 @@ function c73130445.initial_effect(c)
e3:SetOperation(c73130445.drop)
c:RegisterEffect(e3)
end
function c73130445.desfilter(c)
return c:IsSetCard(0x9f) and not c:IsCode(73130445)
end
function c73130445.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and tc and tc:IsSetCard(0x9f) and not tc:IsCode(73130445) and e:GetHandler():IsDestructable() end
and Duel.IsExistingMatchingCard(c73130445.desfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
and e:GetHandler():IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c73130445.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -61,8 +61,7 @@ function c81571633.atkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c81571633.sccon(e)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or not tc:IsSetCard(0xaf)
return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0xaf)
end
function c81571633.filter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_DARK)
......
......@@ -45,8 +45,7 @@ function c88935103.initial_effect(c)
c:RegisterEffect(e6)
end
function c88935103.descon(e)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or not tc:IsSetCard(0x98)
return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0x98)
end
function c88935103.synlimit(e,c)
if not c then return false end
......
......@@ -30,8 +30,7 @@ function c91420254.initial_effect(c)
c:RegisterEffect(e4)
end
function c91420254.sccon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return tc and tc:IsSetCard(0xb3)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xb3)
end
function c91420254.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -27,13 +27,13 @@ function c92746535.initial_effect(c)
c:RegisterEffect(e5)
end
function c92746535.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c92746535.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function c92746535.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local sc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
local sc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,e:GetHandler())
if chk==0 then return Duel.IsExistingMatchingCard(c92746535.thfilter,tp,LOCATION_DECK,0,1,nil,sc:GetOriginalCode()) end
Duel.SetTargetCard(sc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sc,1,0,0)
......
......@@ -27,8 +27,7 @@ function c93149655.initial_effect(c)
c:RegisterEffect(e2)
end
function c93149655.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
if not tc or not tc:IsSetCard(0x99) then return end
if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x99) then return end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if d and a:GetControler()~=d:GetControler() then
......
......@@ -13,8 +13,7 @@ function c93662626.initial_effect(c)
c:RegisterEffect(e2)
end
function c93662626.thcon(e,tp,eg,ep,ev,re,r,rp)
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8)
end
function c93662626.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
......
......@@ -56,9 +56,11 @@ end
function c94415058.aclimit(e,re,tp)
return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c94415058.scfilter(c)
return c:IsSetCard(0x98) or c:IsSetCard(0x99)
end
function c94415058.sccon(e)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return not tc or (not tc:IsSetCard(0x98) and not tc:IsSetCard(0x99))
return not Duel.IsExistingMatchingCard(c94415058.scfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())
end
function c94415058.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
......
......@@ -54,8 +54,7 @@ function c96227613.ndcon(e)
return Duel.IsExistingMatchingCard(c96227613.ndcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function c96227613.thcon(e,tp,eg,ep,ev,re,r,rp)
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsCode(22211622)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_PZONE,0,1,e:GetHandler(),22211622)
end
function c96227613.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x46) and c:IsAbleToHand()
......
......@@ -13,8 +13,7 @@ function c96802306.initial_effect(c)
c:RegisterEffect(e2)
end
function c96802306.thcon(e,tp,eg,ep,ev,re,r,rp)
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8)
end
function c96802306.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
......
......@@ -13,8 +13,7 @@ function c97024987.initial_effect(c)
c:RegisterEffect(e2)
end
function c97024987.thcon(e,tp,eg,ep,ev,re,r,rp)
local pc=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,e:GetHandler()):GetFirst()
return pc and pc:IsSetCard(0xc8)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8)
end
function c97024987.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
......
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