Commit 7d8c6481 authored by wind2009's avatar wind2009

Merge branch 'master' from upstream

parents cac82502 24b09993
......@@ -69,7 +69,8 @@ function c10000010.setcon(e,c,minc)
return false
end
function c10000010.splimit(e,se,sp,st)
return Duel.IsPlayerAffectedByEffect(sp,41044418) and st&SUMMON_VALUE_MONSTER_REBORN>0
return Duel.IsPlayerAffectedByEffect(sp,41044418)
and (st&SUMMON_VALUE_MONSTER_REBORN>0 or se:GetHandler():IsCode(83764718))
and e:GetHandler():IsControler(sp) and e:GetHandler():IsLocation(LOCATION_GRAVE)
end
function c10000010.genchainlm(c)
......
......@@ -62,7 +62,7 @@ function c10000030.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c10000030.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetLabel()==0 then
if e:GetLabel()==0 then
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
......
......@@ -9,7 +9,7 @@ function c10040267.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c10040267.splimit)
e1:SetValue(aux.FossilFusionLimit)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
......@@ -37,9 +37,6 @@ end
function c10040267.matfilter(c,fc)
return c:IsRace(RACE_ROCK) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(fc:GetControler())
end
function c10040267.splimit(e,se,sp,st)
return se:GetHandler():IsCode(59419719) or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c10040267.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
......
......@@ -25,7 +25,7 @@ function c10286023.initial_effect(c)
c:RegisterEffect(e2)
end
function c10286023.drcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x140)
return e:GetHandler():IsSpecialSummonSetCard(0x140)
end
function c10286023.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -6,7 +6,7 @@ function c10920352.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
e1:SetValue(aux.MaskChangeLimit)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
......
......@@ -9,7 +9,7 @@ function c12015000.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c12015000.splimit)
e1:SetValue(aux.FossilFusionLimit)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
......@@ -31,9 +31,6 @@ end
function c12015000.matfilter(c,fc)
return c:IsFusionType(TYPE_MONSTER) and c:GetLevel()>0 and c:IsLevelBelow(4) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(1-fc:GetControler())
end
function c12015000.splimit(e,se,sp,st)
return se:GetHandler():IsCode(59419719) or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c12015000.thfilter(c)
return c:IsCode(59419719) and c:IsAbleToHand()
end
......
......@@ -18,7 +18,7 @@ function c12071500.filter1(c,e)
end
function c12071500.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c.dark_calling and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf)
and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_DARK_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c12071500.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
......@@ -70,7 +70,7 @@ function c12071500.activate(e,tp,eg,ep,ev,re,r,rp)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,SUMMON_VALUE_DARK_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
......
......@@ -46,7 +46,7 @@ function c12097275.atkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c12097275.atkcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0xfc)
return e:GetHandler():IsSpecialSummonSetCard(0xfc)
end
function c12097275.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
......
......@@ -9,7 +9,7 @@ function c13293158.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c13293158.splimit)
e1:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
......@@ -34,10 +34,6 @@ function c13293158.initial_effect(c)
end
c13293158.material_setcode=0x8
c13293158.dark_calling=true
function c13293158.splimit(e,se,sp,st)
return se:GetHandler():IsCode(94820406)
or Duel.IsPlayerAffectedByEffect(sp,72043279) and st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
end
function c13293158.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
......
......@@ -35,25 +35,27 @@ end
function c13735899.atkval(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_REMOVED,0)*-100
end
function c13735899.cfilter(c,e,rc)
return c:IsFaceup() and (c:GetOriginalRace()==rc:GetOriginalRace() or c==rc)
function c13735899.cfilter(c,e)
local typ,se=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_REASON_EFFECT)
local sc=se:GetHandler()
return typ&TYPE_MONSTER~=0 and se:IsActivated()
and c:IsFaceup() and (c:GetOriginalRace()==sc:GetOriginalRace() or c==sc)
and c:IsCanBeEffectTarget(e) and c:IsAbleToRemove()
end
function c13735899.remcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActivated() and re:IsActiveType(TYPE_MONSTER)
and eg:IsExists(c13735899.cfilter,1,nil,e,re:GetHandler())
return eg:IsExists(c13735899.cfilter,1,nil,e)
and not eg:IsContains(e:GetHandler())
end
function c13735899.rmfilter(c,tc)
return c:IsFaceup() and c:GetOriginalRace()==tc:GetOriginalRace()
end
function c13735899.remtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c13735899.cfilter(chkc,e,re:GetHandler()) end
if chkc then return eg:IsContains(chkc) and c13735899.cfilter(chkc,e) end
if chk==0 then return true end
local tc=eg:GetFirst()
if #eg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
tc=eg:FilterSelect(tp,c13735899.cfilter,1,1,nil,e,re:GetHandler()):GetFirst()
tc=eg:FilterSelect(tp,c13735899.cfilter,1,1,nil,e):GetFirst()
end
Duel.SetTargetCard(tc)
local g=Duel.GetMatchingGroup(c13735899.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tc)
......
......@@ -20,8 +20,8 @@ function c14154221.initial_effect(c)
c:RegisterEffect(e2)
end
function c14154221.cfilter(c)
local st=c:GetSummonType()
return st&SUMMON_VALUE_EVOLTILE>0
local typ=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)
return c:IsSummonType(SUMMON_VALUE_EVOLTILE) or (typ&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x304e))
end
function c14154221.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c14154221.cfilter,1,nil)
......
......@@ -32,7 +32,7 @@ function c14220547.initial_effect(c)
c:RegisterEffect(e3)
end
function c14220547.tcfilter(c,tp,re,rp)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and re and re:IsActivated() and re:IsActiveType(TYPE_SPELL) and rp==tp
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_SPELL~=0 and rp==tp
end
function c14220547.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==1 and eg:FilterCount(c14220547.tcfilter,nil,tp,re,rp)==1
......@@ -59,7 +59,7 @@ function c14220547.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c14220547.acfilter(c,tp,re,rp)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and re and re:IsActiveType(TYPE_SPELL) and rp==tp
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_SPELL~=0 and rp==tp
end
function c14220547.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==1 and eg:FilterCount(c14220547.acfilter,nil,tp,re,rp)==1
......
......@@ -75,6 +75,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
......@@ -51,7 +51,7 @@ function c16003979.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c16003979.filter(c,e,tp)
return not c:IsCode(16003979) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(16003979) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16003979.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
......@@ -64,7 +64,7 @@ function c16003979.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c16003979.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -52,7 +52,8 @@ function c18189187.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c18189187.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:IsActiveType(TYPE_MONSTER)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x131)
end
function c18189187.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
......
......@@ -27,7 +27,8 @@ function c1872843.initial_effect(c)
c:RegisterEffect(e2)
end
function c1872843.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x131)
end
function c1872843.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -77,7 +77,7 @@ function c2067935.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c2067935.filter(c,e,tp)
return not c:IsCode(2067935) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(2067935) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c2067935.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -90,7 +90,7 @@ function c2067935.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c2067935.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -17,7 +17,7 @@ function c20855340.condition(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():IsReason(REASON_DESTROY)
end
function c20855340.filter(c,e,tp)
return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_EVOLTILE,tp,false,false)
return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c20855340.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -30,6 +30,6 @@ function c20855340.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c20855340.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_EVOLTILE,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -13,7 +13,7 @@ function c21143940.initial_effect(c)
end
function c21143940.tfilter(c,att,e,tp,tc)
return c:IsSetCard(0xa008) and c:IsAttribute(att)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,true) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c21143940.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x8)
......@@ -39,7 +39,7 @@ function c21143940.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,c21143940.tfilter,tp,LOCATION_EXTRA,0,1,1,nil,att,e,tp,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(sg,0,tp,tp,false,true,POS_FACEUP)
sg:GetFirst():CompleteProcedure()
end
end
......@@ -9,7 +9,7 @@ function c21225115.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c21225115.splimit)
e1:SetValue(aux.FossilFusionLimit)
c:RegisterEffect(e1)
--switch stats
local e2=Effect.CreateEffect(c)
......@@ -36,9 +36,6 @@ end
function c21225115.matfilter(c,fc)
return c:IsFusionType(TYPE_MONSTER) and c:IsLevelAbove(7) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(1-fc:GetControler())
end
function c21225115.splimit(e,se,sp,st)
return se:GetHandler():IsCode(59419719) or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c21225115.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
......
......@@ -9,7 +9,7 @@ function c21947653.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c21947653.splimit)
e1:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
......@@ -25,10 +25,6 @@ function c21947653.initial_effect(c)
end
c21947653.material_setcode=0x8
c21947653.dark_calling=true
function c21947653.splimit(e,se,sp,st)
return se:GetHandler():IsCode(94820406)
or Duel.IsPlayerAffectedByEffect(sp,72043279) and st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
end
function c21947653.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -6,6 +6,7 @@ function c22093873.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.MaskChangeLimit)
c:RegisterEffect(e1)
--battle indestructable
local e2=Effect.CreateEffect(c)
......
......@@ -9,7 +9,7 @@ function c22160245.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c22160245.splimit)
e1:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
......@@ -30,10 +30,6 @@ function c22160245.initial_effect(c)
end
c22160245.material_setcode=0x8
c22160245.dark_calling=true
function c22160245.splimit(e,se,sp,st)
return se:GetHandler():IsCode(94820406)
or Duel.IsPlayerAffectedByEffect(sp,72043279) and st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
end
function c22160245.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
......
......@@ -56,7 +56,7 @@ function c22339232.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c22339232.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetLabel()==0 then
if e:GetLabel()==0 then
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
......
......@@ -51,11 +51,12 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.cfilter(c,tp,re)
return re and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) and c:IsSummonPlayer(1-tp)
function s.cfilter(c,tp)
local typ,se,sp=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_REASON_EFFECT,SUMMON_INFO_REASON_PLAYER)
return typ&TYPE_MONSTER~=0 and se:IsActivated() and sp==1-tp
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp,re)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.spfilter(c,e,tp,exc)
local b1=c:IsSetCard(0x145) and c:IsLocation(LOCATION_DECK)
......
......@@ -32,7 +32,7 @@ function c25924653.initial_effect(c)
e1:SetLabelObject(e3)
end
function c25924653.spgfilter(c,e,tp)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c25924653.spgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c25924653.spgfilter(chkc,e,tp) end
......@@ -45,7 +45,7 @@ end
function c25924653.spgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP) then
if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......@@ -82,7 +82,7 @@ function c25924653.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c25924653.filter(c,e,tp)
return not c:IsCode(25924653) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(25924653) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c25924653.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -95,7 +95,7 @@ function c25924653.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c25924653.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -51,7 +51,7 @@ function c2619149.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c2619149.filter(c,e,tp)
return not c:IsCode(2619149) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(2619149) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c2619149.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -64,7 +64,7 @@ function c2619149.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c2619149.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -78,6 +78,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
......@@ -59,8 +59,7 @@ function c27069566.spfilter(c,e,tp)
return c:IsSetCard(0x14e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c27069566.fselect(g)
return g:GetClassCount(Card.GetRace)==1
and g:GetClassCount(Card.GetAttribute)==1
return aux.SameValueCheck(g,Card.GetRace) and aux.SameValueCheck(g,Card.GetAttribute)
end
function c27069566.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -13,7 +13,8 @@ function c28194325.initial_effect(c)
c:RegisterEffect(e1)
end
function c28194325.condition(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x106f)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x106f)
end
function c28194325.filter(c)
return c:IsSetCard(0x106f) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
--ダイノルフィア・リヴァージョン
--not fully implemented
function c28292031.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
......@@ -29,7 +29,8 @@ function c28403802.initial_effect(c)
c:RegisterEffect(e2)
end
function c28403802.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) or re:GetHandler():IsSetCard(0x171)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) or c:IsSpecialSummonSetCard(0x171)
end
function c28403802.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) end
......
......@@ -33,7 +33,7 @@ function c28776350.initial_effect(c)
c:RegisterEffect(e3)
end
function c28776350.lcheck(g)
return g:GetClassCount(Card.GetLinkRace)==1
return aux.SameValueCheck(g,Card.GetLinkRace)
end
function c28776350.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
......
......@@ -11,7 +11,7 @@ function c28877602.initial_effect(c)
c:RegisterEffect(e2)
end
function c28877602.filter(c,e,tp)
return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_EVOLTILE,tp,false,false)
return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c28877602.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -23,6 +23,6 @@ function c28877602.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c28877602.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_VALUE_EVOLTILE,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -6,7 +6,7 @@ function c29095552.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
e1:SetValue(aux.MaskChangeLimit)
c:RegisterEffect(e1)
--destrroy & atkdown
local e2=Effect.CreateEffect(c)
......
......@@ -25,9 +25,9 @@ function c29146185.initial_effect(c)
c:RegisterEffect(e2)
end
function c29146185.retcon(e,tp,eg,ep,ev,re,r,rp)
if not re then return false end
local rc=re:GetHandler()
return rc:IsRace(RACE_SPELLCASTER) or (rc:IsSetCard(0x106e) and rc:IsType(TYPE_SPELL))
local c=e:GetHandler()
local typ,race=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_RACE)
return (typ&TYPE_MONSTER~=0 and race&RACE_SPELLCASTER~=0) or (typ&TYPE_SPELL~=0 and c:IsSpecialSummonSetCard(0x106e))
end
function c29146185.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==1 end
......
......@@ -108,9 +108,6 @@ end
function s.retfilter(c,fid)
return c:GetFlagEffectLabel(id)==fid
end
function s.retfilter1(c,tp,fid)
return c:GetFlagEffectLabel(id)==fid and c:IsPreviousControler(tp)
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
if not e:GetLabelObject():IsExists(s.retfilter,1,nil,e:GetLabel()) then
e:GetLabelObject():DeleteGroup()
......@@ -121,29 +118,20 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local fid=e:GetLabel()
local g1=e:GetLabelObject():Filter(s.retfilter1,nil,tp,fid)
local g2=e:GetLabelObject():Filter(s.retfilter1,nil,1-tp,fid)
local turnp=Duel.GetTurnPlayer()
if #g2==0 then
if #g1==1 then
Duel.ReturnToField(g1:GetFirst())
else
local tc=g1:Select(tp,1,1,nil):GetFirst()
Duel.ReturnToField(tc)
g1:RemoveCard(tc)
Duel.ReturnToField(g1:GetFirst())
local g=e:GetLabelObject():Filter(s.retfilter,nil,fid)
if #g<=0 then return end
Duel.Hint(HINT_CARD,0,id)
for p in aux.TurnPlayers() do
local tg=g:Filter(Card.IsPreviousControler,nil,p)
local ft=Duel.GetLocationCount(p,LOCATION_MZONE)
if #tg>1 and ft==1 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOFIELD)
local sg=tg:Select(p,1,1,nil)
Duel.ReturnToField(sg:GetFirst())
tg:Sub(sg)
end
else
if turnp==tp then
if #g1>0 then
Duel.ReturnToField(g1:GetFirst())
end
Duel.ReturnToField(g2:GetFirst())
else
Duel.ReturnToField(g2:GetFirst())
if #g1>0 then
Duel.ReturnToField(g1:GetFirst())
end
for tc in aux.Next(tg) do
Duel.ReturnToField(tc)
end
end
e:GetLabelObject():DeleteGroup()
......
......@@ -55,7 +55,7 @@ function c29357956.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
end
function c29357956.filter(c,e,tp)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29357956.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -74,10 +74,10 @@ function c29357956.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,2,2,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
tc=sg:GetNext()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
Duel.SpecialSummonComplete()
end
......
......@@ -26,7 +26,7 @@ function c30163008.initial_effect(c)
c:RegisterEffect(e2)
end
function c30163008.lcheck(g)
return g:GetClassCount(Card.GetLinkRace)==1
return aux.SameValueCheck(g,Card.GetLinkRace)
end
function c30163008.cfilter(c,e,tp,lg,zone)
return c:IsFaceup() and lg:IsContains(c)
......
......@@ -12,7 +12,9 @@ function c30494314.initial_effect(c)
c:RegisterEffect(e1)
end
function c30494314.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) and re:GetHandler():IsRace(RACE_ZOMBIE)
local c=e:GetHandler()
local typ,race=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_RACE)
return c:IsPreviousLocation(LOCATION_GRAVE) and typ&TYPE_MONSTER~=0 and race&RACE_ZOMBIE~=0
end
function c30494314.filter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsLevelAbove(0)
......
......@@ -41,9 +41,10 @@ function s.immtg(e,c)
end
function s.cfilter(c,tp)
return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsType(TYPE_XYZ)
and c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_SPELL~=0 and c:IsSpecialSummonSetCard(0x95)
end
function s.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x95) and re:IsActiveType(TYPE_SPELL) and eg:IsExists(s.cfilter,1,nil,tp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.tgfilter1(c,g,tp)
return g:IsContains(c) and Duel.IsExistingTarget(s.tgfilter2,tp,0,LOCATION_MZONE,1,c)
......
......@@ -48,7 +48,7 @@ function c30864377.splimit(e,se,sp,st)
end
function c30864377.espfilter(c,e,tp)
return c:IsSetCard(0x19) and c:IsType(TYPE_FUSION) and not c:IsCode(30864377)
and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c30864377.esptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30864377.espfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
......@@ -58,7 +58,7 @@ function c30864377.espop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c30864377.espfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_VALUE_GLADIATOR,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
function c30864377.spcfilter(c,ft)
......@@ -74,7 +74,7 @@ function c30864377.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c30864377.spfilter(c,e,tp)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c30864377.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30864377.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
......@@ -86,7 +86,7 @@ function c30864377.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c30864377.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
Duel.SpecialSummonComplete()
end
......
......@@ -24,7 +24,8 @@ function c30929786.initial_effect(c)
c:RegisterEffect(e2)
end
function c30929786.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x79) and re:GetHandler():IsType(TYPE_MONSTER)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x79)
end
function c30929786.thfilter(c)
return c:IsSetCard(0x79) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
......@@ -32,7 +32,7 @@ function c31247589.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c31247589.filter(c,e,tp)
return not c:IsCode(31247589) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR+2,tp,false,false)
return not c:IsCode(31247589) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c31247589.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -45,7 +45,7 @@ function c31247589.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c31247589.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR+2,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
--三眼の死霊
function c31464658.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31464658,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
......@@ -10,7 +10,7 @@ function c31464658.initial_effect(c)
e1:SetCost(c31464658.cost)
e1:SetTarget(c31464658.target)
e1:SetOperation(c31464658.operation)
c:RegisterEffect(e1)
c:RegisterEffect(e1)
end
function c31464658.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -34,7 +34,7 @@ function c3283679.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c3283679.spfilter(c,e,tp)
return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_EVOLTILE,tp,false,false)
return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c3283679.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -46,6 +46,6 @@ function c3283679.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c3283679.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_VALUE_EVOLTILE,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -75,7 +75,7 @@ function c33652635.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
end
function c33652635.filter(c,e,tp)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33652635.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
......@@ -88,7 +88,7 @@ function c33652635.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c33652635.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -10,8 +10,8 @@ function c34026662.initial_effect(c)
c:RegisterEffect(e1)
end
function c34026662.filter(c)
local st=c:GetSummonType()
return c:IsFaceup() and st&SUMMON_VALUE_EVOLTILE>0
local typ=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)
return c:IsFaceup() and c:IsSummonType(SUMMON_VALUE_EVOLTILE) or (typ&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x304e))
end
function c34026662.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c34026662.filter(chkc) end
......
......@@ -65,7 +65,8 @@ function c34822850.filter(c,lv)
return c:IsFaceup() and c:IsSetCard(0xbb) and c:GetLevel()>lv
end
function c34822850.atlimit(e,c)
return c:IsFaceup() and c:IsSetCard(0xbb) and (c:GetLevel()<1 or Duel.IsExistingMatchingCard(c34822850.filter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel()))
return c:IsFaceup() and c:IsSetCard(0xbb)
and (not c:IsHasLevel() or Duel.IsExistingMatchingCard(c34822850.filter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel()))
end
function c34822850.tglimit(e,c)
return c:IsSetCard(0xbb)
......
......@@ -56,9 +56,10 @@ function c37119142.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c37119142.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,check)
if e:GetLabel()==0 then
e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
else
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
end
end
function c37119142.thop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -20,8 +20,10 @@ function c37675138.initial_effect(c)
c:RegisterEffect(e2)
end
function c37675138.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetOwner():IsRace(RACE_ZOMBIE) and e:GetHandler():IsSummonLocation(LOCATION_GRAVE)
and e:GetHandler():IsPreviousControler(tp)
local c=e:GetHandler()
local typ,race=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_RACE)
return c:IsPreviousLocation(LOCATION_GRAVE) and e:GetHandler():IsPreviousControler(tp)
and typ&TYPE_MONSTER~=0 and race&RACE_ZOMBIE~=0
end
function c37675138.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
......@@ -46,7 +46,7 @@ function c3779662.espcon(e,tp,eg,ep,ev,re,r,rp)
end
function c3779662.espfilter(c,e,tp)
return c:IsSetCard(0x19) and c:IsType(TYPE_FUSION) and c:IsLevelBelow(7)
and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c3779662.esptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c3779662.espfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
......@@ -56,7 +56,7 @@ function c3779662.espop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c3779662.espfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_VALUE_GLADIATOR,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
function c3779662.spcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -68,7 +68,7 @@ function c3779662.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
end
function c3779662.spfilter(c,e,tp)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c3779662.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -87,10 +87,10 @@ function c3779662.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,2,2,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
tc=sg:GetNext()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
Duel.SpecialSummonComplete()
end
......
......@@ -29,7 +29,8 @@ function c38267552.initial_effect(c)
c:RegisterEffect(e2)
end
function c38267552.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x131)
end
function c38267552.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
......
......@@ -65,7 +65,7 @@ function c40005099.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c40005099.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetLabel()==0 then
if e:GetLabel()==0 then
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -25,12 +25,12 @@ function c40607210.initial_effect(c)
c:RegisterEffect(e2)
end
function c40607210.cfilter(c,tp)
local typ,race=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_RACE)
return c:IsLevelAbove(5) and c:IsRace(RACE_ZOMBIE) and c:IsControler(tp)
and typ&TYPE_MONSTER~=0 and race&RACE_ZOMBIE~=0
end
function c40607210.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rc and rc:IsRace(RACE_ZOMBIE) and eg:IsExists(c40607210.cfilter,1,nil,tp)
and (re:GetCode()~=EFFECT_SPSUMMON_PROC or not rc:IsHasEffect(EFFECT_REVIVE_LIMIT))
return eg:IsExists(c40607210.cfilter,1,nil,tp)
end
function c40607210.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
......
......@@ -96,7 +96,8 @@ function c41044418.rbop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,41044418,RESET_PHASE+PHASE_END,0,1)
end
function c41044418.regfilter(c)
return c:IsCode(10000010) and c:GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_MONSTER_REBORN
local code,code2=c:GetSpecialSummonInfo(SUMMON_INFO_CODE,SUMMON_INFO_CODE2)
return c:IsCode(10000010) and (c:GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_MONSTER_REBORN or code==83764718 or code2==83764718)
end
function c41044418.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c41044418.regfilter,1,nil)
......
......@@ -44,7 +44,7 @@ function c41091257.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c41091257.descon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0xee)
return e:GetHandler():IsSpecialSummonSetCard(0xee)
end
function c41091257.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
......
......@@ -49,7 +49,7 @@ function c41470137.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c41470137.filter(c,e,tp)
return not c:IsCode(41470137) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(41470137) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c41470137.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -62,7 +62,7 @@ function c41470137.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c41470137.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -32,7 +32,7 @@ function c4253484.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c4253484.filter(c,e,tp)
return not c:IsCode(4253484) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR+1,tp,false,false)
return not c:IsCode(4253484) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c4253484.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -45,7 +45,7 @@ function c4253484.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c4253484.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR+1,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -30,10 +30,10 @@ function c42592719.initial_effect(c)
c:RegisterEffect(e3)
end
function c42592719.splimit(e,se,sp,st)
return st==(SUMMON_TYPE_SPECIAL+SUMMON_VALUE_GLADIATOR+2) or bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
return se:GetHandler():IsCode(31247589) or bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c42592719.imcon(e)
return e:GetHandler():GetFlagEffect(42592719)>0
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c42592719.imfilter(e,te)
return te:IsActiveType(TYPE_SPELL)
......@@ -47,7 +47,7 @@ function c42592719.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c42592719.filter(c,e,tp)
return not c:IsCode(42592719) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(42592719) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c42592719.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -60,7 +60,7 @@ function c42592719.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c42592719.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -61,7 +61,6 @@ function c42925441.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(42925441)==0 end
e:GetHandler():RegisterFlagEffect(42925441,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
--option 1
function c42925441.costfilter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x55,0x7b) and Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c42925441.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp,c)
......@@ -70,14 +69,12 @@ function c42925441.spfilter1(c,e,tp,cc)
return c:IsSetCard(0x55) and c:IsType(TYPE_MONSTER) and not c:IsOriginalCodeRule(cc:GetOriginalCodeRule())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
--option 2
function c42925441.costfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x55,0x7b) and c:IsAbleToGraveAsCost()
end
function c42925441.thfilter(c)
return c:IsSetCard(0x55) and not c:IsCode(42925441) and c:IsAbleToHand()
end
--option both
function c42925441.costfilter3(c,e,tp)
return c:IsFaceup() and c:IsCode(93717133) and Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c42925441.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c)
......
......@@ -24,8 +24,6 @@ function s.initial_effect(c)
e2:SetOperation(s.daop)
c:RegisterEffect(e2)
end
--special summon
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and Duel.GetAttacker():IsControler(1-tp)
end
......@@ -53,8 +51,6 @@ end
function s.skipop(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
--damage
function s.dacon(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp then return false end
return r&REASON_EFFECT>0 and rp==1-tp
......
......@@ -26,7 +26,6 @@ function c43378048.initial_effect(c)
e3:SetValue(c43378048.atkval)
c:RegisterEffect(e3)
end
function c43378048.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
......
......@@ -20,7 +20,8 @@ function c44451698.initial_effect(c)
c:RegisterEffect(e2)
end
function c44451698.spcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsRace(RACE_PLANT)
local typ,race=e:GetHandler():GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_RACE)
return typ&TYPE_MONSTER~=0 and race&RACE_PLANT~=0
end
function c44451698.filter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsLevelAbove(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
......@@ -18,7 +18,7 @@ function c45286019.counterfilter(c)
return c:IsSetCard(0x72)
end
function c45286019.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x72)
return e:GetHandler():IsSpecialSummonSetCard(0x72)
end
function c45286019.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(45286019,tp,ACTIVITY_SPSUMMON)==0 end
......
......@@ -26,7 +26,8 @@ function c45960523.initial_effect(c)
c:RegisterEffect(e2)
end
function c45960523.rmcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x105)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x105)
end
function c45960523.rmfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove() and c:IsFaceup()
......
......@@ -53,6 +53,9 @@ function c46898368.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,lk)
end
function c46898368.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local d=tc:GetLink()
Duel.Draw(p,d,REASON_EFFECT)
end
......@@ -31,7 +31,7 @@ function c46935289.initial_effect(c)
c:RegisterEffect(e2)
end
function c46935289.lcheck(g,lc)
return g:GetClassCount(Card.GetLinkAttribute)==1 and g:GetClassCount(Card.GetLinkRace)==1
return aux.SameValueCheck(g,Card.GetLinkAttribute) and aux.SameValueCheck(g,Card.GetLinkRace)
end
function c46935289.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
......
......@@ -98,5 +98,6 @@ function c4779091.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c4779091.filter),tp,0x13,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
g:GetFirst():CompleteProcedure()
end
end
......@@ -25,7 +25,7 @@ function c47897376.initial_effect(c)
c:RegisterEffect(e2)
end
function c47897376.dtcon1(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x140)
return e:GetHandler():IsSpecialSummonSetCard(0x140)
end
function c47897376.dtfilter(c)
return c:IsSetCard(0x140) and c:IsAbleToDeck()
......
......@@ -64,7 +64,7 @@ function c48156348.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
end
function c48156348.filter(c,e,tp)
return not c:IsCode(41470137) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(41470137) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c48156348.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -83,10 +83,10 @@ function c48156348.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,2,2,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
tc=sg:GetNext()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
Duel.SpecialSummonComplete()
end
......
......@@ -29,7 +29,8 @@ function c49389190.initial_effect(c)
c:RegisterEffect(e2)
end
function c49389190.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x131)
end
function c49389190.thfilter(c)
return c:IsSetCard(0x131) and not c:IsCode(49389190) and c:IsAbleToHand()
......
......@@ -9,7 +9,7 @@ function c50282757.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c50282757.splimit)
e1:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
......@@ -35,10 +35,6 @@ function c50282757.initial_effect(c)
end
c50282757.material_setcode=0x8
c50282757.dark_calling=true
function c50282757.splimit(e,se,sp,st)
return se:GetHandler():IsCode(94820406)
or Duel.IsPlayerAffectedByEffect(sp,72043279) and st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
end
function c50282757.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) and Duel.GetTurnPlayer()==tp
end
......
......@@ -6,6 +6,7 @@ function c50608164.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.MaskChangeLimit)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
......
......@@ -48,10 +48,12 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsSummonType(SUMMON_VALUE_NOUVELLEZ)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER==0 or not c:IsSpecialSummonSetCard(0x196)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_VALUE_NOUVELLEZ)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x196)
end
function s.relfilter(c)
return c:IsReleasableByEffect() and c:IsAttackPos()
......@@ -76,7 +78,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
end
......@@ -61,7 +61,7 @@ function c52502677.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c52502677.filter(c,e,tp)
return not c:IsCode(52502677) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(52502677) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c52502677.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
......@@ -74,7 +74,7 @@ function c52502677.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c52502677.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -74,6 +74,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
......@@ -47,4 +47,3 @@ function c53936268.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
......@@ -16,7 +16,7 @@ function c55488859.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c55488859.filter(c,e,tp)
return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_EVOLTILE,tp,false,false)
return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c55488859.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c55488859.filter(chkc,e,tp) end
......@@ -29,6 +29,6 @@ end
function c55488859.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,SUMMON_VALUE_EVOLTILE,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -85,7 +85,7 @@ function c56518311.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c56518311.rmcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0xe1)
return e:GetHandler():IsSpecialSummonSetCard(0xe1)
end
function c56518311.rmfilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
......
......@@ -9,7 +9,7 @@ function c57157964.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c57157964.splimit)
e1:SetValue(aux.FossilFusionLimit)
c:RegisterEffect(e1)
--extra attack
local e2=Effect.CreateEffect(c)
......@@ -43,9 +43,6 @@ end
function c57157964.matfilter(c,fc)
return c:IsRace(RACE_ROCK) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(fc:GetControler())
end
function c57157964.splimit(e,se,sp,st)
return se:GetHandler():IsCode(59419719) or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c57157964.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
......
......@@ -49,7 +49,7 @@ function c57731460.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c57731460.filter(c,e,tp)
return not c:IsCode(57731460) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(57731460) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c57731460.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -62,7 +62,7 @@ function c57731460.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c57731460.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -33,7 +33,7 @@ function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c581014.filter1,tp,LOCATION_GRAVE,0,3,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c581014.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c581014.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
......@@ -58,7 +58,7 @@ function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function c581014.operation1(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
if e:GetLabel()==0 then
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
......
......@@ -6,7 +6,7 @@ function c58147549.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
e1:SetValue(aux.MaskChangeLimit)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
......
......@@ -9,7 +9,7 @@ function c58332301.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetValue(c58332301.splimit)
e2:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
......@@ -28,10 +28,6 @@ function c58332301.initial_effect(c)
c:RegisterEffect(e3)
end
c58332301.dark_calling=true
function c58332301.splimit(e,se,sp,st)
return se:GetHandler():IsCode(94820406)
or Duel.IsPlayerAffectedByEffect(sp,72043279) and st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
end
function c58332301.matcheck(e,c)
local g=c:GetMaterial()
local s=0
......
......@@ -6,6 +6,7 @@ function c58481572.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.MaskChangeLimit)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
......
......@@ -9,7 +9,7 @@ function c59531356.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c59531356.splimit)
e1:SetValue(aux.FossilFusionLimit)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
......@@ -40,9 +40,6 @@ end
function c59531356.matfilter(c)
return c:IsLevel(5,6)
end
function c59531356.splimit(e,se,sp,st)
return se:GetHandler():IsCode(59419719) or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c59531356.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and c:IsChainAttackable()
......
......@@ -6,6 +6,7 @@ function c59642500.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.MaskChangeLimit)
c:RegisterEffect(e1)
--direct attack
local e2=Effect.CreateEffect(c)
......
......@@ -49,7 +49,7 @@ function c5975022.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c5975022.filter(c,e,tp)
return not c:IsCode(5975022) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(5975022) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c5975022.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -62,7 +62,7 @@ function c5975022.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c5975022.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -46,7 +46,7 @@ function c612115.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c612115.filter(c,e,tp)
return not c:IsCode(612115) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(612115) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c612115.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -59,7 +59,7 @@ function c612115.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c612115.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -31,7 +31,7 @@ function c61641818.mfilter(c,xyzc)
return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,3)
end
function c61641818.xyzcheck(g)
return g:GetClassCount(Card.GetRace)==1 and g:GetClassCount(Card.GetAttribute)==1
return aux.SameValueCheck(g,Card.GetRace) and aux.SameValueCheck(g,Card.GetAttribute)
end
function c61641818.etcon(e)
return e:GetHandler():GetOverlayCount()~=0
......
......@@ -27,7 +27,7 @@ function c61665245.initial_effect(c)
c:RegisterEffect(e2)
end
function c61665245.lcheck(g)
return g:GetClassCount(Card.GetLinkRace)==1
return aux.SameValueCheck(g,Card.GetLinkRace)
end
function c61665245.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
......
......@@ -14,7 +14,8 @@ function c61677004.initial_effect(c)
c:RegisterEffect(e1)
end
function c61677004.thcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x10f3)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x10f3)
end
function c61677004.thfilter(c)
return c:IsSetCard(0x46) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
......
......@@ -53,7 +53,7 @@ function c62000467.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
end
function c62000467.spfilter(c,e,tp)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c62000467.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -73,10 +73,10 @@ function c62000467.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
local tc=sg1:GetFirst()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
tc=sg1:GetNext()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
Duel.SpecialSummonComplete()
end
......
......@@ -29,7 +29,8 @@ function c62393472.initial_effect(c)
c:RegisterEffect(e2)
end
function c62393472.spcon1(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:IsActiveType(TYPE_MONSTER)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x131)
end
function c62393472.spfilter1(c,e,tp)
return c:IsSetCard(0x131) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(62393472)
......
......@@ -6,7 +6,7 @@ function c62624486.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
e1:SetValue(aux.MaskChangeLimit)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
......
......@@ -51,7 +51,8 @@ function c62694833.setop1(e,tp,eg,ep,ev,re,r,rp)
end
end
function c62694833.setcon2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x79) and re:GetHandler():IsType(TYPE_MONSTER)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x79)
end
function c62694833.setfilter3(c,tp)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
......
......@@ -26,7 +26,7 @@ end
function c64245689.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64245689.spfilter(chkc,e,tp) end
local b1=Duel.IsExistingMatchingCard(c64245689.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c64245689.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c64245689.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
......
......@@ -27,7 +27,8 @@ function c6552938.initial_effect(c)
c:RegisterEffect(e3)
end
function c6552938.damcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0xba) and e:GetHandler():IsPreviousLocation(LOCATION_HAND)
local c=e:GetHandler()
return c:IsSpecialSummonSetCard(0xba) and c:IsPreviousLocation(LOCATION_HAND)
end
function c6552938.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -14,7 +14,8 @@ function c65961085.initial_effect(c)
c:RegisterEffect(e1)
end
function c65961085.retcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsRace(RACE_SPELLCASTER)
local typ,race=e:GetHandler():GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_RACE)
return typ&TYPE_MONSTER~=0 and race&RACE_SPELLCASTER~=0
end
function c65961085.filter(c)
return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and c:IsAbleToDeck()
......
......@@ -14,7 +14,7 @@ function c65984457.initial_effect(c)
c:RegisterEffect(e1)
end
function c65984457.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(65984457)>0 and e:GetHandler():GetBattledGroupCount()>0
return aux.gbspcon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():GetBattledGroupCount()>0
end
function c65984457.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -26,7 +26,8 @@ function c66809920.initial_effect(c)
c:RegisterEffect(e2)
end
function c66809920.thcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsType(TYPE_SPELL) and e:GetHandler():IsPreviousLocation(LOCATION_HAND)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_SPELL~=0 and c:IsPreviousLocation(LOCATION_HAND)
end
function c66809920.thfilter(c)
return c:IsCode(92182447) and c:IsAbleToHand()
......
......@@ -42,12 +42,12 @@ end
function c67385964.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false) end
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67385964.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)~=0 then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local a=Duel.GetAttacker()
if a:IsAttackable() and not a:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
......@@ -84,7 +84,7 @@ function c67385964.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c67385964.filter(c,e,tp)
return not c:IsCode(67385964) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(67385964) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67385964.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -97,7 +97,7 @@ function c67385964.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c67385964.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -59,11 +59,12 @@ function c67517351.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c67517351.cfilter(c,e)
local typ,rk=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_RANK)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCanBeEffectTarget(e)
and typ&TYPE_XYZ~=0 and rk>=10 and c:IsSpecialSummonSetCard(0x7f)
end
function c67517351.matcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rc and re:IsActivated() and rc:IsType(TYPE_XYZ) and rc:IsRankAbove(10) and rc:IsSetCard(0x7f) and eg:IsExists(c67517351.cfilter,1,nil,e)
return eg:IsExists(c67517351.cfilter,1,nil,e)
end
function c67517351.tgfilter(c,eg)
return eg:IsContains(c) and c:IsFaceup() and c:IsType(TYPE_XYZ)
......
......@@ -63,5 +63,6 @@ function c71002019.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c71002019.thcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE)&RACE_PLANT~=0
local typ,race=e:GetHandler():GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_RACE)
return typ&TYPE_MONSTER~=0 and race&RACE_PLANT~=0
end
......@@ -6,7 +6,7 @@ function c71628381.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71628381,0))
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetRange(LOCATION_MZONE)
......@@ -34,11 +34,11 @@ function c71628381.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
local mg=c:GetMaterial()
local ct=mg:GetCount()
local sumtype=c:GetSummonType()
if Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and bit.band(sumtype,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
if Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA)
and c:IsSummonType(SUMMON_TYPE_FUSION)
and ct>0 and ct<=Duel.GetLocationCount(tp,LOCATION_MZONE)
and mg:FilterCount(aux.NecroValleyFilter(c71628381.mgfilter),nil,e,tp,c,mg)==ct
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and (not Duel.IsPlayerAffectedByEffect(tp,59822133) or ct==1)
and Duel.SelectYesNo(tp,aux.Stringid(71628381,1)) then
Duel.BreakEffect()
Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -39,7 +39,8 @@ function c71645242.initial_effect(c)
end
end
function c71645242.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:GetSummonType()~=SUMMON_TYPE_SPECIAL+SUMMON_VALUE_BLACK_GARDEN
local code,code2=c:GetSpecialSummonInfo(SUMMON_INFO_CODE,SUMMON_INFO_CODE2)
return c:IsFaceup() and c:IsControler(tp) and code~=71645242 and code2~=71645242
end
function c71645242.regcon(e,tp,eg,ep,ev,re,r,rp)
local sf=0
......@@ -83,12 +84,12 @@ function c71645242.spop(e,tp,eg,ep,ev,re,r,rp)
if bit.extract(ev,tp)~=0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,TYPES_TOKEN_MONSTER,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) then
local token=Duel.CreateToken(tp,71645243)
Duel.SpecialSummonStep(token,SUMMON_VALUE_BLACK_GARDEN,tp,1-tp,false,false,POS_FACEUP_ATTACK)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
end
if bit.extract(ev,1-tp)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(1-tp,71645243,0,TYPES_TOKEN_MONSTER,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) then
local token=Duel.CreateToken(1-tp,71645243)
Duel.SpecialSummonStep(token,SUMMON_VALUE_BLACK_GARDEN,1-tp,tp,false,false,POS_FACEUP_ATTACK)
Duel.SpecialSummonStep(token,0,1-tp,tp,false,false,POS_FACEUP_ATTACK)
end
Duel.SpecialSummonComplete()
end
......@@ -120,7 +121,7 @@ function c71645242.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.Destroy(dg,REASON_EFFECT)==dg:GetCount() then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,SUMMON_VALUE_BLACK_GARDEN,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
......@@ -51,7 +51,7 @@ function c71870152.lvop(e,tp,eg,ep,ev,re,r,rp)
end
function c71870152.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsFaceup() and c:IsAttackPos() and re and re:GetHandler():IsSetCard(0x31)
return c:IsFaceup() and c:IsAttackPos() and c:IsSpecialSummonSetCard(0x31)
end
function c71870152.filter(c)
return c:IsFaceup()
......
......@@ -20,7 +20,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
end
function s.filter(c,tp)
return c:IsSummonLocation(LOCATION_GRAVE) and c:IsSummonPlayer(tp)
return c:IsSummonLocation(LOCATION_GRAVE) and c:IsSummonPlayer(tp) and c:GetOriginalType()&TYPE_MONSTER~=0
end
function s.lpcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.filter,1,nil,tp)
......
......@@ -26,7 +26,8 @@ function c72355272.initial_effect(c)
c:RegisterEffect(e2)
end
function c72355272.rmcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x105)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x105)
end
function c72355272.rmfilter(c)
return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
......
......@@ -43,7 +43,8 @@ function c74298287.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c74298287.spcon2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x74)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x74)
end
function c74298287.spfilter(c,e,tp)
return c:IsSetCard(0x74) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -25,7 +25,7 @@ function c74891384.initial_effect(c)
c:RegisterEffect(e2)
end
function c74891384.dtcon1(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x140)
return e:GetHandler():IsSpecialSummonSetCard(0x140)
end
function c74891384.dtfilter(c)
return c:IsRace(RACE_ROCK) and c:IsAbleToDeck()
......
......@@ -24,7 +24,7 @@ function c7573135.initial_effect(c)
c:RegisterEffect(e2)
end
function c7573135.hspfilter(c,e,tp)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c7573135.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -37,7 +37,7 @@ function c7573135.hspop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c7573135.hspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(7573135,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
......@@ -73,7 +73,7 @@ function c7573135.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c7573135.filter(c,e,tp)
return c:IsSetCard(0x19) and not c:IsCode(7573135) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return c:IsSetCard(0x19) and not c:IsCode(7573135) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c7573135.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -86,7 +86,7 @@ function c7573135.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c7573135.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -29,7 +29,8 @@ function c75888208.initial_effect(c)
c:RegisterEffect(e2)
end
function c75888208.spcon1(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x131)
end
function c75888208.spfilter1(c,e,tp)
return c:IsSetCard(0x131) and not c:IsCode(75888208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -34,7 +34,7 @@ function c7623640.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c7623640.hdcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x6)
return e:GetHandler():IsSpecialSummonSetCard(0x6)
end
function c7623640.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -18,7 +18,7 @@ function c77642288.spcon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():GetBattledGroupCount()>0
end
function c77642288.filter(c,e,tp)
return not c:IsCode(77642288) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(77642288) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c77642288.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -32,7 +32,7 @@ function c77642288.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c77642288.filter,tp,LOCATION_DECK,0,2,2,nil,e,tp)
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
tc=g:GetNext()
end
......
......@@ -27,7 +27,7 @@ function c78348934.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and c:IsCanBeEffectTarget(e)
end
function c78348934.fselect(g)
return g:GetClassCount(Card.GetRace)==1
return aux.SameValueCheck(g,Card.GetRace)
end
function c78348934.filter3(c)
return c:IsFaceup() and c:IsSetCard(0xd6,0xd7)
......
......@@ -96,6 +96,6 @@ function c78371393.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c78371393.filter),tp,0x13,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
Duel.ShuffleDeck(tp)
g:GetFirst():CompleteProcedure()
end
end
......@@ -32,8 +32,8 @@ function c78637313.initial_effect(c)
c:RegisterEffect(e4)
end
function c78637313.filter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:GetReasonEffect()
and c:GetReasonEffect():GetHandler():IsCode(83764718)
local code,code2=c:GetSpecialSummonInfo(SUMMON_INFO_CODE,SUMMON_INFO_CODE2)
return c:GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_MONSTER_REBORN or code==83764718 or code2==83764718
end
function c78637313.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
......
......@@ -32,7 +32,7 @@ function c78868776.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c78868776.filter(c,e,tp)
return not c:IsCode(78868776) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(78868776) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c78868776.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -45,7 +45,7 @@ function c78868776.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c78868776.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -16,8 +16,7 @@ function c79266769.initial_effect(c)
c:RegisterEffect(e1)
end
function c79266769.spcheck(g)
return g:GetClassCount(Card.GetLinkRace)==1
and g:GetClassCount(Card.GetLinkAttribute)==1
return aux.SameValueCheck(g,Card.GetLinkRace) and aux.SameValueCheck(g,Card.GetLinkAttribute)
end
function c79266769.filter(c,e,tp,zone)
return (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone)
......
......@@ -30,7 +30,7 @@ function c79580323.initial_effect(c)
c:RegisterEffect(e3)
end
function c79580323.splimit(e,se,sp,st)
return st==(SUMMON_TYPE_SPECIAL+SUMMON_VALUE_GLADIATOR+1) or bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
return se:GetHandler():IsCode(4253484) or bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c79580323.sfilter(c)
return c:IsSetCard(0x19) and c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
......@@ -56,7 +56,7 @@ function c79580323.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c79580323.filter(c,e,tp)
return not c:IsCode(79580323) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(79580323) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c79580323.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -69,7 +69,7 @@ function c79580323.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c79580323.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
--バーニング・ドラゴン
function c8085950.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
......@@ -9,7 +9,7 @@ function c8085950.initial_effect(c)
e1:SetCondition(c8085950.spcon)
e1:SetTarget(c8085950.sptg)
e1:SetOperation(c8085950.spop)
c:RegisterEffect(e1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
......
......@@ -10,7 +10,7 @@ function c81873903.initial_effect(c)
c:RegisterEffect(e1)
end
function c81873903.filter(c,e,tp)
return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_EVOLTILE,tp,false,false)
return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c81873903.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -21,6 +21,6 @@ function c81873903.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c81873903.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_VALUE_EVOLTILE,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -48,7 +48,6 @@ function c82913020.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--Modified from Nemeses Flag
function c82913020.srfilter(c)
return c:IsSetCard(0x53) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......@@ -64,7 +63,6 @@ function c82913020.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
--Modified from Gagaga Magician and Supreme King Dragon Clear Wing
function c82913020.mcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
......
......@@ -9,7 +9,7 @@ function c83656563.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c83656563.splimit)
e1:SetValue(aux.FossilFusionLimit)
c:RegisterEffect(e1)
--extra attack
local e2=Effect.CreateEffect(c)
......@@ -49,9 +49,6 @@ end
function c83656563.matfilter2(c,fc)
return c:IsLevel(5,6)
end
function c83656563.splimit(e,se,sp,st)
return se:GetHandler():IsCode(59419719) or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c83656563.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
......
......@@ -11,7 +11,7 @@ function c83764718.initial_effect(c)
c:RegisterEffect(e1)
end
function c83764718.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_MONSTER_REBORN,tp,false,false)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c83764718.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c83764718.filter(chkc,e,tp) end
......@@ -24,6 +24,6 @@ end
function c83764718.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,SUMMON_VALUE_MONSTER_REBORN,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -11,7 +11,7 @@ function c84536654.initial_effect(c)
c:RegisterEffect(e1)
end
function c84536654.spfilter(c,code,lv,e,tp,mc)
return c:IsLevel(lv) and c:IsSetCard(0xa008) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
return c:IsLevel(lv) and c:IsSetCard(0xa008) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_MASK_CHANGE,tp,false,true)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c84536654.filter(c,e,tp)
......@@ -36,7 +36,7 @@ function c84536654.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c84536654.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,code,lv,e,tp,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(g,SUMMON_VALUE_MASK_CHANGE,tp,tp,false,true,POS_FACEUP)
g:GetFirst():CompleteProcedure()
end
end
......@@ -30,7 +30,7 @@ function c85808813.filter(c,e,tp)
end
function c85808813.ffilter(c,lv,e,tp,tc)
return c:IsSetCard(0x149) and c:IsType(TYPE_FUSION) and c:GetOriginalLevel()==lv+2
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_FOSSIL_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c85808813.chkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x149) and c:IsType(TYPE_FUSION)
......@@ -53,7 +53,7 @@ function c85808813.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,c85808813.ffilter,tp,LOCATION_EXTRA,0,1,1,nil,lv,e,tp,nil)
if sg:GetCount()>0 then
sg:GetFirst():SetMaterial(nil)
Duel.SpecialSummon(sg,SUMMON_TYPE_FUSION,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(sg,SUMMON_VALUE_FOSSIL_FUSION,tp,tp,false,false,POS_FACEUP)
sg:GetFirst():CompleteProcedure()
end
end
......
......@@ -9,7 +9,7 @@ function c86165817.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c86165817.splimit)
e1:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
......@@ -34,10 +34,6 @@ function c86165817.initial_effect(c)
end
c86165817.material_setcode=0x8
c86165817.dark_calling=true
function c86165817.splimit(e,se,sp,st)
return se:GetHandler():IsCode(94820406)
or Duel.IsPlayerAffectedByEffect(sp,72043279) and st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
end
function c86165817.matfilter(c)
return c:IsLevelAbove(5) and c:IsFusionType(TYPE_MONSTER)
end
......
......@@ -23,7 +23,8 @@ function c8632967.chainlm(e,rp,tp)
return tp==rp
end
function c8632967.sucfilter(c)
return c:IsSummonType(SUMMON_VALUE_EVOLTILE)
local typ=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)
return c:IsSummonType(SUMMON_VALUE_EVOLTILE) or (typ&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x304e))
end
function c8632967.sucop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c8632967.sucfilter,1,nil) and Duel.GetCurrentChain()==1 then
......
......@@ -45,7 +45,7 @@ function c86489182.initial_effect(c)
end
function c86489182.valcheck(e,c)
local g=c:GetMaterial()
if g:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WIND)==g:GetCount() then
if g:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WIND)==#g and #g>0 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
......
......@@ -9,7 +9,7 @@ function c86520461.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c86520461.splimit)
e1:SetValue(aux.FossilFusionLimit)
c:RegisterEffect(e1)
--extra attack
local e2=Effect.CreateEffect(c)
......@@ -34,9 +34,6 @@ end
function c86520461.matfilter(c)
return c:GetLevel()>0 and c:IsLevelBelow(4)
end
function c86520461.splimit(e,se,sp,st)
return se:GetHandler():IsCode(59419719) or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c86520461.thfilter(c)
return c:IsCode(85808813) and c:IsAbleToHand()
end
......
......@@ -9,7 +9,7 @@ function c86676862.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetValue(c86676862.splimit)
e2:SetValue(aux.DarkFusionLimit)
c:RegisterEffect(e2)
--Pos Change
local e3=Effect.CreateEffect(c)
......@@ -35,10 +35,6 @@ function c86676862.initial_effect(c)
end
c86676862.material_setcode=0x8
c86676862.dark_calling=true
function c86676862.splimit(e,se,sp,st)
return se:GetHandler():IsCode(94820406)
or Duel.IsPlayerAffectedByEffect(sp,72043279) and st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
end
function c86676862.ffilter(c)
return c:IsRace(RACE_FIEND) and c:IsLevelAbove(6)
end
......
......@@ -40,7 +40,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function s.descfilter(c)
return c:IsFaceup() and c:IsSetCard(0x196) and c:GetType()&0x81==0x81 and c:IsSummonType(SUMMON_VALUE_NOUVELLEZ)
return c:IsFaceup() and c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x196)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
......
......@@ -16,7 +16,7 @@ function c88095331.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c88095331.filter(c,e,tp)
return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_EVOLTILE,tp,false,false)
return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c88095331.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -28,6 +28,6 @@ function c88095331.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c88095331.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_VALUE_EVOLTILE,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -33,7 +33,7 @@ function c88332693.filter1(c,e,tp)
and Duel.IsExistingMatchingCard(c88332693.filter2,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode())
end
function c88332693.filter2(c,e,tp,tcode)
return c:IsSetCard(0x104f) and c.assault_name==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
return c:IsSetCard(0x104f) and c.assault_name==tcode and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_ASSAULT_MODE,tp,false,true)
end
function c88332693.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -51,7 +51,7 @@ function c88332693.activate(e,tp,eg,ep,ev,re,r,rp)
local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c88332693.filter2,tp,LOCATION_HAND,0,1,1,nil,e,tp,code):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 then
if tc and Duel.SpecialSummon(tc,SUMMON_VALUE_ASSAULT_MODE,tp,tp,false,true,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
......
......@@ -29,7 +29,9 @@ function s.initial_effect(c)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
e:SetLabel(e:GetHandler():GetSummonType()&SUMMON_VALUE_NOUVELLEZ)
local c=e:GetHandler()
local res=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x196) and 1 or 0
e:SetLabel(res)
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
......@@ -79,7 +81,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
end
......@@ -42,13 +42,13 @@ function c88996322.hspcon(e,tp,eg,ep,ev,re,r,rp)
end
function c88996322.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c88996322.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
c:RegisterFlagEffect(c:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
function c88996322.spcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -60,7 +60,7 @@ function c88996322.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c88996322.filter(c,e,tp)
return not c:IsCode(88996322) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(88996322) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c88996322.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
......@@ -73,7 +73,7 @@ function c88996322.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c88996322.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end
end
......@@ -72,6 +72,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
......@@ -35,7 +35,7 @@ function s.initial_effect(c)
c:RegisterEffect(e4)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_EVOLTILE,tp,false,false,POS_FACEDOWN_DEFENSE)
return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,SUMMON_VALUE_EVOLTILE,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
Duel.ConfirmCards(1-tp,g)
end
end
......
......@@ -6,6 +6,7 @@ function c89870349.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(aux.MaskChangeLimit)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
......
......@@ -73,7 +73,7 @@ function c90957527.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
end
function c90957527.filter(c,e,tp)
return not c:IsCode(79580323) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,false,false)
return not c:IsCode(79580323) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c90957527.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -92,10 +92,10 @@ function c90957527.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,2,2,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
tc=sg:GetNext()
Duel.SpecialSummonStep(tc,SUMMON_VALUE_GLADIATOR,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
Duel.SpecialSummonComplete()
end
......
......@@ -98,7 +98,8 @@ function c92332424.efftg(e,c)
return c:IsSetCard(0xc7)
end
function c92332424.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or (re and re:GetHandler():IsSetCard(0xc7))
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_PENDULUM) or c:IsSpecialSummonSetCard(0xc7)
end
function c92332424.thfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
......
......@@ -23,7 +23,7 @@ function c93600443.filter(c,e,tp)
and Duel.IsExistingMatchingCard(c93600443.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv,att,c)
end
function c93600443.spfilter(c,e,tp,lv,att,mc)
return c:IsSetCard(0xa008) and c:GetLevel()>lv and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
return c:IsSetCard(0xa008) and c:GetLevel()>lv and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_MASK_CHANGE,tp,false,true)
and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c93600443.chkfilter(c,tc)
......@@ -50,7 +50,7 @@ function c93600443.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c93600443.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv,att,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(g,SUMMON_VALUE_MASK_CHANGE,tp,tp,false,true,POS_FACEUP)
g:GetFirst():CompleteProcedure()
end
end
......@@ -92,10 +92,10 @@ function c95034141.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c95034141.alfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsFaceup()
return c:IsRace(RACE_ZOMBIE) and c:IsFaceup() and c:GetSpecialSummonInfo(SUMMON_INFO_REASON_EFFECT)
end
function c95034141.alcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c95034141.alfilter,1,nil) and aux.IsSpecialSummonedByEffect(re)
return eg:IsExists(c95034141.alfilter,1,nil)
end
function c95034141.cfilter(c)
return c:IsFacedown() and c:GetSequence()<5
......
......@@ -18,7 +18,6 @@ function c95286165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c95286165.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c95286165.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,nil,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
end
function c95286165.mgfilter(c,e,tp,fusc,mg)
......
......@@ -79,12 +79,13 @@ end
function c95886782.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c95886782.cfilter(c,tp)
return c:IsSummonPlayer(1-tp)
function c95886782.cfilter(c,e,tp)
local se,sp=c:GetSpecialSummonInfo(SUMMON_INFO_REASON_EFFECT,SUMMON_INFO_REASON_PLAYER)
return sp==1-tp and se:IsActivated() and e:GetOwnerPlayer()==1-se:GetOwnerPlayer()
end
function c95886782.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget() and re and re:IsActivated() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()
and eg:IsExists(c95886782.cfilter,1,nil,tp)
return e:GetHandler():GetEquipTarget()
and eg:IsExists(c95886782.cfilter,1,nil,e,tp)
end
function c95886782.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -20,7 +20,8 @@ end
c96015976.toss_dice=true
function c96015976.filter(c)
local lv=c:GetLevel()
return c:IsFaceup() and lv~=0 and lv~=c:GetOriginalLevel()
local olv=c:GetOriginalLevel()
return c:IsFaceup() and lv~=0 and lv~=olv and olv~=0
end
function c96015976.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c96015976.filter(chkc) end
......
......@@ -9,7 +9,7 @@ function c96897184.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c96897184.splimit)
e1:SetValue(aux.FossilFusionLimit)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
......@@ -40,9 +40,6 @@ end
function c96897184.matfilter(c)
return c:IsLevelAbove(7) and c:IsFusionType(TYPE_MONSTER)
end
function c96897184.splimit(e,se,sp,st)
return se:GetHandler():IsCode(59419719) or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c96897184.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
......
......@@ -13,7 +13,8 @@ function c97317530.initial_effect(c)
c:RegisterEffect(e1)
end
function c97317530.descon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_BEAST)
local typ,race=e:GetHandler():GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_RACE)
return typ&TYPE_MONSTER~=0 and race&RACE_BEAST~=0
end
function c97317530.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
......
......@@ -39,12 +39,9 @@ function c98095162.initial_effect(c)
e3:SetOperation(c98095162.thop)
c:RegisterEffect(e3)
end
function c98095162.attfilter(c,att)
return c:GetLinkAttribute()&att==0
end
function c98095162.lcheck(g)
local tc=g:GetFirst()
return not g:IsExists(c98095162.attfilter,1,tc,tc:GetLinkAttribute()) and g:GetClassCount(Card.GetLinkRace)==#g
return aux.SameValueCheck(g,Card.GetLinkAttribute) and g:GetClassCount(Card.GetLinkRace)==#g
end
function c98095162.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
......
......@@ -4,8 +4,6 @@ function c99064191.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c99064191.target1)
e1:SetOperation(c99064191.activate1)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
......
......@@ -27,7 +27,8 @@ function c99792080.initial_effect(c)
c:RegisterEffect(e2)
end
function c99792080.dircon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:IsActiveType(TYPE_MONSTER) and aux.bpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x131) and aux.bpcon(e,tp,eg,ep,ev,re,r,rp)
end
function c99792080.dirop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -148,14 +148,16 @@ SUMMON_TYPE_PENDULUM =0x4a000000 --灵摆召唤
SUMMON_TYPE_LINK =0x4c000000 --连接召唤
--Summon Value --特定的召唤方式
SUMMON_VALUE_SELF =0x1 --自身效果或条件
SUMMON_VALUE_BLACK_GARDEN =0x10 --黑色花园
SUMMON_VALUE_SYNCHRO_MATERIAL =0x11 --特殊召唤并作为同调素材(黑羽-东云之东风检查)
SUMMON_VALUE_DARK_SANCTUARY =0x12 --暗黑圣域
SUMMON_VALUE_MONSTER_REBORN =0x13 --死者苏生(千年的启示)
SUMMON_VALUE_MASK_CHANGE =0x14 --
SUMMON_VALUE_ASSAULT_MODE =0x15 --
SUMMON_VALUE_LV =0x1000 --对应LV怪兽的效果
SUMMON_VALUE_GLADIATOR =0x2000 --剑斗兽
SUMMON_VALUE_EVOLTILE =0x4000 --进化虫
SUMMON_VALUE_NOUVELLEZ =0x8000 --新式魔厨
SUMMON_VALUE_DARK_FUSION =0x43000016 --
SUMMON_VALUE_FOSSIL_FUSION =0x43000017 --
--Status --卡片当前状态
STATUS_DISABLED =0x0001 --效果被无效
STATUS_TO_ENABLE =0x0002 --将变成有效
......
......@@ -2001,5 +2001,20 @@ function Auxiliary.linklimit(e,se,sp,st)
end
--sp_summon condition for /Assault Mode
function Auxiliary.AssaultModeLimit(e,se,sp,st)
return se:GetHandler():IsCode(80280737)
return st==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_ASSAULT_MODE or se:GetHandler():IsCode(80280737)
end
--sp_summon condition for Masked HERO
function Auxiliary.MaskChangeLimit(e,se,sp,st)
return st==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_MASK_CHANGE or se:GetHandler():IsCode(21143940)
end
--sp_summon condition for Evil HERO
function Auxiliary.DarkFusionLimit(e,se,sp,st)
return se:GetHandler():IsCode(94820406)
or st==SUMMON_VALUE_DARK_FUSION
or (Duel.IsPlayerAffectedByEffect(sp,72043279) and st&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION)
end
--sp_summon condition for Fossil
function Auxiliary.FossilFusionLimit(e,se,sp,st)
return st==SUMMON_VALUE_FOSSIL_FUSION or se:GetHandler():IsCode(59419719)
or not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
......@@ -757,13 +757,15 @@ function Auxiliary.qlifilter(e,te)
end
--sp_summon condition for gladiator beast monsters
function Auxiliary.gbspcon(e,tp,eg,ep,ev,re,r,rp)
local st=e:GetHandler():GetSummonType()
return st&SUMMON_VALUE_GLADIATOR>0
local c=e:GetHandler()
local typ=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)
return c:IsSummonType(SUMMON_VALUE_GLADIATOR) or (typ&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x19))
end
--sp_summon condition for evolsaur monsters
function Auxiliary.evospcon(e,tp,eg,ep,ev,re,r,rp)
local st=e:GetHandler():GetSummonType()
return st&SUMMON_VALUE_EVOLTILE>0
local c=e:GetHandler()
local typ=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE)
return c:IsSummonType(SUMMON_VALUE_EVOLTILE) or (typ&TYPE_MONSTER~=0 and c:IsSpecialSummonSetCard(0x304e))
end
--filter for necro_valley test
function Auxiliary.NecroValleyFilter(f)
......@@ -1279,9 +1281,6 @@ end
function Auxiliary.ExtraReleaseFilter(c,tp)
return c:IsControler(1-tp) and c:IsHasEffect(EFFECT_EXTRA_RELEASE_NONSUM,tp)
end
function Auxiliary.IsSpecialSummonedByEffect(e)
return not ((e:GetCode()==EFFECT_SPSUMMON_PROC or e:GetCode()==EFFECT_SPSUMMON_PROC_G) and e:GetProperty()&(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)==(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE))
end
--
function Auxiliary.GetCappedLevel(c)
local lv=c:GetLevel()
......@@ -1485,10 +1484,18 @@ function Auxiliary.SameValueFilter(f,value)
end
---Check if all cards in g have the same Attribute/Race
---@param g Group
---@param f function
---@param f function Like Card.GetAttribute, must return binary value
---@return boolean
function Auxiliary.SameValueCheck(g,f)
if #g<=1 then return true end
if #g==2 then return f(g:GetFirst())&f(g:GetNext())~=0 end
local tc=g:GetFirst()
local filter=Auxiliary.SameValueFilter(f,f(tc))
return not g:IsExists(filter,1,tc)
local v=f(tc)
tc=g:GetNext()
while tc do
v=v&f(tc)
if v==0 then return false end
tc=g:GetNext()
end
return v~=0
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