Commit 039b14a8 authored by 聖園ミカ's avatar 聖園ミカ 🐟

man!

parent 137df60b
No preview for this file type
# YGOPro-FESTiVAL
YGOPro FESTiVAL
\ No newline at end of file
......@@ -45,15 +45,15 @@
04295012 1 --宫水静香·偷懒小妙招
04295017 1 --宫水静香·庆典时刻
#050
05012601 1 --茵蒂克丝
05012601 2 --茵蒂克丝
05012603 1 --一方通行
05012604 1 --上条当麻
05012605 0 --奥雷欧斯·伊萨德
05012609 1 --滨面仕上
05012609 2 --滨面仕上
05012613 1 --欧提努斯
05012615 1 --学院都市
05012616 0 --欧雷尔斯
05012622 1 --月咏小萌
05012622 2 --月咏小萌
05012628 1 --科隆尊
05012630 2 --圣日耳曼
05012638 1 --大霸星祭
......
pics/5012635.jpg

100 KB | W: | H:

pics/5012635.jpg

35.8 KB | W: | H:

pics/5012635.jpg
pics/5012635.jpg
pics/5012635.jpg
pics/5012635.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624135.jpg

87.9 KB | W: | H:

pics/62624135.jpg

90.1 KB | W: | H:

pics/62624135.jpg
pics/62624135.jpg
pics/62624135.jpg
pics/62624135.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624140.jpg

109 KB | W: | H:

pics/62624140.jpg

35.4 KB | W: | H:

pics/62624140.jpg
pics/62624140.jpg
pics/62624140.jpg
pics/62624140.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624145.jpg

90.1 KB | W: | H:

pics/62624145.jpg

30.8 KB | W: | H:

pics/62624145.jpg
pics/62624145.jpg
pics/62624145.jpg
pics/62624145.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624215.jpg

72.1 KB | W: | H:

pics/62624215.jpg

75.2 KB | W: | H:

pics/62624215.jpg
pics/62624215.jpg
pics/62624215.jpg
pics/62624215.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624245.jpg

84.5 KB | W: | H:

pics/62624245.jpg

72.1 KB | W: | H:

pics/62624245.jpg
pics/62624245.jpg
pics/62624245.jpg
pics/62624245.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624260.jpg

86.7 KB | W: | H:

pics/62624260.jpg

77.5 KB | W: | H:

pics/62624260.jpg
pics/62624260.jpg
pics/62624260.jpg
pics/62624260.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624510.jpg

88.5 KB | W: | H:

pics/62624510.jpg

30.1 KB | W: | H:

pics/62624510.jpg
pics/62624510.jpg
pics/62624510.jpg
pics/62624510.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624530.jpg

104 KB | W: | H:

pics/62624530.jpg

33 KB | W: | H:

pics/62624530.jpg
pics/62624530.jpg
pics/62624530.jpg
pics/62624530.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624570.jpg

111 KB | W: | H:

pics/62624570.jpg

35.6 KB | W: | H:

pics/62624570.jpg
pics/62624570.jpg
pics/62624570.jpg
pics/62624570.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624615.jpg

102 KB | W: | H:

pics/62624615.jpg

34.6 KB | W: | H:

pics/62624615.jpg
pics/62624615.jpg
pics/62624615.jpg
pics/62624615.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624630.jpg

90.9 KB | W: | H:

pics/62624630.jpg

92.5 KB | W: | H:

pics/62624630.jpg
pics/62624630.jpg
pics/62624630.jpg
pics/62624630.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624635.jpg

90 KB | W: | H:

pics/62624635.jpg

31.6 KB | W: | H:

pics/62624635.jpg
pics/62624635.jpg
pics/62624635.jpg
pics/62624635.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624705.jpg

85 KB | W: | H:

pics/62624705.jpg

92.3 KB | W: | H:

pics/62624705.jpg
pics/62624705.jpg
pics/62624705.jpg
pics/62624705.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624720.jpg

99.4 KB | W: | H:

pics/62624720.jpg

33.1 KB | W: | H:

pics/62624720.jpg
pics/62624720.jpg
pics/62624720.jpg
pics/62624720.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624725.jpg

95.2 KB | W: | H:

pics/62624725.jpg

95 KB | W: | H:

pics/62624725.jpg
pics/62624725.jpg
pics/62624725.jpg
pics/62624725.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/62624730.jpg

94.4 KB | W: | H:

pics/62624730.jpg

94.4 KB | W: | H:

pics/62624730.jpg
pics/62624730.jpg
pics/62624730.jpg
pics/62624730.jpg
  • 2-up
  • Swipe
  • Onion skin
--芳青之梦 颂枝谣
function c21113800.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e0:SetCondition(c21113800.discon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,21113800)
e1:SetCost(c21113800.cost)
e1:SetTarget(c21113800.tg)
e1:SetOperation(c21113800.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,21113801)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCost(c21113800.cost2)
e2:SetOperation(c21113800.op2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(21113800,ACTIVITY_SPSUMMON,c21113800.counter)
end
function c21113800.counter(c)
return c:IsSetCard(0xc904)
end
function c21113800.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113800.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(21113800,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113800.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetCountLimit(1)
e2:SetOperation(c21113800.op0)
Duel.RegisterEffect(e2,tp)
end
function c21113800.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
function c21113800.op0(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113800)==0 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,12,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113800,0)) then
Duel.Hint(3,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,12,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113800)
e:Reset()
end
function c21113800.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113800.w(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 and c:IsSetCard(0xc904) and not c:IsCode(21113800)
end
function c21113800.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113800.q,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,4)>0 and Duel.IsExistingMatchingCard(c21113800.w,tp,1,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(11,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,1)
end
function c21113800.move(c,seq)
if not c21113800.q(c) then return end
if c:IsFacedown() then return end
if c:GetSequence()~=seq then
return true
else return end
end
function c21113800.seq(c,seq)
if c:GetSequence()==seq then
return true
else return end
end
function c21113800.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113800,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
Duel.Hint(3,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c21113800.move,tp,LOCATION_MZONE,0,1,1,nil,seq):GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local oc=Duel.GetMatchingGroup(c21113800.seq,tp,LOCATION_MZONE,0,nil,seq):GetFirst()
if oc then Duel.Destroy(oc,REASON_RULE) end
Duel.MoveSequence(tc,seq)
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21113800.w,tp,1,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c21113800.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(21113800,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113800.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113800.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetValue(c21113800.val0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetValue(c21113800.val0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c21113800.val0(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():GetSequence()>=5 and bit.band(loc,LOCATION_MZONE)~=0
end
\ No newline at end of file
--芳青之梦 幻樱歌
function c21113805.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e0:SetCondition(c21113805.discon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,21113805+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c21113805.con)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,21113806)
e2:SetCost(c21113805.cost2)
e2:SetTarget(c21113805.tg2)
e2:SetOperation(c21113805.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c21113805.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113805.w(c)
return c:IsFacedown() or not c:IsDisabled()
end
function c21113805.con(e,c)
if c==nil then return true end
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(c21113805.w,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c21113805.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113805.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,c:GetControler())
end
function c21113805.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
function c21113805.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113805.op0)
Duel.RegisterEffect(e1,tp)
end
function c21113805.op0(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113805)==0 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(21113805,0)) then
Duel.Draw(tp,1,REASON_RULE)
end
Duel.ResetFlagEffect(tp,21113805)
e:Reset()
end
function c21113805.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113805.e(c)
return c:IsType(1) and c:IsSetCard(0xc904) and c:IsAbleToHand() and not c:IsCode(21113805)
end
function c21113805.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113805.q,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,4)>0 and Duel.IsExistingMatchingCard(c21113805.e,tp,1,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(11,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,1)
end
function c21113805.move(c,seq)
if not c21113805.q(c) then return end
if c:IsFacedown() then return end
if c:GetSequence()~=seq then
return true
else return end
end
function c21113805.seq(c,seq)
if c:GetSequence()==seq then
return true
else return end
end
function c21113805.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113805,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
Duel.Hint(3,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c21113805.move,tp,LOCATION_MZONE,0,1,1,nil,seq):GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local oc=Duel.GetMatchingGroup(c21113805.seq,tp,LOCATION_MZONE,0,nil,seq):GetFirst()
if oc then Duel.Destroy(oc,REASON_RULE) end
Duel.MoveSequence(tc,seq)
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113805.e,tp,1,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--芳青之梦 天弦声
function c21113810.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c21113810.linkcon())
e0:SetTarget(c21113810.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(c21113810.discon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,21113810)
e2:SetCondition(c21113810.con)
e2:SetCost(c21113810.cost)
e2:SetTarget(c21113810.tg)
e2:SetOperation(c21113810.op)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113810.cost5)
e5:SetOperation(c21113810.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113810,ACTIVITY_SPSUMMON,c21113810.counter)
end
function c21113810.counter(c)
return c:IsSetCard(0xc904)
end
function c21113810.LCheckGoal(sg,tp,lc,lmat)
return #sg==1 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 or #sg==2
and sg:CheckWithSumEqual(Auxiliary.GetLinkCount,2,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function c21113810.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=2
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c21113810.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function c21113810.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=2
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c21113810.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c21113810.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113810.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c21113810.q(c,e,tp)
return c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c21113810.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113810.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113810.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113810)==0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,4,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113810,0)) then
Duel.Hint(3,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,4,1,2,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113810)
e:Reset()
end
function c21113810.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113810.q,tp,0x10,0,1,nil,e,tp) and Duel.GetLocationCount(tp,4)>0 end
local ft=Duel.GetLocationCount(tp,4)
if ft>=3 then ft=2 end
if ft>=2 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113810.q,tp,0x10,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,tp,0x10)
end
function c21113810.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.RegisterFlagEffect(tp,21113810,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g==2 and (Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(tp,4)<=1) then return end
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 then
local og=Duel.GetOperatedGroup()
for tc in aux.Next(og) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
end
end
function c21113810.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113810,tp,ACTIVITY_SPSUMMON)==0
end
function c21113810.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113810.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113810.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 水彩笔
function c21113815.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0xc904),1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e0:SetCondition(c21113815.discon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,21113815)
e1:SetCost(c21113815.cost)
e1:SetTarget(c21113815.tg)
e1:SetOperation(c21113815.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,21113816)
e2:SetCondition(c21113815.con2)
e2:SetCost(c21113815.cost2)
e2:SetTarget(c21113815.tg2)
e2:SetOperation(c21113815.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_CHAIN_DISABLED)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113815.cost5)
e5:SetOperation(c21113815.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113815,ACTIVITY_SPSUMMON,c21113815.counter)
end
function c21113815.counter(c)
return c:IsSetCard(0xc904)
end
function c21113815.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113815.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113815.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113815.q(c)
return c:IsAbleToHand() and c:IsType(6) and c:IsSetCard(0xc904)
end
function c21113815.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113815)==0 and Duel.IsExistingMatchingCard(c21113815.q,tp,1,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113815,0)) then
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113815.q,tp,1,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,g)
end
end
Duel.ResetFlagEffect(tp,21113815)
e:Reset()
end
function c21113815.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,12,12,1,nil) and Duel.GetLocationCount(tp,4)>0 end
Duel.Hint(3,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,12,12,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c21113815.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113815,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c21113815.con2(e,tp,eg,ep,ev,re,r,rp)
return rp==tp
end
function c21113815.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113815.opw)
Duel.RegisterEffect(e1,tp)
end
function c21113815.opw(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113815+1)==0 and Duel.SelectYesNo(tp,aux.Stringid(21113815,1)) then
Duel.Damage(1-tp,1500,REASON_RULE)
end
Duel.ResetFlagEffect(tp,21113815+1)
e:Reset()
end
function c21113815.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500)
end
function c21113815.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113815+1,RESET_PHASE+PHASE_END,0,1)
Duel.Recover(tp,1500,REASON_EFFECT)
end
function c21113815.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113815,tp,ACTIVITY_SPSUMMON)==0
end
function c21113815.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113815.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113815.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 写彩
function c21113820.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetCondition(c21113820.actcon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c21113820.con)
e1:SetTarget(c21113820.tg)
e1:SetOperation(c21113820.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,21113820)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c21113820.tg2)
e2:SetOperation(c21113820.op2)
c:RegisterEffect(e2)
end
function c21113820.act(c)
return c:IsFaceup() and c:IsSetCard(0xc904) and c:IsDisabled()
end
function c21113820.actcon(e)
return Duel.IsExistingMatchingCard(c21113820.act,e:GetHandlerPlayer(),4,0,1,nil)
end
function c21113820.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113820.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c21113820.q,tp,LOCATION_MZONE,0,1,nil) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c21113820.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end
end
function c21113820.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c21113820.disable)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c21113820.disable(e,c)
return c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0
end
function c21113820.w(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xc904) and Duel.GetLocationCount(tp,4)>0
end
function c21113820.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113820.w,tp,0x10,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113820.w,tp,0x10,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0x10)
end
function c21113820.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c21113820.splimit)
Duel.RegisterEffect(e1,tp)
end
function c21113820.splimit(e,c)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 断思染绪
function c21113825.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,21113825+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c21113825.cost)
e1:SetTarget(c21113825.tg)
e1:SetOperation(c21113825.op)
c:RegisterEffect(e1)
end
function c21113825.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113825.op0)
Duel.RegisterEffect(e1,tp)
end
function c21113825.w(c)
return c:IsCode(21113825) and c:IsAbleToHand()
end
function c21113825.op0(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113825)==0 and (Duel.IsExistingMatchingCard(c21113825.w,tp,1,0,1,nil) or Duel.IsPlayerCanDraw(tp,1)) and Duel.SelectYesNo(tp,aux.Stringid(21113825,0)) then
local x1,x2=false,false
if Duel.IsExistingMatchingCard(c21113825.w,tp,1,0,1,nil) then x1=true end
if Duel.IsPlayerCanDraw(tp,1) then x2=true end
local op=aux.SelectFromOptions(tp,{x1,aux.Stringid(21113825,1),0},{x2,aux.Stringid(21113825,2),1})
if op==0 then
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113825.w,tp,1,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,g)
elseif op==1 then
Duel.Draw(tp,1,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113825)
e:Reset()
end
function c21113825.q(c)
return c:IsSetCard(0xc904) and c:IsAbleToHand() and c:IsType(1)
end
function c21113825.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113825.q,tp,1,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,1)
end
function c21113825.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113825,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113825.q,tp,1,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
This diff is collapsed.
This diff is collapsed.
--芳青之梦 柳梢妃
function c21113840.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e0:SetCondition(c21113840.discon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,21113840)
e1:SetCost(c21113840.cost)
e1:SetTarget(c21113840.tg)
e1:SetOperation(c21113840.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_GRAVE_SPSUMMON+CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,21113841)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c21113840.cost2)
e2:SetTarget(c21113840.tg2)
e2:SetOperation(c21113840.op2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(21113840,ACTIVITY_SPSUMMON,c21113840.counter)
end
function c21113840.counter(c)
return c:IsSetCard(0xc904)
end
function c21113840.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113840.t(c)
return c:IsSetCard(0xc904) and c:IsDiscardable()
end
function c21113840.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(21113840,tp,ACTIVITY_SPSUMMON)==0 and Duel.IsExistingMatchingCard(c21113840.t,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,c21113840.t,1,1,REASON_COST+REASON_DISCARD,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113840.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetCountLimit(1)
e2:SetOperation(c21113840.opq)
Duel.RegisterEffect(e2,tp)
end
function c21113840.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
function c21113840.q(c)
return c:IsSetCard(0xc904) and c:IsType(1) and c:IsAbleToHand() and not c:IsCode(21113840)
end
function c21113840.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113840)==0 and Duel.IsExistingMatchingCard(c21113840.q,tp,1,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113840,1)) then
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113840.q,tp,1,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,g)
end
end
Duel.ResetFlagEffect(tp,21113840)
e:Reset()
end
function c21113840.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,4)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
end
function c21113840.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113840,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and not c:IsType(TYPE_TUNER) and c:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(21113840,0)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1,true)
end
end
function c21113840.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(21113840,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113840.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetCountLimit(1)
e2:SetOperation(c21113840.opw)
Duel.RegisterEffect(e2,tp)
end
function c21113840.r(c)
return c:IsSetCard(0xc904) and c:IsType(1) and c:IsAbleToGrave()
end
function c21113840.opw(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113840+1)==0 and Duel.IsExistingMatchingCard(c21113840.r,tp,1,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113840,1)) then
Duel.Hint(3,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c21113840.r,tp,1,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113840+1)
e:Reset()
end
function c21113840.w(c)
return c:IsSetCard(0xc904) and c:IsFaceup() and c:IsAbleToGrave()
end
function c21113840.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113840.w,tp,12,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c21113840.w,tp,12,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c21113840.e(c,e,tp)
return c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 and not c:IsCode(21113840)
end
function c21113840.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113840+1,RESET_PHASE+PHASE_END,0,1)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(0x10) and Duel.IsExistingMatchingCard(c21113840.e,tp,0x10,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(21113840,2)) then
Duel.BreakEffect()
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21113840.e,tp,0x10,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--芳青之梦 荡思眠
function c21113845.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e0:SetCondition(c21113845.discon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_GRAVE_SPSUMMON+CATEGORY_SPECIAL_SUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,21113845)
e1:SetCost(c21113845.cost)
e1:SetTarget(c21113845.tg)
e1:SetOperation(c21113845.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_TODECK)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,21113846)
e2:SetCost(c21113845.cost2)
e2:SetTarget(c21113845.tg2)
e2:SetOperation(c21113845.op2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(21113845,ACTIVITY_SPSUMMON,c21113845.counter)
end
function c21113845.counter(c)
return c:IsSetCard(0xc904)
end
function c21113845.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113845.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(21113845,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113845.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetCountLimit(1)
e2:SetOperation(c21113845.opq)
Duel.RegisterEffect(e2,tp)
end
function c21113845.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
function c21113845.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113845)==0 then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetRange(LOCATION_SZONE)
e1:SetValue(c21113845.valq)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetRange(LOCATION_SZONE)
e2:SetValue(c21113845.valq)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
Duel.ResetFlagEffect(tp,21113845)
e:Reset()
end
function c21113845.valq(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():IsSetCard(0xc904) and bit.band(loc,LOCATION_GRAVE)~=0
end
function c21113845.q(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xc904) and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c21113845.w,tp,0x12,0,1,nil,e,tp,c)
end
function c21113845.w(c,e,tp,sc)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xc904) and not c:IsCode(21113845)
end
function c21113845.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113845.q,tp,4,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x12)
end
function c21113845.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113845,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(3,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,c21113845.q,tp,4,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c21113845.w),tp,0x12,0,1,nil,e,tp,tc) and Duel.GetLocationCount(tp,4)>0 then
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c21113845.w),tp,0x12,0,1,1,nil,e,tp,tc)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c21113845.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.GetCustomActivityCount(21113845,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113845.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
Duel.Remove(c,POS_FACEUP,REASON_COST)
end
function c21113845.e(c,e,tp,mg)
if c:GetLink()<2 then return false end
local ct=math.floor(c:GetLink()/2)
return c:IsType(TYPE_LINK) and c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and mg:CheckSubGroup(c21113845.check,ct,ct,tp,c)
end
function c21113845.check(g,tp,fc)
return Duel.GetLocationCountFromEx(tp,tp,g,fc)>0 and g:FilterCount(Card.IsAbleToDeck,nil)==#g
end
function c21113845.r(c)
return c:IsSetCard(0xc904) and c:IsAbleToDeck() and not c:IsCode(21113845)
end
function c21113845.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c21113845.r,tp,0x30,0,nil)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.IsExistingMatchingCard(c21113845.e,tp,LOCATION_EXTRA,0,1,nil,e,tp,g) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c21113845.op2(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end
local mg=Duel.GetMatchingGroup(c21113845.r,tp,0x30,0,nil)
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21113845.e,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g:GetFirst()
if tc then
Duel.ConfirmCards(1-tp,tc)
local ct=math.floor(tc:GetLink()/2)
Duel.Hint(3,tp,HINTMSG_TODECK)
local sg=mg:SelectSubGroup(tp,c21113845.check,false,ct,ct,tp,tc)
local cg=sg:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)>0 and sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)>0 then
tc:SetMaterial(nil)
Duel.BreakEffect()
if Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
end
\ No newline at end of file
--芳青之梦 春风拂面
function c21113850.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,21113850+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c21113850.cost)
e1:SetTarget(c21113850.tg)
e1:SetOperation(c21113850.op)
c:RegisterEffect(e1)
end
function c21113850.t(c)
return c:IsSetCard(0xc904) and c:IsDiscardable()
end
function c21113850.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c21113850.t,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,c21113850.t,1,1,REASON_COST+REASON_DISCARD,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113850.op0)
Duel.RegisterEffect(e1,tp)
end
function c21113850.w(c)
return c:IsCode(21113850) and c:IsAbleToHand()
end
function c21113850.op0(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113850)==0 and (Duel.IsExistingMatchingCard(c21113850.w,tp,1,0,1,nil) or Duel.IsPlayerCanDraw(tp,1)) and Duel.SelectYesNo(tp,aux.Stringid(21113850,0)) then
local x1,x2=false,false
if Duel.IsExistingMatchingCard(c21113850.w,tp,1,0,1,nil) then x1=true end
if Duel.IsPlayerCanDraw(tp,1) then x2=true end
local op=aux.SelectFromOptions(tp,{x1,aux.Stringid(21113850,1),0},{x2,aux.Stringid(21113850,2),1})
if op==0 then
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113850.w,tp,1,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,g)
elseif op==1 then
Duel.Draw(tp,1,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113850)
e:Reset()
end
function c21113850.q(c)
return c:IsAbleToRemove() and c:IsType(6)
end
function c21113850.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c21113850.q,tp,0,12,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function c21113850.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113850,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c21113850.q,tp,0,12,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(0,4)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(-2000)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
--芳青之梦 猫之教义
function c21113855.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetCondition(c21113855.actcon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(21113855,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,21113855)
e2:SetTarget(c21113855.tg)
e2:SetOperation(c21113855.op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(21113855,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,21113856)
e3:SetTarget(c21113855.tg3)
e3:SetOperation(c21113855.op3)
c:RegisterEffect(e3)
end
function c21113855.act(c)
return c:IsFaceup() and c:IsSetCard(0xc904) and c:IsDisabled()
end
function c21113855.actcon(e)
return Duel.IsExistingMatchingCard(c21113855.act,e:GetHandlerPlayer(),4,0,1,nil)
end
function c21113855.e(c,e,tp)
return c:IsFaceupEx() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0
end
function c21113855.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113855.e,tp,0x30,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113855.e,tp,0x30,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0x30)
end
function c21113855.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c21113855.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113855.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113855.q,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(11,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
end
function c21113855.move(c,seq)
if not c21113855.q(c) then return end
if c:IsFacedown() then return end
if c:GetSequence()~=seq then
return true
else return end
end
function c21113855.seq(c,seq)
if c:GetSequence()==seq then
return true
else return end
end
function c21113855.w(c,e,tp,cg)
local g=Duel.GetFieldGroup(tp,0,12)
return #g>0
end
function c21113855.op3(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetLabel()
Duel.Hint(3,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c21113855.move,tp,LOCATION_MZONE,0,1,1,nil,seq):GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local oc=Duel.GetMatchingGroup(c21113855.seq,tp,LOCATION_MZONE,0,nil,seq):GetFirst()
if oc then Duel.Destroy(oc,REASON_RULE) end
Duel.MoveSequence(tc,seq)
Duel.AdjustAll()
local cg=tc:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if #cg>0 and Duel.SelectYesNo(tp,aux.Stringid(21113855,2)) then
Duel.BreakEffect()
Duel.Destroy(cg,REASON_EFFECT)
end
end
end
\ No newline at end of file
--芳青之梦 音长阶
function c21113860.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c21113860.linkcon())
e0:SetTarget(c21113860.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(c21113860.discon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,21113860)
e2:SetCondition(c21113860.con)
e2:SetCost(c21113860.cost)
e2:SetTarget(c21113860.tg)
e2:SetOperation(c21113860.op)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113860.cost5)
e5:SetOperation(c21113860.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113860,ACTIVITY_SPSUMMON,c21113860.counter)
end
function c21113860.counter(c)
return c:IsSetCard(0xc904)
end
function c21113860.LCheckGoal(sg,tp,lc,lmat)
return #sg==1 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 or #sg==2
and sg:CheckWithSumEqual(Auxiliary.GetLinkCount,2,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function c21113860.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=2
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c21113860.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function c21113860.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=2
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c21113860.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c21113860.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113860.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c21113860.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113860.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113860.q(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xc904) and Duel.GetLocationCount(tp,4)>0
end
function c21113860.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113860)==0 and Duel.IsExistingMatchingCard(c21113860.q,tp,0x10,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(21113860,0)) then
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21113860.q,tp,0x10,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
Duel.ResetFlagEffect(tp,21113860)
e:Reset()
end
function c21113860.w(c)
return c:IsSetCard(0xc904) and c:IsType(6) and c:IsType(TYPE_CONTINUOUS) and c:IsSSetable()
end
function c21113860.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113860.w,tp,0x11,0,1,nil) end
end
function c21113860.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113860,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(3,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c21113860.w),tp,0x11,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g:GetFirst())
end
end
function c21113860.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113860,tp,ACTIVITY_SPSUMMON)==0
end
function c21113860.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113860.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113860.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 喵殿下
function c21113865.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c21113865.linkcon())
e0:SetTarget(c21113865.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(c21113865.discon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,21113865)
e2:SetCost(c21113865.cost)
e2:SetTarget(c21113865.tg)
e2:SetOperation(c21113865.op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_ATKCHANGE+CATEGORY_DAMAGE+CATEGORY_DEFCHANGE)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,21113866)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c21113865.tg3)
e3:SetOperation(c21113865.op3)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113865.cost5)
e5:SetOperation(c21113865.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113865,ACTIVITY_SPSUMMON,c21113865.counter)
end
function c21113865.counter(c)
return c:IsSetCard(0xc904)
end
function c21113865.LCheckGoal(sg,tp,lc,lmat)
return #sg==2 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat)) or #sg>=2
and sg:CheckWithSumEqual(Auxiliary.GetLinkCount,3,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function c21113865.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=2
local maxc=3
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c21113865.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function c21113865.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=2
local maxc=3
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c21113865.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c21113865.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113865.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113865.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113865.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113865)==0 and Duel.SelectYesNo(tp,aux.Stringid(21113865,2)) then
Duel.Damage(1-tp,1500,REASON_RULE)
end
Duel.ResetFlagEffect(tp,21113865)
e:Reset()
end
function c21113865.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113865.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113865.q,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,4)>0 and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(11,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1,tp)
end
function c21113865.move(c,seq)
if not c21113865.q(c) then return end
if c:IsFacedown() then return end
if c:GetSequence()~=seq then
return true
else return end
end
function c21113865.seq(c,seq)
if c:GetSequence()==seq then
return true
else return end
end
function c21113865.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113865,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
Duel.Hint(3,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c21113865.move,tp,LOCATION_MZONE,0,1,1,nil,seq):GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local oc=Duel.GetMatchingGroup(c21113865.seq,tp,LOCATION_MZONE,0,nil,seq):GetFirst()
if oc then Duel.Destroy(oc,REASON_RULE) end
Duel.MoveSequence(tc,seq)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c21113865.w(c)
return c:IsFaceup() and not (c:IsAttack(0) and c:IsDefense(0))
end
function c21113865.e(c)
return c:IsAbleToGrave() and c:IsSetCard(0xc904) and c:IsLevelAbove(1) and c:IsType(1)
end
function c21113865.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113865.w,tp,4,4,1,nil) and Duel.IsExistingMatchingCard(c21113865.e,tp,3,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c21113865.w,tp,4,4,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,3)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c21113865.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
Duel.Hint(3,tp,HINTMSG_TOGRAVE)
local sc=Duel.SelectMatchingCard(tp,c21113865.e,tp,3,0,1,1,nil):GetFirst()
if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then
local lv=sc:GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(-lv*500)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(-lv*500)
tc:RegisterEffect(e2)
if not tc:IsHasEffect(108) then
Duel.Damage(1-tp,500,REASON_EFFECT)
end
end
end
function c21113865.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113865,tp,ACTIVITY_SPSUMMON)==0
end
function c21113865.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113865.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113865.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 双生契
function c21113870.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DAMAGE)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,21113870)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c21113870.cost)
e1:SetTarget(c21113870.tg)
e1:SetOperation(c21113870.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_GRAVE_ACTION+CATEGORY_TODECK)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,21113871)
e2:SetCondition(c21113870.con2)
e2:SetTarget(c21113870.tg2)
e2:SetOperation(c21113870.op2)
c:RegisterEffect(e2)
end
function c21113870.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904) and c:IsReleasable()
end
function c21113870.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113870.q,tp,4,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c21113870.q,tp,4,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c21113870.w(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0
end
function c21113870.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113870.w,tp,0x30,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113870.w,tp,0x30,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0x30)
end
function c21113870.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,500,REASON_EFFECT)
end
end
function c21113870.con2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c21113870.e(c)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and c:IsAbleToDeck()
end
function c21113870.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113870.e,tp,0x30,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c21113870.e,tp,0x30,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0x30)
end
function c21113870.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Recover(tp,500,REASON_EFFECT)
end
end
\ No newline at end of file
--芳青之梦 天桃环
function c21113875.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c21113875.linkcon())
e0:SetTarget(c21113875.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(c21113875.discon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,21113875)
e2:SetCondition(c21113875.con)
e2:SetCost(c21113875.cost)
e2:SetTarget(c21113875.tg)
e2:SetOperation(c21113875.op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,21113876)
e3:SetCost(c21113875.cost3)
e3:SetTarget(c21113875.tg3)
e3:SetOperation(c21113875.op3)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113875.cost5)
e5:SetOperation(c21113875.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113875,ACTIVITY_SPSUMMON,c21113875.counter)
end
function c21113875.counter(c)
return c:IsSetCard(0xc904)
end
function c21113875.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
end
end
end
function c21113875.LCheckGoal(sg,tp,lc,lmat)
return #sg==1 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetFirst():IsLink(2) or #sg>=2
and sg:CheckWithSumEqual(c21113875.GetLinkCount,4,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat)) or #sg>=2
and sg:CheckWithSumEqual(aux.GetLinkCount,4,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function c21113875.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=4
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c21113875.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function c21113875.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=4
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c21113875.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c21113875.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113875.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c21113875.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113875.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113875.opq(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,21113875)==0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21113875,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc904))
Duel.RegisterEffect(e1,tp)
end
Duel.ResetFlagEffect(tp,21113875)
e:Reset()
end
function c21113875.q(c,e,tp)
return c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(21113875) and Duel.GetLocationCount(tp,4)>0
end
function c21113875.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113875.q,tp,0x10,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113875.q,tp,0x10,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,tp,0x10)
end
function c21113875.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113875,RESET_PHASE+PHASE_END,0,1)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c21113875.w(c)
return c:IsFaceup() and c:IsSetCard(0xc904) and c:IsAbleToRemoveAsCost()
end
function c21113875.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c21113875.w,tp,4,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c21113875.w,tp,4,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113875.opw)
Duel.RegisterEffect(e1,tp)
end
function c21113875.opw(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,12,12)
if Duel.GetFlagEffect(tp,21113875+1)==0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(21113875,0)) then
Duel.Hint(3,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,2,nil)
if #dg>0 then
Duel.Destroy(dg,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113875+1)
e:Reset()
end
function c21113875.e(c)
return c:IsType(1) and c:IsSetCard(0xc904) and c:IsAbleToDeck()
end
function c21113875.r(c,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,nil,c) and c:IsSetCard(0xc904) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and c:IsLink(3)
end
function c21113875.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.IsExistingMatchingCard(c21113875.e,tp,0x10,0,1,nil) and Duel.IsExistingMatchingCard(c21113875.r,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,0x10)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c21113875.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113875+1,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(3,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c21113875.e,tp,0x10,0,1,1,nil)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_DECK+LOCATION_EXTRA) and Duel.IsExistingMatchingCard(c21113875.r,tp,LOCATION_EXTRA,0,1,nil,e,tp) then
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c21113875.r,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #sg>0 then
sg:GetFirst():SetMaterial(nil)
if Duel.SpecialSummon(sg,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)>0 then
sg:GetFirst():CompleteProcedure()
end
end
end
end
function c21113875.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113875,tp,ACTIVITY_SPSUMMON)==0
end
function c21113875.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113875.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113875.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 清风主
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(s.linkcon())
e0:SetTarget(s.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(s.discon)
c:RegisterEffect(e1)
--release
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
--e2:SetCondition(s.con)
e2:SetCost(s.recost)
e2:SetTarget(s.retg)
e2:SetOperation(s.reop)
c:RegisterEffect(e2)
--specialSummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetDescription(1,id+o)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(s.cost5)
e5:SetOperation(s.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counter)
end
function s.counter(c)
return c:IsSetCard(0xc904)
end
function s.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
end
end
end
function s.LCheckGoal(sg,tp,lc,lmat)
return sg:CheckWithSumEqual(s.GetLinkCount,3,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat)) or #sg>=2
and sg:CheckWithSumEqual(aux.GetLinkCount,3,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function s.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=3
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(s.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function s.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=4
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,s.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.recost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(s.opq)
Duel.RegisterEffect(e1,tp)
end
function s.opq(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,id)==0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Damage(1-tp,1000,REASON_EFFECT)
Duel.Recover(tp,1000,REASON_EFFECT)
end
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
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)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Release(tc,REASON_EFFECT)
end
end
function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) and chk~=c end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function s.cost5(e,c,tp)
return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0
end
function s.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
--芳青之梦 无暇缄默
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(s.linkcon())
e0:SetTarget(s.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(s.discon)
c:RegisterEffect(e1)
--sset
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
--e2:SetCondition(s.con)
e2:SetCost(s.sscost)
e2:SetTarget(s.sstg)
e2:SetOperation(s.ssop)
c:RegisterEffect(e2)
--specialSummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e3:SetRange(LOCATION_MZONE)
e3:SetDescription(1,id+o)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(s.cost5)
e5:SetOperation(s.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counter)
end
function s.counter(c)
return c:IsSetCard(0xc904)
end
function s.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
end
end
end
function s.LCheckGoal(sg,tp,lc,lmat)
return #sg==1 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetFirst():IsLink(3) or #sg==2
and sg:IsExists(Card.IsDisabled,2,nil) and sg:IsExists(Card.IsType,2,nil,TYPE_LINK)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetClassCount(Card.GetLink)==6 or #sg>=2
and sg:CheckWithSumEqual(s.GetLinkCount,6,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat)) or #sg>=2
and sg:CheckWithSumEqual(aux.GetLinkCount,6,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function s.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=6
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(s.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function s.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=6
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,s.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(s.opq)
Duel.RegisterEffect(e1,tp)
end
function s.opq(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,id)==0 then
--negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(s.necon)
e1:SetOperation(s.neop)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(s.adcon)
e2:SetOperation(s.adop)
Duel.RegisterEffect(e2,tp)
end
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
function s.necon(e,tp,eg,ep,ev,re,r,rp)
local loc,p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_PLAYER)
if loc&(LOCATION_GRAVE+LOCATION_REMOVED)>0 and tp~=p then return true end
end
function s.neop(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tp~=p and te:GetHandler():IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) then
Duel.NegateEffect(ev)
end
end
function s.adfilter(c)
return c:GetFlagEffect(id+2)==0
end
function s.adcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.adfilter,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil)
end
function s.adop(e,tp,eg,ep,ev,re,r,rp)
--[[local g=Duel.GetMatchingGroup(s.adfilter,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,nil)
for tc in aux.Next(g) do]]
tc:RegisterFlagEffect(id+2,RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD,0,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(0,0x30)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
--end
Duel.AdjustAll()
end
function s.setfilter(c)
return c:IsSetCard(0xc904) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
local ct=g:GetCount()
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ct>0 and ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tg=g:Select(tp,1,2,nil)
Duel.SSet(tp,tg)
end
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtraAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.cost5(e,c,tp)
return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0
end
function s.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
--芳青之梦 九魂猫秘术
local s,id,o=GetID()
function s.initial_effect(c)
--act in set turn
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetCondition(s.actcon)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.setcon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
function s.actfilter(c)
return c:IsDisabled() and c:IsSetCard(0xc904) and c:IsFaceup()
end
function s.actcon(e)
return Duel.GetMatchingGroupCount(s.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xc904,TYPES_NORMAL_TRAP_MONSTER,2000,2000,7,RACE_BEAST,ATTRIBUTE_WIND) and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,LOCATION_REMOVED)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,LOCATION_REMOVED,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,LOCATION_REMOVED,LOCATION_REMOVED)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,LOCATION_REMOVED)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xc904,TYPES_NORMAL_TRAP_MONSTER,2000,2000,7,RACE_BEAST,ATTRIBUTE_WIND) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
end
end
end
function s.setfilter(c)
return c:IsSetCard(0xc904) and c:IsFaceup()
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(s.setfilter,tp,LOCATION_MZONE,0,nil)>0
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
\ No newline at end of file
--芳青之梦 摘月梦
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(s.discon)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.seqcost)
e2:SetTarget(s.seqtg)
e2:SetOperation(s.seqop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id+1)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function s.seqcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(s.opq)
Duel.RegisterEffect(e1,tp)
end
function s.opq(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dg=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
if Duel.GetFlagEffect(tp,id)==0 and dg:GetCount()>=5 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
local rg=dg:RandomSelect(tp,5)
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
end
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 and Duel.IsExistingMatchingCard(s.seqfilter,tp,LOCATION_MZONE,0,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
end
function s.seqfilter(c,e,seq)
return c:IsSetCard(0xc904) and c:IsFaceup() and not c:IsImmuneToEffect(e) and c:GetSequence()~=seq
end
function s.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,s.seqfilter,tp,LOCATION_MZONE,0,1,1,nil,e,seq):GetFirst()
local dc=Duel.GetFieldCard(tp,LOCATION_MZONE,seq)
if dc then Duel.Destroy(dc,REASON_RULE) end
if Duel.CheckLocation(tp,LOCATION_MZONE,seq) then Duel.MoveSequence(tc,seq) end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc904))
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1800)
Duel.RegisterEffect(e3,tp)
end
function s.tdfilter(c)
return c:IsSetCard(0xc904) and not c:IsCode(id) and c:IsAbleToDeck()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) and chk~=c end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--芳青之梦 竹篮打水
function c21113900.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,21113900+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c21113900.tg)
e1:SetOperation(c21113900.op)
c:RegisterEffect(e1)
if not c21113900.check_limit then
c21113900.check_limit = true
record_limit_activate = {}
record_limit_trigger = {}
record_limit_spsummon = {}
resolve_table = {}
spsummon_limit_table = {}
local ce1=Effect.CreateEffect(c)
ce1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ce1:SetCode(EVENT_ADJUST)
ce1:SetCondition(c21113900.limit_check_con)
ce1:SetOperation(c21113900.limit_hack_op)
Duel.RegisterEffect(ce1,0)
local ce2=Effect.CreateEffect(c)
ce2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ce2:SetCode(EVENT_ADJUST)
ce2:SetCondition(c21113900.limit_check_con2)
ce2:SetOperation(c21113900.limit_hack_op2)
Duel.RegisterEffect(ce2,0)
end
end
function c21113900.record_doesnot_contain(tbl,effect)
for _, value in pairs(tbl) do
if value == effect then
return false
end
end
return true
end
function c21113900.check_or_add_new_limit(add_or_not)
local is_new_limit = false
for tp = 0,1 do
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_ACTIVATE) then
local limit_table = {Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_ACTIVATE)}
for _, limit_effect in ipairs(limit_table) do
if c21113900.record_doesnot_contain(record_limit_activate,limit_effect) then
if add_or_not then
table.insert(record_limit_activate,limit_effect)
table.insert(resolve_table,limit_effect)
end
is_new_limit = true
end
end
end
end
local ag = Duel.GetFieldGroup(0,0xff,0xff)
for tc in aux.Next(ag) do
if tc:IsHasEffect(tp,EFFECT_CANNOT_TRIGGER) then
local limit_table = {tc:IsHasEffect(EFFECT_CANNOT_TRIGGER)}
for _, limit_effect in ipairs(limit_table) do
if c21113900.record_doesnot_contain(record_redirect,limit_effect) then
if add_or_not then
table.insert(record_redirect,limit_effect)
table.insert(resolve_table,limit_effect)
end
is_new_limit = true
end
end
end
end
return is_new_limit
end
function c21113900.limit_check_con(e)
return c21113900.check_or_add_new_limit(false)
end
function c21113900.limit_hack_op(e)
resolve_table = {}
if c21113900.check_or_add_new_limit(true) then
for _, resolve_effect in ipairs(resolve_table) do
local resolve_condition = resolve_effect:GetCondition() or aux.TRUE
local resolve_target = resolve_effect:GetTarget() or aux.TRUE
local resolve_value = resolve_effect:GetValue() or aux.TRUE
if resolve_effect:IsHasType(EFFECT_TYPE_SINGLE) then
resolve_effect:SetCondition(
function(ne,...)
return not ne:GetHandler():IsCode(21113900) and not (ne:GetHandler():IsSetCard(0xc904) and Duel.IsPlayerAffectedByEffect(ne:GetHandlerPlayer(),21113900))and resolve_condition(ne,...)
end )
else
resolve_effect:SetTarget(
function(ne,nc,...)
return not nc:IsCode(21113900) and not (nc:IsSetCard(0xc904) and Duel.IsPlayerAffectedByEffect(nc:GetControler(),21113900)) and resolve_target(ne,nc,...)
end )
resolve_effect:SetValue(
function(ne,nte,ntp,...)
return not nte:GetHandler():IsCode(21113900) and not (nte:GetHandler():IsSetCard(0xc904) and Duel.IsPlayerAffectedByEffect(nte:GetHandlerPlayer(),21113900)) and resolve_value(ne,nte,ntp,...)
end )
end
end
end
end
function c21113900.record_doesnot_contain2(tbl,effect)
for _, value in pairs(tbl) do
if value == effect then
return false
end
end
return true
end
function c21113900.check_or_add_new_limit2(add_or_not)
local is_new_limit = false
for tp = 0,1 do
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_SPECIAL_SUMMON) then
local limit_table = {Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_SPECIAL_SUMMON)}
for _, limit_effect in ipairs(limit_table) do
if c21113900.record_doesnot_contain2(record_limit_spsummon,limit_effect) then
if add_or_not then
table.insert(record_limit_spsummon,limit_effect)
table.insert(spsummon_limit_table,limit_effect)
end
is_new_limit = true
end
end
end
end
return is_new_limit
end
function c21113900.limit_check_con2(e)
return c21113900.check_or_add_new_limit2(false)
end
function c21113900.limit_hack_op2(e)
spsummon_limit_table = {}
if c21113900.check_or_add_new_limit2(true) then
for _, spsummon_effect in ipairs(spsummon_limit_table) do
local spsummon_target = spsummon_effect:GetTarget() or aux.TRUE
local spsummon_value = spsummon_effect:GetValue() or aux.TRUE
spsummon_effect:SetTarget(
function(ne,nc,...)
return not (nc:IsSetCard(0xc904) and Duel.IsPlayerAffectedByEffect(nc:GetControler(),21113900)) and spsummon_target(ne,nc,...)
end )
spsummon_effect:SetValue(
function(ne,nte,ntp,...)
return not (nte:GetHandler():IsSetCard(0xc904) and Duel.IsPlayerAffectedByEffect(nc:GetControler(),21113900)) and spsummon_value(ne,nte,ntp,...)
end )
end
end
end
function c21113900.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.GetTurnPlayer()==tp then
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
end
end
function c21113900.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(21113900)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--芳青之梦 翡翠之想
local s,id,o=GetID()
function s.initial_effect(c)
--public
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PUBLIC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.pucon)
e2:SetTargetRange(0,LOCATION_HAND)
c:RegisterEffect(e2)
end
function s.pucon(e)
return e:GetHandler():IsPublic()
end
function s.thfilter(c)
return c:IsSetCard(0xc904) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and not c:IsCode(id)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
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)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.BreakEffect()
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
end
\ No newline at end of file
--芳青之梦 紫绯天
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(s.discon)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.spcon)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetCost(s.seqcost)
e3:SetTarget(s.seqtg)
e3:SetOperation(s.seqop)
c:RegisterEffect(e3)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function s.cfilter(c)
return c:IsDisabled() and c:IsSetCard(0xc904) and c:IsFaceup()
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetMatchingGroupCount(s.cfilter,c:GetControler(),LOCATION_MZONE,0,nil)==Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsSetCard(0xc904)
end
function s.seqcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(s.opq)
Duel.RegisterEffect(e1,tp)
end
function s.opq(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 and Duel.IsExistingMatchingCard(s.seqfilter,tp,LOCATION_MZONE,0,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
end
function s.seqfilter(c,e,seq)
return c:IsSetCard(0xc904) and c:IsFaceup() and not c:IsImmuneToEffect(e) and c:GetSequence()~=seq
end
function s.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,s.seqfilter,tp,LOCATION_MZONE,0,1,1,nil,e,seq):GetFirst()
local dc=Duel.GetFieldCard(tp,LOCATION_MZONE,seq)
if dc then Duel.Destroy(dc,REASON_RULE) end
if Duel.CheckLocation(tp,LOCATION_MZONE,seq) then Duel.MoveSequence(tc,seq) end
if Duel.Draw(tp,1,REASON_EFFECT)>0
then Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
\ No newline at end of file
......@@ -26,7 +26,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.filter(c)
return c.MoJin==true and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
return c.MoJin and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
......
......@@ -2,6 +2,7 @@
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -24,8 +25,8 @@ function s.initial_effect(c)
e6:SetDescription(1130)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetRange(LOCATION_REMOVED+LOCATION_GRAVE)
e6:SetCountLimit(1,id)
--e6:SetRange(LOCATION_REMOVED+LOCATION_GRAVE)
e6:SetCountLimit(2,id)
e6:SetTarget(s.ovtg)
e6:SetOperation(s.ovop)
c:RegisterEffect(e6)
......@@ -70,7 +71,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.ovfilter(c)
return c:IsFaceup() and c.MoJin==true and c:IsType(TYPE_XYZ)
return c:IsFaceup() and c.MoJin and c:IsType(TYPE_XYZ)
end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.ovfilter(chkc) and chkc~=e:GetHandler() end
......
......@@ -40,7 +40,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
end
function s.resfilter(c)
return c:IsReleasable() and c.MoJin==true
return c:IsReleasable() and c.MoJin
end
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -81,7 +81,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.filter(c,e,tp)
return c.MoJin==true and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return (c.MoJin or c:IsSetCard(0x23c)) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -70,7 +70,7 @@ function s.initial_effect(c)
c:RegisterEffect(e5)
end
function s.sfliter(c)
return c.MoJin==true
return (c.MoJin or c:IsSetCard(0x23c))
end
function s.cfilter(c,e)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c==e:GetHandler()
......
......@@ -24,12 +24,11 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(s.atkval)
c:RegisterEffect(e2)
local e4=e2:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--local e4=e2:Clone()
--e2:SetCode(EFFECT_UPDATE_DEFENSE)
--c:RegisterEffect(e4)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(48905153,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -49,10 +48,10 @@ function s.atkval(e,c)
return c:GetOverlayCount()*1000
end
function s.mfilter(c,xyzc)
return c:IsLevelAbove(4) and c.MoJin==true
return c:IsLevelAbove(4) and c.MoJin
end
function s.ovfilter(c)
return c:IsFaceup() and c.MoJin==true and c:IsLevelAbove(7) and c:IsLocation(LOCATION_MZONE)
return c:IsFaceup() and c.MoJin and c:IsLevelAbove(17) and c:IsLocation(LOCATION_MZONE)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
......
......@@ -27,13 +27,13 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c.MoJin==true and c:IsAbleToRemoveAsCost()
return c.MoJin and c:IsAbleToRemoveAsCost()
end
function s.fselect(g,e,tp)
return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end
function s.sfilter(c,e,tp,g)
return c:IsFacedown() and c.MoJin==true
return c:IsFacedown() and c.MoJin
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -45,7 +45,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function s.filter(c,e,tp)
return c:IsFacedown() and c.MoJin==true
return c:IsFacedown() and c.MoJin
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -82,10 +82,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.tdfilter(c)
return c:IsAbleToDeck() and c.MoJin==true
return c:IsAbleToDeck() and c.MoJin
end
function s.thfilter(c)
return c:IsAbleToHand() and c:IsFaceup() and c.MoJin==true
return c:IsAbleToHand() and c:IsFaceup() and c.MoJin
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
......
......@@ -34,7 +34,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.cfilter(c,tp)
return c.MoJin==true and c:IsAbleToRemoveAsCost()
return c.MoJin and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -102,7 +102,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
function s.aclimit(e,re,tp)
local rc=re:GetHandler()
return not s.MoJin==true
return not s.MoJin
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
......@@ -111,7 +111,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.ndcfilter(c)
return c:IsFaceup() and c.MoJin==true
return c:IsFaceup() and c.MoJin
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
--return Duel.IsExistingMatchingCard(s.ndcfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
--幻想杀手
local s,id,o=GetID()
c5012608.MoJin=true
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--Activate
......@@ -26,7 +26,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFacedown() or (not c.MoJin==true)
return c:IsFacedown() or not(c.MoJin or c:IsSetCard(0x23c))
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
......@@ -66,10 +66,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
if tc:IsControler(tp) and Duel.IsPlayerCanDraw(tp,1)
and tc:GetFlagEffect(id)>0 and Duel.SelectYesNo(tp,aux.Stringid(2857636,1)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
--if tc:IsControler(tp) and Duel.IsPlayerCanDraw(tp,1)
--and tc:GetFlagEffect(id)>0 and Duel.SelectYesNo(tp,aux.Stringid(2857636,1)) then
--Duel.Draw(tp,1,REASON_EFFECT)
--end
end
end
function s.spfilter(c,e,tp)
......
......@@ -43,7 +43,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsType(TYPE_PENDULUM) and c.MoJin==true and c:IsAbleToGrave()
return c:IsType(TYPE_PENDULUM) and c.MoJin and c:IsAbleToGrave()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -37,7 +37,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.mfilter(c,xyzc)
return c.MoJin==true
return (c.MoJin or c:IsSetCard(0x23c))
end
function s.cfilter(c)
return c:IsCode(5012604) and c:IsFaceup()
......
--欧提努斯
local s,id,o=GetID()
c5012613.MoJin=true
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,5012604),1,1)
c:EnableReviveLimit()
......@@ -105,10 +106,12 @@ function s.initial_effect(c)
e20:SetCode(EFFECT_CANNOT_DISEFFECT)
e20:SetValue(s.effectfilter)
c:RegisterEffect(e20)
--cannot release
--不能当召唤用素材--
local e21=Effect.CreateEffect(c)
e21:SetType(EFFECT_TYPE_SINGLE)
e21:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e21:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e21:SetRange(LOCATION_MZONE)
e21:SetCode(EFFECT_UNRELEASABLE_SUM)
e21:SetValue(1)
c:RegisterEffect(e21)
......@@ -131,17 +134,35 @@ function s.initial_effect(c)
local e16=e14:Clone()
e16:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e16)
--做超量素材时送去墓地
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_ADJUST)
e4:SetOperation(s.rmop)
Duel.RegisterEffect(e4,0)
--maintain
local e17=Effect.CreateEffect(c)
e17:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e17:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e17:SetCode(EVENT_PHASE+PHASE_END)
e17:SetRange(LOCATION_MZONE)
--e17:SetRange(LOCATION_MZONE)
e17:SetCountLimit(1)
e17:SetCondition(s.mtcon)
e17:SetOperation(s.mtop)
c:RegisterEffect(e17)
end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.ndsfilter(c)
return c:IsFaceup() and c:IsCode(5012604)
end
......
--学院都市
local s,id,o=GetID()
c5012615.MoJin=true
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--Activate
......@@ -17,7 +17,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(2)
--e2:SetCountLimit(2)
e2:SetTarget(s.lvtg)
e2:SetOperation(s.lvop)
c:RegisterEffect(e2)
......@@ -36,7 +36,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c.MoJin==true --and c:IsAbleToHand()
return c:IsType(TYPE_MONSTER) and (c.MoJin or c:IsSetCard(0x23c)) and c:IsAbleToHand()
end
function s.target(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
......@@ -45,8 +45,8 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
--if g:GetCount()>0 then
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
if g:GetCount()>0 then
--if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
local sg=g:RandomSelect(tp,1)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
......@@ -65,7 +65,7 @@ function s.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsType(TYPE_FIELD)
end
function s.filter(c)
return c:IsFaceup() and c.MoJin==true and (c:GetLevel()>0 or c:GetRank()>0)
return c:IsFaceup() and (c.MoJin or c:IsSetCard(0x23c)) and (c:GetLevel()>0 or c:GetRank()>0)
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
......
......@@ -2,7 +2,6 @@
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,s.mfilter,nil,2,2)
......@@ -39,7 +38,7 @@ function s.initial_effect(c)
c:RegisterEffect(e8)
end
function s.mfilter(c,xyzc)
return c:IsLevelAbove(7) and c.MoJin==true --and c:IsSummonType(SUMMON_TYPE_SPECIAL)
return c:IsLevelAbove(8) and c.MoJin==true --and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return --Duel.GetCurrentChain()<1 and
......
--亚雷斯塔
local s,id,o=GetID()
c5012617.MoJin=true
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--link summon
......@@ -37,6 +37,13 @@ function s.initial_effect(c)
e5:SetRange(0xff)
e5:SetValue(s.effectfilter)
c:RegisterEffect(e5)
--做超量素材时送去墓地
local e7=Effect.CreateEffect(c)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e7:SetCode(EVENT_ADJUST)
e7:SetOperation(s.rmop)
Duel.RegisterEffect(e7,0)
--control
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
......@@ -87,6 +94,14 @@ function s.initial_effect(c)
e11:SetCondition(s.descon)
c:RegisterEffect(e11)
end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.lcheck(g,lc)
return g:IsExists(Card.IsLinkCode,1,nil,5012604)
end
......
--蓝发耳环
local s,id,o=GetID()
c5012618.MoJin=true
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--pendulum summon
aux.EnablePendulumAttribute(c)
--level
......@@ -32,10 +31,10 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsFaceup() and c.MoJin==true
return c:IsFaceup() and c.MoJin
end
function s.tgfilter(c)
return c.MoJin==true and c:IsAbleToGrave()
return c.MoJin and c:IsAbleToGrave()
end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
......
--云川芹亚
local cm,m,o=GetID()
local s,id,o=GetID()
s.MoJin=true
function cm.initial_effect(c)
--special summon
local damageCnt=0
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
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_HAND)
e1:SetCondition(cm.con)
e1:SetCost(cm.cost)
e1:SetOperation(cm.op)
e1:SetCost(s.drcost)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
c:RegisterEffect(e1)
--延迟伤害
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE+LOCATION_HAND)
e3:SetCost(s.cost)
e3:SetOperation(s.op)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PREDRAW)
e4:SetRange(0xff)
e4:SetCountLimit(1,id+EFFECT_COUNT_CODE_CHAIN)
e4:SetCondition(s.condition)
e4:SetOperation(s.operation)
c:RegisterEffect(e4)
end
function cm.rmvfilter(c)
return c:IsAbleToRemoveAsCost() and c.MoJin==true
function s.costfilterRem(c)
return c.MoJin and c:IsAbleToGraveAsCost()
end
function cm.tgfilter(c)
return c:IsAbleToGraveAsCost()and c.MoJin==true
function s.costfilterGra(c)
return c.MoJin and c:IsAbleToRemoveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmvfilter,tp,LOCATION_GRAVE,0,1,nil) or Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
local b1=false
local b2=false
if Duel.IsExistingMatchingCard(cm.rmvfilter,tp,LOCATION_GRAVE,0,1,nil) then b1=true end
if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_REMOVED,0,1,nil) then b2=true end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,1)},
{b2,aux.Stringid(m,2)})
if op==1 then
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.costfilterGra,tp,LOCATION_GRAVE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.costfilterRem,tp,LOCATION_REMOVED,0,1,nil)
if chk==0 then return b1 or b2 end
local which=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),0},
{b2,aux.Stringid(id,2),1})
if which==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmvfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
elseif op==2 then
local rg=Duel.SelectMatchingCard(tp,s.costfilterGra,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
elseif which==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
local rg=Duel.SelectMatchingCard(tp,s.costfilterRem,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoGrave(rg,REASON_COST+REASON_RETURN)
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
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 cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function s.tdfilter(c)
return (c:IsFaceup()or c:IsLocation(LOCATION_HAND)) and c:IsAbleToDeckAsCost() and c.MoJin
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
if chk==0 then return c:IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c)
if g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
end
g=g+c
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetTargetRange(1,0)
e3:SetValue(s.val)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.RegisterFlagEffect(tp,id,0,0,1)
end
function s.val(e,re,dam,r,rp,rc)
if dam>0 then
damageCnt=damageCnt+dam
end
return 0
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)>0
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,damageCnt,REASON_EFFECT)
Duel.ResetFlagEffect(tp,id)
damageCnt=0
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,ev,REASON_EFFECT)
end
\ No newline at end of file
......@@ -41,7 +41,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return c.MoJin==true and c:IsAbleToRemove()
return c.MoJin==true and c:IsAbleToRemove()
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
......
......@@ -2,7 +2,6 @@
local s,id,o=GetID()
c5012622.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--extra summon
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -18,7 +17,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
--e3:SetCountLimit(1,id)
e3:SetCountLimit(1,id)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
......@@ -31,13 +30,15 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
--e1:SetTargetRange(1,0)
e1:SetTarget(s.estg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
function s.estg(e,c)
return c.MoJin==true
--return c.MoJin==true
return not c:IsSetCard(0x23333a)
end
function s.val(e,c)
local tp=e:GetHandlerPlayer()
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment