Commit 607e625c authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:purerosefallen/ygopro-222DIY-cards

parents e6355cfd fd4d2614
......@@ -935,16 +935,29 @@ end
rsef.QO_OPPONENT_TURN=rsef.RegisterOPTurn
--Effect: Register Condition, Cost, Target and Operation
function rsef.RegisterSolve(e,con,cost,tg,op)
local code=e:GetOwner():GetCode()
if con then
if type(con)~="function" then
Debug.Message(code .. " RegisterSolve con must be function")
end
e:SetCondition(con)
end
if cost then
if type(cost)~="function" then
Debug.Message(code .. " RegisterSolve cost must be function")
end
e:SetCost(cost)
end
if tg then
if type(tg)~="function" then
Debug.Message(code .. " RegisterSolve tg must be function")
end
e:SetTarget(tg)
end
if op then
if type(op)~="function" then
Debug.Message(code .. " RegisterSolve op must be function")
end
e:SetOperation(op)
end
end
......@@ -1975,7 +1988,7 @@ function rscost.lpcost2(lp,max,islabel)
if chk==0 then return Duel.CheckLPCost(tp,lp) end
local costmaxlp=math.floor(maxlp/lp)
local t={}
for i=1,m do
for i=1,costmaxlp do
t[i]=i*lp
end
local cost=Duel.AnnounceNumber(tp,table.unpack(t))
......@@ -2450,10 +2463,17 @@ function rscf.SetSpecialSummonProduce(cardtbl,range,con,op,desctbl,ctlimittbl,re
local tc1,tc2,ignore=rsef.GetRegisterCard(cardtbl)
if not desctbl then desctbl=rshint.spproc end
local flag=not tc2:IsSummonableCard() and "uc,cd" or "uc"
local e1=rsef.Register(cardtbl,EFFECT_TYPE_FIELD,EFFECT_SPSUMMON_PROC,desctbl,ctlimittbl,nil,flag,range,con,nil,nil,op,nil,nil,nil,resettbl)
local e1=rsef.Register(cardtbl,EFFECT_TYPE_FIELD,EFFECT_SPSUMMON_PROC,desctbl,ctlimittbl,nil,flag,range,rscf.SetSpecialSummonProduce_con(con),nil,nil,op,nil,nil,nil,resettbl)
return e1
end
rssf.SetSpecialSummonProduce=rscf.SetSpecialSummonProduce
function rscf.SetSpecialSummonProduce_con(con)
return function(e,c)
if c==nil then return true end
local tp=c:GetControler()
return con(e,c,tp)
end
end
--Card/Summon effect: Is monster can normal or special summon
function rscf.SetSummonCondition(cardtbl,isnsable,sumvalue,iseffectspsum,resettbl)
local tc1,tc2,ignore=rsef.GetRegisterCard(cardtbl)
......@@ -2809,6 +2829,7 @@ function rsef.ChangeFunction_Synchro()
end
function rscf.SynMixCheckGoal2(tp,sg,minc,ct,syncard,sg1,smat,gc)
local g=rsgf.Mix2(sg,sg1)
if syncard.rssyncheckfun and not syncard.rssyncheckfun(g,syncard,tp) then return false end
local f=Card.GetLevel
local f2=Card.GetSynchroLevel
local darktunerg=g:Filter(Card.IsType,nil,TYPE_TUNER)
......@@ -2883,6 +2904,15 @@ function rscf.AddSynchroMixProcedure_ChangeTunerLevel(c,f1,lv,f2,f3,f4,minc,maxc
return e1
end
rssf.AddSynchroMixProcedure_ChangeTunerLevel=rscf.AddSynchroMixProcedure_ChangeTunerLevel
function rscf.AddSynchroMixProcedure_CheckMaterial(c,f1,f2,f3,f4,minc,maxc,extrafilter)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end
local mt=getmetatable(c)
mt.rssyncheckfun=extrafilter
rsef.ChangeFunction_Synchro()
local e1=rscf.AddSynchroMixProcedure(c,f1,f2,f3,f4,minc,maxc)
return e1
end
rssf.AddSynchroMixProcedure_CheckMaterial=rscf.AddSynchroMixProcedure_CheckMaterial
--Card effect: Set field info
function rscf.SetFieldInfo(c)
local seq=c:IsOnField() and c:GetSequence() or c:GetPreviousSequence()
......@@ -3193,6 +3223,8 @@ function cm.initial_effect(c)
"rsan" = "Arknights"
"rsnm" = "Nightmare"
"rsdt" = "DarkTale"
"rseee" = "EEE"
"rshr" = "HarmonicRhythm"
}--]]
end
end
\ No newline at end of file
--地上的月兔 铃仙·优昙华院·因幡
function c11200018.initial_effect(c)
--
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200018,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,11200018)
e1:SetTarget(c11200018.tg1)
e1:SetOperation(c11200018.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetLabelObject(e1)
e2:SetCountLimit(1,11200118)
e2:SetTarget(c11200018.tg2)
e2:SetOperation(c11200018.op2)
c:RegisterEffect(e2)
--
end
--
function c11200018.tfilter1(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,8,rc)
else return false end
end
function c11200018.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c)
local ft=Duel.GetMZoneCount(tp)
if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,8,c)
else
return mg:IsExists(c11200018.tfilter1,1,nil,tp,mg,c)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
--
function c11200018.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetMZoneCount(tp)
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,8,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c11200018.tfilter1,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,8,tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
e:SetLabel(mat:GetCount())
if not tc:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
--
function c11200018.tfilter2(c,e,tp)
return c:IsSetCard(0x132) and c:IsType(TYPE_SPELL)
and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x132,0x21,1100,1100,4,RACE_BEAST,ATTRIBUTE_LIGHT)
end
function c11200018.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rcount=e:GetLabelObject():GetLabel()
if chk==0 then
if not e:GetLabelObject() then return false end
if not e:GetLabelObject():GetLabel() then return false end
if e:GetLabelObject():GetLabel()<1 then return false end
return true
end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200018.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rcount=e:GetLabelObject():GetLabel()
local dc1,dc2,dc3,dc4,dc5,dc6=Duel.TossDice(tp,rcount)
local dc=0
if dc1 and dc1>0 then dc=dc+dc1 end
if dc2 and dc2>0 then dc=dc+dc2 end
if dc3 and dc3>0 then dc=dc+dc3 end
if dc4 and dc4>0 then dc=dc+dc4 end
if dc5 and dc5>0 then dc=dc+dc5 end
if dc6 and dc6>0 then dc=dc+dc6 end
if dc%2==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(dc*450)
c:RegisterEffect(e1)
local e2_2=Effect.CreateEffect(c)
e2_2:SetType(EFFECT_TYPE_SINGLE)
e2_2:SetCode(EFFECT_IMMUNE_EFFECT)
e2_2:SetValue(c11200018.efilter2_2)
e2_2:SetOwnerPlayer(tp)
e2_2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e2_2)
end
if dc==4 then Duel.Damage(tp,1100,REASON_EFFECT) end
if dc%2==0 then
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c11200018.tfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
local tc=sg:GetFirst()
tc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_BEAST,4,1100,1100)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
--
function c11200018.efilter2_2(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--铃仙·优昙华院·因幡
function c11200019.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200019,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DICE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11200019)
e1:SetCost(c11200019.cost1)
e1:SetTarget(c11200019.tg1)
e1:SetOperation(c11200019.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200019,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11200119)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c11200019.tg2)
e2:SetOperation(c11200019.op2)
c:RegisterEffect(e2)
--
end
--
function c11200019.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
end
--
function c11200019.tfilter1(c)
return (c:IsCode(24094653)
or (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)))
and c:IsAbleToHand()
end
function c11200019.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200019.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=Duel.TossDice(tp,1)
if dc>0 and dc<4 then
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
if dc==4 then Duel.Damage(tp,1100,REASON_EFFECT) end
if dc>4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c11200019.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()<1 then return end
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--
function c11200019.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
--
function c11200019.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1_1:SetValue(1)
e1_1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1_1)
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1_2:SetValue(1)
e1_2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1_2)
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_SINGLE)
e1_3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1_3:SetValue(1)
e1_3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1_3)
local e1_4=Effect.CreateEffect(c)
e1_4:SetType(EFFECT_TYPE_SINGLE)
e1_4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1_4:SetValue(1)
e1_4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1_4)
local e1_5=Effect.CreateEffect(c)
e1_5:SetType(EFFECT_TYPE_SINGLE)
e1_5:SetCode(EFFECT_MUST_ATTACK)
e1_5:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1_5)
end
--
--月上的逃兵 铃仙·优昙华院·因幡
function c11200020.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DICE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11200020)
e1:SetCost(c11200020.cost1)
e1:SetTarget(c11200020.tg1)
e1:SetOperation(c11200020.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200020,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCondition(c11200020.con2)
e2:SetCost(c11200020.cost2)
e2:SetOperation(c11200020.op2)
c:RegisterEffect(e2)
--
end
--
function c11200020.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
end
--
function c11200020.tfilter1(c,e,tp)
return c:IsSetCard(0x132) and c:IsType(TYPE_SPELL) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x132,0x21,1100,1100,4,RACE_BEAST,ATTRIBUTE_LIGHT)
end
function c11200020.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200020.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=Duel.TossDice(tp,1)
if dc>0 and dc<4 then
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
if dc==4 then Duel.Damage(tp,1100,REASON_EFFECT) end
if dc>4 then
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c11200020.tfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
local tc=sg:GetFirst()
tc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_BEAST,4,1100,1100)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
tc:AddMonsterAttributeComplete()
Duel.SpecialSummonComplete()
end
end
--
function c11200020.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
--
function c11200020.cfilter2(c)
return c:IsAbleToRemoveAsCost()
and c:IsType(TYPE_SPELL) and c:IsSetCard(0x132)
end
function c11200020.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable()
and Duel.IsExistingMatchingCard(c11200020.cfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,c11200020.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
Duel.Release(c,REASON_COST)
end
--
function c11200020.op2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateAttack() then return end
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
--
--兔·兔
function c11200022.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c11200022.FusFilter,2,true)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DAMAGE+CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11200022)
e1:SetCondition(c11200022.con1)
e1:SetTarget(c11200022.tg1)
e1:SetOperation(c11200022.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TOSS_DICE_NEGATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c11200022.con2)
e2:SetOperation(c11200022.op2)
c:RegisterEffect(e2)
--
end
--
function c11200022.FusFilter(c)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
--
function c11200022.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetSummonType()==SUMMON_TYPE_FUSION
and c:GetMaterialCount()>0
end
--
function c11200022.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200022.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=Duel.TossDice(tp,1)
if dc>0 and dc<4 then
local num=dc*300
if c:IsFacedown() then return end
if not c:IsRelateToEffect(e) then return end
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_UPDATE_ATTACK)
e1_1:SetValue(num)
e1_1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1_1)
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local sc=sg:GetFirst()
while sc do
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_UPDATE_ATTACK)
e1_2:SetValue(-num)
e1_2:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e1_2)
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_SINGLE)
e1_3:SetCode(EFFECT_UPDATE_DEFENSE)
e1_3:SetValue(-num)
e1_3:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e1_3)
sc=sg:GetNext()
end
Duel.Damage(1-tp,num,REASON_EFFECT)
end
if dc==4 then Duel.Damage(tp,1100,REASON_EFFECT) end
if dc>4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if sg:GetCount()<1 then return end
Duel.Destroy(sg,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(tp,c11200022.ofilter2,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()<1 then return end
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--
function c11200022.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetSummonType()==SUMMON_TYPE_FUSION
and c:GetFlagEffect(11200022)==0
end
function c11200022.op2(e,tp,eg,ep,ev,re,r,rp)
local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
if c11200022[0]~=cid and Duel.SelectYesNo(tp,aux.Stringid(11200022,1)) then
Duel.Hint(HINT_CARD,0,11200022)
e:GetHandler():RegisterFlagEffect(11200022,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local dc={Duel.GetDiceResult()}
local ac=1
local ct=bit.band(ev,0xff)+bit.rshift(ev,16)
if ct>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11200022,2))
local val,idx=Duel.AnnounceNumber(tp,table.unpack(dc,1,ct))
ac=idx+1
end
dc[ac]=7
Duel.SetDiceResult(table.unpack(dc))
c11200022[0]=cid
end
end
--『月面弹跳』
function c11200024.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200024)
e1:SetTarget(c11200024.tg1)
e1:SetOperation(c11200024.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11200124)
e2:SetCondition(aux.exccon)
e2:SetCost(c11200024.cost2)
e2:SetTarget(c11200024.tg2)
e2:SetOperation(c11200024.op2)
c:RegisterEffect(e2)
--
end
--
function c11200024.tfilter1(c)
return c:IsCode(11200019)
or (c:IsSetCard(0x132) and c:IsAbleToHand())
end
function c11200024.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200024.tfilter1,tp,LOCATION_DECK,0,1,nil) end
end
--
function c11200024.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c11200024.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()<1 then return end
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
--
function c11200024.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
--
function c11200024.tfilter2(c,e,tp)
return c:IsSetCard(0x132) and c:IsType(TYPE_SPELL) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x132,0x21,1100,1100,4,RACE_BEAST,ATTRIBUTE_LIGHT)
end
function c11200024.tg2(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 Duel.IsExistingMatchingCard(c11200024.tfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND)
end
--
function c11200024.op2(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 sg=Duel.SelectMatchingCard(tp,c11200024.tfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
local sc=sg:GetFirst()
sc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_BEAST,4,1100,1100)
Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummonComplete()
Duel.Draw(tp,1,REASON_EFFECT)
end
--
--『地上弹跳』
function c11200025.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200025)
e1:SetCost(c11200025.cost1)
e1:SetTarget(c11200025.tg1)
e1:SetOperation(c11200025.op1)
c:RegisterEffect(e1)
--
if not c11200025.check then
c11200025.check=true
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetOperation(c11200025.op2)
Duel.RegisterEffect(e2,0)
end
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,11200125)
e3:SetCost(c11200025.cost3)
e3:SetTarget(c11200025.tg3)
e3:SetOperation(c11200025.op3)
c:RegisterEffect(e3)
--
end
--
function c11200025.cfilter1(c)
return c:IsRace(RACE_BEAST) and c:IsReleasable()
end
function c11200025.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200025.cfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectMatchingCard(tp,c11200025.cfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil)
Duel.Release(sg,REASON_EFFECT)
end
--
function c11200025.tfilter1(c)
return c:IsAbleToHand() and c:IsSetCard(0x132)
end
function c11200025.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200025.tfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
--
function c11200025.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c11200025.tfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
if Duel.GetFlagEffect(tp,11200025)>0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x132,0x21,1100,1100,4,RACE_BEAST,ATTRIBUTE_LIGHT) then return end
if Duel.SelectYesNo(tp,aux.Stringid(11200025,0)) then
c:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_BEAST,4,1100,1100)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:AddMonsterAttributeComplete()
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1_1:SetValue(1)
e1_1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1_1,true)
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetReset(RESET_EVENT+0x1fe0000)
e1_2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1_2,true)
Duel.SpecialSummonComplete()
end
end
--
function c11200025.op2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not re:IsActiveType(TYPE_MONSTER) then return end
Duel.RegisterFlagEffect(rc:GetControler(),11200025,RESET_PHASE+PHASE_END,0,1)
end
--
function c11200025.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToHandAsCost,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_COST)
end
--
function c11200025.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
--
function c11200025.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
--
--『幻胧月睨』
function c11200026.initial_effect(c)
--
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EQUIP_LIMIT)
e0:SetValue(1)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200026+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c11200026.tg1)
e1:SetOperation(c11200026.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_SET_CONTROL)
e4:SetCondition(c11200026.con4)
e4:SetValue(c11200026.val4)
c:RegisterEffect(e4)
--
if not c11200026.global_check then
c11200026.global_check=true
local e5=Effect.GlobalEffect()
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAINING)
e5:SetOperation(c11200026.op5)
Duel.RegisterEffect(e5,0)
end
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_EQUIP)
e6:SetRange(LOCATION_SZONE)
e6:SetOperation(c11200026.op6)
c:RegisterEffect(e6)
--
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_EQUIP)
e7:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e7:SetValue(ATTRIBUTE_LIGHT)
c:RegisterEffect(e7)
--
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_EQUIP)
e8:SetCode(EFFECT_CHANGE_RACE)
e8:SetValue(RACE_BEAST)
c:RegisterEffect(e8)
--
end
--
function c11200026.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
--
function c11200026.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--
function c11200026.con4(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(e:GetHandler():GetControler(),11200026)<1
end
--
function c11200026.val4(e,c)
return e:GetHandlerPlayer()
end
--
function c11200026.op5(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not re:IsActiveType(TYPE_MONSTER) then return end
Duel.RegisterFlagEffect(rc:GetControler(),11200026,RESET_PHASE+PHASE_END,0,1)
end
--
function c11200026.op6(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if eg:GetFirst()~=c then return end
local tc=c:GetEquipTarget()
if not tc then return end
local e6_1=Effect.CreateEffect(c)
e6_1:SetType(EFFECT_TYPE_SINGLE)
e6_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6_1:SetCode(EFFECT_CHANGE_CODE)
e6_1:SetRange(LOCATION_MZONE)
e6_1:SetLabelObject(c)
e6_1:SetValue(11200019)
e6_1:SetCondition(c11200026.con6_1)
tc:RegisterEffect(e6_1)
local e6_2=Effect.CreateEffect(c)
e6_2:SetType(EFFECT_TYPE_SINGLE)
e6_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6_2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e6_2:SetValue(1)
e6_2:SetLabelObject(c)
e6_2:SetCondition(c11200026.con6_2)
tc:RegisterEffect(e6_2)
local e6_3=Effect.CreateEffect(c)
e6_3:SetType(EFFECT_TYPE_SINGLE)
e6_3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6_3:SetCode(11200026)
e6_3:SetRange(LOCATION_MZONE)
e6_3:SetLabelObject(c)
e6_3:SetCondition(c11200026.con6_2)
c:RegisterEffect(e6_3)
end
--
function c11200026.con6_1(e)
local c=e:GetHandler()
local g=c:GetEquipGroup()
if g:IsContains(e:GetLabelObject()) then
return not e:GetLabelObject():IsDisabled()
else return false end
end
--
function c11200026.con6_2(e)
local c=e:GetHandler()
local g=c:GetEquipGroup()
local p=e:GetLabelObject():GetControler()
if g:IsContains(e:GetLabelObject()) then
return c:IsControler(p) and c:GetOwner()~=p
and not e:GetLabelObject():IsDisabled()
else return false end
end
--
--乌冬
function c11200027.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200027+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c11200027.tg1)
e1:SetOperation(c11200027.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200027,0))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER+CATEGORY_DICE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,11200027)
e2:SetCost(c11200027.cost2)
e2:SetOperation(c11200027.op2)
c:RegisterEffect(e2)
--
end
--
function c11200027.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(700)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,700)
end
--
function c11200027.op1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--
function c11200027.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
--
function c11200027.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=Duel.TossDice(tp,1)
if dc>0 and dc<5 then
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_1:SetProperty(EFFECT_FLAG_DELAY)
e2_1:SetCode(EVENT_SPSUMMON_SUCCESS)
e2_1:SetCondition(c11200027.con2_1)
e2_1:SetOperation(c11200027.op2_1)
e2_1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_1,tp)
local e2_2=Effect.CreateEffect(c)
e2_2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2_2:SetCondition(c11200027.con2_2)
e2_2:SetOperation(c11200027.op2_2)
e2_2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_2,tp)
local e2_3=Effect.CreateEffect(c)
e2_3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_3:SetCode(EVENT_CHAIN_SOLVED)
e2_3:SetCondition(c11200027.con2_3)
e2_3:SetOperation(c11200027.op2_3)
e2_3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_3,tp)
end
if dc>4 then
local e2_4=Effect.CreateEffect(c)
e2_4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_4:SetProperty(EFFECT_FLAG_DELAY)
e2_4:SetCode(EVENT_SPSUMMON_SUCCESS)
e2_4:SetCondition(c11200027.con2_4)
e2_4:SetOperation(c11200027.op2_4)
e2_4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_4,tp)
local e2_5=Effect.CreateEffect(c)
e2_5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_5:SetCode(EVENT_SPSUMMON_SUCCESS)
e2_5:SetCondition(c11200027.con2_5)
e2_5:SetOperation(c11200027.op2_5)
e2_5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_5,tp)
local e2_6=Effect.CreateEffect(c)
e2_6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_6:SetCode(EVENT_CHAIN_SOLVED)
e2_6:SetCondition(c11200027.con2_6)
e2_6:SetOperation(c11200027.op2_6)
e2_6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_6,tp)
end
end
--
function c11200027.cfilter2_1(c,sp)
return c:GetSummonPlayer()==sp
end
function c11200027.con2_1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11200027.cfilter2_1,1,nil,1-tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function c11200027.op2_1(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,700,REASON_EFFECT)
end
--
function c11200027.con2_2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11200027.cfilter2_1,1,nil,1-tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function c11200027.op2_2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,11200027,RESET_CHAIN,0,1)
end
--
function c11200027.con2_3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,11200027)>0
end
function c11200027.op2_3(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,11200027)
Duel.ResetFlagEffect(tp,11200027)
Duel.Recover(tp,n*700,REASON_EFFECT)
end
--
function c11200027.con2_4(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11200027.cfilter2_1,1,nil,1-tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function c11200027.op2_4(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,11200028)>=3 then return end
Duel.Draw(tp,1,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,11200028,RESET_PHASE+PHASE_END,0,1)
end
--
function c11200027.con2_5(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11200027.cfilter2_1,1,nil,1-tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function c11200027.op2_5(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,11200029,RESET_CHAIN,0,1)
end
--
function c11200027.con2_6(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,11200029)>0
end
function c11200027.op2_6(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,11200029)
local num=Duel.GetFlagEffect(tp,11200028)
if n>3-num then n=3-num end
Duel.ResetFlagEffect(tp,11200029)
if n>0 then Duel.Draw(tp,1,REASON_EFFECT) end
while n>0 do
Duel.RegisterFlagEffect(tp,11200028,RESET_PHASE+PHASE_END,0,1)
n=n-1
end
end
--
--幻之月
function c11200028.initial_effect(c)
--
if not c11200028.global_check then
c11200028.global_check=true
local e0=Effect.GlobalEffect()
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_CHAINING)
e0:SetCondition(c11200028.con0)
e0:SetOperation(c11200028.op0)
Duel.RegisterEffect(e0,0)
end
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200028+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c11200028.tg1)
e1:SetOperation(c11200028.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c11200028.op2)
c:RegisterEffect(e2)
--
end
--
function c11200028.con0(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsCode(11200019)
end
--
function c11200028.op0(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,11200025,0,0,0)
end
--
function c11200028.tfilter1(c)
return (c:IsCode(24094653)
or (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)))
and c:IsAbleToHand()
end
function c11200028.tg1(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 Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x132,0x21,1100,1100,4,RACE_BEAST,ATTRIBUTE_LIGHT)
and Duel.IsExistingMatchingCard(c11200028.tfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200028.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=Duel.TossDice(tp,1)
if dc==1 or dc==2 or dc==3 or dc==4 then
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x132,0x21,1100,1100,4,RACE_BEAST,ATTRIBUTE_LIGHT) then
c:AddMonsterAttribute(TYPE_EFFECT)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:AddMonsterAttributeComplete()
Duel.SpecialSummonComplete()
end
elseif dc==5 or dc==6 then
local b1=Duel.IsExistingMatchingCard(c11200028.tfilter1,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.GetFlagEffect(tp,11200025)<1 and Duel.IsPlayerCanDraw(tp,1)
if not (b1 or b2) then return end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(11200028,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(11200028,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c11200028.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()<1 then return end
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
else
Duel.Draw(tp,1,REASON_EFFECT)
end
else
end
end
--
function c11200028.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_FIELD)
e2_1:SetCode(EFFECT_UPDATE_ATTACK)
e2_1:SetTargetRange(LOCATION_MZONE,0)
e2_1:SetTarget(c11200028.tg2_1)
e2_1:SetValue(700)
e2_1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e2_1,tp)
local e2_2=e2_1:Clone()
e2_2:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e2_2,tp)
end
--
function c11200028.tg2_1(e,c)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
--
--远古的欺诈师 因幡帝
function c11200066.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(TYPE_TRAP)
c:RegisterEffect(e1)
--
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c11200066.con3)
e3:SetTarget(c11200066.tg3)
e3:SetOperation(c11200066.op3)
c:RegisterEffect(e3)
--
end
--
--
function c11200066.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if not eg then return false end
local tc=eg:GetFirst()
if chkc then return chkc==tc end
if chk==0 then return ep~=tp and tc:IsFaceup() and tc:GetAttack()>=1000 and tc:IsOnField() and tc:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,0xffee) end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
--
function c11200066.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsFacedown() then return end
if not tc:IsRelateToEffect(e) then return end
if tc:GetAttack()<1000 then return end
if Duel.Destroy(tc,REASON_EFFECT)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local sg=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,0xffee)
if sg:GetCount()<1 then return end
local sc=sg:GetFirst()
if sc:IsLocation(LOCATION_GRAVE) then
Duel.MoveSequence(sc,0)
Duel.ConfirmDecktop(tp,1)
else
Duel.SendtoDeck(sc,nil,0,REASON_EFFECT)
end
end
--
function c11200066.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE)
and c:IsPreviousPosition(POS_FACEDOWN)
end
--
function c11200066.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
--
function c11200066.op3(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--
......@@ -56,11 +56,20 @@ function c1156012.op1(e,tp,eg,ep,ev,re,r,rp)
end
end
--
--
function c1156012.cfilter2(c)
return c:IsFacedown() or (not c:IsAttribute(ATTRIBUTE_WATER))
end
function c1156012.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()>=5
local c=e:GetHandler()
return c:GetSequence()>=5 and not Duel.IsExistingMatchingCard(c1156012.cfilter2,tp,LOCATION_MZONE,0,1,nil)
end
--
function c1156012.limit2(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsAttribute(ATTRIBUTE_WATER)
end
--
--灾厄重融合
--灾厄岩兽 雷德王
function c14801037.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14801037,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c14801037.target)
e1:SetOperation(c14801037.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetDescription(aux.Stringid(14801037,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,14801037)
e2:SetCondition(aux.exccon)
e2:SetTarget(c14801037.tdtg)
e2:SetOperation(c14801037.tdop)
c:RegisterEffect(e2)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14801037,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,14801037)
e1:SetTarget(c14801037.thtg)
e1:SetOperation(c14801037.thop)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14801037,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,148010371)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c14801037.spcon)
e2:SetTarget(c14801037.sptg)
e2:SetOperation(c14801037.spop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14801037,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,148010372)
e3:SetCondition(c14801037.spbcon)
e3:SetTarget(c14801037.spbtg)
e3:SetOperation(c14801037.spbop)
c:RegisterEffect(e3)
end
function c14801037.filter0(c)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
function c14801037.thfilter(c)
return (c:IsSetCard(0x4800) and c:IsType(TYPE_MONSTER)) and not c:IsCode(14801037) and c:IsAbleToHand()
end
function c14801037.filter1(c,e)
return (c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
function c14801037.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14801037.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14801037.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c14801037.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c14801037.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x4800) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
function c14801037.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c14801037.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c14801037.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(c14801037.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c14801037.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
function c14801037.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()==1-tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c14801037.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c14801037.filter1),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(c14801037.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c14801037.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
if mat:IsExists(Card.IsFacedown,1,nil) then
local cg=mat:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(mat,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
function c14801037.thfilter1(c)
return c:IsFaceup() and (c:IsSetCard(0x4800) and c:IsType(TYPE_MONSTER)) and c:IsAbleToGrave()
end
function c14801037.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
function c14801037.thfilter2(c)
return c:IsFaceup() and (c:IsSetCard(0x4800) and c:IsType(TYPE_MONSTER)) and c:IsAbleToGrave() and c:GetSequence()<5
end
function c14801037.spfilter(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c14801037.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then
local b=false
if ft>0 then
b=Duel.IsExistingTarget(c14801037.thfilter1,tp,LOCATION_ONFIELD,0,1,nil)
else
b=Duel.IsExistingTarget(c14801037.thfilter2,tp,LOCATION_MZONE,0,1,nil)
end
return b and Duel.IsExistingTarget(c14801037.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
local g1=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if ft>0 then
g1=Duel.SelectTarget(tp,c14801037.thfilter1,tp,LOCATION_ONFIELD,0,1,1,nil)
else
g1=Duel.SelectTarget(tp,c14801037.thfilter2,tp,LOCATION_MZONE,0,1,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,c14801037.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0)
e:SetLabelObject(g1:GetFirst())
end
function c14801037.spop(e,tp,eg,ep,ev,re,r,rp)
local tc1,tc2=Duel.GetFirstTarget()
if tc1~=e:GetLabelObject() then tc1,tc2=tc2,tc1 end
if tc1:IsRelateToEffect(e) and Duel.SendtoGrave(tc1,REASON_EFFECT)>0
and tc1:IsLocation(LOCATION_GRAVE) and tc2:IsRelateToEffect(e) then
Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)
end
end
function c14801037.spbcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c14801037.spbfilter(c,e,tp)
return c:IsSetCard(0x4800) and not c:IsCode(14801037) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c14801037.spbtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14801037.spbfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c14801037.spbfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c14801037.spbfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c14801037.spbop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c14801037.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--灾厄魔鸟 桑德里阿斯
--灾厄炎双 庞墩
function c14801051.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14801051,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,14801051)
e2:SetTarget(c14801051.target)
e2:SetOperation(c14801051.operation)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14801051,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,148010511)
e3:SetTarget(c14801051.thtg)
e3:SetOperation(c14801051.thop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c14801051.thcon)
c:RegisterEffect(e4)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x4800),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_FIRE),true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--attackall
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14801051,0))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,14801051)
e3:SetCondition(c14801051.damcon)
e3:SetCost(c14801051.damcost)
e3:SetTarget(c14801051.damtg)
e3:SetOperation(c14801051.damop)
c:RegisterEffect(e3)
--dambage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(14801051,1))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_GRAVE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1,148010511)
e4:SetCost(aux.bfgcost)
e4:SetCondition(c14801051.dambcon)
e4:SetTarget(c14801051.dambtg)
e4:SetOperation(c14801051.dambop)
c:RegisterEffect(e4)
end
function c14801051.filter2(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c14801051.damcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()==1-tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c14801051.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14801051.filter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c14801051.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c14801051.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
function c14801051.costfilter(c)
return (c:IsSetCard(0x4800) and c:IsType(TYPE_FUSION)) and c:IsAbleToGrave()
end
function c14801051.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
function c14801051.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14801051.costfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c14801051.costfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c14801051.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
function c14801051.ctfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c14801051.thfilter(c)
return c:IsSetCard(0x4800) and not c:IsCode(14801051) and c:IsAbleToHand()
function c14801051.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14801051.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local ct=Duel.GetMatchingGroupCount(c14801051.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*400)
end
function c14801051.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14801051.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
function c14801051.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetMatchingGroupCount(c14801051.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Damage(p,ct*400,REASON_EFFECT)
end
function c14801051.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c14801051.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
function c14801051.dambcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.GetTurnPlayer()==1-tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c14801051.dambtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,0xe,1,nil) end
Duel.SetTargetPlayer(1-tp)
local dam=Duel.GetFieldGroupCount(1-tp,0xe,0)*200
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c14801051.dambop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=Duel.GetFieldGroupCount(1-tp,0xe,0)*200
Duel.Damage(p,dam,REASON_EFFECT)
end
--灾厄魔鸟 鲁格赛特
--灾厄冥硫 霍
function c14801053.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x4800),2,99)
--fusion material
c:EnableReviveLimit()
--destroy
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x4800),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14801053,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c14801053.descon)
e1:SetTarget(c14801053.destg)
e1:SetOperation(c14801053.desop)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--negate
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14801053,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,14801053)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c14801053.discon)
e2:SetTarget(c14801053.distg)
e2:SetOperation(c14801053.disop)
e2:SetDescription(aux.Stringid(14801053,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(c14801053.decon)
e2:SetTarget(c14801053.destg)
e2:SetOperation(c14801053.desop)
c:RegisterEffect(e2)
--special summon
--indes
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14801053,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,148010531)
e3:SetCondition(c14801053.spcon2)
e3:SetTarget(c14801053.sptg2)
e3:SetOperation(c14801053.spop2)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(14801053,1))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,14801053)
e4:SetCondition(c14801053.negcon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c14801053.negtg)
e4:SetOperation(c14801053.negop)
c:RegisterEffect(e4)
end
function c14801053.decon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c14801053.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
function c14801053.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c14801053.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
function c14801053.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c14801053.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14801053.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c14801053.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c14801053.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c14801053.discon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsChainNegatable(ev) and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
function c14801053.negcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c14801053.distg(e,tp,eg,ep,ev,re,r,rp,chk)
function c14801053.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c14801053.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
function c14801053.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(500)
c:RegisterEffect(e1)
end
end
function c14801053.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp))
and c:IsPreviousPosition(POS_FACEUP)
end
function c14801053.spfilter2(c,e,tp)
return c:IsSetCard(0x4800) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c14801053.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c14801053.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c14801053.spop2(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,c14801053.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--灾厄融合兽 雷霆杀手
--灾厄恶兽 基路伯
function c14801055.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--handes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14801003,1))
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c14801003.condition)
e1:SetTarget(c14801003.target)
e1:SetOperation(c14801003.operation)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14801003,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetTarget(c14801003.distg)
e2:SetOperation(c14801003.disop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14801055,0))
e1:SetCategory(CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,14801055)
e1:SetCondition(c14801055.spcon)
e1:SetTarget(c14801055.sptg)
e1:SetOperation(c14801055.spop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14801055,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCondition(c14801055.damcon)
e2:SetTarget(c14801055.damtg)
e2:SetOperation(c14801055.damop)
c:RegisterEffect(e2)
end
function c14801003.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
function c14801055.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()==1-tp
and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end
function c14801003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1)
function c14801055.filter1(c,e)
return c:IsLocation(LOCATION_HAND) and not c:IsImmuneToEffect(e)
end
function c14801003.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0)
local sg=g:RandomSelect(ep,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
function c14801055.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x4800) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function c14801003.disfilter(c)
return c:IsFaceup() and not (c:GetAttack()==0 and c:IsDisabled())
function c14801055.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
local res=Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c14801055.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c14801055.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c14801003.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14801003.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14801003.disfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c14801003.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
function c14801055.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c14801055.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c14801055.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c14801055.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if (Duel.GetLocationCountFromEx(tp)>0 and sg1:GetCount()>0) or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c14801003.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
if tc:IsType(TYPE_TRAPMONSTER) then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
end
end
function c14801055.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER)
end
function c14801055.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c14801055.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
\ No newline at end of file
--灾厄融合兽 加拉德隆王
--灾厄疾兽 百慕达
function c14801057.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c14801057.val)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(1)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_BE_BATTLE_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,14801057)
e4:SetCondition(c14801057.descon1)
e4:SetTarget(c14801057.destg)
e4:SetOperation(c14801057.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_BECOME_TARGET)
e5:SetCondition(c14801057.descon2)
c:RegisterEffect(e5)
end
function c14801057.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x4800)*300
end
function c14801057.descon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c14801057.descon2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsContains(e:GetHandler())
end
function c14801057.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
and not e:GetHandler():IsStatus(STATUS_CHAINING) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c14801057.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
\ No newline at end of file
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14801057,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,14801057)
e1:SetCondition(c14801057.spcon)
e1:SetTarget(c14801057.sptg)
e1:SetOperation(c14801057.spop)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x4800))
e2:SetValue(500)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14801057,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,148010571)
e3:SetCondition(c14801057.thcon)
e3:SetTarget(c14801057.thtg)
e3:SetOperation(c14801057.thop)
c:RegisterEffect(e3)
end
function c14801057.cfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x4800)
end
function c14801057.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c14801057.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c14801057.sptg(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,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c14801057.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c14801057.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c14801057.thfilter(c)
return (c:IsSetCard(0x4800) and c:IsType(TYPE_MONSTER)) and not c:IsCode(14801057) and c:IsAbleToHand()
end
function c14801057.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14801057.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c14801057.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c14801057.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--灾厄融合兽 贝蒙杰多
--灾厄深渊 古维拉
function c14801059.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--Immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
c:RegisterEffect(e1)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetTarget(c14801059.distg)
c:RegisterEffect(e4)
end
function c14801059.distg(e,c)
return c==e:GetHandler():GetBattleTarget()
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x4800),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_WATER),true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--pos
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14801059,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c14801059.pocon)
e2:SetCountLimit(1,14801059)
e2:SetTarget(c14801059.postg)
e2:SetOperation(c14801059.posop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14801059,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLE_START)
e3:SetTarget(c14801059.targ)
e3:SetOperation(c14801059.op)
c:RegisterEffect(e3)
--disable attack
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(14801059,2))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetCountLimit(1,148010591)
e4:SetCost(aux.bfgcost)
e4:SetCondition(c14801059.atkcon)
e4:SetOperation(c14801059.atkop)
c:RegisterEffect(e4)
end
function c14801059.pocon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c14801059.filters(c)
return c:IsCanChangePosition()
end
function c14801059.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14801059.filters(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14801059.filters,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c14801059.filters,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c14801059.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c14801059.targ(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget()
if chk ==0 then return Duel.GetAttacker()==e:GetHandler()
and d~=nil and d:IsFaceup() and d:IsDefensePos() and d:IsRelateToBattle() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
end
function c14801059.op(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d~=nil and d:IsRelateToBattle() and d:IsDefensePos() then
Duel.Destroy(d,REASON_EFFECT)
end
end
function c14801059.atkcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e)
end
function c14801059.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
\ No newline at end of file
--灾厄融合龙 奇美拉柏洛斯
--灾厄异兽 布鲁顿
function c14801061.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x4800),5,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--Immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
c:RegisterEffect(e3)
--Equip
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(14801061,1))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(c14801061.eqtg)
e5:SetOperation(c14801061.eqop)
c:RegisterEffect(e5)
--Destroy
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(14801061,2))
e6:SetCategory(CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCost(c14801061.descost)
e6:SetTarget(c14801061.destg)
e6:SetOperation(c14801061.desop)
c:RegisterEffect(e6)
--negate attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14801061,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,14801061)
e1:SetCondition(c14801061.dimcom)
e1:SetTarget(c14801061.dimtg)
e1:SetOperation(c14801061.dimop)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14801061,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1,148010611)
e2:SetCondition(c14801061.sccon)
e2:SetTarget(c14801061.sctg)
e2:SetOperation(c14801061.scop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14801061,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,148010612)
e3:SetCondition(c14801061.thcon)
e3:SetTarget(c14801061.thtg)
e3:SetOperation(c14801061.thop)
c:RegisterEffect(e3)
end
function c14801061.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==1-tp
and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsCanBeEffectTarget(e) and not c:IsForbidden()
function c14801061.dimfilter(c)
return c:IsFaceup() and c:IsSetCard(0x4800)
end
function c14801061.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c14801061.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and eg:IsExists(c14801061.filter,1,nil,e,tp) end
local g=eg:Filter(c14801061.filter,nil,e,tp)
local tc=nil
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tc=g:Select(tp,1,1,nil):GetFirst()
else
tc=g:GetFirst()
end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
function c14801061.dimcom(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()==1-tp and Duel.IsExistingMatchingCard(c14801061.dimfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c14801061.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c14801061.eqlimit)
tc:RegisterEffect(e1)
end
function c14801061.dimtg(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,0,tp,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c14801061.eqlimit(e,c)
return e:GetOwner()==c
function c14801061.dimop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.NegateAttack()
end
end
function c14801061.tgfilter(c,tp)
return c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c14801061.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetRace())
function c14801061.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function c14801061.desfilter(c,rc)
return c:IsFaceup() and c:IsRace(rc)
function c14801061.mfilter(c)
return c:IsSetCard(0x4800)
end
function c14801061.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(c14801061.tgfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,c14801061.tgfilter,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetRace())
Duel.SendtoGrave(g,REASON_COST)
function c14801061.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(c14801061.mfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c14801061.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c14801061.desfilter,tp,0,LOCATION_MZONE,nil,e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
function c14801061.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(c14801061.mfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
function c14801061.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c14801061.thfilter(c)
return c:IsSetCard(0x4800) and not c:IsCode(14801061) and c:IsAbleToHand()
end
function c14801061.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14801061.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14801061.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c14801061.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c14801061.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c14801061.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c14801061.desfilter,tp,0,LOCATION_MZONE,nil,e:GetLabel())
Duel.Destroy(g,REASON_EFFECT)
end
\ No newline at end of file
--灾厄融合
--灾厄守卫 金古乔
function c14801075.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14801075,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c14801075.target)
e1:SetOperation(c14801075.activate)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(14801075,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c14801075.thcost)
e2:SetTarget(c14801075.thtg)
e2:SetOperation(c14801075.thop)
c:RegisterEffect(e2)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x4800),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_WIND),true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c14801075.imtg)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(14801075,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_GRAVE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCondition(c14801075.spcon)
e5:SetCountLimit(1,14801075)
e5:SetCost(aux.bfgcost)
e5:SetTarget(c14801075.sptg)
e5:SetOperation(c14801075.spop)
c:RegisterEffect(e5)
end
function c14801075.filter1(c,e)
return not c:IsImmuneToEffect(e)
function c14801075.imtg(e,c)
return c:IsSetCard(0x4800) and not c:IsCode(14801075)
end
function c14801075.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x4800) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
function c14801075.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return aux.exccon(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()==1-tp
and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function c14801075.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c14801075.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c14801075.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function c14801075.spfilter(c,e,tp)
return ((c:IsSetCard(0x4800) and c:IsType(TYPE_FUSION)) and not c:IsCode(14801075)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c14801075.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c14801075.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c14801075.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c14801075.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
function c14801075.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14801075.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c14801075.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c14801075.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c14801075.thfilter(c)
return c:IsSetCard(0x4800) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
function c14801075.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
function c14801075.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14801075.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c14801075.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c14801075.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c14801075.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
This diff is collapsed.
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
aux.EnablePendulumAttribute(c,false)
--immune
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(17060843,0))
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_IMMUNE_EFFECT)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -17,28 +17,21 @@ function cm.initial_effect(c)
e0:SetCondition(cm.imcon)
e0:SetValue(cm.efilter)
c:RegisterEffect(e0)
--
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetValue(1)
e1:SetDescription(aux.Stringid(m,1))
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.cost)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--back
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_LEAVE_FIELD)
e8:SetCode(EVENT_ADJUST)
e8:SetRange(LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND+LOCATION_EXTRA)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e8:SetCondition(cm.backon)
......@@ -69,12 +62,12 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetValue(c:GetAttack()*2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(c:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......
......@@ -4,28 +4,17 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17060920,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--scale
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17060920,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,17060920)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetCountLimit(1,m)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
end
cm.is_named_with_Million_Arthur=1
cm.is_named_with_Symphony=1
......@@ -37,35 +26,15 @@ function cm.IsSymphony(c)
local m=_G["c"..c:GetCode()]
return m and m.is_named_with_Symphony
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.thfilter(c)
return c:IsSetCard(0x2702) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.thfilter1(c)
return c:IsAbleToHand()
return cm.IsSymphony(c) and c:IsAbleToHand()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and cm.thfilter1(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter1,tp,LOCATION_PZONE,0,1,nil)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and cm.thfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_PZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter1,tp,LOCATION_PZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_PZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......
......@@ -6,17 +6,17 @@ function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17060921,0))
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,17060921)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--scale
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(17060921,1))
e0:SetDescription(aux.Stringid(m,1))
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -34,8 +34,15 @@ function cm.IsSymphony(c)
local m=_G["c"..c:GetCode()]
return m and m.is_named_with_Symphony
end
function iCount(name,tp,m,id)
return ((name=="get" or name=="set")
and {(name=="get"
and {tonumber(((Duel.GetFlagEffect(tp,m)==nil) and {0} or {Duel.GetFlagEffect(tp,m)})[1])}
or { Debug.Message("","请使用Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)") })[1]}
or {(bit.band(iCount("get",tp,m,id),math.pow(2,id-1))==0 and {true} or {false})[1]})[1]
end
function cm.thfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x2702) or c:IsSetCard(0x700)) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
return c:IsFaceup() and cm.IsSymphony(c) and c:IsType(TYPE_PENDULUM) and not c:IsCode(17060921) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
......@@ -58,16 +65,16 @@ function cm.spfilter2(c,e,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and cm.thfilter1(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.GetFlagEffect(tp,17060921)==0 and Duel.IsExistingTarget(cm.thfilter1,tp,LOCATION_PZONE,0,1,nil)
if chk==0 then return iCount(0,tp,m,1) and Duel.IsExistingTarget(cm.thfilter1,tp,LOCATION_PZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.thfilter1,tp,LOCATION_PZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.RegisterFlagEffect(tp,17060921,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -181,29 +181,29 @@ function c21520175.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local gc=Duel.GetMatchingGroupCount(c21520175.drfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local h=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local fchk=Duel.IsExistingMatchingCard(c21520175.fcfilter,tp,LOCATION_ONFIELD,0,1,nil)
local d=gc*100
if fchk then d=d*2 end
local d=gc*300
local ops=Duel.SelectOption(tp,aux.Stringid(21520175,3),aux.Stringid(21520175,4))
e:SetLabel(ops)
if ops==0 then
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(21520175,3))
if fchk then d=d*2 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(d)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,d)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,gc*300)
elseif ops==1 then
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(21520175,4))
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3-h)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3-h)
Duel.SetTargetParam(2-h)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2-h)
end
end
function c21520175.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ops=e:GetLabel()
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local fchk=Duel.IsExistingMatchingCard(c21520175.fcfilter,tp,LOCATION_ONFIELD,0,1,nil)
local fchk=Duel.IsExistingMatchingCard(c21520175.fcfilter,p,LOCATION_ONFIELD,0,1,nil)
if ops==0 then
local gc=Duel.GetMatchingGroupCount(c21520175.drfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)*100
local gc=Duel.GetMatchingGroupCount(c21520175.drfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)*300
if fchk then gc=gc*2 end
Duel.Damage(p,gc,REASON_EFFECT)
elseif ops==1 then
......@@ -211,9 +211,9 @@ function c21520175.drop(e,tp,eg,ep,ev,re,r,rp)
if hc>=3 then return end
Duel.Draw(p,3-hc,REASON_EFFECT)
local hg=Duel.GetFieldGroup(1-p,LOCATION_HAND,0)
if not fchk and Duel.SelectYesNo(1-p,aux.Stringid(21520175,5)) then
if hg:GetCount()>0 and not fchk and Duel.SelectYesNo(1-p,aux.Stringid(21520175,5)) then
Duel.Hint(HINT_CARD,p,21520175)
if hg:GetCount()>0 then Duel.SendtoGrave(hg,REASON_EFFECT+REASON_DISCARD) end
Duel.SendtoGrave(hg,REASON_EFFECT+REASON_DISCARD)
Duel.Draw(1-p,3-hg:GetCount(),REASON_EFFECT)
end
end
......
This diff is collapsed.
This diff is collapsed.
......@@ -6,7 +6,7 @@ function c21520190.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(7,21520190)
e1:SetCountLimit(1,21520190)
e1:SetCondition(c21520190.spcon)
e1:SetOperation(c21520190.spop)
c:RegisterEffect(e1)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
local e4=rsnm.FilpFun(c,m,"eq",nil,rsop.target({cm.eqfilter,"eq",0,LOCATION_MZONE },{cm.cfilter,nil,LOCATION_MZONE }),cm.op)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6552) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
return c:IsFaceup() and c:IsSetCard(0x4552) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.eqfilter(c,e,tp)
return c:IsFaceup() and c:IsAbleToChangeControler() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment