Commit 719efae7 authored by Nemo Ma's avatar Nemo Ma

update 1016

parent d1229794
No preview for this file type
expansions/pics/9910115.jpg

38.4 KB | W: | H:

expansions/pics/9910115.jpg

38.5 KB | W: | H:

expansions/pics/9910115.jpg
expansions/pics/9910115.jpg
expansions/pics/9910115.jpg
expansions/pics/9910115.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -42,7 +42,8 @@ function c65010086.refil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x9da0)
end
function c65010086.sumcon(e,c)
local tp=e:GetHandler():GetControler()
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c65010086.refil,tp,LOCATION_EXTRA,0,1,nil)
end
function c65010086.sumop(e,tp,eg,ep,ev,re,r,rp,c)
......
......@@ -34,7 +34,8 @@ function c65010088.refil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x9da0)
end
function c65010088.sumcon(e,c)
local tp=e:GetHandler():GetControler()
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c65010088.refil,tp,LOCATION_EXTRA,0,1,nil)
end
function c65010088.sumop(e,tp,eg,ep,ev,re,r,rp,c)
......
......@@ -66,7 +66,8 @@ function c65010090.refil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x9da0)
end
function c65010090.sumcon(e,c)
local tp=e:GetHandler():GetControler()
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c65010090.refil,tp,LOCATION_EXTRA,0,1,nil)
end
function c65010090.sumop(e,tp,eg,ep,ev,re,r,rp,c)
......
......@@ -64,7 +64,8 @@ function c65010092.refil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x9da0)
end
function c65010092.sumcon(e,c)
local tp=e:GetHandler():GetControler()
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c65010092.refil,tp,LOCATION_EXTRA,0,1,nil)
end
function c65010092.sumop(e,tp,eg,ep,ev,re,r,rp,c)
......
......@@ -38,7 +38,8 @@ function c65010094.refil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x9da0)
end
function c65010094.sumcon(e,c)
local tp=e:GetHandler():GetControler()
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c65010094.refil,tp,LOCATION_EXTRA,0,1,nil)
end
function c65010094.sumop(e,tp,eg,ep,ev,re,r,rp,c)
......
......@@ -41,20 +41,20 @@ function c9910024.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(fid*9910024+lab)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c9910024.retcon)
e1:SetOperation(c9910024.retop)
Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(9910024,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
tc:RegisterFlagEffect(9910035,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,lab)
end
end
end
function c9910024.retcon(e,tp,eg,ep,ev,re,r,rp)
local fid,tmp2=math.modf(e:GetLabel()/9910024)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(9910024)==fid then
if tc:GetFlagEffectLabel(9910024)==e:GetLabel() then
return true
else
e:Reset()
......@@ -62,8 +62,8 @@ function c9910024.retcon(e,tp,eg,ep,ev,re,r,rp)
end
end
function c9910024.retop(e,tp,eg,ep,ev,re,r,rp)
local lab=e:GetLabel()%9910024
local tc=e:GetLabelObject()
local lab=tc:GetFlagEffectLabel(9910035)
if lab==LOCATION_MZONE then
Duel.ReturnToField(tc)
end
......
......@@ -18,7 +18,7 @@ function c9910031.initial_effect(c)
e2:SetDescription(aux.Stringid(9910031,4))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+12289247)
e2:SetCode(EVENT_CUSTOM+9910031)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c9910031.spcon)
......@@ -33,6 +33,16 @@ function c9910031.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e3)
if not c9910031.global_check then
c9910031.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
ge1:SetCondition(c9910031.regcon)
ge1:SetOperation(c9910031.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c9910031.rpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
......@@ -68,8 +78,23 @@ function c9910031.rpop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c9910031.spcfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c9910031.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c9910031.spcfilter,1,nil,tp) then v=v+1 end
if eg:IsExists(c9910031.spcfilter,1,nil,1-tp) then v=v+2 end
if v==0 then return false end
e:SetLabel(v)
return true
end
function c9910031.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+9910031,re,r,rp,ep,e:GetLabel())
end
function c9910031.spcon(e,tp,eg,ep,ev,re,r,rp)
return ev==tp or ev==PLAYER_ALL
return ev==1 or ev==3
end
function c9910031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
--翱翔之折纸使
function c9910001.initial_effect(c)
function c9910034.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
......@@ -9,7 +9,7 @@ function c9910001.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c9910001.condtion)
e1:SetCondition(c9910034.condtion)
e1:SetValue(1)
c:RegisterEffect(e1)
--immune
......@@ -18,41 +18,41 @@ function c9910001.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c9910001.condtion)
e2:SetValue(c9910001.efilter)
e2:SetCondition(c9910034.condtion)
e2:SetValue(c9910034.efilter)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9910001,0))
e3:SetDescription(aux.Stringid(9910034,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,9910001)
e3:SetCountLimit(1,9910034)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(c9910001.thcon)
e3:SetOperation(c9910001.thop)
e3:SetCondition(c9910034.thcon)
e3:SetOperation(c9910034.thop)
c:RegisterEffect(e3)
end
function c9910001.mfilter(c)
function c9910034.mfilter(c)
return not c:IsType(TYPE_PENDULUM)
end
function c9910001.condtion(e)
function c9910034.condtion(e)
local c=e:GetHandler()
local mg=c:GetMaterial()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and mg:GetCount()>0 and not mg:IsExists(c9910001.mfilter,1,nil)
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and mg:GetCount()>0 and not mg:IsExists(c9910034.mfilter,1,nil)
end
function c9910001.efilter(e,te)
function c9910034.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end
function c9910001.thcon(e,tp,eg,ep,ev,re,r,rp)
function c9910034.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0
end
function c9910001.thfilter(c,g)
function c9910034.thfilter(c,g)
return c:IsAbleToHand() and g:IsContains(c)
end
function c9910001.thop(e,tp,eg,ep,ev,re,r,rp)
function c9910034.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
......@@ -61,8 +61,8 @@ function c9910001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveSequence(c,nseq)
local tg=c:GetColumnGroup()
tg:AddCard(c)
local g=Duel.GetMatchingGroup(c9910001.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tg)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910001,1)) then
local g=Duel.GetMatchingGroup(c9910034.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tg)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910034,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect()
......
--折纸使的狂岚
function c9910036.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c9910036.cost)
e1:SetTarget(c9910036.target)
e1:SetOperation(c9910036.activate)
c:RegisterEffect(e1)
end
function c9910036.filter1(c)
return c:GetSequence()<5 and c:IsAbleToRemove()
end
function c9910036.filter2(c)
return c:GetSequence()>4 and c:IsAbleToRemove()
end
function c9910036.filter3(c)
return c:IsFaceup() and c:IsAbleToRemove()
end
function c9910036.filter4(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function c9910036.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_EQUIP) and c:IsSetCard(0x951) and c:IsAbleToGraveAsCost()
end
function c9910036.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rt=4
if not Duel.IsExistingMatchingCard(c9910036.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then rt=rt-1 end
if not Duel.IsExistingMatchingCard(c9910036.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then rt=rt-1 end
if not Duel.IsExistingMatchingCard(c9910036.filter3,tp,LOCATION_SZONE,LOCATION_SZONE,1,c) then rt=rt-1 end
if not Duel.IsExistingMatchingCard(c9910036.filter4,tp,LOCATION_SZONE,LOCATION_SZONE,1,c) then rt=rt-1 end
local cg=Duel.GetMatchingGroup(c9910036.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
local ct=cg:GetClassCount(Card.GetCode)
if chk==0 then return rt>0 and ct>0 end
local ctt={}
local ctp=1
while rt>=ctp and ct>=ctp do
ctt[ctp]=ctp
ctp=ctp+1
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910036,0))
local st=Duel.AnnounceNumber(tp,table.unpack(ctt))
local rg=Group.CreateGroup()
for i=1,st do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=cg:Select(tp,1,1,nil)
cg:Remove(Card.IsCode,nil,sg:GetFirst():GetCode())
rg:Merge(sg)
end
Duel.SendtoGrave(rg,REASON_COST)
e:SetLabel(st)
end
function c9910036.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c9910036.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(c9910036.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b3=Duel.IsExistingMatchingCard(c9910036.filter3,tp,LOCATION_SZONE,LOCATION_SZONE,1,c)
local b4=Duel.IsExistingMatchingCard(c9910036.filter4,tp,LOCATION_SZONE,LOCATION_SZONE,1,c)
if chk==0 then return b1 or b2 or b3 or b4 end
local ct=e:GetLabel()
if ct>=3 then Duel.SetChainLimit(c9910036.chainlm) end
local sel=0
local off=0
repeat
local ops={}
local opval={}
off=1
if b1 then
ops[off]=aux.Stringid(9910036,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(9910036,2)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(9910036,3)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(9910036,4)
opval[off-1]=4
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
sel=sel+1
b1=false
elseif opval[op]==2 then
sel=sel+2
b2=false
elseif opval[op]==3 then
sel=sel+4
b3=false
else
sel=sel+8
b4=false
end
ct=ct-1
until ct==0 or off<3
e:SetLabel(sel)
if bit.band(sel,1)~=0 then
local g=Duel.GetMatchingGroup(c9910036.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_MZONE)
end
if bit.band(sel,2)~=0 then
local g=Duel.GetMatchingGroup(c9910036.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_MZONE)
end
if bit.band(sel,3)~=0 then
local g=Duel.GetMatchingGroup(c9910036.filter3,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_SZONE)
end
if bit.band(sel,4)~=0 then
local g=Duel.GetMatchingGroup(c9910036.filter4,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_SZONE)
end
end
function c9910036.chainlm(e,rp,tp)
return tp==rp
end
function c9910036.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if bit.band(sel,1)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9910036.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
if bit.band(sel,2)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9910036.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
if bit.band(sel,4)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9910036.filter3,tp,LOCATION_MZONE,LOCATION_SZONE,1,1,c)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
if bit.band(sel,8)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9910036.filter4,tp,LOCATION_MZONE,LOCATION_SZONE,1,1,c)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
......@@ -33,6 +33,7 @@ function c9910103.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(c9910103.tofifilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -44,8 +45,8 @@ function c9910103.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not tc:IsForbidden() then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
......@@ -72,6 +73,7 @@ function c9910103.spop(e,tp,eg,ep,ev,re,r,rp)
fc:RegisterEffect(e1)
end
Duel.ShuffleDeck(tp)
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
......
......@@ -28,10 +28,12 @@ function c9910104.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c9910104.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and e:GetHandler():IsAbleToDeck() end
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck() end
end
function c9910104.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -40,8 +42,8 @@ function c9910104.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not tc:IsForbidden() then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
......@@ -54,6 +56,7 @@ function c9910104.spop(e,tp,eg,ep,ev,re,r,rp)
end
else
Duel.Recover(tp,1000,REASON_EFFECT)
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
......@@ -68,6 +71,7 @@ end
function c9910104.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c9910104.posfilter,1,nil,nil,tp) end
Duel.SetTargetCard(eg)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,eg:GetCount(),0,0)
end
function c9910104.posop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -32,6 +32,7 @@ function c9910105.target(e,tp,eg,ep,ev,re,r,rp,chk)
and (Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910105.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp))) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c9910105.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -29,7 +29,7 @@ function Zcd.XyzCondition(f,lv,minc,maxc,alterf,desc,op)
end
if (not min or min<=1) and mg:IsExists(Zcd.XyzAlterFilter,minc,nil,alterf,c,e,tp,op) then
local ssg=mg:Filter(Zcd.XyzAlterFilter,nil,alterf,c,e,tp,op)
if ssg:IsExists(Zcd.MFilter,1,nil) then return true end
if ssg:IsExists(Zcd.MFilter,1,nil,c,tp) then return true end
end
local minc=minc
local maxc=maxc
......@@ -65,13 +65,13 @@ function Zcd.XyzTarget(f,lv,minc,maxc,alterf,desc,op)
local ssg=nil
if (not min or min<=1) and mg:IsExists(Zcd.XyzAlterFilter,minc,nil,alterf,c,e,tp,op) then
ssg=mg:Filter(Zcd.XyzAlterFilter,nil,alterf,c,e,tp,op)
b2=ssg:IsExists(Zcd.MFilter,1,nil)
b2=ssg:IsExists(Zcd.MFilter,1,nil,c,tp)
end
local g=nil
if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then
e:SetLabel(1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
g=ssg:FilterSelect(tp,Zcd.MFilter,1,1,nil)
g=ssg:FilterSelect(tp,Zcd.MFilter,1,1,nil,c,tp)
local tc=g:GetFirst()
mg:RemoveCard(tc)
local g2=mg:FilterSelect(tp,Zcd.XyzAlterFilter,minc-1,maxc-1,nil,alterf,c,e,tp,op)
......@@ -120,9 +120,9 @@ end
function Zcd.XyzAlterFilter(c,alterf,xyzc,e,tp,op)
return alterf(c)
and (c:IsCanBeXyzMaterial(xyzc) or ((bit.band(c:GetOriginalType(),TYPE_SPELL)~=0 or bit.band(c:GetOriginalType(),TYPE_TRAP)~=0) and not c:IsType(TYPE_MONSTER)))
and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0
and Auxiliary.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and (not op or op(e,tp,0,c))
end
function Zcd.MFilter(c)
function Zcd.MFilter(c,xyzc,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x952)
and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0
end
......@@ -19,6 +19,7 @@ function c9910108.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetLabelObject(c)
e2:SetCost(c9910108.descost)
e2:SetTarget(c9910108.destg)
e2:SetOperation(c9910108.desop)
......@@ -32,10 +33,12 @@ function c9910108.spfilter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910108.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and e:GetHandler():IsAbleToDeck()
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(c9910108.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function c9910108.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -45,8 +48,8 @@ function c9910108.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not tc:IsForbidden() then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
......@@ -65,13 +68,26 @@ function c9910108.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==0 then return end
Duel.ShuffleDeck(tp)
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
end
function c9910108.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local c=e:GetLabelObject()
local g=e:GetHandler():GetOverlayGroup()
if not g:IsContains(c) then return false end
g:RemoveCard(c)
if g:GetCount()==0 or (g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910108,1))) then
Duel.SendtoGrave(c,REASON_COST)
elseif Duel.SelectYesNo(tp,aux.Stringid(9910108,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local tg=g:Select(tp,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_COST)
end
else e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end
end
function c9910108.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
......
......@@ -27,6 +27,7 @@ function c9910109.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(1-tp,4)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck()
and rg:GetCount()>0 and rg:FilterCount(Card.IsAbleToRemove,nil)==4 end
......@@ -38,8 +39,8 @@ function c9910109.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not tc:IsForbidden() then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
......@@ -56,6 +57,7 @@ function c9910109.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableShuffleCheck()
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
......
......@@ -31,6 +31,7 @@ function c9910110.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(c9910110.tgfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -42,8 +43,8 @@ function c9910110.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not tc:IsForbidden() then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
......@@ -62,6 +63,7 @@ function c9910110.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.ShuffleDeck(tp)
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
......@@ -79,6 +81,7 @@ function c9910110.xmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9910110.xmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910110.xmfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x952) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c9910110.xmfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
......
......@@ -46,6 +46,7 @@ function c9910112.imtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9910112.ctfilter(chkc,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c9910112.ctfilter,tp,LOCATION_MZONE,0,1,c,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9910112.ctfilter,tp,LOCATION_MZONE,0,1,1,c,tp)
end
......
......@@ -45,6 +45,7 @@ function c9910113.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9910113.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910113.seqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910113,2))
Duel.SelectTarget(tp,c9910113.seqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
......@@ -64,6 +65,7 @@ function c9910113.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c9910113.thfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -33,10 +33,12 @@ function c9910114.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c9910114.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and e:GetHandler():IsAbleToDeck()
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck()
and Duel.IsPlayerCanDraw(tp,1) end
end
function c9910114.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -46,8 +48,8 @@ function c9910114.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not tc:IsForbidden() then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
......@@ -61,6 +63,7 @@ function c9910114.spop(e,tp,eg,ep,ev,re,r,rp)
else
Duel.Recover(1-tp,1000,REASON_EFFECT)
if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
......
......@@ -2,7 +2,7 @@
function c9910115.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_RECOVER)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910115)
......@@ -16,7 +16,6 @@ function c9910115.initial_effect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCost(c9910115.atkcost)
e2:SetCondition(c9910115.atkcon)
e2:SetTarget(c9910115.atktg)
e2:SetOperation(c9910115.atkop)
......@@ -26,10 +25,12 @@ function c9910115.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c9910115.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and e:GetHandler():IsAbleToDeck() end
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck() end
end
function c9910115.tgfilter(c)
return c:IsFaceup() and c:IsAbleToGrave()
......@@ -41,8 +42,8 @@ function c9910115.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if not tc:IsForbidden() then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
......@@ -54,7 +55,8 @@ function c9910115.spop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
else
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)==0 then return end
local g=Duel.GetMatchingGroup(c9910115.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910115,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......@@ -64,19 +66,16 @@ function c9910115.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c9910115.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c9910115.atkcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c9910115.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetOverlayCount(tp,1,1)>1 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c9910115.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) then
local ct=Duel.GetOverlayCount(tp,1,1)
if ct>0 then
local e1=Effect.CreateEffect(c)
......
......@@ -57,6 +57,7 @@ end
function c9910117.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0
and Duel.IsExistingMatchingCard(c9910117.cfilter,tp,0,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c9910117.gyfilter(c,g)
return g:IsContains(c)
......
--战车道少女·冷泉麻子
function c9910119.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910119)
e1:SetCost(c9910119.spcost)
e1:SetTarget(c9910119.sptg)
e1:SetOperation(c9910119.spop)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
end
function c9910119.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c9910119.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x952) end
end
function c9910119.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910119,0))
local sg=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x952)
local sc=sg:GetFirst()
if sc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(sc,0)
Duel.ConfirmDecktop(tp,1)
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
end
end
function c9910119.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
end
--战车道少女·角谷杏
function c9910120.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910120)
e1:SetCost(c9910120.spcost)
e1:SetTarget(c9910120.sptg)
e1:SetOperation(c9910120.spop)
c:RegisterEffect(e1)
--actlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(0,1)
e3:SetValue(1)
e3:SetCondition(c9910120.actcon)
c:RegisterEffect(e3)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCondition(c9910120.atkcon)
e3:SetValue(1600)
c:RegisterEffect(e3)
end
function c9910120.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c9910120.tofifilter(c)
return c:IsSetCard(0x952) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c9910120.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(c9910120.tofifilter,tp,LOCATION_DECK,0,1,nil) end
end
function c9910120.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c9910120.tofifilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()==0 then return end
Duel.SSet(tp,g)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
end
function c9910120.actcon(e)
return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil
end
function c9910120.atkcon(e)
local phase=Duel.GetCurrentPhase()
return phase==PHASE_DAMAGE_CAL and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil
end
--战车道装甲·丘吉尔MkⅦ
require("expansions/script/c9910106")
function c9910121.initial_effect(c)
--xyz summon
Zcd.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),5,2,c9910121.xyzfilter,aux.Stringid(9910121,0),99)
c:EnableReviveLimit()
--to deck top
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910121,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCondition(c9910121.ttcon)
e1:SetCost(c9910121.ttcost)
e1:SetTarget(c9910121.tttg)
e1:SetOperation(c9910121.ttop)
c:RegisterEffect(e1)
--draw & negate
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(9910121,2))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(c9910121.drcon)
e2:SetTarget(c9910121.drtg)
e2:SetOperation(c9910121.drop)
c:RegisterEffect(e2)
end
function c9910121.xyzfilter(c)
return (c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x952) and c:IsFaceup()))
and c:GetLevel()==5 and c:IsRace(RACE_MACHINE)
end
function c9910121.ttcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER)
end
function c9910121.ttcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c9910121.tttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x952)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c9910121.ttop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910121,3))
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x952)
local tc=g:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
function c9910121.drcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c9910121.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.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c9910121.drop(e,tp,eg,ep,ev,re,r,rp,chk)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==0 then return end
local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc)
if tc:IsType(TYPE_MONSTER) and tc:IsSetCard(0x952) then
Duel.BreakEffect()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
Duel.ShuffleHand(tp)
end
--战车道紧急增援
function c9910122.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c9910122.cost)
e1:SetTarget(c9910122.target)
e1:SetOperation(c9910122.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,9910122)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9910122.tdtg)
e2:SetOperation(c9910122.tdop)
c:RegisterEffect(e2)
end
function c9910122.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c9910122.filter(c,e,tp)
return c:IsSetCard(0x952) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910122.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910122.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c9910122.activate(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,c9910122.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(9910122,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(c9910122.descon)
e2:SetOperation(c9910122.desop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetCountLimit(1)
Duel.RegisterEffect(e2,tp)
Duel.SpecialSummonComplete()
end
end
function c9910122.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(9910122)~=0 then
return true
else
e:Reset()
return false
end
end
function c9910122.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
function c9910122.tdfilter(c)
return c:IsSetCard(0x952) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c9910122.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910122.tdfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c9910122.locfilter(c,sp)
return c:IsLocation(LOCATION_DECK) and c:IsControler(sp)
end
function c9910122.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c9910122.tdfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,nil)
if g:GetCount()~=2 then return end
if Duel.SendtoDeck(g,nil,0,REASON_EFFECT)~=2 then return end
local ct=Duel.GetOperatedGroup():FilterCount(c9910122.locfilter,nil,tp)
if ct~=0 then Duel.ShuffleDeck(tp) end
Duel.BreakEffect()
Duel.ConfirmDecktop(tp,1)
local tg=Duel.GetDecktopGroup(tp,1)
local tc=tg:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
end
end
--战车道少女·松本里子
function c9910123.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910123)
e1:SetCost(c9910123.spcost)
e1:SetTarget(c9910123.sptg)
e1:SetOperation(c9910123.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910123,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c9910123.drcon)
e2:SetTarget(c9910123.drtg)
e2:SetOperation(c9910123.drop)
c:RegisterEffect(e2)
end
function c9910123.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c9910123.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck() end
end
function c9910123.tgfilter(c)
return c:IsFacedown() and c:IsAbleToGrave()
end
function c9910123.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
else
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)==0 then return end
local g=Duel.GetMatchingGroup(c9910123.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910123,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
function c9910123.drcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c9910123.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c9910123.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) then
Duel.Draw(p,d,REASON_EFFECT)
end
end
--战车道少女·凯伊
function c9910124.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910124)
e1:SetCost(c9910124.spcost)
e1:SetTarget(c9910124.sptg)
e1:SetOperation(c9910124.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910124,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,9910125)
e2:SetCost(c9910124.thcost)
e2:SetTarget(c9910124.thtg)
e2:SetOperation(c9910124.thop)
c:RegisterEffect(e2)
end
function c9910124.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c9910124.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck()
and Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c9910124.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
else
Duel.DisableShuffleCheck()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
end
end
function c9910124.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c9910124.thfilter(c)
return c:IsSetCard(0x952) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c9910124.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910124.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9910124.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910124.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 c9910126.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_XYZ),1,1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910126,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9910126)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c9910126.sptg)
e1:SetOperation(c9910126.spop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
end
function c9910126.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x952)
end
function c9910126.filter2(c,e,tp)
return c:IsSetCard(0x952) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910126.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c9910126.filter1,tp,LOCATION_ONFIELD,0,1,c)
and Duel.IsExistingTarget(c9910126.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910126,1))
Duel.SelectTarget(tp,c9910126.filter1,tp,LOCATION_ONFIELD,0,1,1,c)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9910126,2))
local g=Duel.SelectTarget(tp,c9910126.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c9910126.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tg=Group.CreateGroup()
local tc1=g:Filter(Card.IsLocation,nil,LOCATION_ONFIELD):GetFirst()
local tc2=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst()
if tc2 and tc2:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)~=1 then return end
if c:IsRelateToEffect(e) then
tg:AddCard(c)
end
if tc1 and tc1:IsFaceup() and tc1:IsSetCard(0x952) and not tc1:IsImmuneToEffect(e) then
local og=tc1:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
tg:AddCard(tc1)
end
if tg:GetCount()>0 then
Duel.Overlay(tc2,tg)
end
end
end
--战车道少女·橙黄白毫
function c9910127.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9910127)
e1:SetCost(c9910127.spcost)
e1:SetTarget(c9910127.sptg)
e1:SetOperation(c9910127.spop)
c:RegisterEffect(e1)
--xyz material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,9910128)
e2:SetCondition(c9910127.xmcon)
e2:SetTarget(c9910127.xmtg)
e2:SetOperation(c9910127.xmop)
c:RegisterEffect(e2)
end
function c9910127.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c9910127.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsAbleToDeck()
and Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
end
function c9910127.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsSetCard(0x952) and tc:IsType(TYPE_MONSTER) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and not tc:IsForbidden() then
Duel.DisableShuffleCheck()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
else
local d1=Duel.Draw(tp,1,REASON_EFFECT)
local d2=Duel.Draw(1-tp,1,REASON_EFFECT)
if d1==0 or d2==0 then return end
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)==0 then return end
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
end
function c9910127.xmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c9910127.xmfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c9910127.xmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9910127.xmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910127.xmfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c9910127.xmfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c9910127.xmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
......@@ -29,7 +29,7 @@ function c9950066.initial_effect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCountLimit(1,99500660)
e2:SetCondition(c9950066.tgcon)
e2:SetTarget(c9950066.tgtg)
e2:SetOperation(c9950066.tgop)
......
......@@ -19,7 +19,7 @@ function c9950067.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1)
e3:SetCountLimit(19950067)
e3:SetCost(c9950067.drcost)
e3:SetTarget(c9950067.drtg)
e3:SetOperation(c9950067.drop)
......
......@@ -11,20 +11,13 @@ function c9950076.initial_effect(c)
e1:SetTarget(c9950076.target)
e1:SetOperation(c9950076.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(9950076,2))
e2:SetCost(c9950076.thcost)
c:RegisterEffect(e2)
end
function c9950076.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c9950076.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c9950076.cfilter(c)
function c9950076.cfilter(c,e,tp,ft)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xba5) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c9950076.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -24,19 +24,6 @@ function c9950087.initial_effect(c)
e1:SetTarget(c9950087.thtg)
e1:SetOperation(c9950087.thop)
c:RegisterEffect(e1)
--copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9950087,3))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(c9950087.target)
e2:SetOperation(c9950087.operation)
c:RegisterEffect(e2)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -69,38 +56,4 @@ function c9950087.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c9950087.cpfilter(c)
return c:IsSetCard(0x3ba5) and c:IsType(TYPE_XYZ) and c:IsAbleToRemove()
end
function c9950087.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE+LOCATION_EXTRA and c9950087.cpfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9950087.cpfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c9950087.cpfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,PLAYER_ALL,LOCATION_GRAVE+LOCATION_EXTRA)
end
function c9950087.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=1 then return end
local code=tc:GetCode()
local reset_flag=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END
c:CopyEffect(code, reset_flag, 1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(reset_flag)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1000)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
......@@ -33,7 +33,7 @@ function c9980652.initial_effect(c)
c:RegisterEffect(e4)
end
function c9980652.thfilter(c)
return c:IsCode(9980637,9980636) and c:IsAbleToHand()
return c:IsSetCard(0x9bcd) and c:IsLevelAbove(9) and c:IsAbleToHand()
end
function c9980652.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......
......@@ -36,7 +36,6 @@ function c9980663.initial_effect(c)
e2:SetDescription(aux.Stringid(9980663,0))
e2:SetCountLimit(1,99806630)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c9980663.descost)
e2:SetTarget(c9980663.destg)
e2:SetOperation(c9980663.desop)
c:RegisterEffect(e2)
......@@ -62,16 +61,6 @@ function c9980663.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c9980663.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9980663.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -22,6 +22,16 @@ function c9981105.initial_effect(c)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,99811050)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9981105.sptg)
e2:SetOperation(c9981105.spop)
c:RegisterEffect(e2)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -109,3 +119,19 @@ function c9981105.effop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c9981105.spfilter(c,e,tp)
return c:IsSetCard(0x5bc3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9981105.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9981105.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c9981105.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9981105.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
\ No newline at end of file
......@@ -14,13 +14,15 @@ function c9981110.initial_effect(c)
e1:SetTarget(c9981110.rmtg)
e1:SetOperation(c9981110.rmop)
c:RegisterEffect(e1)
--atkup
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c9981110.atkval)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,9981110)
e1:SetTarget(c9981110.sptg)
e1:SetOperation(c9981110.spop)
c:RegisterEffect(e1)
--negate
local e1=Effect.CreateEffect(c)
......@@ -30,7 +32,7 @@ function c9981110.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCountLimit(1,9981110)
e1:SetCondition(c9981110.descon)
e1:SetCost(c9981110.descost)
e1:SetTarget(c9981110.destg)
......@@ -49,12 +51,6 @@ end
function c9981110.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9981110,0))
end
function c9981110.atkfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x5bc3)
end
function c9981110.atkval(e,c)
return Duel.GetMatchingGroup(c9981110.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)*200
end
function c9981110.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
......@@ -100,4 +96,47 @@ function c9981110.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9981110,1))
end
end
function c9981110.desfilter(c)
return c:IsFaceup()
end
function c9981110.spfilter(c,e,tp)
return c:IsSetCard(0x5bc3) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9981110.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(e:GetLabel()) and chkc:IsControler(tp) and c9981110.desfilter(chkc) end
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local loc=LOCATION_ONFIELD
if ft==0 then loc=LOCATION_MZONE end
e:SetLabel(loc)
return Duel.IsExistingTarget(c9981110.desfilter,tp,loc,0,1,nil)
and Duel.IsExistingMatchingCard(c9981110.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c9981110.desfilter,tp,e:GetLabel(),0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c9981110.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9981110.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)
end
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(c9981110.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c9981110.splimit(e,c)
return not c:IsSetCard(0x5bc3) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
......@@ -8,6 +8,18 @@ function c9981136.initial_effect(c)
e1:SetTarget(c9981136.target)
e1:SetOperation(c9981136.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9981136,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,56577313)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9981136.sptg)
e2:SetOperation(c9981136.spop)
c:RegisterEffect(e2)
end
function c9981136.filter(c)
return c:IsSetCard(0x5bc3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......@@ -23,4 +35,24 @@ function c9981136.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
end
function c9981136.spfilter(c,e,tp)
return c:IsSetCard(0x5bc3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9981136.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9981136.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c9981136.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c9981136.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if ct<=0 or g:GetCount()==0 then return end
ct=math.min(ct,g:GetClassCount(Card.GetCode))
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,ct,ct)
if sg and sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -14,12 +14,6 @@ function c9981192.initial_effect(c)
e1:SetTarget(c9981192.thtg)
e1:SetOperation(c9981192.thop)
c:RegisterEffect(e1)
--spsummon
local e3=aux.AddRitualProcEqual2(c,c9981192.ritual_filter,LOCATION_HAND+LOCATION_DECK,nil,c9981192.mfilter1,c9981192.mfilter2)
e3:SetDescription(aux.Stringid(9981192,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9981192,2))
......@@ -30,11 +24,16 @@ function c9981192.initial_effect(c)
e1:SetTarget(c9981192.destg)
e1:SetOperation(c9981192.desop)
c:RegisterEffect(e1)
--ritual material
--tohand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL)
e3:SetValue(c9981192.mtval)
e3:SetDescription(aux.Stringid(9981192,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_HAND)
e3:SetCost(c9981192.thcost)
e3:SetTarget(c9981192.thtg2)
e3:SetOperation(c9981192.thop2)
c:RegisterEffect(e3)
--damage
local e1=Effect.CreateEffect(c)
......@@ -81,18 +80,6 @@ function c9981192.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c9981192.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsSetCard(0x5bc2,0x9bcd)
end
function c9981192.mfilter1(c)
return c:IsSetCard(0x5bc2,0x9bcd)
end
function c9981192.mfilter2(c,e,tp)
return c~=e:GetHandler()
end
function c9981192.mtval(e,c)
return c:IsSetCard(0x5bc2,0x9bcd)
end
function c9981192.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......@@ -117,3 +104,23 @@ function c9981192.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(p,d,REASON_EFFECT)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9981192,4))
end
function c9981192.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c9981192.thfilter2(c)
return c:IsSetCard(0x5bc2,0x9bcd) and not c:IsCode(9981192) and c:IsAbleToHand()
end
function c9981192.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9981192.thfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9981192.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c9981192.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c9981192.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
......@@ -51,7 +51,7 @@ function c9981200.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9981200,2))
end
function c9981200.thfilter(c)
return c:IsCode(9981119,9980636) and c:IsAbleToHand()
return (c:IsCode(9981119) or (c:IsSetCard(0x9bcd) and c:IsLevelAbove(9)))and c:IsAbleToHand()
end
function c9981200.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9981200.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
......
......@@ -51,7 +51,7 @@ function c9981202.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(9981202,1))
end
function c9981202.thfilter(c)
return c:IsCode(9981154,9980636) and c:IsAbleToHand()
return (c:IsCode(9981154) or (c:IsSetCard(0x9bcd) and c:IsLevelAbove(9)))and c:IsAbleToHand()
end
function c9981202.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9981202.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
......
......@@ -189,4 +189,8 @@
#沃亚森斯奥克斯 2201771890 920
!setname 0x920 邪魂
!setname 0x3920 终焉邪魂
\ No newline at end of file
!setname 0x3920 终焉邪魂
#TYGOC Submissions
#Desruc_6872 987
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