Commit 76496186 authored by Nemo Ma's avatar Nemo Ma

upd 250112

parent 2e054e29
......@@ -2491,6 +2491,10 @@
60362066 0
74920585 0
77103950 1
#250112
40010934 0
98500000 0
11561001 2
#241229
47158779 0
74645656 0
......@@ -4312,7 +4316,6 @@
8709008 0
10400001 0
10400004 0
15000260 0
31402000 0
64800024 0
93601004 0
......@@ -4778,7 +4781,6 @@
79029322 0
79029323 0
14010108 0
15000258 0
72100104 0
72100025 0
72100125 0
......@@ -6168,7 +6170,7 @@
9981625 0
25800380 0
72412110 0
87490445 0
87490445 1
12847415 0
12847417 0
12847419 0
......
No preview for this file type
expansions/pics/49811252.jpg

66.9 KB | W: | H:

expansions/pics/49811252.jpg

67.1 KB | W: | H:

expansions/pics/49811252.jpg
expansions/pics/49811252.jpg
expansions/pics/49811252.jpg
expansions/pics/49811252.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811253.jpg

62.8 KB | W: | H:

expansions/pics/49811253.jpg

63.3 KB | W: | H:

expansions/pics/49811253.jpg
expansions/pics/49811253.jpg
expansions/pics/49811253.jpg
expansions/pics/49811253.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811254.jpg

52.1 KB | W: | H:

expansions/pics/49811254.jpg

52.1 KB | W: | H:

expansions/pics/49811254.jpg
expansions/pics/49811254.jpg
expansions/pics/49811254.jpg
expansions/pics/49811254.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811302.jpg

59.2 KB | W: | H:

expansions/pics/49811302.jpg

59.3 KB | W: | H:

expansions/pics/49811302.jpg
expansions/pics/49811302.jpg
expansions/pics/49811302.jpg
expansions/pics/49811302.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811304.jpg

47.9 KB | W: | H:

expansions/pics/49811304.jpg

47.9 KB | W: | H:

expansions/pics/49811304.jpg
expansions/pics/49811304.jpg
expansions/pics/49811304.jpg
expansions/pics/49811304.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811315.jpg

55.6 KB | W: | H:

expansions/pics/49811315.jpg

55.7 KB | W: | H:

expansions/pics/49811315.jpg
expansions/pics/49811315.jpg
expansions/pics/49811315.jpg
expansions/pics/49811315.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811454.jpg

59 KB | W: | H:

expansions/pics/49811454.jpg

59 KB | W: | H:

expansions/pics/49811454.jpg
expansions/pics/49811454.jpg
expansions/pics/49811454.jpg
expansions/pics/49811454.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910410.jpg

10.4 KB | W: | H:

expansions/pics/9910410.jpg

43.6 KB | W: | H:

expansions/pics/9910410.jpg
expansions/pics/9910410.jpg
expansions/pics/9910410.jpg
expansions/pics/9910410.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910419.jpg

43.8 KB | W: | H:

expansions/pics/9910419.jpg

43.4 KB | W: | H:

expansions/pics/9910419.jpg
expansions/pics/9910419.jpg
expansions/pics/9910419.jpg
expansions/pics/9910419.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910423.jpg

11.1 KB | W: | H:

expansions/pics/9910423.jpg

48.1 KB | W: | H:

expansions/pics/9910423.jpg
expansions/pics/9910423.jpg
expansions/pics/9910423.jpg
expansions/pics/9910423.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -83,7 +83,22 @@ function cm.clear(e,tp,eg,ep,ev,re,r,rp)
cm[i]=nil
i=i+1
end
if res then cm.chain_with_stridgon=cm.chain_with_stridgon+1 else cm.chain_with_stridgon=0 end
local tp=e:GetHandler():GetOwner()
Duel.ResetFlagEffect(tp,m)
--local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_FLAG_EFFECT+m)}
--for _,te in pairs(eset) do te:Reset() end
if res then
cm.chain_with_stridgon=cm.chain_with_stridgon+1
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(m,math.min(cm.chain_with_stridgon,3)+2))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e3:SetTargetRange(1,0)
e3:SetCode(EFFECT_FLAG_EFFECT+m)
Duel.RegisterEffect(e3,tp)
else
cm.chain_with_stridgon=0
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
......@@ -15,7 +15,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2)
--c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
......@@ -71,21 +71,26 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (not c:IsLocation(LOCATION_HAND) or c:IsCanBeSpecialSummoned(e,0,tp,false,false) or 1==1) and (c:IsSummonable(true,nil) or (c:IsAbleToHand() and c:IsLocation(LOCATION_MZONE))) end
local g=Duel.GetMatchingGroup(function(c) return c:IsAbleToHand() and c:GetSummonType()&SUMMON_TYPE_NORMAL==0 end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if chk==0 then return (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or 1==1) and (c:IsSummonable(true,nil) or (c:IsAbleToHand() and c:IsLocation(LOCATION_MZONE) and #g>0)) end
g:AddCard(c)
if c:IsLocation(LOCATION_HAND) then
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
elseif c:IsLocation(LOCATION_MZONE) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,PLAYER_ALL,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,PLAYER_ALL,LOCATION_ONFIELD)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if c:IsAbleToHand() and c:IsLocation(LOCATION_MZONE) then
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:SelectSubGroup(tp,Group.IsContains,false,1,2,c)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
if c:IsLocation(LOCATION_MZONE) then
local g=Duel.GetMatchingGroup(function(c) return c:IsAbleToHand() and c:GetSummonType()&SUMMON_TYPE_NORMAL==0 end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if #g>0 then
g:AddCard(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:SelectSubGroup(tp,Group.IsContains,false,2,2,c)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
elseif c:IsSummonable(true,nil) then
Duel.Summon(tp,c,true,nil)
end
......
......@@ -62,7 +62,7 @@ function cm.hfilter(c,lv)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>lv
end
function cm.fselect(g,lv)
return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=1
return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)<=1
end
function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -62,7 +62,7 @@ function cm.hfilter(c,lv)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>lv
end
function cm.fselect(g,lv)
return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) and g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1 and g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=1
return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) --and g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE+LOCATION_EXTRA)<=2
end
function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
--Cry for me
function c12847502.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c12847502.condition)
e1:SetCost(c12847502.cost)
e1:SetOperation(c12847502.activate)
c:RegisterEffect(e1)
--inactivatable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_INACTIVATE)
e2:SetRange(LOCATION_FZONE)
e2:SetValue(c12847502.effectfilter2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_DISEFFECT)
e3:SetRange(LOCATION_FZONE)
e3:SetValue(c12847502.effectfilter2)
c:RegisterEffect(e3)
--cannot be destroyed
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_FZONE)
e4:SetValue(1)
c:RegisterEffect(e4)
--cannot set/activate
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_SSET)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(1,0)
e5:SetTarget(c12847502.setlimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetRange(LOCATION_FZONE)
e6:SetTargetRange(1,0)
e6:SetValue(c12847502.actlimit)
c:RegisterEffect(e6)
end
function c12847502.condition(e,tp)
local chain=Duel.GetCurrentChain()
local flag=false
for i=1,chain do
local re=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if re:GetHandlerPlayer()==tp and re:IsActiveType(TYPE_MONSTER) then
flag=true
end
end
return flag and not Duel.IsExistingMatchingCard(nil,tp,LOCATION_FZONE,0,1,nil) and Duel.GetCurrentChain()>0 and e:GetHandler():IsLocation(LOCATION_HAND)
end
function c12847502.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local chain=Duel.GetCurrentChain()
local rg=Group.CreateGroup()
for i=1,chain do
local re=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
local gc=re:GetHandler()
if re:GetHandlerPlayer()==tp and gc:IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER) and gc:IsAbleToHandAsCost() then
rg:AddCard(gc)
end
end
if chk==0 then return rg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=rg:Select(tp,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_FZONE,POS_FACEUP,true)
e:SetLabel(g:GetFirst():GetCode())
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12847502,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_FZONE)
e1:SetOperation(c12847502.tgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,5)
c:SetTurnCounter(0)
c:RegisterEffect(e1)
end
function c12847502.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==5 then Duel.SendtoGrave(c,REASON_RULE) e:Reset() end
end
function c12847502.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c12847502.sumlimit)
e1:SetLabel(e:GetLabel())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_INACTIVATE)
e4:SetRange(LOCATION_SZONE)
e4:SetLabel(e:GetLabel())
e4:SetValue(c12847502.effectfilter)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_DISEFFECT)
e5:SetRange(LOCATION_SZONE)
e5:SetValue(c12847502.effectfilter)
c:RegisterEffect(e5)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(12847502,2))
end
function c12847502.effectfilter(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():IsCode(e:GetLabel())
end
function c12847502.sumlimit(e,c)
return c:IsCode(e:GetLabel())
end
function c12847502.effectfilter2(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<2
end
function c12847502.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD)
end
function c12847502.actlimit(e,re,tp)
return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
\ No newline at end of file
--三船文子
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12866755)
--specialsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--fusion substitute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o)
e2:SetCost(s.cost)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.cfilter(c,tp)
return c:IsAbleToGrave() and Duel.GetMZoneCount(tp,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
local c=e:GetHandler()
local tc=tg:GetFirst()
if tc and Duel.SendtoGrave(tc1,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and c:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsSummonLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
end
end
function s.costfilter(c,ec)
return aux.IsCodeListed(c,12866755) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(cg,REASON_COST)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_FUSION_SUBSTITUTE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(s.subval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.subval(e,c)
return aux.IsCodeListed(c,12866755)
end
\ No newline at end of file
--枪之魔人
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12866600,12866725,12847313,12866615)
--splimit
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(s.splimit)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,id)
e2:SetCost(s.tdcost)
e2:SetCondition(s.tdcon)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
--destory
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,id+o)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
--spsummon cost
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(0xff)
e5:SetCost(s.spcost)
e5:SetOperation(s.spcop)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
s.spchecks=aux.CreateChecks(Card.IsCode,{12866615,12866725})
function s.chainfilter(re,tp,cid)
return not (re:GetHandler():IsCode(12866600))
end
function s.costfilter(c)
return c:IsCode(12866615,12866725) and c:IsAbleToGraveAsCost()
end
function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)>0
or Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) and c:IsAbleToDeck() then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function s.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function s.rmfilter(c,e,tp)
return c:IsAbleToRemove(tp,POS_FACEUP,REASON_ACTION) and c:IsCode(12866615,12866725) and c:IsFaceupEx()
end
function s.spcost(e,c,tp)
local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
return g:CheckSubGroupEach(s.spchecks,aux.mzctcheck,tp)
end
function s.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.rmfilter),tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroupEach(tp,s.spchecks,true,aux.mzctcheck,tp)
Duel.Remove(sg,POS_FACEUP,REASON_ACTION)
end
function s.desfilter(c)
return c:IsRace(RACE_FIEND)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_GRAVE,0,1,nil) and
Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.spfilter(c,e,tp)
return c:IsCode(12847313) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_GRAVE,0,nil)
local ct=aux.GetAttributeCount(cg)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,c)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 and not (c:IsRelateToEffect(e) or c:IsLocation(LOCATION_MZONE)) and
Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and
Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=sg:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--挣脱过往
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12866755,12866760)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function s.tdfilter(c)
return aux.IsCodeListed(c,12866755) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.sumfilter(c)
return c:IsCode(12866760) and c:IsSummonable(true,nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if tc:IsCode(12866760) and tc:IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
end
function s.thfilter(c)
return c:IsFaceup() and c:IsEffectProperty(aux.EffectPropertyFilter(EFFECT_FLAG_FUSION_SUMMON)) and c:IsAbleToHand()
and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--与恶魔共舞
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12866755)
--fusionsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,id)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.spstg)
e2:SetOperation(s.spsop)
c:RegisterEffect(e2)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRelateToEffect(re) and (LOCATION_HAND+LOCATION_ONFIELD)&loc~=0
end
function s.filter1(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and aux.IsCodeListed(c,12866755) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
mg1:AddCard(rc)
local res=Duel.IsExistingMatchingCard(s.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(s.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)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
mg1:AddCard(rc)
local sg1=Duel.GetMatchingGroup(s.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(s.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
end
function s.sfilter(c,e,tp)
return c:GetOriginalType()&TYPE_MONSTER>0 and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and s.sfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.sfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.sfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spsop(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
\ No newline at end of file
--「刀仕祢宜」·朱雀院红叶
local s,id=GetID()
function s.initial_effect(c)
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_EQUIP)
e7:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetOperation(s.eqop1)
c:RegisterEffect(e7)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(s.hcon1)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(s.hcon2)
e5:SetValue(aux.imval1)
c:RegisterEffect(e5)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.hcon2)
e1:SetValue(true)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.hcon3)
e4:SetValue(s.efilter)
c:RegisterEffect(e4)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,1))
e0:SetCategory(CATEGORY_REMOVE)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_BATTLE_DAMAGE)
e0:SetCondition(s.recon)
e0:SetTarget(s.retg)
e0:SetOperation(s.reop)
c:RegisterEffect(e0)
end
function s.setfilter(c)
return c:IsAbleToRemove()
end
function s.recon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)<5 then return false end
local g=Duel.GetDecktopGroup(1-tp,5)
return g:IsExists(s.setfilter,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(id,0)) then return end
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)<5 then return false end
Duel.ConfirmDecktop(1-tp,5)
local g=Duel.GetDecktopGroup(1-tp,5)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.RevealSelectDeckSequence(true)
local th=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil)
Duel.RevealSelectDeckSequence(false)
Duel.Remove(th,POS_FACEDOWN,REASON_EFFECT)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function s.efilter(e,te)
return te:GetHandlerPlayer()~=e:GetHandlerPlayer()
end
function s.hcon1(e,tp,eg,ep,ev,re,r,rp)
local mlp = Duel.GetLP(e:GetHandlerPlayer())
local ylp = Duel.GetLP(1-e:GetHandlerPlayer())
return mlp>ylp
end
function s.hcon2(e,tp,eg,ep,ev,re,r,rp)
local mlp = Duel.GetLP(e:GetHandlerPlayer())
local ylp = Duel.GetLP(1-e:GetHandlerPlayer())
return mlp==ylp
end
function s.hcon3(e,tp,eg,ep,ev,re,r,rp)
local mlp = Duel.GetLP(e:GetHandlerPlayer())
local ylp = Duel.GetLP(1-e:GetHandlerPlayer())
return mlp<ylp
end
function s.eqop1(e,tp,eg,ep,ev,re,r,rp)
local token=Duel.CreateToken(tp,37900203)
Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
token:CancelToGrave()
local e1=Effect.CreateEffect(token)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_EQUIP+TYPE_SPELL)
--e1:SetReset(RESET_EVENT+0x1fc0000)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(token)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(1)
token:RegisterEffect(e2,true)
token:CancelToGrave()
local c = e:GetHandler()
if Duel.Equip(tp,token,c,false) then
local e3=Effect.CreateEffect(token)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_DIRECT_ATTACK)
token:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(s.atkval)
token:RegisterEffect(e1)
end
end
function s.atkval(e)
local mlp = Duel.GetLP(e:GetHandlerPlayer())
local ylp = Duel.GetLP(1-e:GetHandlerPlayer())
if mlp>ylp then
return mlp-ylp
end
return ylp-mlp
end
\ No newline at end of file
......@@ -17,6 +17,7 @@ function c44401001.initial_effect(c)
e0:SetCategory(CATEGORY_RECOVER)
e0:SetType(EFFECT_TYPE_QUICK_F)
e0:SetCode(EVENT_BECOME_TARGET)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(c44401001.runcon)
e0:SetCost(c44401001.run)
......@@ -29,6 +30,9 @@ function c44401001.rmfilter(c)
end
function c44401001.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c44401001.rmfilter,tp,LOCATION_DECK,0,1,nil) end
if e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) then
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(44401001,3))
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c44401001.thfilter(c)
......
......@@ -18,6 +18,7 @@ function c44401002.initial_effect(c)
e0:SetCategory(CATEGORY_ATKCHANGE)
e0:SetType(EFFECT_TYPE_QUICK_F)
e0:SetCode(EVENT_BECOME_TARGET)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(c44401002.runcon)
e0:SetCost(c44401002.run)
......
......@@ -16,12 +16,19 @@ function c44401003.initial_effect(c)
e0:SetCategory(CATEGORY_REMOVE)
e0:SetType(EFFECT_TYPE_QUICK_F)
e0:SetCode(EVENT_BECOME_TARGET)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(c44401003.runcon)
e0:SetCost(c44401003.run)
e0:SetTarget(c44401003.runtg)
e0:SetOperation(c44401003.runop)
c:RegisterEffect(e0)
--sign
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c44401003.regop)
c:RegisterEffect(e2)
end
function c44401003.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
......@@ -86,3 +93,8 @@ function c44401003.runop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c44401003.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_NORMAL) then return end
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(44401003,3))
end
......@@ -15,13 +15,19 @@ function c44401004.initial_effect(c)
e0:SetCategory(CATEGORY_REMOVE)
e0:SetType(EFFECT_TYPE_QUICK_F)
e0:SetCode(EVENT_BECOME_TARGET)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(c44401004.runcon)
e0:SetCost(c44401004.run)
e0:SetTarget(c44401004.runtg)
e0:SetOperation(c44401004.runop)
c:RegisterEffect(e0)
--sign
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c44401004.regop)
c:RegisterEffect(e2)
end
function c44401004.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -89,3 +95,8 @@ function c44401004.runop(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableShuffleCheck()
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end
function c44401004.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_NORMAL) then return end
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_WITHOUT_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(44401004,3))
end
--R.X-剑士 索萨
function c49811252.initial_effect(c)
c:SetSPSummonOnce(49811252)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e0:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e0:SetTargetRange(POS_FACEUP_ATTACK,1)
e0:SetCountLimit(1,49811252+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(c49811252.spcon)
e0:SetOperation(c49811252.spop)
c:RegisterEffect(e0)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetTargetRange(POS_FACEUP_ATTACK,1)
e1:SetCondition(c49811252.spcon)
e1:SetOperation(c49811252.spop)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e1)
--cannot special summon
local e11=Effect.CreateEffect(c)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e11)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xd))
e2:SetValue(c49811252.efilter)
c:RegisterEffect(e2)
--draw or control
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW+CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c49811252.con)
e3:SetTarget(c49811252.tg)
e3:SetOperation(c49811252.op)
c:RegisterEffect(e3)
--matlimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xd))
e4:SetValue(c49811252.matlimit)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
--draw or spsummon
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(49811252,0))
e7:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(c49811252.chkcon)
e7:SetTarget(c49811252.chktg)
e7:SetOperation(c49811252.chkop)
c:RegisterEffect(e7)
end
function c49811252.spcfilter(c)
return c:IsSetCard(0x100d) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
......@@ -55,51 +71,41 @@ function c49811252.spop(e,tp,eg,ep,ev,re,r,rp,c)
end
function c49811252.efilter(e,te,c)
local tc=te:GetOwner()
return not tc:IsSetCard(0x100d) and tc:IsLocation(LOCATION_ONFIELD)
and bit.band(te:GetActiveType(),c:GetType())~=0
return not tc:IsSetCard(0x100d) and tc:IsOnField() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated()
end
function c49811252.matlimit(e,c)
if not c then return false end
return not c:IsSetCard(0xd)
end
function c49811252.cfilter(c,p)
return c:IsSetCard(0x100d) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(p)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsSummonPlayer(p)
end
function c49811252.con(e,tp,eg,ep,ev,re,r,rp)
function c49811252.chkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c49811252.cfilter,1,nil,1-tp)
end
function c49811252.ctfilter(c)
return c:IsSetCard(0x100d) and c:IsControlerCanBeChanged()
function c49811252.chktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end
end
function c49811252.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsPlayerCanDraw(tp,1)
and Duel.GetFlagEffect(tp,49811252)==0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c49811252.ctfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetFlagEffect(tp,49811352)==0
if chk==0 then return b1 or b2 end
function c49811252.spfilter(c,e,tp)
return c:IsSetCard(0xd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c49811252.op(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsPlayerCanDraw(tp,1)
and Duel.GetFlagEffect(tp,49811252)==0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c49811252.ctfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetFlagEffect(tp,49811352)==0
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(49811252,1),aux.Stringid(49811252,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(49811252,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(49811252,2))+1
else return end
if op==0 then
Duel.Draw(tp,1,REASON_EFFECT)
Debug.Message("现在的我无比强大!")
Duel.RegisterFlagEffect(tp,49811252,RESET_PHASE+PHASE_END,0,1)
function c49811252.chkop(e,tp,eg,ep,ev,re,r,rp)
local cg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #cg==0 then return end
Duel.ConfirmCards(tp,cg)
if cg:IsExists(Card.IsSetCard,1,nil,0xd) then
local g=cg:Filter(c49811252.spfilter,nil,e,tp)
if #g>0 and Duel.GetLocationCountFromEx(tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(49811252,1)) then
local sg=g:GetMinGroup(Card.GetAttack)
if #sg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,1,1,nil)
end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
else
local g=Duel.GetMatchingGroup(c49811252.ctfilter,tp,0,LOCATION_MZONE,nil)
local cg=g:GetMinGroup(Card.GetAttack)
if cg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
cg=cg:Select(tp,1,1,nil)
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(49811252,2)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
Duel.GetControl(cg,tp)
Debug.Message("老伙计,加入我吧!")
Duel.RegisterFlagEffect(tp,49811352,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
end
......@@ -26,7 +26,8 @@ function c49811253.initial_effect(c)
c:RegisterEffect(e1)
--xmaterial
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetDescription(aux.Stringid(49811253,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_MZONE)
......@@ -34,9 +35,13 @@ function c49811253.initial_effect(c)
e2:SetTarget(c49811253.xmtg)
e2:SetOperation(c49811253.xmop)
c:RegisterEffect(e2)
--xmaterial2
--local e22=Effect.Clone(e2)
--e22:SetCode(EVENT_BATTLE_DESTROYED)
--c:RegisterEffect(e22)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
......@@ -50,10 +55,12 @@ function c49811253.mfilter(c)
end
function c49811253.xyzcheck(g)
local tp=g:GetFirst():GetControler()
local xg=Duel.GetMatchingGroup(c49811253.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if xg:GetCount()==0 then return false end
local tg=xg:GetMaxGroup(Card.GetAttack)
return tg:IsExists(Card.IsControler,1,nil,1-tp)
local xg=Duel.GetMatchingGroup(c49811253.mfilter,tp,0,LOCATION_MZONE,nil)
--local xg=Duel.GetMatchingGroup(c49811253.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
--if xg:GetCount()==0 then return false end
--local tg=xg:GetMaxGroup(Card.GetAttack)
--return tg:IsExists(Card.IsControler,1,nil,1-tp)
return #xg>0
end
function c49811253.imecon(e)
return e:GetHandler():GetOverlayCount()>=5
......@@ -62,16 +69,16 @@ function c49811253.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c49811253.cfilter(c)
return c:IsSetCard(0x100d) and c:IsPreviousLocation(LOCATION_MZONE)
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c49811253.xmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c49811253.cfilter,1,nil)
end
function c49811253.xmfilter(c,e)
return c:IsSetCard(0x100d) and c:IsCanBeXyzMaterial(e:GetHandler())
return c:IsSetCard(0xd) and c:IsCanBeXyzMaterial(e:GetHandler())
end
function c49811253.xmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49811253.xmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,e:GetHandler(),e) end
if chk==0 then return true end
end
function c49811253.xmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c49811253.xmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler(),e)
......@@ -81,7 +88,6 @@ function c49811253.xmop(e,tp,eg,ep,ev,re,r,rp)
cg=cg:Select(tp,1,1,nil)
end
Duel.Overlay(e:GetHandler(),cg)
Debug.Message("弟兄们,助我一臂之力!")
end
function c49811253.spfilter(c,e,tp)
return c:IsSetCard(0x100d) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
......@@ -91,7 +97,6 @@ function c49811253.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(c49811253.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,0)
end
function c49811253.spop(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
......@@ -100,7 +105,8 @@ function c49811253.spop(e,tp,eg,ep,ev,re,r,rp)
if tc then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Damage(tp,tc:GetLevel()*1000,REASON_EFFECT)
Duel.SetLP(tp,Duel.GetLP(tp)-tc:GetLevel()*1000)
--Duel.Damage(tp,tc:GetLevel()*1000,REASON_EFFECT)
tc:CompleteProcedure()
end
end
......
--废铁龙心
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
--equipgt
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(s.eqcon)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
local e0=aux.AddThisCardInGraveAlreadyCheck(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetLabelObject(e0)
e2:SetCondition(s.eqcon2)
e2:SetTarget(s.eqtg)
e2:SetOperation(s.eqop)
c:RegisterEffect(e2)
if not s.global_activate_check then
s.global_activate_check=true
s.global_effect_table={}
s[0]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsOriginalSetCard(0x24) and rc:IsType(TYPE_SYNCHRO) and rc:IsFaceup() and rc:IsLocation(LOCATION_MZONE) and rc:GetFlagEffect(id)==0 then
s[0]=s[0]+1
local ct=s[0]
rc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,ct)
--Debug.Message("0")
s.global_effect_table[ct]=re
end
end
function s.eqfilter(c)
return c:IsFaceup() and c:IsOriginalSetCard(0x24) and c:IsType(TYPE_SYNCHRO)
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eg=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
if eg:GetCount()>0 then
local tc=eg:GetFirst()
Duel.HintSelection(eg)
Duel.Equip(tp,c,tc)
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
--
local cregister=Card.RegisterEffect
Card.RegisterEffect=function(card,effect,flag)
if effect then
--spell speed 2
if effect:IsHasType(EFFECT_TYPE_IGNITION) then
effect:SetType(EFFECT_TYPE_QUICK_O)
effect:SetCode(EVENT_FREE_CHAIN)
effect:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMINGS_CHECK_MONSTER,TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
local con=effect:GetCondition()
effect:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--Debug.Message("1")
if c:GetFlagEffectLabel(id) then
--Debug.Message("2")
local ct=c:GetFlagEffectLabel(id)
local ce=s.global_effect_table[ct]
if ce then
--Debug.Message("3")
local etg=e:GetTarget()
local eop=e:GetOperation()
local cetg=ce:GetTarget()
local ceop=ce:GetOperation()
return (not etg or not etg==cetg) and (not eop or not eop==ceop) and (not con or con(e,tp,eg,ep,ev,re,r,rp))
end
end
return not con or con(e,tp,eg,ep,ev,re,r,rp)
end)
end
end
return cregister(card,effect,flag)
end
--
tc:ReplaceEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD)
Card.RegisterEffect=cregister
end
end
function s.eqlimit(e,c)
local tp=e:GetHandlerPlayer()
return c:IsControler(tp)
end
function s.cfilter(c,tp,se)
return c:IsSetCard(0x24) and c:IsType(TYPE_SYNCHRO)
and (se==nil or c:GetReasonEffect()~=se)
end
function s.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(s.cfilter,1,nil,tp,se)
end
-- 废铁鬣蜥
function c49811456.initial_effect(c)
-- Effect: Reveal, destroy self, then destroy target cards
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811456,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,49811456)
e1:SetCondition(c49811456.rlcon1)
e1:SetCost(c49811456.cost)
e1:SetTarget(c49811456.target)
e1:SetOperation(c49811456.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c49811456.rlcon2)
c:RegisterEffect(e2)
-- Effect 2: Place "Scrap" Continuous Spell/Trap
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(49811456,1))
e3:SetCategory(CATEGORY_TOFIELD)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCountLimit(1,49811457)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c49811456.tfcon)
e3:SetTarget(c49811456.tftg)
e3:SetOperation(c49811456.tfop)
c:RegisterEffect(e3)
end
-- Condition: If a "Scrap" card exists on the field, can activate during opponent's turn
function c49811456.rlcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c49811456.filter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c49811456.rlcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c49811456.filter,tp,LOCATION_ONFIELD,0,1,nil)
end
-- Filter: Check for face-up "Scrap" cards
function c49811456.filter(c)
return c:IsSetCard(0x24) and c:IsFaceup()
end
-- Cost: Reveal this card to the opponent
function c49811456.cost(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
-- Target: Confirm availability of itself for destruction
function c49811456.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return e:GetHandler():IsDestructable(e)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
-- Filter: "Scrap" monsters excluding "Scrap Lizard"
function c49811456.scrapfilter(c,e)
return c:IsSetCard(0x24) and not c:IsCode(49811456) and c:IsDestructable(e) and c:IsType(TYPE_MONSTER)
end
-- Operation: Destroy self, then optionally destroy target cards
function c49811456.operation(e,tp,eg,ep,ev,re,r,rp)
-- Destroy the card itself (self-destruction)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_HAND) then
-- Ask player if they want to proceed with additional destruction
if Duel.Destroy(c,REASON_EFFECT)>0 and Duel.SelectYesNo(tp,aux.Stringid(49811456,2)) and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,e) and Duel.IsExistingMatchingCard(c49811456.scrapfilter,tp,LOCATION_DECK,0,1,nil,e) then
Duel.BreakEffect()
-- Select 1 card from hand or field
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,e)
if #g1>0 then
-- Select 1 "Scrap" monster from Deck
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,c49811456.scrapfilter,tp,LOCATION_DECK,0,1,1,nil,e)
if #g2>0 then
g1:Merge(g2)
Duel.Destroy(g1,REASON_EFFECT)
end
end
end
end
end
-- Effect 2: Place "Scrap" Continuous Spell/Trap
function c49811456.tfcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and re and re:GetHandler():IsSetCard(0x24)
end
function c49811456.pfilter(c)
return c:IsSetCard(0x24) and c:IsType(TYPE_CONTINUOUS) and c:IsSSetable() and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c49811456.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c49811456.pfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c49811456.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c49811456.pfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end
-- 废铁解构机
function c49811458.initial_effect(c)
c:EnableCounterPermit(0x492,LOCATION_SZONE)
c:SetCounterLimit(0x492,6)
-- Activation limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,49811458+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e0)
-- Place Scrap Counters
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c49811458.ctcon)
e1:SetOperation(c49811458.ctop)
c:RegisterEffect(e1)
-- Replacement for destruction
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c49811458.reptg)
e2:SetCountLimit(1)
e2:SetValue(c49811458.repval)
e2:SetOperation(c49811458.repop)
c:RegisterEffect(e2)
-- Remove counters and destroy a monster
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c49811458.sptg)
e3:SetOperation(c49811458.spop)
c:RegisterEffect(e3)
end
function c49811458.ctfilter(c,tp,re,e)
return c:IsSetCard(0x24)
and c:GetPreviousControler()==tp
and (not re or re:GetHandler()~=e:GetHandler()) -- 确保效果来源不是这张卡
end
function c49811458.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c49811458.ctfilter,1,nil,tp,re,e) -- 将 e 传递给 ctfilter
end
function c49811458.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x492,2)
end
-- Effect 2: Replacement for destruction
function c49811458.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsFaceup() and not c:IsReason(REASON_REPLACE) and c:GetPreviousControler()==tp
end
function c49811458.replacementfilter(c)
return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:IsDestructable()
end
function c49811458.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c49811458.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c49811458.replacementfilter,tp,LOCATION_HAND,0,1,nil) end
if Duel.SelectYesNo(tp,aux.Stringid(49811458,0)) then
return true
else
return false
end
end
function c49811458.repval(e,c)
return c49811458.repfilter(c,e:GetHandlerPlayer())
end
function c49811458.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c49811458.replacementfilter,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE)
end
end
-- Effect 3: Remove any number of counters and destroy a monster
function c49811458.filter(c,cc,e,tp)
return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:IsDestructable()
and c:GetLevel()>0 and cc:IsCanRemoveCounter(tp,0x492,c:GetLevel(),REASON_COST)
end
function c49811458.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49811458.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler(),e,tp) end
local g=Duel.GetMatchingGroup(c49811458.filter,tp,LOCATION_DECK,0,nil,e:GetHandler(),e,tp)
local lvt={}
local tc=g:GetFirst()
while tc do
local tlv=tc:GetLevel()
lvt[tlv]=tlv
tc=g:GetNext()
end
local pc=1
for i=1,12 do
if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end
end
lvt[pc]=nil
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(49811458,1))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
e:GetHandler():RemoveCounter(tp,0x492,lv,REASON_COST)
e:SetLabel(lv)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_DECK)
end
function c49811458.sfilter(c,lv)
return c:IsSetCard(0x24) and c:IsType(TYPE_MONSTER) and c:IsLevel(lv) and c:IsDestructable()
end
function c49811458.spop(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c49811458.sfilter),tp,LOCATION_DECK,0,1,1,nil,lv)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
-- 废铁传送机构
function c49811459.initial_effect(c)
aux.AddCodeList(c,49811459)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,49811459+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e0)
-- Effect 1: Protect "Scrap" cards from banishing
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(c49811459.protect)
c:RegisterEffect(e1)
-- Effect 2: Special Summon a "Scrap" monster
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c49811459.spcon)
e2:SetTarget(c49811459.sptg)
e2:SetOperation(c49811459.spop)
c:RegisterEffect(e2)
-- Effect 3: Destroy all non-"Scrap" cards when destroyed
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c49811459.descon)
e3:SetTarget(c49811459.destg)
e3:SetOperation(c49811459.desop)
c:RegisterEffect(e3)
end
-- Effect 1: Protection from banishing
function c49811459.protect(e,c)
return c:IsSetCard(0x24)
end
-- Effect 2: Condition for Special Summon
function c49811459.spcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
-- 触发条件:对手发动非破坏效果,且来源不是这张卡
return re:IsActiveType(TYPE_EFFECT)
and rp~=tp
and (not rc or not rc:IsCode(49811459))
and not re:IsHasCategory(CATEGORY_DESTROY) -- 排除破坏类效果
end
function c49811459.spfilter(c,e,tp)
return c:IsSetCard(0x24) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function c49811459.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c49811459.spfilter(chkc,e,tp) end
if chk==0 then
return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0)
and Duel.IsExistingTarget(c49811459.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c49811459.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c49811459.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local s1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
local s2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
local op=0
Duel.Hint(HINT_SELECTMSG,tp,0)
if s1 and s2 then
op=Duel.SelectOption(tp,aux.Stringid(49811459,1),aux.Stringid(49811459,2))
elseif s1 then
op=Duel.SelectOption(tp,aux.Stringid(49811459,1))
elseif s2 then
op=Duel.SelectOption(tp,aux.Stringid(49811459,2))+1
else
return
end
if op==0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
end
-- Restriction: Cannot Special Summon same card name using "Scrap Recycler"
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c49811459.splimit(tc:GetCode()))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c49811459.splimit(code)
return function(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(code) and se:GetHandler():IsCode(49811459)
end
end
-- Effect 3: Destroy all non-"Scrap" cards when destroyed
function c49811459.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT+REASON_DESTROY)
end
function c49811459.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
g:Remove(Card.IsSetCard,nil,0x24) -- Exclude "Scrap" cards
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c49811459.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
g:Remove(Card.IsSetCard,nil,0x24) -- Exclude "Scrap" cards
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
......@@ -14,7 +14,7 @@ function s.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.discost)
e1:SetTarget(s.distg)
......@@ -47,8 +47,8 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
function s.disfilter(c,e,tp)
return c:IsSetCard(0x836) and c:GetFlagEffect(id)>0 and c:IsAbleToHand()
......
......@@ -71,7 +71,7 @@ end
function c67200160.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c67200160.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
--黑羽驯鸟师-玄翼之隼匠·布莱克
function c98920795.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x33),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920795,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,98920795)
e3:SetCost(c98920795.spcost)
e3:SetTarget(c98920795.sptg)
e3:SetOperation(c98920795.spop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(98920795,ACTIVITY_SPSUMMON,c98920795.counterfilter)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920795,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,98920795)
e1:SetCondition(c98920795.spcon2)
e1:SetTarget(c98920795.sptg2)
e1:SetOperation(c98920795.spop2)
c:RegisterEffect(e1)
end
function c98920795.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_SYNCHRO)
end
function c98920795.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function c98920795.cfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost()
end
function c98920795.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(98920795,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c98920795.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98920795.filter(c,e,tp)
return c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920795.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local t=math.floor(Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)/2)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=t
and Duel.IsExistingMatchingCard(c98920795.filter,tp,LOCATION_DECK,0,t,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,t,tp,LOCATION_DECK)
end
function c98920795.spop(e,tp,eg,ep,ev,re,r,rp)
local t=math.floor(Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)/2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) and t>=2 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<t then return end
local g=Duel.GetMatchingGroup(c98920795.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>=t then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,t,t,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c98920795.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c98920795.RitualUltimateFilter(c,filter,e,tp,m1,greater_or_equal,chk)
if not c:IsType(TYPE_SYNCHRO) or not c:IsCode(73218989,9012916,60992105) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,true) then return false end
local mg=m1:Filter(Card.IsAbleToRemove,c,c)
local lv=c:GetLevel()
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal)
local res=mg:CheckSubGroup(Auxiliary.RitualCheck,1,lv,tp,c,lv,greater_or_equal)
Auxiliary.GCheckAdditional=nil
return res
end
function c98920795.RitualExtraFilter(c)
return c:GetLevel()>0 and c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c98920795.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(c98920795.RitualExtraFilter,tp,LOCATION_GRAVE,0,nil)
return Duel.IsExistingMatchingCard(c98920795.RitualUltimateFilter,tp,LOCATION_EXTRA,0,1,nil,filter,e,tp,mg,'Equal')
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end
function c98920795.cfilter2(c)
return c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)
end
function c98920795.spop2(e,tp,eg,ep,ev,re,r,rp)
::RitualUltimateSelectStart::
local mg=Duel.GetMatchingGroup(c98920795.RitualExtraFilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,Auxiliary.NecroValleyFilter(c98920795.RitualUltimateFilter),tp,LOCATION_EXTRA,0,1,1,nil,filter,e,tp,mg,'Equal')
local tc=tg:GetFirst()
local mat
if tc then
mg=mg:Filter(Card.IsAbleToRemove,tc,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local lv=tc:GetLevel()
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(tc,lv,'Equal')
mat=mg:SelectSubGroup(tp,Auxiliary.RitualCheck,true,1,lv,tp,tc,lv,'Equal')
Auxiliary.GCheckAdditional=nil
if not mat then goto RitualUltimateSelectStart end
Duel.Remove(mat,POS_FACEUP,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
\ No newline at end of file
--熔岩谷龙王
function c98920808.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_FIRE),1)
c:EnableReviveLimit()
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920808,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,98930808)
e2:SetCondition(c98920808.condition)
e2:SetTarget(c98920808.target)
e2:SetOperation(c98920808.operation)
c:RegisterEffect(e2)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920808,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,98920808)
e1:SetCondition(c98920808.spcon)
e1:SetCost(c98920808.spcost)
e1:SetTarget(c98920808.sptg)
e1:SetOperation(c98920808.spop)
c:RegisterEffect(e1)
end
function c98920808.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c98920808.filter(c,e,sp)
return c:IsSetCard(0x39) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c98920808.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920808.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local gct=Duel.GetMatchingGroupCount(c98920808.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
if ct>gct then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,gct,tp,LOCATION_GRAVE)
else
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,tp,LOCATION_GRAVE)
end
end
function c98920808.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g=Duel.GetMatchingGroup(c98920808.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
local gc=g:GetCount()
if gc==0 then return end
if gc<=ct then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ct,ct,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c98920808.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98920808.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_FIRE)
end
function c98920808.spcfilter(c)
return c:IsDefense(200) and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c98920808.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c98920808.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920808.spcfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98920808.spcfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98920808.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 c98920808.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if #cg==0 then return end
Duel.BreakEffect()
Duel.Destroy(cg,REASON_EFFECT)
end
end
\ No newline at end of file
--怒怒怒征服者
function c98920810.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920810,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98920810)
e1:SetCondition(c98920810.spcon)
e1:SetTarget(c98920810.sptg)
e1:SetOperation(c98920810.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920810,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,18514526)
e2:SetCost(c98920810.spcost)
e2:SetTarget(c98920810.sptg1)
e2:SetOperation(c98920810.spop1)
c:RegisterEffect(e2)
end
function c98920810.filter(c,e,tp)
return c:IsSetCard(0x13a) or c:IsCode(8512558) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920810.costfilter(c)
return bit.band(c:GetType(),0x82)==0x82 and not c:IsPublic()
end
function c98920810.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
end
function c98920810.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c98920810.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
end
function c98920810.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98920810.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
g:AddCard(e:GetHandler())
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c98920810.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1500) end
Duel.PayLPCost(tp,1500)
end
function c98920810.spfilter(c,e,tp)
return c:IsSetCard(0x82) and c:IsCanBeEffectTarget(e) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)) or (c:IsLevelAbove(5) and c:IsAbleToHand())
end
function c98920810.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98920810.spfilter(chkc,e,tp) end
local g=Duel.GetMatchingGroup(c98920810.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
local xg=g:Filter(Card.IsLevelAbove,nil,5)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=0 or #xg>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local t=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=g:SelectSubGroup(tp,c98920810.kcheck,false,1,99,t)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,3,0,0)
end
function c98920810.kcheck(sg,t)
return sg:FilterCount(Card.IsLevelBelow,nil,4)<=t
end
function c98920810.spop1(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=tg:Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst()
while tc do
if tc:IsLevelBelow(4) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
elseif tc:IsLevelAbove(5) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
tc=g:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c98920810.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98920810.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--混沌之青魔道士 混沌战士
function c98920812.initial_effect(c)
c:EnableReviveLimit()
c:EnableCounterPermit(0x1)
c:SetCounterLimit(0x1,3)
--ritual level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_RITUAL_LEVEL)
e2:SetValue(c98920812.rlevel)
c:RegisterEffect(e2)
--add counter
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_CHAINING)
e0:SetRange(LOCATION_MZONE)
e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c98920812.acop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920812,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,98920812)
e2:SetCost(c98920812.spcost)
e2:SetTarget(c98920812.sptg)
e2:SetOperation(c98920812.spop)
c:RegisterEffect(e2)
end
function c98920812.rlevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsSetCard(0xcf) then
local clv=c:GetLevel()
return (lv<<16)+clv
else return lv end
end
function c98920812.acop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(FLAG_ID_CHAINING)>0 then
e:GetHandler():AddCounter(0x1,1)
end
end
function c98920812.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetCounter(0x1)>0 and e:GetHandler():IsReleasable() end
e:SetLabel(e:GetHandler():GetCounter(0x1))
Duel.Release(e:GetHandler(),REASON_COST)
end
function c98920812.filter(c,e,tp)
return (c:IsSetCard(0xbd) or c:IsSetCard(0x10cf)) and not c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c98920812.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c98920812.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c98920812.spop(e,tp,eg,ep,ev,re,r,rp)
local lt=e:GetLabel()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if lt>ft then lt=ft end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c98920812.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,lt,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--幻想魔术少女
local s,id,o=GetID()
function c98920816.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id+o)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o*2)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+o*2)
e4:SetTarget(s.settg1)
e4:SetOperation(s.setop1)
c:RegisterEffect(e4)
end
function s.spfilter(c)
return c:IsSetCard(0x20a2) and not c:IsCode(98920816) and c:IsFaceupEx() and c:IsType(TYPE_MONSTER)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetMatchingGroupCount(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)>0
end
function s.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function s.thfilter(c)
return aux.IsCodeListed(c,38033121) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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 c98920816.spfilterx(c,e,tp,mc)
return c:IsCode(10000030) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c98920816.spfilterx,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98920816.spfilterx,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
function c98920816.thfilterx(c)
return c:IsCode(58143852) and c:IsAbleToHand()
end
function s.settg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDestructable() and Duel.IsExistingMatchingCard(c98920816.thfilterx,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.setop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98920816.thfilterx,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
end
\ No newline at end of file
--电子龙二型超载
function c98920817.initial_effect(c)
--code
aux.EnableChangeCode(c,70095154,LOCATION_MZONE+LOCATION_GRAVE)
--special summon (grave)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920817,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCountLimit(1,1142881)
e3:SetTarget(c98920817.sptg2)
e3:SetOperation(c98920817.spop2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--effect gain
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_BE_MATERIAL)
e5:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e5:SetCondition(c98920817.effcon)
e5:SetOperation(c98920817.effop)
c:RegisterEffect(e5)
end
function c98920817.filter(c,e,tp)
return c:IsCode(70095154) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920817.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98920817.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98920817.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98920817.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98920817.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if c:GetLevel()~=5 and Duel.SelectYesNo(tp,aux.Stringid(98920817,0)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(5)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
end
function c98920817.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION+REASON_XYZ)~=0 and e:GetHandler():GetReasonCard():IsRace(RACE_MACHINE)
end
function c98920817.effop(e,tp,eg,ep,ev,re,r,rp)
--atkchange
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e2=Effect.CreateEffect(rc)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetDescription(aux.Stringid(98920817,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c98920817.atktg)
e2:SetOperation(c98920817.atkop)
e2:SetCountLimit(1)
rc:RegisterEffect(e2,true)
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(98920817,5))
end
function c98920817.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsAttack(2000) end
end
function c98920817.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
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)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetOperation(c98920817.tgop)
e3:SetReset(RESET_EVENT+0xc6e0000)
c:RegisterEffect(e3)
end
end
function c98920817.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
\ No newline at end of file
--妖仙兽 谷惠风
function c98920825.initial_effect(c)
--set P
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920825,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,98920825)
e1:SetCost(c98920825.spcost)
e1:SetTarget(c98920825.sptg)
e1:SetOperation(c98920825.spop)
c:RegisterEffect(e1)
--extra pendulum
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98920825,3))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCondition(aux.exccon)
e5:SetCost(aux.bfgcost)
e5:SetCountLimit(1,98930825)
e5:SetTarget(c98920825.exptg)
e5:SetOperation(c98920825.expop)
c:RegisterEffect(e5)
end
function c98920825.spcost(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 c98920825.spfilter(c)
return c:IsSetCard(0xb3) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98920825.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c98920825.setfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1)
and g:GetClassCount(Card.GetCode)>=2 end
end
function c98920825.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) or not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.GetMatchingGroup(c98920825.setfilter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g1=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
local tc1=g1:GetFirst()
local tc2=g1:GetNext()
if Duel.MoveToField(tc1,tp,tp,LOCATION_PZONE,POS_FACEUP,false) then
if Duel.MoveToField(tc2,tp,tp,LOCATION_PZONE,POS_FACEUP,false) then
tc2:SetStatus(STATUS_EFFECT_ENABLED,true)
end
tc1:SetStatus(STATUS_EFFECT_ENABLED,true)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c98920825.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98920825.splimit(e,c)
return not c:IsSetCard(0xb3)
end
function c98920825.exptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,98920825)==0 end
end
function c98920825.expop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920825,4))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_PENDULUM_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCountLimit(1,98940825)
e1:SetValue(c98920825.pendvalue)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,98920825,RESET_PHASE+PHASE_END,0,1)
end
function c98920825.pendvalue(e,c)
return c:IsSetCard(0xb3)
end
\ No newline at end of file
--赛博空间的讯使
function c9910419.initial_effect(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,9910419)
e2:SetTarget(c9910419.thtg)
e2:SetOperation(c9910419.thop)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,9910419)
e1:SetTarget(c9910419.thtg)
e1:SetOperation(c9910419.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,9910419)
e4:SetCost(c9910419.spcost)
e4:SetTarget(c9910419.sptg)
e4:SetOperation(c9910419.spop)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,9910419)
e3:SetTarget(c9910419.sptg)
e3:SetOperation(c9910419.spop)
c:RegisterEffect(e3)
end
function c9910419.thfilter(c)
return c:IsSetCard(0x6950) and c:IsAbleToHand()
......@@ -42,12 +41,8 @@ function c9910419.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c9910419.spcost(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 c9910419.spfilter(c,e,tp)
return c:IsSetCard(0x6950) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x6950) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c9910419.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -59,7 +54,7 @@ function c9910419.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910419.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
end
......@@ -7,7 +7,7 @@ function c9910423.initial_effect(c)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,9910423)
......@@ -15,17 +15,18 @@ function c9910423.initial_effect(c)
e2:SetTarget(c9910423.sptg)
e2:SetOperation(c9910423.spop)
c:RegisterEffect(e2)
--draw
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetDescription(aux.Stringid(9910423,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,9910424)
e3:SetCondition(c9910423.drcon)
e3:SetTarget(c9910423.drtg)
e3:SetOperation(c9910423.drop)
e3:SetCondition(c9910423.thcon)
e3:SetTarget(c9910423.thtg)
e3:SetOperation(c9910423.thop)
c:RegisterEffect(e3)
end
function c9910423.rfilter(c,e,tp)
......@@ -34,10 +35,6 @@ function c9910423.rfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c9910423.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,lv+3,e,tp)
end
function c9910423.spfilter(c,lv,e,tp)
return c:IsLevelBelow(lv) and c:IsSetCard(0x6950) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_HAND) or Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT))
end
function c9910423.spfilter2(c,lv,e,tp)
return c:IsLevelBelow(lv) and c:IsSetCard(0x6950) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910423.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -50,34 +47,43 @@ end
function c9910423.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,0)
end
function c9910423.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910423.spfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp)
if g:GetCount()==0 or Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if g:GetFirst():IsPreviousLocation(LOCATION_DECK) then
Duel.BreakEffect()
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
local tc=Duel.SelectMatchingCard(tp,c9910423.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) and tc:IsPreviousLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c9910423.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c9910423.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c9910423.cfilter(c,tp,rp)
return rp==1-tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:GetPreviousControler()==tp and c:IsSetCard(0x6950)
return rp==1-tp and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsSetCard(0x6950)
end
function c9910423.drcon(e,tp,eg,ep,ev,re,r,rp)
function c9910423.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910423.cfilter,1,nil,tp,rp)
end
function c9910423.drtg(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)
function c9910423.thfilter(c)
return c:IsSetCard(0x6950) and c:IsAbleToHand()
end
function c9910423.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
function c9910423.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910423.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9910423.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910423.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 c9911281.initial_effect(c)
--spsummon from hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9911281)
e1:SetCost(c9911281.cost)
e1:SetTarget(c9911281.sptg1)
e1:SetOperation(c9911281.spop1)
c:RegisterEffect(e1)
--spsummon self
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,9911282)
e2:SetTarget(c9911281.sptg2)
e2:SetOperation(c9911281.spop2)
c:RegisterEffect(e2)
end
function c9911281.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c9911281.cfilter(c,e,tp)
return c:IsSetCard(0x6950) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c9911281.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
end
function c9911281.spfilter(c,e,tp)
return c:IsSetCard(0x6950) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9911281.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetHandler():IsPublic() or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
if e:GetLabel()~=0 then
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c9911281.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
else
return Duel.IsExistingMatchingCard(c9911281.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
end
end
if e:GetLabel()~=0 then
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9911281.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c9911281.spop1(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,c9911281.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9911281.sptg2(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 c9911281.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment