Commit a0b2af0b authored by 花桃白音's avatar 花桃白音

update 12.12

parent 62607e77
......@@ -5,7 +5,7 @@ stages:
variables:
GIT_DEPTH: "1"
LAST_UPDATE_DATE: "2023.11.19"
CURRENT_UPDATE_DATE: "2023.11.19"
CURRENT_UPDATE_DATE: "2023.12.12"
redtext:
stage: prepare
......
--贪欲的大恶魔
local s,id=GetID()
function s.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_DECK)
e0:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(s.spcon)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,id+10000)
e1:SetTarget(s.thtg2)
e1:SetOperation(s.thop2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DISCARD)
e3:SetCountLimit(1,id+20000)
e3:SetCost(s.spcost)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_HANDES)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DISCARD)
e4:SetCountLimit(1,id+20000)
e4:SetCost(s.spcost)
e4:SetTarget(s.drtg)
e4:SetOperation(s.drop)
c:RegisterEffect(e4)
--search
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,3))
e5:SetCategory(CATEGORY_HANDES+CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DISCARD)
e5:SetCountLimit(1,id+20000)
e5:SetCost(s.spcost)
e5:SetTarget(s.destg)
e5:SetOperation(s.desop)
c:RegisterEffect(e5)
end
function s.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,nil)==0
end
function s.thfilter2(c)
return c:IsSetCard(0x5540) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,400)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,400,REASON_EFFECT,true)
Duel.Damage(1-tp,400,REASON_EFFECT,true)
Duel.RDComplete()
Duel.Draw(tp,1,REASON_EFFECT)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),tp,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(s.spcon2)
e1:SetOperation(s.spop2)
if Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
end
Duel.RegisterEffect(e1,tp)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel()
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Draw(tp,2,REASON_EFFECT)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>2 and g:GetCount()>0 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,nil,3,3,REASON_EFFECT+REASON_DISCARD)==0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
local m=15005200
local cm=_G["c"..m]
cm.name="坠镞为林-柯莱"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+15005200)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--on-summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,15005200)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.target)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.thfilter(c)
return aux.IsCounterAdded(c,0x1f37) and c:IsAbleToHand() and not c:IsCode(15005200)
end
function cm.ctfilter(c)
return c:IsCanAddCounter(0x1f37,1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(m,3)},{b2,aux.Stringid(m,4)})
if op==1 then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e:SetOperation(cm.search)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
else
e:SetCategory(CATEGORY_COUNTER)
e:SetOperation(cm.ctplace)
end
end
function cm.search(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g~=0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.ctplace(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,cm.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if #g~=0 then
g:GetFirst():AddCounter(0x1f37,1)
Duel.RaiseEvent(g:GetFirst(),EVENT_CUSTOM+15005201,e,0,tp,tp,1)
end
end
\ No newline at end of file
local m=15005201
local cm=_G["c"..m]
cm.name="提纳里-由片叶管窥枯荣"
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CUSTOM+15005201)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.cttg)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.ctfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:GetCounter(0)~=0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and cm.ctfilter(chkc) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then
local count=tc:GetCounter(0x1f37)
local count1=tc:GetCounter(0x100e)
tc:RemoveCounter(tp,0,0,REASON_EFFECT)
if count1~=0 then Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0x100e,e,REASON_EFFECT,tp,tp,count) end
if count~=0 and tc:GetCounter(0x1f37)==0 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function cm.actfilter(c)
return c:IsCanAddCounter(0x1f37,1)
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.actfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.actfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #g~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local cg=g:Select(tp,1,2,nil)
local tc=cg:GetFirst()
while tc do
tc:AddCounter(0x1f37,1)
Duel.RaiseEvent(tc,EVENT_CUSTOM+15005201,e,0,tp,tp,1)
tc=cg:GetNext()
end
end
end
\ No newline at end of file
local m=15005202
local cm=_G["c"..m]
cm.name="卡维-天园的理想"
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
--counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.ctcon)
e1:SetTarget(cm.cttg)
e1:SetOperation(cm.ctop)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(15005202)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.rctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.ctfilter(c)
return c:IsCanAddCounter(0x1f37,1)
end
function cm.rctfilter(c)
return c:GetCounter(0x1f37)~=0
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetCounter(tp,LOCATION_MZONE,LOCATION_MZONE,0x1f37)==0 then return end
local ct0=Duel.GetCounter(tp,LOCATION_MZONE,0,0x1f37)
local ct1=Duel.GetCounter(1-tp,LOCATION_MZONE,0,0x1f37)
local sg=Duel.GetMatchingGroup(cm.rctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tc=sg:GetFirst()
while tc do
tc:RemoveCounter(tp,0x1f37,tc:GetCounter(0x1f37),REASON_EFFECT)
tc=sg:GetNext()
end
local cg=Duel.GetMatchingGroup(cm.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #cg~=0 then
local cc=cg:GetFirst()
while cc do
cc:AddCounter(0x1f37,1)
Duel.RaiseEvent(cc,EVENT_CUSTOM+15005201,e,0,tp,tp,1)
cc=cg:GetNext()
end
end
end
\ No newline at end of file
local m=15005203
local cm=_G["c"..m]
cm.name="艾尔海森-正理"
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,cm.lcheck)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetCondition(cm.tgcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(cm.tgcon)
e2:SetValue(cm.atktg)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCondition(cm.atkcon)
e3:SetValue(cm.atkval)
c:RegisterEffect(e3)
--place counter
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetCost(cm.ctcost)
e4:SetTarget(cm.cttg)
e4:SetOperation(cm.ctop)
c:RegisterEffect(e4)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.lctfilter(c)
return aux.IsCounterAdded(c,0x1f37)
end
function cm.lcheck(g,lc)
return g:IsExists(cm.lctfilter,1,nil)
end
function cm.tgcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.atktg(e,c)
return c:IsFaceup() and aux.IsCounterAdded(c,0x1f37) and c~=e:GetHandler()
end
function cm.atkcon(e)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and bc and bc:GetCounter(0x1f37)~=0
end
function cm.atkval(e)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc:GetCounter(0x1f37)*300
end
function cm.filter(c)
return c:GetCounter(0x1f37)>0
end
function cm.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function cm.ctfilter(c)
return c:IsCanAddCounter(0x1f37,1)
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.ctfilter,tp,0,LOCATION_MZONE,1,nil)
end
local count=Duel.GetCounter(tp,LOCATION_MZONE,0,0x1f37)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
Duel.RemoveCounter(tp,LOCATION_MZONE,0,0x1f37,Duel.GetCounter(tp,LOCATION_MZONE,0,0x1f37),REASON_COST)
Duel.SetTargetParam(count)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local x=0
while x<ct do
local g=Duel.GetMatchingGroup(cm.ctfilter,tp,0,LOCATION_MZONE,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(0x1f37,1)
Duel.RaiseEvent(tc,EVENT_CUSTOM+15005201,e,0,tp,tp,1)
x=x+1
end
end
\ No newline at end of file
local m=15005204
local cm=_G["c"..m]
cm.name="纳西妲-妙谛破愚之叶"
function cm.initial_effect(c)
--public
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,15005204)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
cm.public_effect=e1
--place
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,15005205)
e2:SetCondition(cm.regcon)
e2:SetTarget(cm.regtg)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.filter(c)
return c:GetCounter(0x1f37)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:RemoveCounter(tp,0x1f37,1,REASON_COST,e)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local fid=c:GetFieldID()
c:RegisterFlagEffect(15005204,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,fid,66)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
--Damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(15005204)
e2:SetRange(LOCATION_HAND)
e2:SetTargetRange(0,1)
e2:SetLabel(fid)
e2:SetLabelObject(c)
e2:SetCondition(cm.indcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e2:SetValue(300)
c:RegisterEffect(e2)
end
function cm.indcon(e)
local c=e:GetLabelObject()
return c:GetFlagEffectLabel(15005204)==e:GetLabel()
end
function cm.ctfilter(c)
return c:IsCanAddCounter(0x1f37,1)
end
function cm.rctfilter(c)
return c:GetCounter(0x1f37)==0
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ev>0 and eg and eg:IsExists(cm.rctfilter,1,nil) and ((e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE)) or (e:GetHandler():IsPublic() and e:GetHandler():IsLocation(LOCATION_HAND))) and not e:GetHandler():IsStatus(STATUS_CHAINING) and ((not re) or re~=c.public_effect)
end
function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(15005205)==0 end
c:RegisterFlagEffect(15005205,RESET_CHAIN,0,1)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local cg=eg:Filter(cm.rctfilter,nil):Filter(cm.ctfilter,nil)
if #cg~=0 then
local cc=cg:GetFirst()
while cc do
cc:AddCounter(0x1f37,1)
Duel.RaiseEvent(cc,EVENT_CUSTOM+15005201,e,0,tp,tp,1)
cc=cg:GetNext()
end
end
end
\ No newline at end of file
local m=15005206
local cm=_G["c"..m]
cm.name="瑶瑶-正思无邪"
function cm.initial_effect(c)
--place
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,15005206)
e1:SetCondition(cm.pccon)
e1:SetCost(cm.pccost)
e1:SetOperation(cm.pcop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,15005207)
e2:SetCost(cm.cost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.pccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.pccost(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 cm.pcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.ctop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.ctfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x1f37,1)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.ctfilter,1,nil) then
local g=eg:Filter(cm.ctfilter,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0x1f37,1,REASON_EFFECT)
Duel.RaiseEvent(tc,EVENT_CUSTOM+15005201,e,0,tp,tp,1)
tc=g:GetNext()
end
end
end
function cm.filter(c)
return c:GetCounter(0x1f37)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:RemoveCounter(tp,0x1f37,1,REASON_COST)
end
function cm.thfilter(c)
return aux.IsCounterAdded(c,0x1f37) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(15005206)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
local m=15005208
local cm=_G["c"..m]
cm.name="绮良良-沿途百景会心"
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,15005208)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(cm.indcon)
e3:SetOperation(cm.indop)
c:RegisterEffect(e3)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.spfilter(c,e,tp)
return aux.IsCounterAdded(c,0x1f37) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(15005208)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and e:GetHandler():IsCanAddCounter(0x1f37,1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.ConfirmCards(1-tp,g)
if c:IsRelateToEffect(e) and c:IsCanAddCounter(0x1f37,1) then
c:AddCounter(0x1f37,1,REASON_EFFECT)
Duel.RaiseEvent(c,EVENT_CUSTOM+15005201,e,0,tp,tp,1)
end
end
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_LINK
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(cm.indval)
e1:SetOwnerPlayer(ep)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function cm.indval(e,re,rp)
return rp==1-e:GetOwnerPlayer()
end
\ No newline at end of file
local m=15005209
local cm=_G["c"..m]
cm.name="白术-盈虚藏象"
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,15005209)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,15005210)
e3:SetTarget(cm.reptg)
e3:SetValue(cm.repval)
e3:SetOperation(cm.repop)
c:RegisterEffect(e3)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.ctfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanAddCounter(0x1f37,1)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and cm.ctfilter(chkc) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) and cm.ctfilter(tc) then
tc:AddCounter(0x1f37,1)
Duel.RaiseEvent(tc,EVENT_CUSTOM+15005201,e,0,tp,tp,1)
end
end
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:GetCounter(0x1f37)>0 and c:IsControler(tp)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp)
and Duel.IsCanRemoveCounter(tp,1,0,0x1f37,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function cm.repval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:RemoveCounter(tp,0x1f37,1,REASON_EFFECT)
end
\ No newline at end of file
local m=15005211
local cm=_G["c"..m]
cm.name="心景幻成-净善摄受明论"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(cm.ct2filter))
e2:SetValue(300)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--SearchCard
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,15005211)
e4:SetCost(cm.cost)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.ct1filter(c)
return c:IsCanAddCounter(0x1f37,1)
end
function cm.ct2filter(c)
return c:GetCounter(0x1f37)>0
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.ct1filter,tp,LOCATION_MZONE,LOCATION_MZONE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,cm.ct1filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if #g~=0 then
g:GetFirst():AddCounter(0x1f37,1)
Duel.RaiseEvent(g:GetFirst(),EVENT_CUSTOM+15005201,e,0,tp,tp,1)
end
end
end
function cm.filter(c)
return c:GetCounter(0x1f37)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:RemoveCounter(tp,0x1f37,1,REASON_COST)
end
function cm.thfilter(c)
return aux.IsCounterAdded(c,0x1f37) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
local m=15005212
local cm=_G["c"..m]
cm.name="显象缚结-谜林道破"
function cm.initial_effect(c)
--counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,15005212+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target1)
e1:SetOperation(cm.activate1)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,15005212+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.activate2)
c:RegisterEffect(e2)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.ctfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanAddCounter(0x1f37,1)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and cm.ctfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and cm.ctfilter(tc) then
tc:AddCounter(0x1f37,1)
Duel.RaiseEvent(tc,EVENT_CUSTOM+15005201,e,0,tp,tp,1)
end
end
function cm.atkfilter(c)
return c:IsFaceup() and c:GetCounter(0x1f37)>0 and (c:GetAttack()>0 or c:GetDefense()>0 or aux.NegateMonsterFilter(c))
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SET_ATTACK_FINAL)
e0:SetValue(0)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e1)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
\ No newline at end of file
local m=15005213
local cm=_G["c"..m]
cm.name="繁绘隅穹-工艺家的奇想"
function cm.initial_effect(c)
--counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,15005213+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.cttg)
e1:SetOperation(cm.ctop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,15005214)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.rctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.ctfilter(c)
return c:IsCanAddCounter(0x1f37,1)
end
function cm.rctfilter(c)
return c:GetCounter(0x1f37)~=0
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetCounter(tp,LOCATION_MZONE,LOCATION_MZONE,0x1f37)==0 then return end
local ct0=Duel.GetCounter(tp,LOCATION_MZONE,0,0x1f37)
local ct1=Duel.GetCounter(1-tp,LOCATION_MZONE,0,0x1f37)
local sg=Duel.GetMatchingGroup(cm.rctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tc=sg:GetFirst()
while tc do
tc:RemoveCounter(tp,0x1f37,tc:GetCounter(0x1f37),REASON_EFFECT)
tc=sg:GetNext()
end
local cg=Duel.GetMatchingGroup(cm.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #cg~=0 then
local cc=cg:GetFirst()
while cc do
cc:AddCounter(0x1f37,1)
Duel.RaiseEvent(cc,EVENT_CUSTOM+15005201,e,0,tp,tp,1)
cc=cg:GetNext()
end
end
end
function cm.spfilter(c,e,tp)
return aux.IsCounterAdded(c,0x1f37) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(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 m=15005215
local cm=_G["c"..m]
cm.name="造生缠藤箭-诸叶辨通"
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCountLimit(1,15005215+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--counter
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,15005216)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.cttg)
e3:SetOperation(cm.ctop)
c:RegisterEffect(e3)
if not TddSkandhaGlobalCheck then
TddSkandhaGlobalCheck=true
_SkandhaCRemoveCounter=Card.RemoveCounter
function Card.RemoveCounter(tc,p,countertype,ct,r,re)
if countertype==0 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),count)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),count)
end
end
if countertype==0x1f37 then
local count=tc:GetCounter(0x1f37)
if count>0 and not re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,nil,r,p,tc:GetControler(),ct)
elseif count>0 and re then
Duel.RaiseEvent(tc,EVENT_REMOVE_COUNTER+0x1f37,re,r,p,tc:GetControler(),ct)
end
end
return _SkandhaCRemoveCounter(tc,p,countertype,ct,r)
end
_SkandhaDRemoveCounter=Duel.RemoveCounter
function Duel.RemoveCounter(p,s,o,countertype,ct,r)
if countertype~=0x1f37 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
if s~=0 and o~=0 then
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local f=function(c)
return c:GetCounter(0x1f37)>0
end
local rmg=Duel.GetMatchingGroup(f,p,s,o,nil)
local rmg0=rmg:Filter(Card.IsControler,nil,0)
local rmg1=rmg:Filter(Card.IsControler,nil,1)
if #rmg0~=0 then
Duel.RaiseEvent(rmg0,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,0,ct)
end
if #rmg1~=0 then
Duel.RaiseEvent(rmg1,EVENT_REMOVE_COUNTER+0x1f37,nil,r,7,1,ct)
end
return _SkandhaDRemoveCounter(p,s,o,countertype,ct,r)
end
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD_P)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0=eg:Filter(Card.IsControler,nil,0):GetSum(Card.GetCounter,0x1f37)
local ct1=eg:Filter(Card.IsControler,nil,1):GetSum(Card.GetCounter,0x1f37)
e:SetLabel(ct0,ct1)
end)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_LEAVE_FIELD)
ge2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
return ct0~=0 or ct1~=0
end)
ge2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ct0,ct1=e:GetLabelObject():GetLabel()
if ct0~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,0,ct0)
end
if ct1~=0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+15005200,re,r,rp,1,ct1)
end
end)
ge2:SetLabelObject(ge1)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_CUSTOM+15005200)
ge3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0
end)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_REMOVE_COUNTER+0x1f37)
ge4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ev>0 and (rp==0 or rp==1)
end)
ge4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local x=100
if Duel.IsPlayerAffectedByEffect(ep,15005204) then
x=Duel.IsPlayerAffectedByEffect(ep,15005204):GetValue()
end
if Duel.IsPlayerAffectedByEffect(ep,15005202) then
Duel.Recover(ep,ev*x,REASON_EFFECT)
else
Duel.Damage(ep,ev*x,REASON_EFFECT)
end
end)
Duel.RegisterEffect(ge4,0)
end
end
cm.counter_add_list={0x1f37}
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetCounter(0x1f37)~=0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
local code=re:GetHandler():GetCode()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(cm.aclimit)
Duel.RegisterEffect(e1,tp)
end
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER)
end
function cm.actfilter(c)
return c:IsCanAddCounter(0x1f37,1)
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.actfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.actfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #g~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local cg=g:Select(tp,1,2,nil)
local tc=cg:GetFirst()
while tc do
tc:AddCounter(0x1f37,1)
Duel.RaiseEvent(tc,EVENT_CUSTOM+15005201,e,0,tp,tp,1)
tc=cg:GetNext()
end
end
end
\ No newline at end of file
--N×M 露丝
local s,id=GetID()
function s.summon(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id)
e2:SetCost(s.sumcost)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
end
function s.cfilter1(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end
function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,c,tp)
Duel.Release(g,REASON_COST)
end
function s.sumfilter(c)
return c:IsType(TYPE_SPIRIT) and c:IsSummonable(true,nil)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Summon(tp,c,true,nil)
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(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function s.splimit(e,c)
return not c:IsRace(RACE_FAIRY) and c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.tohand(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.retreg)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
end
function s.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnConditionForced)
e1:SetTarget(s.rettg)
e1:SetOperation(s.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.SpiritReturnConditionOptional)
c:RegisterEffect(e2)
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return true
else
return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE)
end
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,47320020)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
s.give(token)
end
end
function s.give(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47320020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.sccon)
e1:SetTarget(s.sctg)
e1:SetOperation(s.scop)
c:RegisterEffect(e1)
end
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.synfilter(c,tc,mg)
return c:IsSynchroSummonable(tc,mg)
end
function s.sfilter(c)
return c:IsType(TYPE_SPIRIT) or c:IsType(TYPE_TOKEN)
end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
function s.ontg(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,id-1000)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
function s.thfilter(c)
return c:IsSetCard(0x434) and c:IsType(TYPE_MONSTER) 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 s.initial_effect(c)
s.summon(c)
s.tohand(c)
s.ontg(c)
end
--N×M 图莉普
local s,id=GetID()
function s.summon(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id)
e2:SetCost(s.sumcost)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
end
function s.cfilter1(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end
function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,c,tp)
Duel.Release(g,REASON_COST)
end
function s.sumfilter(c)
return (c:IsType(TYPE_SPIRIT) or c:IsType(TYPE_TOKEN)) and c:IsFaceup()
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Summon(tp,c,true,nil)
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(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function s.splimit(e,c)
return not c:IsRace(RACE_FAIRY) and c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.tohand(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.retreg)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
end
function s.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnConditionForced)
e1:SetTarget(s.rettg)
e1:SetOperation(s.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.SpiritReturnConditionOptional)
c:RegisterEffect(e2)
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return true
else
return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE)
end
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,47320020)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
s.give(token)
end
end
function s.give(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47320020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.sccon)
e1:SetTarget(s.sctg)
e1:SetOperation(s.scop)
c:RegisterEffect(e1)
end
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.synfilter(c,tc,mg)
return c:IsSynchroSummonable(tc,mg)
end
function s.sfilter(c)
return c:IsType(TYPE_SPIRIT) or c:IsType(TYPE_TOKEN)
end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
function s.ontg(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,id-1000)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
function s.thfilter(c)
return c:IsSetCard(0x434) 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 s.initial_effect(c)
s.summon(c)
s.tohand(c)
s.ontg(c)
end
--N×M 桑弗洛
local s,id=GetID()
function s.summon(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id)
e2:SetCondition(s.sumcon)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
end
function s.cfilter1(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end
function s.spfilter(c,tp)
return c:IsSetCard(0x434) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsControler(tp)
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.spfilter,1,nil,tp)
end
function s.sumfilter(c)
return c:IsType(TYPE_SPIRIT) and c:IsSummonable(true,nil)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Summon(tp,c,true,nil)
end
end
function s.tohand(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.retreg)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
end
function s.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnConditionForced)
e1:SetTarget(s.rettg)
e1:SetOperation(s.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.SpiritReturnConditionOptional)
c:RegisterEffect(e2)
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return true
else
return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE)
end
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,47320020)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
s.give(token)
end
end
function s.give(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47320020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.sccon)
e1:SetTarget(s.sctg)
e1:SetOperation(s.scop)
c:RegisterEffect(e1)
end
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.synfilter(c,tc,mg)
return c:IsSynchroSummonable(tc,mg)
end
function s.sfilter(c)
return c:IsType(TYPE_SPIRIT) or c:IsType(TYPE_TOKEN)
end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
function s.ontg(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,id-1000)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
function s.thfilter(c)
return c:IsSetCard(0x434) and c:IsAbleToHand() and not c:IsCode(47320003)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
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_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.initial_effect(c)
s.summon(c)
s.tohand(c)
s.ontg(c)
end
--N×M 康乃馨
local s,id=GetID()
function s.peff(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.scost)
e1:SetTarget(s.stg)
e1:SetOperation(s.sop)
c:RegisterEffect(e1)
end
function s.scost(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 s.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0)
end
function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsSetCard(0x434)
end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function s.search(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id-1000)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
end
function s.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function s.filter(c,tp)
if not Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) then return false end
return c:IsType(TYPE_SPIRIT) and c:IsLevel(4) and c:IsAbleToRemove()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then
local code=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function s.tohand(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.retreg)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
end
function s.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnConditionForced)
e1:SetTarget(s.rettg)
e1:SetOperation(s.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.SpiritReturnConditionOptional)
c:RegisterEffect(e2)
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return true
else
return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320021,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_WATER)
end
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320021,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_WATER) then
local token=Duel.CreateToken(tp,47320021)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
s.give(token)
end
end
function s.give(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47320021,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1)
e2:SetCondition(s.fscon)
e2:SetTarget(s.fstg)
e2:SetOperation(s.fsop)
c:RegisterEffect(e2)
end
function s.fscon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.mfilter(c,e)
return c:IsReleasable() and not c:IsImmuneToEffect(e)
end
function s.sfilter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FAIRY) 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.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.mfilter,nil,e)
local res=Duel.IsExistingMatchingCard(s.sfilter,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.sfilter,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)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
end
function s.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.mfilter,nil,e)
local sg1=Duel.GetMatchingGroup(s.sfilter,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.sfilter,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.Release(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.onrelease(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_DECK)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id-2000)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg2)
e1:SetOperation(s.thop2)
c:RegisterEffect(e1)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_RELEASE) and c:IsLocation(LOCATION_EXTRA)
and c:IsFaceup()
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
function s.initial_effect(c)
s.peff(c)
s.search(c)
s.tohand(c)
s.onrelease(c)
end
--N×M 艾莉丝
local s,id=GetID()
function s.sptoken(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
end
function s.costfilter(c)
return (c:IsSetCard(0x434) or (c:IsType(TYPE_SPIRIT) and c:IsType(TYPE_MONSTER))) and not c:IsPublic()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,47320020)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
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(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function s.splimit(e,c)
return not c:IsRace(RACE_FAIRY) and c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.tohand(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.retreg)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
end
function s.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnConditionForced)
e1:SetTarget(s.rettg)
e1:SetOperation(s.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.SpiritReturnConditionOptional)
c:RegisterEffect(e2)
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return true
else
return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320021,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_WATER)
end
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320021,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_WATER) then
local token=Duel.CreateToken(tp,47320021)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
s.give(token)
end
end
function s.give(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47320021,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1)
e2:SetCondition(s.fscon)
e2:SetTarget(s.fstg)
e2:SetOperation(s.fsop)
c:RegisterEffect(e2)
end
function s.fscon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.mfilter(c,e)
return c:IsReleasable() and not c:IsImmuneToEffect(e)
end
function s.sfilter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FAIRY) 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.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.mfilter,nil,e)
local res=Duel.IsExistingMatchingCard(s.sfilter,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.sfilter,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)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
end
function s.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.mfilter,nil,e)
local sg1=Duel.GetMatchingGroup(s.sfilter,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.sfilter,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.Release(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.ontg(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,id-1000)
e1:SetCondition(s.setcon)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
function s.setfilter(c)
return c:IsSetCard(0x434) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsSSetable() end
if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and
Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
function s.initial_effect(c)
s.sptoken(c)
s.tohand(c)
s.ontg(c)
end
--N×M 佩图莉娅
local s,id=GetID()
function s.eff1(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c,lg)
return lg:IsContains(c)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(s.cfilter,1,nil,lg)
end
function s.lkfilter(c,att)
return c:IsFaceup() and c:IsAttribute(att)
end
function s.filter(c)
return (c:IsSetCard(0x434) or c:IsType(TYPE_SPIRIT)) and c:IsFaceup()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) and lg:IsExists(s.lkfilter,1,nil,ATTRIBUTE_FIRE)
local b2=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) and lg:IsExists(s.lkfilter,1,nil,ATTRIBUTE_WATER)
local b3=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and lg:IsExists(s.lkfilter,1,nil,ATTRIBUTE_ALL-ATTRIBUTE_FIRE-ATTRIBUTE_WATER)
if chk==0 then return b1 or b2 or b3 end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local lg=e:GetHandler():GetLinkedGroup()
local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) and lg:IsExists(s.lkfilter,1,nil,ATTRIBUTE_FIRE)
local res=0
if b1 then
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,1,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
res=res+1
tc=g:GetNext()
end
Duel.BreakEffect()
Duel.Damage(1-tp,800,REASON_EFFECT)
end
lg=e:GetHandler():GetLinkedGroup()
local b2=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) and lg:IsExists(s.lkfilter,1,nil,ATTRIBUTE_WATER)
if b2 then
if res~=0 then Duel.BreakEffect() end
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,0,1,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
res=res+1
tc=g:GetNext()
end
Duel.BreakEffect()
Duel.Recover(tp,600,REASON_EFFECT)
end
lg=e:GetHandler():GetLinkedGroup()
local b3=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>1
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and lg:IsExists(s.lkfilter,1,nil,ATTRIBUTE_ALL-ATTRIBUTE_FIRE-ATTRIBUTE_WATER)
if b3 then
if res~=0 then Duel.BreakEffect() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tg=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SSet(tp,tg)
end
end
function s.setfilter(c)
return c:IsSetCard(0x434) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.eff2(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id-1000)
e1:SetCondition(s.drcon)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
c:RegisterEffect(e1)
end
function s.drfilter(c,lg)
return c:IsType(TYPE_TOKEN) and lg:IsContains(c)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(s.drfilter,1,nil,lg)
end
function s.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)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_SPIRIT),2,2)
s.eff1(c)
s.eff2(c)
end
--N×M 薇尔莉特
local s,id=GetID()
function s.peff(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKBOTTOM,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x434) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsCanBeSpecialSummoned(e,0,tp,true,false) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
function s.remove(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id-1000)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCondition(s.rmcon)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)~=0
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function s.toextra(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.retreg)
c:RegisterEffect(e1)
end
function s.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnConditionForced)
e1:SetTarget(s.rettg)
e1:SetOperation(s.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.SpiritReturnConditionOptional)
c:RegisterEffect(e2)
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return true
else
return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320021,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_WATER)
end
end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoExtraP(c,nil,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320021,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_WATER) then
local token=Duel.CreateToken(tp,47320021)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
s.give(token)
end
end
function s.give(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47320021,0))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1)
e2:SetCondition(s.fscon)
e2:SetTarget(s.fstg)
e2:SetOperation(s.fsop)
c:RegisterEffect(e2)
end
function s.fscon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.mfilter(c,e)
return c:IsReleasable() and not c:IsImmuneToEffect(e)
end
function s.sfilter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FAIRY) 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.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.mfilter,nil,e)
local res=Duel.IsExistingMatchingCard(s.sfilter,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.sfilter,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)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
end
function s.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.mfilter,nil,e)
local sg1=Duel.GetMatchingGroup(s.sfilter,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.sfilter,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.Release(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.onleave(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,id-2000)
e1:SetCondition(s.pcon)
e1:SetTarget(s.ptg)
e1:SetOperation(s.pop)
c:RegisterEffect(e1)
end
function s.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and bit.band(c:GetPreviousTypeOnField(),TYPE_TOKEN)~=0
end
function s.pcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(s.cfilter,1,nil,tp) and not eg:IsContains(c) and c:IsFaceup()
end
function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function s.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end
end
function s.ffilter(c)
return c:IsFusionSetCard(0x434) or c:IsFusionType(TYPE_SPIRIT)
end
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,s.ffilter,2,true)
s.peff(c)
s.remove(c)
s.toextra(c)
s.onleave(c)
end
--N×M 普拉姆·布罗瑟
local s,id=GetID()
function s.peff(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.descost)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKBOTTOM,REASON_COST)
end
function s.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.desfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function s.negate(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id-1000)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCondition(s.ngcon)
e2:SetTarget(s.ngtg)
e2:SetOperation(s.ngop)
c:RegisterEffect(e2)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.ngcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)~=0
end
function s.ngtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
end
function s.ngop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function s.toextra(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.retreg)
c:RegisterEffect(e1)
end
function s.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnConditionForced)
e1:SetTarget(s.rettg)
e1:SetOperation(s.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.SpiritReturnConditionOptional)
c:RegisterEffect(e2)
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return true
else
return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE)
end
end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoExtraP(c,nil,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,47320020)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
s.give(token)
end
end
function s.give(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47320020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.sccon)
e1:SetTarget(s.sctg)
e1:SetOperation(s.scop)
c:RegisterEffect(e1)
end
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.synfilter(c,tc,mg)
return c:IsSynchroSummonable(tc,mg)
end
function s.sfilter(c)
return (c:IsType(TYPE_SPIRIT) or c:IsType(TYPE_TOKEN)) and c:IsFaceup()
end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(s.synfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_MZONE,0,nil)
if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(s.synfilter,tp,LOCATION_EXTRA,0,nil,c,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c,mg)
end
end
function s.onleave(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetRange(LOCATION_EXTRA)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id-2000)
e1:SetCondition(s.pcon)
e1:SetTarget(s.ptg)
e1:SetOperation(s.pop)
c:RegisterEffect(e1)
end
function s.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and bit.band(c:GetPreviousTypeOnField(),TYPE_TOKEN)~=0
end
function s.pcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(s.cfilter,1,nil,tp) and not eg:IsContains(c) and c:IsFaceup()
end
function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function s.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end
end
function s.ffilter(c)
return c:IsFusionSetCard(0x434) or c:IsFusionType(TYPE_SPIRIT)
end
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_FAIRY),1,99)
s.peff(c)
s.negate(c)
s.toextra(c)
s.onleave(c)
end
--N×M 达丽雅
local s,id=GetID()
function s.release(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.rlcost)
e1:SetTarget(s.rltg)
e1:SetOperation(s.rlop)
c:RegisterEffect(e1)
end
function s.rlcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.rltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsReleasableByEffect() end
if chk==0 then return Duel.IsExistingTarget(Card.IsReleasableByEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,Card.IsReleasableByEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
if e:GetHandler():GetOverlayGroup():FilterCount(Card.IsSetCard,nil,0x434)~=0 then
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(600)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,600)
end
end
function s.sovfilter(c)
return c:IsSetCard(0x434) and c:GetOriginalType()&TYPE_MONSTER~=0
end
function s.rlop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Release(tc,REASON_EFFECT)
if e:GetHandler():GetOverlayGroup():FilterCount(s.sovfilter,nil)~=0 then
Duel.BreakEffect()
Duel.Recover(tp,600,REASON_EFFECT)
end
end
end
function s.toextra(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.retreg)
c:RegisterEffect(e1)
end
function s.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnConditionForced)
e1:SetTarget(s.rettg)
e1:SetOperation(s.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.SpiritReturnConditionOptional)
c:RegisterEffect(e2)
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return true
else
return c:IsAbleToExtra()
end
end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,0,0)
if c:GetOverlayGroup():FilterCount(Card.IsAbleToHand,nil)~=0 then
local g=c:GetOverlayGroup():Filter(Card.IsAbleToHand,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0)
end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local g=c:GetOverlayGroup():Filter(Card.IsAbleToHand,nil)
if #g>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
local cg=g:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #cg>0 then
Duel.ConfirmCards(1-tp,cg)
end
end
Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
function s.onrelease(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_RELEASE)
e1:SetCountLimit(1,id-1000)
e1:SetCondition(s.ovcon)
e1:SetTarget(s.ovtg)
e1:SetOperation(s.ovop)
c:RegisterEffect(e1)
end
function s.ovcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSetCard,1,nil,0x434)
end
function s.ovfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ovfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
end
function s.ovop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,s.ovfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(e:GetHandler(),g)
end
end
function s.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SPIRIT),4,2,nil,nil,99)
c:EnableReviveLimit()
s.release(c)
s.toextra(c)
s.onrelease(c)
end
--N×M 居所
local s,id=GetID()
function s.summon(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x434))
c:RegisterEffect(e1)
end
function s.indes(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(s.indtg)
e1:SetValue(s.indct)
c:RegisterEffect(e1)
end
function s.indtg(e,c)
return c:IsType(TYPE_SPIRIT) or c:IsType(TYPE_TOKEN)
end
function s.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
function s.recover(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetCondition(s.rccon)
e1:SetTarget(s.rctg)
e1:SetOperation(s.rcop)
c:RegisterEffect(e1)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.filter(c)
return c:IsType(TYPE_SPIRIT) and c:IsFaceup()
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.filter,nil)
if #g>0 then
local tc=g:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),id,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
end
function s.rccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)~=0
end
function s.tdfilter(c)
return c:IsType(TYPE_SPIRIT) and c:IsAbleToDeck()
end
function s.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function s.fselect(g)
return g:IsExists(Card.IsType,1,nil,TYPE_SPIRIT)
end
function s.rcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=g:SelectSubGroup(tp,s.fselect,false,1,3)
if #tg>0 then
local cg=tg:Filter(Card.IsLocation,nil,LOCATION_HAND)
Duel.ConfirmCards(1-tp,cg)
local co=Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
if co>0 then
Duel.BreakEffect()
if Duel.Recover(tp,co*600,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetOperation(s.drop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanDraw(tp,1) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
s.summon(c)
s.indes(c)
s.recover(c)
end
--N×M 迎接
local s,id=GetID()
function s.active(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsSetCard(0x434) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.sfilter(c,code,e)
return not c:IsCode(code) and c:IsSummonable(true,nil) and c:IsLevel(4)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,tc:GetCode())
and Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_HAND,0,1,nil,tc:GetCode(),e)
and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_HAND,0,1,1,nil,tc:GetCode(),e)
local sc=sg:GetFirst()
if sc then
Duel.Summon(tp,sc,true,nil)
end
end
end
end
function s.changelv(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(aux.bfgcost)
e1:SetTarget(s.lvtg)
e1:SetOperation(s.lvop)
c:RegisterEffect(e1)
end
function s.lvfilter(c)
return (c:IsType(TYPE_SPIRIT) or c:IsType(TYPE_TOKEN)) and c:IsFaceup() and c:GetLevel()>0
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local sel=0
local lvl=1
if tc:IsLevel(1) then
sel=Duel.SelectOption(tp,aux.Stringid(id,3))
else
sel=Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))
end
if sel==1 then
lvl=-1
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lvl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function s.initial_effect(c)
s.active(c)
s.changelv(c)
end
--N×M 休憩
local s,id=GetID()
function s.active(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON+CATEGORY_POSITION+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsType(TYPE_TOKEN) and c:IsReleasable()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,0,0,0)
end
function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsType(TYPE_SPIRIT) and c:IsLevel(4)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
Duel.BreakEffect()
local tt=Duel.GetFirstTarget()
if tt and tt:IsRelateToEffect(e) then
Duel.Release(tt,REASON_EFFECT)
end
end
end
function s.recover(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetCondition(s.rccon)
e1:SetCost(aux.bfgcost)
e1:SetOperation(s.rcop)
c:RegisterEffect(e1)
end
function s.rfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPIRIT)
end
function s.rccon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.rcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,ev,REASON_EFFECT)
end
function s.initial_effect(c)
s.active(c)
s.recover(c)
end
--N×M 清扫
local s,id=GetID()
function s.active(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.rfilter(c)
return c:IsReleasable() and c:IsType(TYPE_MONSTER)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local att=tc:GetAttribute()
if Duel.Release(g,REASON_EFFECT)>0 and Duel.NegateEffect(ev) then
Duel.BreakEffect()
if att&ATTRIBUTE_FIRE~=0 and Duel.GetMZoneCount(tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320020,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,47320020)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
if att&ATTRIBUTE_WATER~=0 and Duel.GetMZoneCount(tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47320021,0x434,TYPES_TOKEN_MONSTER,1000,1000,4,RACE_FAIRY,ATTRIBUTE_WATER) then
local token=Duel.CreateToken(tp,47320021)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
if att&(ATTRIBUTE_ALL-ATTRIBUTE_FIRE-ATTRIBUTE_WATER)~=0 and Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_SZONE,1,1,nil)
Duel.Destroy(tg,REASON_EFFECT)
end
end
end
end
function s.set(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_RECOVER)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id-1000)
e1:SetCondition(s.setcon)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
end
end
function s.initial_effect(c)
s.active(c)
s.set(c)
end
......@@ -3,7 +3,7 @@ local s,id=GetID()
function s.initial_effect(c)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetDescription(aux.Stringid(id,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
......
......@@ -3,7 +3,7 @@ local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......
......@@ -227,6 +227,9 @@
!setname 0x9540 西风教会
!setname 0xa540 璃月
!setname 0xc540 契约
!setname 0xe540 须弥
!counter 0x410 棱镜指示物
!counter 0x1406 蕴种印指示物
#yuangeril 1404497238 118 0x310-0x31f
!setname 0x3310 创造物
......@@ -460,6 +463,7 @@
!counter 0x1f30 红指示物
!counter 0x1f31 岩指示物
!counter 0x1f33 理智
!counter 0x1f37 蕴种指示物
!counter 0xf3c 幻象指示物
!counter 0xf3f 隐痛指示物
......
# Delete List (Codepage is UTF-8, please use TAB to seperate entries, Use Relative Address.)
\ No newline at end of file
# Delete List (Codepage is UTF-8, please use TAB to seperate entries, Use Relative Address.)
\ No newline at end of file
.gitlab-ci.yml 14f0c978d67454249e19f8dd548776aa
.gitlab-ci.yml 14f0c978d67454249e19f8dd548776aa
.gitlab-ci.yml.backup 6b1efae0ff9d89f049c462211aca5d61
.vs/ProjectSettings.json e88a33ccaa92ae56561422612f557911
.vs/slnx.sqlite 94cafea8933dcceeb2ef02b262d8ae96
.vs/VSWorkspaceState.json dbb7b8558a0959569f2b24a3b37c67ab
.vs/ygopro-222DIY-cards/FileContentIndex/12976cc5-e8ab-4345-a20f-71b99723474a.vsidx 331f5ed3b35c81a3f5f2216cc29d2b02
.vs/ygopro-222DIY-cards/FileContentIndex/1fb6c313-0423-4b08-b7f1-79029a59fa24.vsidx 52c2e98966242e140f4fb1dcba16292b
.vs/ygopro-222DIY-cards/FileContentIndex/25d124d3-c125-4990-b4d2-2c4ef074b8d9.vsidx 6693d74dfae247856a05b6c4fa0f39e0
.vs/ygopro-222DIY-cards/FileContentIndex/38abc868-7bc7-445d-a74c-a07484f046d9.vsidx 00f6b502661edbc4f9f7266914fda382
.vs/ygopro-222DIY-cards/FileContentIndex/4cd9e805-60ce-4144-a234-0ad981e690ce.vsidx b80d13a07e1681d2ebfdb4d555ecc64a
.vs/ygopro-222DIY-cards/FileContentIndex/61837c3e-7bca-43b8-b037-46e3e3ade7df.vsidx 9bd886771837b110d4f856cd81f3dbff
.vs/ygopro-222DIY-cards/FileContentIndex/7e187a09-a6c5-45bf-a834-e26a68f8d37d.vsidx d4d7e5928999956d63a5c2445f0a09a6
.vs/ygopro-222DIY-cards/FileContentIndex/8e523d5f-2067-4a70-998a-1f3dc10edb87.vsidx 2463bdc19ff57843b81844715fc462ba
.vs/ygopro-222DIY-cards/FileContentIndex/adf02add-636d-4c49-9eba-62c30a552d8b.vsidx 27c8d219acad8cdedebe68ee6e7475ca
.vs/ygopro-222DIY-cards/FileContentIndex/b7e9d49a-9158-4a88-a7d2-95548a07bbd5.vsidx 434fe31d4ee99f52109a608b062b3e3d
.vs/ygopro-222DIY-cards/FileContentIndex/b8b91c6d-7dbe-45b6-94b9-975239746e6d.vsidx 16a647b83974915c28bf7671cdbf3b6f
.vs/ygopro-222DIY-cards/FileContentIndex/b8bc5d52-a42c-4314-8b8a-30fd646fa37f.vsidx cf431cda39c29e7939e5ffb612613bf6
.vs/ygopro-222DIY-cards/FileContentIndex/b93682a8-3150-4c80-add1-42a850ff9fbb.vsidx 12e598528c307c48c7c5261b1197f2e8
.vs/ygopro-222DIY-cards/FileContentIndex/c5dbb773-6fb3-49b7-b08c-2922dbe16b13.vsidx 54518c2967f0c11e115c62702e238284
.vs/ygopro-222DIY-cards/FileContentIndex/read.lock d41d8cd98f00b204e9800998ecf8427e
.vs/ygopro-222DIY-cards/v17/.wsuo 6152eead10c2325f3d2439a87aab785d
.vs/ygopro-222DIY-cards/v17/workspaceFileList.bin 11c2f511668b63e4ca9ffe25cadde1a6
deck/2023-12-11 1st.ydk cbf6cae2eaeaade61297b4af967d5932
deck/2023-12-11 2nd.ydk 9a8d724a9e74763edc6193e59eb0c886
deck/2023-12-11 3rd.ydk 2f2ce2c7cd438fec645425ef8a28573f
deck/2023-12-11 4th.ydk 44b293765229c33e76fcab8974e2134a
.vs/slnx.sqlite 7b01948cee58af44267f554425cca528
.vs/VSWorkspaceState.json c5d8964c7f5288c0be2b2463a8eccc7a
.vs/ygopro-222DIY-cards/FileContentIndex/0f6c78f1-16dc-49b7-99f1-f9060c4b3139.vsidx 0
.vs/ygopro-222DIY-cards/FileContentIndex/3078f029-65d9-440e-b80b-5f9e1ba5d853.vsidx 0
.vs/ygopro-222DIY-cards/FileContentIndex/4c6f1cdd-825e-4ef0-9691-9318256dd184.vsidx 0
.vs/ygopro-222DIY-cards/FileContentIndex/4cabe04b-5787-483e-9922-ffb75561466a.vsidx 0
.vs/ygopro-222DIY-cards/FileContentIndex/70fb1512-ba48-48d1-8e4e-c773eafcaaf1.vsidx 0
.vs/ygopro-222DIY-cards/FileContentIndex/7f5f9cc6-6955-493c-b630-1868bc3e4f0f.vsidx 0
.vs/ygopro-222DIY-cards/FileContentIndex/885dbaac-d6de-40c5-96a3-d0a11ea79185.vsidx 0
.vs/ygopro-222DIY-cards/FileContentIndex/d791416e-6a15-4649-ad19-5a036be551a4.vsidx 0
.vs/ygopro-222DIY-cards/FileContentIndex/e382baff-4cb2-4d35-bdc3-51d3d4cebc23.vsidx 0
.vs/ygopro-222DIY-cards/FileContentIndex/e3d026a8-5738-446c-a620-11a330aa7e9b.vsidx 0
.vs/ygopro-222DIY-cards/FileContentIndex/fe44a4a1-e56e-4679-814d-3fc68f4fc449.vsidx 0
.vs/ygopro-222DIY-cards/v17/.wsuo d182f26010e1a4d2981b5a56b9b62d64
.vs/ygopro-222DIY-cards/v17/workspaceFileList.bin ec6aac9de97976527164683f714c694e
deck/2023-12-11 1st.ydk 6e41169c6a105a9cdd72fd77830a894b
deck/2023-12-11 2nd.ydk e0cf27aca939f25608dd6935bd4a27b5
deck/2023-12-11 3rd.ydk 412655da30b6f70b1bf107105d132046
deck/2023-12-11 4th.ydk cde5e8d124a82fa48e0bfa8000bdc242
expansions/222DIY.cdb eb58c6f8eac8eef0557cd456d517c41d
expansions/lflist.conf 5536f92d059074170035fc84381516f6
expansions/strings.conf 35690616451e8d7a6ebb94ee5d5d2893
expansions/strings.conf 23eeb59276dd0f135b089d017da5d457
expansions/pics/10000100.jpg 094075113728f2b79eb0c6a029d97e10
expansions/pics/10000101.jpg 0b5df74edf842a9d635e9e11b04c50c1
expansions/pics/1000360.jpg f4de29c225749200e94ea6d6d1056995
......@@ -3674,6 +3670,18 @@ expansions/pics/15005142.jpg 1313da3cfa9aa9a1a5286ad6984a9645
expansions/pics/15005143.jpg 7e97ee56471f9a91a476c23650020a1a
expansions/pics/15005144.jpg ff0391233d77c3f2b2278d41f67d9a2c
expansions/pics/15005149.jpg bb682ffc0b22d6b31623bb93ea26e051
expansions/pics/15005200.jpg a79d1fdcc488422ecab1d984c08af818
expansions/pics/15005201.jpg de477e3d165947fdca08545998643dfe
expansions/pics/15005202.jpg 958349bb6bf42fe82996339f5acb7702
expansions/pics/15005203.jpg acc7cc5500cb3c465002c91f877ebee7
expansions/pics/15005204.jpg ed584bac3e99383b7b36723a4272bcbc
expansions/pics/15005206.jpg 68d5e6cfcdfa9316fd984f36f02c693b
expansions/pics/15005208.jpg 8615f3c6e2a253ad64dd3758a59d5317
expansions/pics/15005209.jpg 20df42209a5600bb2606cf4f139c1a8b
expansions/pics/15005211.jpg 5ebfb931df55a433676c1adf774f94bf
expansions/pics/15005212.jpg 46d8430693f636a4761bcb9e20f2c518
expansions/pics/15005213.jpg da304459f09698753ec2feff5945cb0a
expansions/pics/15005215.jpg 7d628c4a3c1f4793ccafe1eec05407ec
expansions/pics/15070000.jpg 0906bf6e9574fc0e678a53326fb5997c
expansions/pics/15070001.jpg 7c47f11ac19cb9fbf33f61e41bfba694
expansions/pics/15070002.jpg c8b30baf6ddd6f352ec1f400972c9a9d
......@@ -10133,6 +10141,15 @@ expansions/pics/47310513.jpg 2a50f4e9564340b417f0e11a83427f6a
expansions/pics/47310514.jpg 97db222a41f132a3314f597b0c8eab8d
expansions/pics/47310515.jpg 6bb4f95302b67e5a5b9e9d496a5f2842
expansions/pics/47310516.jpg 61b67b872916e03ffed7d1a5015e0bd4
expansions/pics/47320001.jpg 8164fa23c0a20fe63c368a50b680ae0e
expansions/pics/47320004.jpg 33a417bd8d0ea3e01c338b316d081361
expansions/pics/47320005.jpg 59ceb10b886b0e72e245626b7b3302ac
expansions/pics/47320006.jpg 62551e3c32741680a89b1c372374de56
expansions/pics/47320009.jpg a5e06018d63ed98fabfeef4b02f48291
expansions/pics/47320010.jpg dc6f82d56f1b3da88fe8846c94b12049
expansions/pics/47320011.jpg 85a8859f06802aec20682eb96e59035d
expansions/pics/47320020.jpg ba067eb7ae6c9f31b36f84d5d5ff278f
expansions/pics/47320021.jpg 0a82f46233a1ae85a6d7f100097615e8
expansions/pics/47320501.jpg 2127f64958d125c44018cbdb2b516390
expansions/pics/47320502.jpg bc60541d6e323524ab4b9ee2c9f03f18
expansions/pics/47320503.jpg 5589af4aef5dfde9e236fcb8066712f2
......@@ -12015,6 +12032,7 @@ expansions/pics/64800066.jpg 909aff1f3b9feab1b2d09ac8512fc91e
expansions/pics/64800067.jpg 177f8a0b0d518d7758bbe15178743408
expansions/pics/64800068.jpg 11db2ef1b749384cba495814060811c1
expansions/pics/64800074.jpg 244cdaf52a2ce42781dee0ab0c525120
expansions/pics/64800075.jpg d44501e975a0f0b57b1fc1c272bd9a07
expansions/pics/64800080.jpg 34fe2f037a803161903f0f9e3c3a579e
expansions/pics/64800081.jpg f8ff51f96f6c9e839099367e19a9ecd2
expansions/pics/64800082.jpg 6c6b8e1f56a6f6ba6985a2667b1e97f6
......@@ -12128,6 +12146,9 @@ expansions/pics/64800204.jpg 47391a167f1207bd92a19526be366ea9
expansions/pics/64800205.jpg 373ba2bcf174941d1f9db36fcfca254c
expansions/pics/64800206.jpg 4b718b862c4f72986ecfd92c8c6b9a8e
expansions/pics/64800207.jpg c1f929ebabef332f362b6505151a7ab8
expansions/pics/64800213.jpg 8c9b9b327752121b97ec409377fe6018
expansions/pics/64800214.jpg 6ea4088b0749e766cebe3cfebb314dad
expansions/pics/64800215.jpg 8284bdaaf8f63c8048ea71b6b4aaf460
expansions/pics/64810000.jpg b44e58619c4cf3342381ad5a7b919b67
expansions/pics/64830500.jpg 59a0c624684e5a5cb9521685c7176495
expansions/pics/64830501.jpg c62ae1edf8403c377ccffce9cabf25db
......@@ -17622,6 +17643,7 @@ expansions/pics/field/15000921.jpg ddc8e2e4d54f8315a5ea6413fb5412d4
expansions/pics/field/15004020.jpg 2dad04bd9c9ef4516862393f217e6f4e
expansions/pics/field/15004391.jpg 8e43c49de96d6fc70170bbc26c504404
expansions/pics/field/15005058.jpg c72315927ababecae27b71dec6b0227f
expansions/pics/field/15005211.jpg 11703b09b085949900b712fbf2f7a898
expansions/pics/field/15873634.jpg f224e27edd2202bc3c66a92b6489fe32
expansions/pics/field/16101109.jpg d1ac3076cb4bd5124a99f74403daf431
expansions/pics/field/16102004.jpg 7b168fbaca865ab11b3510ec99453fb9
......@@ -17734,6 +17756,7 @@ expansions/pics/field/45745921.jpg 2f3bb2e31f815f4d61ca97bd9e280452
expansions/pics/field/45746031.jpg 1a1947b10c0bb4ccdd29baaeb9caf9ab
expansions/pics/field/45746851.jpg b1008ac75aab6191850a8e252f2fd2e7
expansions/pics/field/45746852.jpg a8585ef0b8561a251de99d39079113d6
expansions/pics/field/47320010.jpg 1ebc26315f37bec1840b6aeb8c77757d
expansions/pics/field/47330514.jpg 9a328dcca4e30c49e490b72bdd4972eb
expansions/pics/field/47344563.jpg 3cd5c340576dfc084d371a2270ec16d5
expansions/pics/field/47344564.jpg 63c9c02ee539ba20f9a4a75655eba9de
......@@ -20671,6 +20694,7 @@ expansions/script/c12400016.lua cfdee4df04d8cfb7a00ac2e34785f54f
expansions/script/c12400018.lua 94639b3a4cdb71bfe6a90291077afab8
expansions/script/c12400021.lua 0644cb26ca063c021f0f8fd40de6d2cf
expansions/script/c12400022.lua 3729613032da7fa7c9606c1b394d5c98
expansions/script/c12400055.lua 851f467426f606b955f2c47ab13c6a92
expansions/script/c12400080.lua e7bbeee46cbeb6614232d6b3159dd151
expansions/script/c12400081.lua 37f224f8706d22b4fb9bfe281648227e
expansions/script/c12400082.lua 8154a975cb310856e996e2fbca1eb3da
......@@ -21480,6 +21504,18 @@ expansions/script/c15005142.lua 25be97df6a6945494bc5ce1acd97b3e4
expansions/script/c15005143.lua 52b9d03291501d10cf1baf4d0c53fc37
expansions/script/c15005144.lua 5bce5d758328c4b8d053b21c96ac2f8f
expansions/script/c15005149.lua 0a8b102ea24a58f4098cd1f7a517d5d0
expansions/script/c15005200.lua 25a70f7b1cf23b85267257c4dcf5a867
expansions/script/c15005201.lua 44daa6b441fdc11c8c2e279795a71046
expansions/script/c15005202.lua ab171b73d1ae25d118b7ed8a8fd4c06c
expansions/script/c15005203.lua 63f7318276f45fb71a3908d89fcc33a2
expansions/script/c15005204.lua 3c7ead55f48a6543a3a0d480c3e5cdeb
expansions/script/c15005206.lua b2207b01967f72d4451f4353290911ee
expansions/script/c15005208.lua ac154ce0a4aba0cd5ef139979389ac00
expansions/script/c15005209.lua a8d616090789e652d35c1934d8493286
expansions/script/c15005211.lua f58e5d8284400338b4229e0114bf062c
expansions/script/c15005212.lua 7d926e4992457a47a0097f2eac644289
expansions/script/c15005213.lua 0d77ebd2258953ac00610f3cc89127de
expansions/script/c15005215.lua 654a8a0bfc06a813a051cebc93cf728e
expansions/script/c15070000.lua 219615c448451118a875e3968569f3e9
expansions/script/c15070001.lua 52c1d4a1282a0e40dc13be2f89de11fc
expansions/script/c15070002.lua 38844a937e28179a98e4bc394fa462b0
......@@ -21659,7 +21695,7 @@ expansions/script/c17029000.lua 5daa1469f43117a0beef10f6360f4de0
expansions/script/c17029010.lua 654b854d647c3888d1d723a09cfce117
expansions/script/c17029130.lua cb8dd3afbfb0be55951514935ee49a08
expansions/script/c17029230.lua bdee5b7c9ce400b34c8c151ccf311dfc
expansions/script/c17030600.lua b913bb2e17a7c4a6af8ac071edbbd38c
expansions/script/c17030600.lua 2f7b918f763b71e14e49a92d95a02e74
expansions/script/c17030610.lua 720843ad66580a5f7ee2aa39b838e75f
expansions/script/c17030630.lua df68dfa5734a23e0afdbe32c2e656d68
expansions/script/c17030640.lua e2a2370cb5c36848305a8127d108b9e0
......@@ -21877,7 +21913,7 @@ expansions/script/c17035560.lua 58ebd6b4265272ba4a2cad1909da87e2
expansions/script/c17035570.lua 82015d587ab81d86ee5e7132f613b592
expansions/script/c17035600.lua 59292424a7e0bf47ca6ff219ac709202
expansions/script/c17035610.lua 55253c9e94f5a3b4f63cdeb794b063c6
expansions/script/c17055000.lua 32277d83413f7f5d227cf315cc89c2b9
expansions/script/c17055000.lua d87104442ef20db30e4393c3a52c16d4
expansions/script/c17055010.lua 68861229333620adee04e29839040030
expansions/script/c17055020.lua 0cec0ddca12c4b2da7521c008025ed56
expansions/script/c17055030.lua 8365ded8a0a07008770b3fa6becd071a
......@@ -22784,7 +22820,7 @@ expansions/script/c23000320.lua 68fb00ac5df73cdfbaead3da07a7c992
expansions/script/c23000321.lua 750eb27e9abe2ae9b9d446ce7bce9871
expansions/script/c23000322.lua 1f0e386d9a44f60d72f75b264ab8a2c5
expansions/script/c23000350.lua 75650bbd65240764144a60c2bfc00c8a
expansions/script/c23000400.lua 9f280928194b85994cc6aa26fb4ca090
expansions/script/c23000400.lua 3f5edbb9112430360b248152f259be2e
expansions/script/c23000410.lua 318225c9c6ec1040a0f6041efc243354
expansions/script/c23000420.lua 258826bc1ea1a813d59edc2a664601e9
expansions/script/c23000430.lua f2dd8ea62c3590dfd1bafd72cd5698e2
......@@ -22814,7 +22850,7 @@ expansions/script/c23000660.lua 205dcc6f9722fbfb6440d16492851e99
expansions/script/c23000665.lua 730569ea74ee8c2204892056439620d7
expansions/script/c23000670.lua a4642028ec1ce515cde87c6bf2831e91
expansions/script/c23000675.lua ecada3f4b104b686de8072165d26b793
expansions/script/c23000680.lua b1ade09b458fad38fc21f80e82472b70
expansions/script/c23000680.lua e5e1f5f092ab9c46b802f3fbbde100ac
expansions/script/c23000685.lua f06b3e7e98716308cd5a47cbd3023327
expansions/script/c23000690.lua a152f39d8c8dd0568d2b8bcc015428a3
expansions/script/c23000695.lua cc8d3b9949cee62c6dffab65a1f40e51
......@@ -27543,6 +27579,19 @@ expansions/script/c47310513.lua 53c7ed59878dbe63d861fea4224a3ecf
expansions/script/c47310514.lua 494fb96a24dbf42b9f138226d9a42a7e
expansions/script/c47310515.lua a05989c3dd91cc7de6d6c1827aac0ba6
expansions/script/c47310516.lua 74f092fb8a53b8a9d0f257c2200b42b6
expansions/script/c47320001.lua fc856eb80c0a0bba567f2b49cf1f54e4
expansions/script/c47320002.lua ea17a53d3ed11512a71118bcc130118c
expansions/script/c47320003.lua e7c3a1d993be4be689ac98a958490304
expansions/script/c47320004.lua cce104492eac91466f8be47ee539794f
expansions/script/c47320005.lua 04ac26c06da03d8f6603e89061f12864
expansions/script/c47320006.lua 0765c7857e2aca712898064c6c63fb8d
expansions/script/c47320007.lua 7dc85291c6fe6f9d1a3556f68e894dbd
expansions/script/c47320008.lua 7ba43235b7094ac896503a2c0b412003
expansions/script/c47320009.lua 57504ad26c9d4e86a264d7f16f5cdb9a
expansions/script/c47320010.lua bc82da6ccc3bbdc946b62afb94b2c878
expansions/script/c47320011.lua 4e391846fd197677d57e66cf9e5c7c05
expansions/script/c47320012.lua a3475efa55db3c550db0e8106a3ce174
expansions/script/c47320013.lua 4c96e5022f59493c2f058c25d2983aef
expansions/script/c47320501.lua 8f498358ed10afd202eb0abc769000cc
expansions/script/c47320502.lua 7b587c1cf47cec114f744c4c5844616d
expansions/script/c47320503.lua 68dc7ab99ba0b9b393b94f2ea254bd52
......@@ -29440,8 +29489,8 @@ expansions/script/c64800189.lua 862b131bea95c8f009f6bbd863482501
expansions/script/c64800190.lua f14add082cec49d2791471f3c12162da
expansions/script/c64800191.lua aec6c775c40cf5fad2f9fab0aeb5fcfc
expansions/script/c64800192.lua a28766e613d5adb0a42ec9b4fca79f3f
expansions/script/c64800193.lua fa174e4e788c7cde81a9521ad71b9e70
expansions/script/c64800194.lua 0cf03cf9fe9f778a9b7d0b96a6e9d618
expansions/script/c64800193.lua 18b7832e332177f1ee01d45c57e16d1e
expansions/script/c64800194.lua fc18eb8158e5ee7a704befdedc24b303
expansions/script/c64800200.lua 5bb48d9b6b80166d3d3835b49a01a857
expansions/script/c64800201.lua e1575942eafb10daeeba56e79432a11d
expansions/script/c64800203.lua 9aa2903f8d65022fe6aaa3e70dfba52a
......@@ -34366,7 +34415,7 @@ expansions/script/c98646201.lua 9782783c9d3cea3bcffe9c2e9ce43853
expansions/script/c98646202.lua d492d5f7584267be04bd9749d2f2237d
expansions/script/c98646203.lua bdf454cac2bdef50f171a64f2fbc21a1
expansions/script/c98646204.lua 395684795a15ea7698059b1445b5c62a
expansions/script/c98650000.lua 7eca3f26c14c31809536a5528ceaae2a
expansions/script/c98650000.lua ae70779e8d2da4d85e870c1f35cb7514
expansions/script/c98657300.lua ecfde6555cf73fc043906fc0341430ed
expansions/script/c98657301.lua f6e96b29253bf8f2b57d36fb624d454d
expansions/script/c98657302.lua ff5e9150703478ec856ce179c0cf15cd
......@@ -34689,8 +34738,12 @@ expansions/script/psionic.lua ee797887273b8ab6c5e94815f2768037
expansions/script/tama.lua e81e8bb64ed65e88f6c9d28439b4243e
expansions/script/underscore.lua 1edba1de7fbd192ea4961e0c41e9438e
expansions/script/utterconfusionlib.lua d8abc11763007f170e0781b79c145e99
update/delete.txt 41c8b8bfbf0e584c4437015a5a53dd1e
update/filelist.txt c92380a5d401c126fdd1c6287b9a3753
update/rename.txt c509c33cdee4e36b1cfaaed4315f2886
update/update-push.bat 49e0e022872a85c5350b8ee445ecd4d8
update/update-push.sh 7e2d4b2410720d4d446f36371420ff54
update/update-server.sh b078089c0cbfcf3460194360681cfb49
update/update-without-sound.bat 22d7b973d79ef9311213aeff61d93d7c
update/update.exe.backup 4e657ec15b4a65065c3ab583043b234e
update/version.txt 99420b572565df9ea076cad7b3fbf475
2023/12/12 19:42:01
\ No newline at end of file
2023/12/14 8:39:06
\ No newline at end of file
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