Commit 10bbeca3 authored by Nemo Ma's avatar Nemo Ma

wd

parent 18bd2427
No preview for this file type
expansions/pics/46250025.jpg

51.8 KB | W: | H:

expansions/pics/46250025.jpg

86.8 KB | W: | H:

expansions/pics/46250025.jpg
expansions/pics/46250025.jpg
expansions/pics/46250025.jpg
expansions/pics/46250025.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390000.jpg

49.3 KB | W: | H:

expansions/pics/89390000.jpg

17.2 KB | W: | H:

expansions/pics/89390000.jpg
expansions/pics/89390000.jpg
expansions/pics/89390000.jpg
expansions/pics/89390000.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390001.jpg

51.7 KB | W: | H:

expansions/pics/89390001.jpg

18.1 KB | W: | H:

expansions/pics/89390001.jpg
expansions/pics/89390001.jpg
expansions/pics/89390001.jpg
expansions/pics/89390001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390002.jpg

51.1 KB | W: | H:

expansions/pics/89390002.jpg

18.7 KB | W: | H:

expansions/pics/89390002.jpg
expansions/pics/89390002.jpg
expansions/pics/89390002.jpg
expansions/pics/89390002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390003.jpg

50.3 KB | W: | H:

expansions/pics/89390003.jpg

16.4 KB | W: | H:

expansions/pics/89390003.jpg
expansions/pics/89390003.jpg
expansions/pics/89390003.jpg
expansions/pics/89390003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390004.jpg

50.8 KB | W: | H:

expansions/pics/89390004.jpg

19.2 KB | W: | H:

expansions/pics/89390004.jpg
expansions/pics/89390004.jpg
expansions/pics/89390004.jpg
expansions/pics/89390004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390005.jpg

54.3 KB | W: | H:

expansions/pics/89390005.jpg

17.3 KB | W: | H:

expansions/pics/89390005.jpg
expansions/pics/89390005.jpg
expansions/pics/89390005.jpg
expansions/pics/89390005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390006.jpg

52.3 KB | W: | H:

expansions/pics/89390006.jpg

16.7 KB | W: | H:

expansions/pics/89390006.jpg
expansions/pics/89390006.jpg
expansions/pics/89390006.jpg
expansions/pics/89390006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390007.jpg

48.2 KB | W: | H:

expansions/pics/89390007.jpg

16.8 KB | W: | H:

expansions/pics/89390007.jpg
expansions/pics/89390007.jpg
expansions/pics/89390007.jpg
expansions/pics/89390007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390008.jpg

48.1 KB | W: | H:

expansions/pics/89390008.jpg

14.6 KB | W: | H:

expansions/pics/89390008.jpg
expansions/pics/89390008.jpg
expansions/pics/89390008.jpg
expansions/pics/89390008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390009.jpg

51.6 KB | W: | H:

expansions/pics/89390009.jpg

16.3 KB | W: | H:

expansions/pics/89390009.jpg
expansions/pics/89390009.jpg
expansions/pics/89390009.jpg
expansions/pics/89390009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390010.jpg

45.8 KB | W: | H:

expansions/pics/89390010.jpg

15.8 KB | W: | H:

expansions/pics/89390010.jpg
expansions/pics/89390010.jpg
expansions/pics/89390010.jpg
expansions/pics/89390010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390011.jpg

49.7 KB | W: | H:

expansions/pics/89390011.jpg

15.6 KB | W: | H:

expansions/pics/89390011.jpg
expansions/pics/89390011.jpg
expansions/pics/89390011.jpg
expansions/pics/89390011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390012.jpg

60 KB | W: | H:

expansions/pics/89390012.jpg

16.8 KB | W: | H:

expansions/pics/89390012.jpg
expansions/pics/89390012.jpg
expansions/pics/89390012.jpg
expansions/pics/89390012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390013.jpg

49.4 KB | W: | H:

expansions/pics/89390013.jpg

16.8 KB | W: | H:

expansions/pics/89390013.jpg
expansions/pics/89390013.jpg
expansions/pics/89390013.jpg
expansions/pics/89390013.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(0xc914)
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(0xc914)
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,4,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,4,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(0xc914)
end
function c21113800.w(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 and c:IsSetCard(0xc914) 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(0xc914)
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(0xc914)
end
function c21113805.e(c)
return c:IsType(1) and c:IsSetCard(0xc914) 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(0xc914)
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(0xc914) 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(0xc914) 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(0xc914) 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(0xc914)
end
\ No newline at end of file
--芳青之梦 水彩笔
function c21113815.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0xc914),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(0xc914)
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(0xc914)
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(0xc914)
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(0xc914) 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(0xc914)
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(0xc914) 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(0xc914)
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(0xc914) 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.
--芳青之梦 幻天使
function c21113835.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(c21113835.linkcon())
e0:SetTarget(c21113835.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(c21113835.discon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c21113835.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,21113835)
e3:SetCost(c21113835.cost)
e3:SetTarget(c21113835.tg)
e3:SetOperation(c21113835.op)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,21113836)
e4:SetCondition(c21113835.con4)
e4:SetCost(c21113835.cost4)
e4:SetOperation(c21113835.op4)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113835.cost5)
e5:SetOperation(c21113835.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113835,ACTIVITY_SPSUMMON,c21113835.counter)
end
function c21113835.counter(c)
return c:IsSetCard(0xc914)
end
function c21113835.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc914) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc914) and c:IsDisabled() then
return 2
else
return 1
end
end
end
function c21113835.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:CheckWithSumEqual(c21113835.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 c21113835.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(0xc914) 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(c21113835.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function c21113835.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(0xc914) 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,c21113835.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c21113835.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113835.disable(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0) and c:IsFaceup()
end
function c21113835.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(c21113835.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113835.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113835)==0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113835,1)) then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil)
Duel.ConfirmCards(tp,g)
Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_RULE)
end
Duel.ResetFlagEffect(tp,21113835)
e:Reset()
end
function c21113835.q(c)
return c:IsFaceup() and c:IsSetCard(0xc914)
end
function c21113835.w(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc914) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 and not c:IsCode(21113835)
end
function c21113835.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113835.q,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,4)>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 c21113835.move(c,seq)
if not c21113835.q(c) then return end
if c:IsFacedown() then return end
if c:GetSequence()~=seq then
return true
else return end
end
function c21113835.seq(c,seq)
if c:GetSequence()==seq then
return true
else return end
end
function c21113835.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113835,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
Duel.Hint(3,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c21113835.move,tp,LOCATION_MZONE,0,1,1,nil,seq):GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local oc=Duel.GetMatchingGroup(c21113835.seq,tp,LOCATION_MZONE,0,nil,seq):GetFirst()
if oc then Duel.Destroy(oc,REASON_RULE) end
Duel.MoveSequence(tc,seq)
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c21113835.w),tp,0x30,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(21113835,0)) then
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c21113835.w),tp,0x30,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c21113835.con4(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c21113835.cost4(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(c21113835.opw)
Duel.RegisterEffect(e1,tp)
end
function c21113835.r(c)
return c:IsType(6) and c:IsSetCard(0xc914) and c:IsSSetable()
end
function c21113835.opw(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113835+1)==0 and Duel.IsExistingMatchingCard(c21113835.r,tp,1,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113835,2)) then
Duel.Hint(3,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c21113835.r,tp,1,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g:GetFirst())
end
end
Duel.ResetFlagEffect(tp,21113835+1)
e:Reset()
end
function c21113835.op4(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113835+1,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(12,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc914))
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(12,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc914))
e2:SetValue(aux.indoval)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c21113835.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113835,tp,ACTIVITY_SPSUMMON)==0
end
function c21113835.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(c21113835.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113835.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc914)
end
\ No newline at end of file
--芳青之梦 柳梢妃
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(0xc914)
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(0xc914) 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(0xc914)
end
function c21113840.q(c)
return c:IsSetCard(0xc914) 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(0xc914) 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(0xc914) 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(0xc914) 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(0xc914)
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(0xc914)
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(0xc914) and bit.band(loc,LOCATION_GRAVE)~=0
end
function c21113845.q(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xc914) 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(0xc914) 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(0xc914) 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(0xc914) 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(0xc914) 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(0xc914) 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(0xc914)
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(0xc914)
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(0xc914) 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(0xc914) 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(0xc914) 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(0xc914) 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(0xc914)
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(0xc914)
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(0xc914) 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(0xc914) 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(0xc914)
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(0xc914) 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(0xc914)
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(0xc914) 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(0xc914) 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(0xc914) 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:SetDescription(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(0xc914)
end
function c21113875.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc914) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc914) 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(0xc914) 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(0xc914) 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,0xc914))
Duel.RegisterEffect(e1,tp)
end
Duel.ResetFlagEffect(tp,21113875)
e:Reset()
end
function c21113875.q(c,e,tp)
return c:IsSetCard(0xc914) 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(0xc914) 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(0xc914) and c:IsAbleToDeck()
end
function c21113875.r(c,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,nil,c) and c:IsSetCard(0xc914) 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(0xc914)
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: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(0xc914)
end
function s.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc914) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc914) 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(2) or #sg>=2
and sg:CheckWithSumEqual(s.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 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=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(0xc914) 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(0xc914) 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(0xc914) 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(0xc914)
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(0xc914)
end
function s.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc914) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc914) 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: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(0xc914) 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(0xc914) 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_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.AdjustAll()
end
function s.setfilter(c)
return c:IsSetCard(0xc914) 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(0xc914) 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(0xc914)
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: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: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(0xc914) 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,0xc914,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,0xc914,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(0xc914) 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(0xc914) 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,0xc914))
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(0xc914) 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(0xc914) 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(0xc914) 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(0xc914) 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(0xc914) and Duel.IsPlayerAffectedByEffect(nc:GetControler(),21113900)) and spsummon_target(ne,nc,...)
end )
spsummon_effect:SetValue(
function(ne,nte,ntp,...)
return not (nte:GetHandler():IsSetCard(0xc914) 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(0xc914) 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(0xc914) 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(0xc914)
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(0xc914) 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
...@@ -69,38 +69,39 @@ function c28352281.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,38 +69,39 @@ function c28352281.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c28352281.operation(e,tp,eg,ep,ev,re,r,rp) function c28352281.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLP(tp)>=10000 then --if Duel.GetLP(tp)>=10000
--effect indes --defense up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCondition(c28352281.defcon)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH)) e1:SetValue(c28352281.defval)
e1:SetValue(1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end --if Duel.GetLP(tp)>Duel.GetLP(1-tp)
if Duel.GetLP(tp)>Duel.GetLP(1-tp) then --effect indes
--defense up
local val=(Duel.GetLP(tp)-Duel.GetLP(1-tp))/2
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetValue(val) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH))
e2:SetCondition(c28352281.imcon)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end --if c:IsDefensePos()
if c:IsDefensePos() then
--position --position
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SET_POSITION) e3:SetCode(EFFECT_SET_POSITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetValue(POS_DEFENSE) e3:SetCondition(c28352281.poscon)
e3:SetValue(POS_FACEUP_DEFENSE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--defense attack --defense attack
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -108,9 +109,24 @@ function c28352281.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,9 +109,24 @@ function c28352281.operation(e,tp,eg,ep,ev,re,r,rp)
e4:SetCode(EFFECT_DEFENSE_ATTACK) e4:SetCode(EFFECT_DEFENSE_ATTACK)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetCondition(c28352281.poscon)
e4:SetValue(1) e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c28352281.defcon(e)
return Duel.GetLP(e:GetHandlerPlayer())>=10000
end
function c28352281.defval(e,c)
local tp=c:GetControler()
return (Duel.GetLP(tp)-10000)/2
end
function c28352281.imcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetLP(tp)>Duel.GetLP(1-tp)
end
function c28352281.poscon(e)
return e:GetHandler():IsDefensePos()
end end
function c28352281.rlcon(e,tp,eg,ep,ev,re,r,rp) function c28352281.rlcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)>=10000 return Duel.GetLP(tp)>=10000
......
...@@ -68,10 +68,8 @@ end ...@@ -68,10 +68,8 @@ end
function c28381466.valcheck(e,c) function c28381466.valcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
local att=0 local att=0
local tc=g:GetFirst() for tc in aux.Next(g) do
while tc do
att=bit.bor(att,tc:GetOriginalAttribute()) att=bit.bor(att,tc:GetOriginalAttribute())
tc=g:GetNext()
end end
e:SetLabel(att) e:SetLabel(att)
end end
...@@ -100,7 +98,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,7 +98,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp)
ge1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) ge1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
ge1:SetRange(LOCATION_MZONE) ge1:SetRange(LOCATION_MZONE)
ge1:SetTargetRange(LOCATION_MZONE,0) ge1:SetTargetRange(LOCATION_MZONE,0)
ge1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x283)) ge1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY))
ge1:SetValue(aux.tgoval) ge1:SetValue(aux.tgoval)
c:RegisterEffect(ge1) c:RegisterEffect(ge1)
end end
...@@ -146,7 +144,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -146,7 +144,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp)
ge3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) ge3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
ge3:SetRange(LOCATION_MZONE) ge3:SetRange(LOCATION_MZONE)
ge3:SetTargetRange(LOCATION_MZONE,0) ge3:SetTargetRange(LOCATION_MZONE,0)
ge3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x283)) ge3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY))
ge3:SetValue(1) ge3:SetValue(1)
c:RegisterEffect(ge3) c:RegisterEffect(ge3)
end end
...@@ -168,7 +166,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -168,7 +166,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp)
ge4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) ge4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ge4:SetRange(LOCATION_MZONE) ge4:SetRange(LOCATION_MZONE)
ge4:SetTargetRange(LOCATION_MZONE,0) ge4:SetTargetRange(LOCATION_MZONE,0)
ge4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x283)) ge4:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY))
ge4:SetValue(1) ge4:SetValue(1)
c:RegisterEffect(ge4) c:RegisterEffect(ge4)
end end
...@@ -190,7 +188,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -190,7 +188,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp)
ge5:SetCode(EFFECT_CANNOT_DISABLE) ge5:SetCode(EFFECT_CANNOT_DISABLE)
ge5:SetRange(LOCATION_MZONE) ge5:SetRange(LOCATION_MZONE)
ge5:SetTargetRange(LOCATION_MZONE,0) ge5:SetTargetRange(LOCATION_MZONE,0)
ge5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x283)) ge5:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY))
ge5:SetValue(1) ge5:SetValue(1)
ge5:SetReset(RESET_EVENT+RESETS_STANDARD) ge5:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(ge5) c:RegisterEffect(ge5)
...@@ -219,7 +217,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -219,7 +217,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e0:SetRange(LOCATION_MZONE) e0:SetRange(LOCATION_MZONE)
e0:SetTargetRange(LOCATION_MZONE,0) e0:SetTargetRange(LOCATION_MZONE,0)
e0:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x283)) e0:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY))
e0:SetLabelObject(ge6) e0:SetLabelObject(ge6)
c:RegisterEffect(e0) c:RegisterEffect(e0)
end end
...@@ -228,7 +226,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -228,7 +226,7 @@ function c28381466.regop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c28381466.indtg(e,c,r,tp) function c28381466.indtg(e,c,r,tp)
return c:IsSetCard(0x283) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:GetControl()==tp return c:IsRace(RACE_FAIRY) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:GetControl()==tp
end end
function c28381466.efilter(e,te) function c28381466.efilter(e,te)
if te:GetOwnerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end if te:GetOwnerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
...@@ -243,7 +241,7 @@ function c28381466.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -243,7 +241,7 @@ function c28381466.discon(e,tp,eg,ep,ev,re,r,rp)
or (re:IsActiveType(TYPE_TRAP) and Duel.GetFlagEffect(tp,48381466)==0)) or (re:IsActiveType(TYPE_TRAP) and Duel.GetFlagEffect(tp,48381466)==0))
end end
function c28381466.disfilter(c) function c28381466.disfilter(c)
return c:IsSetCard(0x283) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) return c:IsRace(RACE_FAIRY) and c:IsAbleToDeckAsCost() and c:IsFaceupEx()
end end
function c28381466.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c28381466.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28381466.disfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c28381466.disfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,nil) end
......
...@@ -23,11 +23,19 @@ function c28381783.initial_effect(c) ...@@ -23,11 +23,19 @@ function c28381783.initial_effect(c)
e1:SetOperation(c28381783.tgop) e1:SetOperation(c28381783.tgop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetOperation(c28381783.regop)
c:RegisterEffect(e5)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c28381783.thcon)
e2:SetTarget(c28381783.thtg) e2:SetTarget(c28381783.thtg)
e2:SetOperation(c28381783.thop) e2:SetOperation(c28381783.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -109,6 +117,12 @@ function c28381783.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,6 +117,12 @@ function c28381783.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end end
end end
function c28381783.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(28381783,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c28381783.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(28381783)~=0
end
function c28381783.dthfilter(c) function c28381783.dthfilter(c)
return c:IsSetCard(0x285) and c:IsAbleToHand() return c:IsSetCard(0x285) and c:IsAbleToHand()
end end
...@@ -117,7 +131,7 @@ function c28381783.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -117,7 +131,7 @@ function c28381783.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c28381783.gthfilter(c) function c28381783.gthfilter(c)
return c:IsSetCard(0x285) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x285) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsFaceupEx()
end end
function c28381783.thop(e,tp,eg,ep,ev,re,r,rp) function c28381783.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -56,37 +56,20 @@ end ...@@ -56,37 +56,20 @@ end
function c28390175.target(e,tp,eg,ep,ev,re,r,rp,chk) function c28390175.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c28390175.tgfilter,tp,LOCATION_DECK,0,1,nil) local b1=Duel.IsExistingMatchingCard(c28390175.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c28390175.thfilter,tp,LOCATION_GRAVE,0,1,nil) local b2=Duel.IsExistingMatchingCard(c28390175.thfilter,tp,LOCATION_GRAVE,0,1,nil)
local b3=Duel.IsExistingMatchingCard(c28390175.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b3=Duel.IsExistingMatchingCard(c28390175.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0
if chk==0 then return b1 or b2 or b3 end if chk==0 then return b1 or b2 or b3 end
local off=1 local op=aux.SelectFromOptions(tp,
local ops={} {b1,aux.Stringid(28390175,0)},
local opval={} {b2,aux.Stringid(28390175,1)},
if b1 then {b3,aux.Stringid(28390175,2)})
ops[off]=aux.Stringid(28390175,0) e:SetLabel(op)
opval[off-1]=1 if op==1 then
off=off+1
end
if b2 then
ops[off]=aux.Stringid(28390175,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(28390175,2)
opval[off-1]=3
off=off+1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_TOGRAVE) e:SetCategory(CATEGORY_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
elseif sel==2 then elseif op==2 then
e:SetCategory(CATEGORY_TOHAND) e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
elseif sel==3 then elseif op==3 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
...@@ -106,7 +89,7 @@ function c28390175.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,7 +89,7 @@ function c28390175.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
elseif sel==3 then elseif sel==3 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c28390175.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c28390175.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -126,7 +109,7 @@ function c28390175.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -126,7 +109,7 @@ function c28390175.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function c28390175.cfilter(c) function c28390175.cfilter(c)
return c:IsSetCard(0x283) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsRace(RACE_FAIRY) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c28390175.thop(e,tp,eg,ep,ev,re,r,rp) function c28390175.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
...@@ -142,7 +125,7 @@ function c28390175.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -142,7 +125,7 @@ function c28390175.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleDeck(p) Duel.ShuffleDeck(p)
end end
function c28390175.splimit(e,c) function c28390175.splimit(e,c)
return not c:IsSetCard(0x283) return not c:IsRace(RACE_FAIRY+RACE_SPELLCASTER)
end end
function c28390175.cdstg(e,c) function c28390175.cdstg(e,c)
return true return true
......
...@@ -44,7 +44,7 @@ function c28391698.initial_effect(c) ...@@ -44,7 +44,7 @@ function c28391698.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c28391698.cfilter(c) function c28391698.cfilter(c)
return c:IsSetCard(0x283) and c:IsFaceup() return c:IsRace(RACE_FAIRY) and c:IsFaceup()
end end
function c28391698.necon(e,tp,eg,ep,ev,re,r,rp) function c28391698.necon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
......
local s,id,o=GetID() local s,id,o=GetID()
local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end
local IO_CHECK=false
if io then IO_CHECK=true end
function s.initial_effect(c) function s.initial_effect(c)
if not s.globle_check then if not s.globle_check then
s.autodata={ s.autodata={
...@@ -138,7 +142,7 @@ function s.initial_effect(c) ...@@ -138,7 +142,7 @@ function s.initial_effect(c)
end end
local control_player=0 local control_player=0
if Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end if Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end
if Duel.GetMatchingGroupCount(s.cfilter,control_player,LOCATION_EXTRA,0,nil,id)>0 then if Duel.GetMatchingGroupCount(s.cfilter,control_player,LOCATION_EXTRA,0,nil,id)==1 then
s.Wild_Mode=true s.Wild_Mode=true
local _cRegisterEffect=Card.RegisterEffect local _cRegisterEffect=Card.RegisterEffect
function Card.RegisterEffect(ec,e,bool) function Card.RegisterEffect(ec,e,bool)
...@@ -166,7 +170,7 @@ function s.initial_effect(c) ...@@ -166,7 +170,7 @@ function s.initial_effect(c)
ge1:SetLabelObject(ge0) ge1:SetLabelObject(ge0)
Duel.RegisterEffect(ge1,control_player) Duel.RegisterEffect(ge1,control_player)
end end
if Duel.GetMatchingGroupCount(s.cfilter,control_player,0x7f,0,nil,id)>1 then if Duel.GetMatchingGroupCount(s.cfilter,control_player,0x7f,0,nil,id)==2 and KOISHI_CHECK then
Duel.DisableActionCheck(true) Duel.DisableActionCheck(true)
Debug.SetPlayerInfo(control_player,8000,0,1) Debug.SetPlayerInfo(control_player,8000,0,1)
Debug.SetPlayerInfo(1-control_player,0,0,1) Debug.SetPlayerInfo(1-control_player,0,0,1)
...@@ -194,9 +198,15 @@ function s.initial_effect(c) ...@@ -194,9 +198,15 @@ function s.initial_effect(c)
pcall(Duel.MoveToField,c,control_player,control_player,LOCATION_MZONE,POS_FACEUP_ATTACK,true,0x20) pcall(Duel.MoveToField,c,control_player,control_player,LOCATION_MZONE,POS_FACEUP_ATTACK,true,0x20)
local atke=Effect.CreateEffect(c) local atke=Effect.CreateEffect(c)
atke:SetType(EFFECT_TYPE_SINGLE) atke:SetType(EFFECT_TYPE_SINGLE)
atke:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
atke:SetCode(EFFECT_SET_BATTLE_ATTACK) atke:SetCode(EFFECT_SET_BATTLE_ATTACK)
atke:SetValue(2147483647) atke:SetValue(2147483647)
c:RegisterEffect(atke,true) c:RegisterEffect(atke,true)
local atke2=Effect.CreateEffect(c)
atke2:SetType(EFFECT_TYPE_SINGLE)
atke2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
atke2:SetCode(EFFECT_MATCH_KILL)
c:RegisterEffect(atke2,true)
--local cd = coroutine.create(Duel.CalculateDamage) --local cd = coroutine.create(Duel.CalculateDamage)
--coroutine.resume(cd,c,nil) --coroutine.resume(cd,c,nil)
--local dr1 = coroutine.create(Duel.Draw) --local dr1 = coroutine.create(Duel.Draw)
...@@ -206,7 +216,7 @@ function s.initial_effect(c) ...@@ -206,7 +216,7 @@ function s.initial_effect(c)
--pcall(Duel.CalculateDamage,c,nil) --pcall(Duel.CalculateDamage,c,nil)
-- --
if control_player==0 then if control_player==0 then
s.Administrator(5) --s.Administrator(5)
else else
end end
...@@ -225,12 +235,6 @@ function s.Administrator(number) ...@@ -225,12 +235,6 @@ function s.Administrator(number)
Debug.Message("Messages:"..number) Debug.Message("Messages:"..number)
Debug.ShowHint(result) Debug.ShowHint(result)
end end
--Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI)
local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end
local IO_CHECK=false
if io then IO_CHECK=true end
function s.changecardcode(e,tp) function s.changecardcode(e,tp)
local cardtable={27520594,95511642,22916281,58400390,4392470,62514770,46986414,89631139} local cardtable={27520594,95511642,22916281,58400390,4392470,62514770,46986414,89631139}
local c=e:GetHandler() local c=e:GetHandler()
...@@ -1354,14 +1358,14 @@ function s.mindcontrol(e,tp) ...@@ -1354,14 +1358,14 @@ function s.mindcontrol(e,tp)
if effect and s.Control_Mode then if effect and s.Control_Mode then
if effect:GetType()&EFFECT_TYPE_GRANT~=0 then if effect:GetType()&EFFECT_TYPE_GRANT~=0 then
local labeff=s.change_effect(effect:GetLabelObject(),card,tp) local labeff=s.change_effect(effect:GetLabelObject(),card,tp)
if labeff~=0 then if aux.GetValueType(labeff)=="Effect" then
local eff=effect:Clone() local eff=effect:Clone()
eff:SetLabelObject(labeff) eff:SetLabelObject(labeff)
_CReg(card,eff,...) _CReg(card,eff,...)
end end
else else
local eff=s.change_effect(effect,card,tp) local eff=s.change_effect(effect,card,tp)
if eff~=0 then if aux.GetValueType(eff)=="Effect" then
_CReg(card,eff,...) _CReg(card,eff,...)
end end
end end
...@@ -1700,7 +1704,7 @@ function s.setactop(e,tp,eg,ep,ev,re,r,rp) ...@@ -1700,7 +1704,7 @@ function s.setactop(e,tp,eg,ep,ev,re,r,rp)
local effect=tc:GetActivateEffect() local effect=tc:GetActivateEffect()
local eff=effect:Clone() local eff=effect:Clone()
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
if eff and aux.GetValueType(eff)=="Effect"then if eff and aux.GetValueType(eff)=="Effect" then
eff:SetProperty(effect:GetProperty()|EFFECT_FLAG_SET_AVAILABLE) eff:SetProperty(effect:GetProperty()|EFFECT_FLAG_SET_AVAILABLE)
eff:SetRange(LOCATION_SZONE) eff:SetRange(LOCATION_SZONE)
eff:SetDescription(aux.Stringid(id+1,9)) eff:SetDescription(aux.Stringid(id+1,9))
......
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