Commit 039b14a8 authored by 森野さくら's avatar 森野さくら 🐟

man!

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

100 KB | W: | H:

pics/5012635.jpg

35.8 KB | W: | H:

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

87.9 KB | W: | H:

pics/62624135.jpg

90.1 KB | W: | H:

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

109 KB | W: | H:

pics/62624140.jpg

35.4 KB | W: | H:

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

90.1 KB | W: | H:

pics/62624145.jpg

30.8 KB | W: | H:

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

72.1 KB | W: | H:

pics/62624215.jpg

75.2 KB | W: | H:

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

84.5 KB | W: | H:

pics/62624245.jpg

72.1 KB | W: | H:

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

86.7 KB | W: | H:

pics/62624260.jpg

77.5 KB | W: | H:

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

88.5 KB | W: | H:

pics/62624510.jpg

30.1 KB | W: | H:

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

104 KB | W: | H:

pics/62624530.jpg

33 KB | W: | H:

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

111 KB | W: | H:

pics/62624570.jpg

35.6 KB | W: | H:

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

102 KB | W: | H:

pics/62624615.jpg

34.6 KB | W: | H:

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

90.9 KB | W: | H:

pics/62624630.jpg

92.5 KB | W: | H:

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

90 KB | W: | H:

pics/62624635.jpg

31.6 KB | W: | H:

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

85 KB | W: | H:

pics/62624705.jpg

92.3 KB | W: | H:

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

99.4 KB | W: | H:

pics/62624720.jpg

33.1 KB | W: | H:

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

95.2 KB | W: | H:

pics/62624725.jpg

95 KB | W: | H:

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

94.4 KB | W: | H:

pics/62624730.jpg

94.4 KB | W: | H:

pics/62624730.jpg
pics/62624730.jpg
pics/62624730.jpg
pics/62624730.jpg
  • 2-up
  • Swipe
  • Onion skin
--芳青之梦 颂枝谣
function c21113800.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e0:SetCondition(c21113800.discon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,21113800)
e1:SetCost(c21113800.cost)
e1:SetTarget(c21113800.tg)
e1:SetOperation(c21113800.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,21113801)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCost(c21113800.cost2)
e2:SetOperation(c21113800.op2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(21113800,ACTIVITY_SPSUMMON,c21113800.counter)
end
function c21113800.counter(c)
return c:IsSetCard(0xc904)
end
function c21113800.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113800.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(21113800,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113800.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetCountLimit(1)
e2:SetOperation(c21113800.op0)
Duel.RegisterEffect(e2,tp)
end
function c21113800.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
function c21113800.op0(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113800)==0 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,12,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113800,0)) then
Duel.Hint(3,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,12,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113800)
e:Reset()
end
function c21113800.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113800.w(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 and c:IsSetCard(0xc904) and not c:IsCode(21113800)
end
function c21113800.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113800.q,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,4)>0 and Duel.IsExistingMatchingCard(c21113800.w,tp,1,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(11,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,1)
end
function c21113800.move(c,seq)
if not c21113800.q(c) then return end
if c:IsFacedown() then return end
if c:GetSequence()~=seq then
return true
else return end
end
function c21113800.seq(c,seq)
if c:GetSequence()==seq then
return true
else return end
end
function c21113800.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113800,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
Duel.Hint(3,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c21113800.move,tp,LOCATION_MZONE,0,1,1,nil,seq):GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local oc=Duel.GetMatchingGroup(c21113800.seq,tp,LOCATION_MZONE,0,nil,seq):GetFirst()
if oc then Duel.Destroy(oc,REASON_RULE) end
Duel.MoveSequence(tc,seq)
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21113800.w,tp,1,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c21113800.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(21113800,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113800.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113800.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetValue(c21113800.val0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetValue(c21113800.val0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c21113800.val0(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():GetSequence()>=5 and bit.band(loc,LOCATION_MZONE)~=0
end
\ No newline at end of file
--芳青之梦 幻樱歌
function c21113805.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e0:SetCondition(c21113805.discon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,21113805+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c21113805.con)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,21113806)
e2:SetCost(c21113805.cost2)
e2:SetTarget(c21113805.tg2)
e2:SetOperation(c21113805.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c21113805.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113805.w(c)
return c:IsFacedown() or not c:IsDisabled()
end
function c21113805.con(e,c)
if c==nil then return true end
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(c21113805.w,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c21113805.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113805.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,c:GetControler())
end
function c21113805.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
function c21113805.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113805.op0)
Duel.RegisterEffect(e1,tp)
end
function c21113805.op0(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113805)==0 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(21113805,0)) then
Duel.Draw(tp,1,REASON_RULE)
end
Duel.ResetFlagEffect(tp,21113805)
e:Reset()
end
function c21113805.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113805.e(c)
return c:IsType(1) and c:IsSetCard(0xc904) and c:IsAbleToHand() and not c:IsCode(21113805)
end
function c21113805.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113805.q,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,4)>0 and Duel.IsExistingMatchingCard(c21113805.e,tp,1,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(11,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,1)
end
function c21113805.move(c,seq)
if not c21113805.q(c) then return end
if c:IsFacedown() then return end
if c:GetSequence()~=seq then
return true
else return end
end
function c21113805.seq(c,seq)
if c:GetSequence()==seq then
return true
else return end
end
function c21113805.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113805,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
Duel.Hint(3,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c21113805.move,tp,LOCATION_MZONE,0,1,1,nil,seq):GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local oc=Duel.GetMatchingGroup(c21113805.seq,tp,LOCATION_MZONE,0,nil,seq):GetFirst()
if oc then Duel.Destroy(oc,REASON_RULE) end
Duel.MoveSequence(tc,seq)
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113805.e,tp,1,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--芳青之梦 天弦声
function c21113810.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c21113810.linkcon())
e0:SetTarget(c21113810.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(c21113810.discon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,21113810)
e2:SetCondition(c21113810.con)
e2:SetCost(c21113810.cost)
e2:SetTarget(c21113810.tg)
e2:SetOperation(c21113810.op)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113810.cost5)
e5:SetOperation(c21113810.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113810,ACTIVITY_SPSUMMON,c21113810.counter)
end
function c21113810.counter(c)
return c:IsSetCard(0xc904)
end
function c21113810.LCheckGoal(sg,tp,lc,lmat)
return #sg==1 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 or #sg==2
and sg:CheckWithSumEqual(Auxiliary.GetLinkCount,2,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function c21113810.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=2
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c21113810.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function c21113810.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=2
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c21113810.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c21113810.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113810.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c21113810.q(c,e,tp)
return c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c21113810.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113810.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113810.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113810)==0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,4,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113810,0)) then
Duel.Hint(3,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,4,1,2,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113810)
e:Reset()
end
function c21113810.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113810.q,tp,0x10,0,1,nil,e,tp) and Duel.GetLocationCount(tp,4)>0 end
local ft=Duel.GetLocationCount(tp,4)
if ft>=3 then ft=2 end
if ft>=2 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113810.q,tp,0x10,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,tp,0x10)
end
function c21113810.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.RegisterFlagEffect(tp,21113810,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g==2 and (Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(tp,4)<=1) then return end
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 then
local og=Duel.GetOperatedGroup()
for tc in aux.Next(og) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
end
end
function c21113810.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113810,tp,ACTIVITY_SPSUMMON)==0
end
function c21113810.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113810.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113810.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 水彩笔
function c21113815.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0xc904),1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e0:SetCondition(c21113815.discon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,21113815)
e1:SetCost(c21113815.cost)
e1:SetTarget(c21113815.tg)
e1:SetOperation(c21113815.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,21113816)
e2:SetCondition(c21113815.con2)
e2:SetCost(c21113815.cost2)
e2:SetTarget(c21113815.tg2)
e2:SetOperation(c21113815.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_CHAIN_DISABLED)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113815.cost5)
e5:SetOperation(c21113815.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113815,ACTIVITY_SPSUMMON,c21113815.counter)
end
function c21113815.counter(c)
return c:IsSetCard(0xc904)
end
function c21113815.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113815.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113815.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113815.q(c)
return c:IsAbleToHand() and c:IsType(6) and c:IsSetCard(0xc904)
end
function c21113815.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113815)==0 and Duel.IsExistingMatchingCard(c21113815.q,tp,1,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113815,0)) then
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113815.q,tp,1,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,g)
end
end
Duel.ResetFlagEffect(tp,21113815)
e:Reset()
end
function c21113815.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,12,12,1,nil) and Duel.GetLocationCount(tp,4)>0 end
Duel.Hint(3,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,12,12,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c21113815.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113815,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c21113815.con2(e,tp,eg,ep,ev,re,r,rp)
return rp==tp
end
function c21113815.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113815.opw)
Duel.RegisterEffect(e1,tp)
end
function c21113815.opw(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113815+1)==0 and Duel.SelectYesNo(tp,aux.Stringid(21113815,1)) then
Duel.Damage(1-tp,1500,REASON_RULE)
end
Duel.ResetFlagEffect(tp,21113815+1)
e:Reset()
end
function c21113815.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500)
end
function c21113815.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113815+1,RESET_PHASE+PHASE_END,0,1)
Duel.Recover(tp,1500,REASON_EFFECT)
end
function c21113815.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113815,tp,ACTIVITY_SPSUMMON)==0
end
function c21113815.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113815.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113815.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 写彩
function c21113820.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetCondition(c21113820.actcon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c21113820.con)
e1:SetTarget(c21113820.tg)
e1:SetOperation(c21113820.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,21113820)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c21113820.tg2)
e2:SetOperation(c21113820.op2)
c:RegisterEffect(e2)
end
function c21113820.act(c)
return c:IsFaceup() and c:IsSetCard(0xc904) and c:IsDisabled()
end
function c21113820.actcon(e)
return Duel.IsExistingMatchingCard(c21113820.act,e:GetHandlerPlayer(),4,0,1,nil)
end
function c21113820.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113820.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c21113820.q,tp,LOCATION_MZONE,0,1,nil) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c21113820.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end
end
function c21113820.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c21113820.disable)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c21113820.disable(e,c)
return c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0
end
function c21113820.w(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xc904) and Duel.GetLocationCount(tp,4)>0
end
function c21113820.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113820.w,tp,0x10,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113820.w,tp,0x10,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0x10)
end
function c21113820.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c21113820.splimit)
Duel.RegisterEffect(e1,tp)
end
function c21113820.splimit(e,c)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 断思染绪
function c21113825.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,21113825+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c21113825.cost)
e1:SetTarget(c21113825.tg)
e1:SetOperation(c21113825.op)
c:RegisterEffect(e1)
end
function c21113825.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113825.op0)
Duel.RegisterEffect(e1,tp)
end
function c21113825.w(c)
return c:IsCode(21113825) and c:IsAbleToHand()
end
function c21113825.op0(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113825)==0 and (Duel.IsExistingMatchingCard(c21113825.w,tp,1,0,1,nil) or Duel.IsPlayerCanDraw(tp,1)) and Duel.SelectYesNo(tp,aux.Stringid(21113825,0)) then
local x1,x2=false,false
if Duel.IsExistingMatchingCard(c21113825.w,tp,1,0,1,nil) then x1=true end
if Duel.IsPlayerCanDraw(tp,1) then x2=true end
local op=aux.SelectFromOptions(tp,{x1,aux.Stringid(21113825,1),0},{x2,aux.Stringid(21113825,2),1})
if op==0 then
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113825.w,tp,1,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,g)
elseif op==1 then
Duel.Draw(tp,1,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113825)
e:Reset()
end
function c21113825.q(c)
return c:IsSetCard(0xc904) and c:IsAbleToHand() and c:IsType(1)
end
function c21113825.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113825.q,tp,1,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,1)
end
function c21113825.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113825,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113825.q,tp,1,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--芳青之梦 白烨鹿
function c21113830.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(c21113830.linkcon())
e0:SetTarget(c21113830.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(c21113830.discon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(21113830,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,21113830)
e2:SetCost(c21113830.cost)
e2:SetTarget(c21113830.tg)
e2:SetOperation(c21113830.op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(21113830,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,21113831)
e3:SetCost(c21113830.cost3)
e3:SetTarget(c21113830.tg3)
e3:SetOperation(c21113830.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(c21113830.cost5)
e5:SetOperation(c21113830.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113830,ACTIVITY_SPSUMMON,c21113830.counter)
end
function c21113830.counter(c)
return c:IsSetCard(0xc904)
end
function c21113830.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
end
end
end
function c21113830.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(c21113830.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 c21113830.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=4
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c21113830.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function c21113830.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=4
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c21113830.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c21113830.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113830.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(c21113830.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113830.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113830)==0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113830,5)) then
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
if #g1>0 and (#g3==0 or Duel.SelectYesNo(tp,aux.Stringid(21113830,3))) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg1=g1:RandomSelect(tp,1)
Duel.HintSelection(sg1)
sg:Merge(sg1)
end
if #g3>0 and (#sg==0 or Duel.SelectYesNo(tp,aux.Stringid(21113830,4))) then
Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg3=g3:RandomSelect(tp,1)
sg:Merge(sg3)
end
Duel.Remove(sg,POS_FACEUP,REASON_RULE)
end
Duel.ResetFlagEffect(tp,21113830)
e:Reset()
end
function c21113830.q(c,e,tp)
return c:IsFaceupEx() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 and c:IsSetCard(0xc904) and not c:IsCode(21113830)
end
function c21113830.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113830.q,tp,0x30,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113830.q,tp,0x30,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0x30)
end
function c21113830.o(c)
local seq=c:GetSequence()
local tp=c:GetControler()
if seq>4 then return false end
return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
end
function c21113830.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113830,RESET_PHASE+PHASE_END,0,1)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,4)>0 and Duel.GetMatchingGroupCount(c21113830.o,tp,4,0,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(21113830,2)) then
Duel.BreakEffect()
Duel.Hint(3,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,c21113830.o,tp,4,0,1,1,nil):GetFirst()
local seq=tc:GetSequence()
if seq>4 then return end
local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then
flag=flag|(1<<(seq-1)) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then
flag=flag|(1<<(seq+1)) end
if flag==0 then return end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,~flag)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
end
function c21113830.w(c)
return c:IsFaceup() and c:IsReleasable() and c:IsSetCard(0xc904)
end
function c21113830.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c21113830.w,tp,4,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c21113830.w,tp,4,0,1,1,nil)
Duel.Release(g,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(c21113830.opw)
Duel.RegisterEffect(e1,tp)
end
function c21113830.e(c)
return c:IsSetCard(0xc904) and (c:IsAbleToGrave() or c:IsAbleToHand())
end
function c21113830.e1(c)
return c:IsSetCard(0xc904) and c:IsAbleToGrave()
end
function c21113830.e2(c)
return c:IsSetCard(0xc904) and c:IsAbleToHand()
end
function c21113830.opw(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113830+1)==0 and Duel.IsExistingMatchingCard(c21113830.e,tp,1,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113830,7)) then
local g1=Duel.GetMatchingGroup(c21113830.e1,tp,1,0,nil)
local g2=Duel.GetMatchingGroup(c21113830.e2,tp,1,0,nil)
local op=aux.SelectFromOptions(tp,{#g1>0,aux.Stringid(21113830,8),0},{#g2>0,aux.Stringid(21113830,9),1})
if op==0 then
Duel.Hint(3,tp,HINTMSG_TOGRAVE)
local g=g1:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_RULE)
elseif op==1 then
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=g2:Select(tp,1,1,nil)
Duel.SendtoHand(g,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,g)
end
end
Duel.ResetFlagEffect(tp,21113830+1)
e:Reset()
end
function c21113830.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500)
end
function c21113830.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113830+1,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
if Duel.Damage(1-tp,1500,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,12,12,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113830,6)) then
Duel.BreakEffect()
Duel.Hint(3,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,12,12,1,1,nil):GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
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
end
function c21113830.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113830,tp,ACTIVITY_SPSUMMON)==0
end
function c21113830.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(c21113830.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113830.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 幻天使
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(0xc904)
end
function c21113835.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
end
end
end
function 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:IsExists(Card.IsDisabled,2,nil) and sg:IsExists(Card.IsType,2,nil,TYPE_LINK)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetClassCount(Card.GetLink)==6 or #sg>=2
and sg:CheckWithSumEqual(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(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(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(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,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(0xc904)
end
function c21113835.w(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 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(0xc904) 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,0xc904))
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,0xc904))
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(0xc904)
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(0xc904)
end
function c21113840.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113840.t(c)
return c:IsSetCard(0xc904) and c:IsDiscardable()
end
function c21113840.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(21113840,tp,ACTIVITY_SPSUMMON)==0 and Duel.IsExistingMatchingCard(c21113840.t,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,c21113840.t,1,1,REASON_COST+REASON_DISCARD,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113840.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetCountLimit(1)
e2:SetOperation(c21113840.opq)
Duel.RegisterEffect(e2,tp)
end
function c21113840.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
function c21113840.q(c)
return c:IsSetCard(0xc904) and c:IsType(1) and c:IsAbleToHand() and not c:IsCode(21113840)
end
function c21113840.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113840)==0 and Duel.IsExistingMatchingCard(c21113840.q,tp,1,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113840,1)) then
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113840.q,tp,1,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,g)
end
end
Duel.ResetFlagEffect(tp,21113840)
e:Reset()
end
function c21113840.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,4)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
end
function c21113840.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113840,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and not c:IsType(TYPE_TUNER) and c:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(21113840,0)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1,true)
end
end
function c21113840.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(21113840,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113840.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetCountLimit(1)
e2:SetOperation(c21113840.opw)
Duel.RegisterEffect(e2,tp)
end
function c21113840.r(c)
return c:IsSetCard(0xc904) and c:IsType(1) and c:IsAbleToGrave()
end
function c21113840.opw(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113840+1)==0 and Duel.IsExistingMatchingCard(c21113840.r,tp,1,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113840,1)) then
Duel.Hint(3,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c21113840.r,tp,1,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113840+1)
e:Reset()
end
function c21113840.w(c)
return c:IsSetCard(0xc904) and c:IsFaceup() and c:IsAbleToGrave()
end
function c21113840.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113840.w,tp,12,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c21113840.w,tp,12,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c21113840.e(c,e,tp)
return c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 and not c:IsCode(21113840)
end
function c21113840.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113840+1,RESET_PHASE+PHASE_END,0,1)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(0x10) and Duel.IsExistingMatchingCard(c21113840.e,tp,0x10,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(21113840,2)) then
Duel.BreakEffect()
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21113840.e,tp,0x10,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--芳青之梦 荡思眠
function c21113845.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e0:SetCondition(c21113845.discon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_GRAVE_SPSUMMON+CATEGORY_SPECIAL_SUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,21113845)
e1:SetCost(c21113845.cost)
e1:SetTarget(c21113845.tg)
e1:SetOperation(c21113845.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_TODECK)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,21113846)
e2:SetCost(c21113845.cost2)
e2:SetTarget(c21113845.tg2)
e2:SetOperation(c21113845.op2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(21113845,ACTIVITY_SPSUMMON,c21113845.counter)
end
function c21113845.counter(c)
return c:IsSetCard(0xc904)
end
function c21113845.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113845.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(21113845,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113845.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetCountLimit(1)
e2:SetOperation(c21113845.opq)
Duel.RegisterEffect(e2,tp)
end
function c21113845.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
function c21113845.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113845)==0 then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetRange(LOCATION_SZONE)
e1:SetValue(c21113845.valq)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetRange(LOCATION_SZONE)
e2:SetValue(c21113845.valq)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
Duel.ResetFlagEffect(tp,21113845)
e:Reset()
end
function c21113845.valq(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():IsSetCard(0xc904) and bit.band(loc,LOCATION_GRAVE)~=0
end
function c21113845.q(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xc904) and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c21113845.w,tp,0x12,0,1,nil,e,tp,c)
end
function c21113845.w(c,e,tp,sc)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xc904) and not c:IsCode(21113845)
end
function c21113845.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113845.q,tp,4,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x12)
end
function c21113845.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113845,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(3,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,c21113845.q,tp,4,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c21113845.w),tp,0x12,0,1,nil,e,tp,tc) and Duel.GetLocationCount(tp,4)>0 then
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c21113845.w),tp,0x12,0,1,1,nil,e,tp,tc)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c21113845.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.GetCustomActivityCount(21113845,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113845.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
Duel.Remove(c,POS_FACEUP,REASON_COST)
end
function c21113845.e(c,e,tp,mg)
if c:GetLink()<2 then return false end
local ct=math.floor(c:GetLink()/2)
return c:IsType(TYPE_LINK) and c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and mg:CheckSubGroup(c21113845.check,ct,ct,tp,c)
end
function c21113845.check(g,tp,fc)
return Duel.GetLocationCountFromEx(tp,tp,g,fc)>0 and g:FilterCount(Card.IsAbleToDeck,nil)==#g
end
function c21113845.r(c)
return c:IsSetCard(0xc904) and c:IsAbleToDeck() and not c:IsCode(21113845)
end
function c21113845.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c21113845.r,tp,0x30,0,nil)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.IsExistingMatchingCard(c21113845.e,tp,LOCATION_EXTRA,0,1,nil,e,tp,g) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c21113845.op2(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end
local mg=Duel.GetMatchingGroup(c21113845.r,tp,0x30,0,nil)
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21113845.e,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g:GetFirst()
if tc then
Duel.ConfirmCards(1-tp,tc)
local ct=math.floor(tc:GetLink()/2)
Duel.Hint(3,tp,HINTMSG_TODECK)
local sg=mg:SelectSubGroup(tp,c21113845.check,false,ct,ct,tp,tc)
local cg=sg:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)>0 and sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)>0 then
tc:SetMaterial(nil)
Duel.BreakEffect()
if Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
end
\ No newline at end of file
--芳青之梦 春风拂面
function c21113850.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,21113850+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c21113850.cost)
e1:SetTarget(c21113850.tg)
e1:SetOperation(c21113850.op)
c:RegisterEffect(e1)
end
function c21113850.t(c)
return c:IsSetCard(0xc904) and c:IsDiscardable()
end
function c21113850.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c21113850.t,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,c21113850.t,1,1,REASON_COST+REASON_DISCARD,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113850.op0)
Duel.RegisterEffect(e1,tp)
end
function c21113850.w(c)
return c:IsCode(21113850) and c:IsAbleToHand()
end
function c21113850.op0(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113850)==0 and (Duel.IsExistingMatchingCard(c21113850.w,tp,1,0,1,nil) or Duel.IsPlayerCanDraw(tp,1)) and Duel.SelectYesNo(tp,aux.Stringid(21113850,0)) then
local x1,x2=false,false
if Duel.IsExistingMatchingCard(c21113850.w,tp,1,0,1,nil) then x1=true end
if Duel.IsPlayerCanDraw(tp,1) then x2=true end
local op=aux.SelectFromOptions(tp,{x1,aux.Stringid(21113850,1),0},{x2,aux.Stringid(21113850,2),1})
if op==0 then
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21113850.w,tp,1,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,g)
elseif op==1 then
Duel.Draw(tp,1,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113850)
e:Reset()
end
function c21113850.q(c)
return c:IsAbleToRemove() and c:IsType(6)
end
function c21113850.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c21113850.q,tp,0,12,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function c21113850.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113850,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c21113850.q,tp,0,12,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(0,4)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(-2000)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
--芳青之梦 猫之教义
function c21113855.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetCondition(c21113855.actcon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(21113855,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,21113855)
e2:SetTarget(c21113855.tg)
e2:SetOperation(c21113855.op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(21113855,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,21113856)
e3:SetTarget(c21113855.tg3)
e3:SetOperation(c21113855.op3)
c:RegisterEffect(e3)
end
function c21113855.act(c)
return c:IsFaceup() and c:IsSetCard(0xc904) and c:IsDisabled()
end
function c21113855.actcon(e)
return Duel.IsExistingMatchingCard(c21113855.act,e:GetHandlerPlayer(),4,0,1,nil)
end
function c21113855.e(c,e,tp)
return c:IsFaceupEx() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0
end
function c21113855.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113855.e,tp,0x30,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113855.e,tp,0x30,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0x30)
end
function c21113855.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c21113855.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113855.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113855.q,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(11,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
end
function c21113855.move(c,seq)
if not c21113855.q(c) then return end
if c:IsFacedown() then return end
if c:GetSequence()~=seq then
return true
else return end
end
function c21113855.seq(c,seq)
if c:GetSequence()==seq then
return true
else return end
end
function c21113855.w(c,e,tp,cg)
local g=Duel.GetFieldGroup(tp,0,12)
return #g>0
end
function c21113855.op3(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetLabel()
Duel.Hint(3,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c21113855.move,tp,LOCATION_MZONE,0,1,1,nil,seq):GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local oc=Duel.GetMatchingGroup(c21113855.seq,tp,LOCATION_MZONE,0,nil,seq):GetFirst()
if oc then Duel.Destroy(oc,REASON_RULE) end
Duel.MoveSequence(tc,seq)
Duel.AdjustAll()
local cg=tc:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if #cg>0 and Duel.SelectYesNo(tp,aux.Stringid(21113855,2)) then
Duel.BreakEffect()
Duel.Destroy(cg,REASON_EFFECT)
end
end
end
\ No newline at end of file
--芳青之梦 音长阶
function c21113860.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c21113860.linkcon())
e0:SetTarget(c21113860.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(c21113860.discon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,21113860)
e2:SetCondition(c21113860.con)
e2:SetCost(c21113860.cost)
e2:SetTarget(c21113860.tg)
e2:SetOperation(c21113860.op)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113860.cost5)
e5:SetOperation(c21113860.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113860,ACTIVITY_SPSUMMON,c21113860.counter)
end
function c21113860.counter(c)
return c:IsSetCard(0xc904)
end
function c21113860.LCheckGoal(sg,tp,lc,lmat)
return #sg==1 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 or #sg==2
and sg:CheckWithSumEqual(Auxiliary.GetLinkCount,2,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function c21113860.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=2
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c21113860.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function c21113860.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=2
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c21113860.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c21113860.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113860.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c21113860.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113860.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113860.q(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xc904) and Duel.GetLocationCount(tp,4)>0
end
function c21113860.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113860)==0 and Duel.IsExistingMatchingCard(c21113860.q,tp,0x10,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(21113860,0)) then
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21113860.q,tp,0x10,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
Duel.ResetFlagEffect(tp,21113860)
e:Reset()
end
function c21113860.w(c)
return c:IsSetCard(0xc904) and c:IsType(6) and c:IsType(TYPE_CONTINUOUS) and c:IsSSetable()
end
function c21113860.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113860.w,tp,0x11,0,1,nil) end
end
function c21113860.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113860,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(3,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c21113860.w),tp,0x11,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g:GetFirst())
end
end
function c21113860.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113860,tp,ACTIVITY_SPSUMMON)==0
end
function c21113860.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113860.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113860.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 喵殿下
function c21113865.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c21113865.linkcon())
e0:SetTarget(c21113865.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(c21113865.discon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,21113865)
e2:SetCost(c21113865.cost)
e2:SetTarget(c21113865.tg)
e2:SetOperation(c21113865.op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_ATKCHANGE+CATEGORY_DAMAGE+CATEGORY_DEFCHANGE)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,21113866)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c21113865.tg3)
e3:SetOperation(c21113865.op3)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113865.cost5)
e5:SetOperation(c21113865.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113865,ACTIVITY_SPSUMMON,c21113865.counter)
end
function c21113865.counter(c)
return c:IsSetCard(0xc904)
end
function c21113865.LCheckGoal(sg,tp,lc,lmat)
return #sg==2 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat)) or #sg>=2
and sg:CheckWithSumEqual(Auxiliary.GetLinkCount,3,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function c21113865.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=2
local maxc=3
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c21113865.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function c21113865.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=2
local maxc=3
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c21113865.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c21113865.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113865.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113865.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113865.opq(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113865)==0 and Duel.SelectYesNo(tp,aux.Stringid(21113865,2)) then
Duel.Damage(1-tp,1500,REASON_RULE)
end
Duel.ResetFlagEffect(tp,21113865)
e:Reset()
end
function c21113865.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113865.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113865.q,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,4)>0 and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(3,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(11,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1,tp)
end
function c21113865.move(c,seq)
if not c21113865.q(c) then return end
if c:IsFacedown() then return end
if c:GetSequence()~=seq then
return true
else return end
end
function c21113865.seq(c,seq)
if c:GetSequence()==seq then
return true
else return end
end
function c21113865.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113865,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
Duel.Hint(3,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c21113865.move,tp,LOCATION_MZONE,0,1,1,nil,seq):GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local oc=Duel.GetMatchingGroup(c21113865.seq,tp,LOCATION_MZONE,0,nil,seq):GetFirst()
if oc then Duel.Destroy(oc,REASON_RULE) end
Duel.MoveSequence(tc,seq)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c21113865.w(c)
return c:IsFaceup() and not (c:IsAttack(0) and c:IsDefense(0))
end
function c21113865.e(c)
return c:IsAbleToGrave() and c:IsSetCard(0xc904) and c:IsLevelAbove(1) and c:IsType(1)
end
function c21113865.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113865.w,tp,4,4,1,nil) and Duel.IsExistingMatchingCard(c21113865.e,tp,3,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c21113865.w,tp,4,4,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,3)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c21113865.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
Duel.Hint(3,tp,HINTMSG_TOGRAVE)
local sc=Duel.SelectMatchingCard(tp,c21113865.e,tp,3,0,1,1,nil):GetFirst()
if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then
local lv=sc:GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(-lv*500)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(-lv*500)
tc:RegisterEffect(e2)
if not tc:IsHasEffect(108) then
Duel.Damage(1-tp,500,REASON_EFFECT)
end
end
end
function c21113865.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113865,tp,ACTIVITY_SPSUMMON)==0
end
function c21113865.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113865.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113865.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 双生契
function c21113870.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DAMAGE)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,21113870)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c21113870.cost)
e1:SetTarget(c21113870.tg)
e1:SetOperation(c21113870.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_GRAVE_ACTION+CATEGORY_TODECK)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,21113871)
e2:SetCondition(c21113870.con2)
e2:SetTarget(c21113870.tg2)
e2:SetOperation(c21113870.op2)
c:RegisterEffect(e2)
end
function c21113870.q(c)
return c:IsFaceup() and c:IsSetCard(0xc904) and c:IsReleasable()
end
function c21113870.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113870.q,tp,4,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c21113870.q,tp,4,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c21113870.w(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0
end
function c21113870.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113870.w,tp,0x30,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113870.w,tp,0x30,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0x30)
end
function c21113870.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,500,REASON_EFFECT)
end
end
function c21113870.con2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c21113870.e(c)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and c:IsAbleToDeck()
end
function c21113870.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113870.e,tp,0x30,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c21113870.e,tp,0x30,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0x30)
end
function c21113870.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Recover(tp,500,REASON_EFFECT)
end
end
\ No newline at end of file
--芳青之梦 天桃环
function c21113875.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c21113875.linkcon())
e0:SetTarget(c21113875.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(c21113875.discon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,21113875)
e2:SetCondition(c21113875.con)
e2:SetCost(c21113875.cost)
e2:SetTarget(c21113875.tg)
e2:SetOperation(c21113875.op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,21113876)
e3:SetCost(c21113875.cost3)
e3:SetTarget(c21113875.tg3)
e3:SetOperation(c21113875.op3)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(c21113875.cost5)
e5:SetOperation(c21113875.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(21113875,ACTIVITY_SPSUMMON,c21113875.counter)
end
function c21113875.counter(c)
return c:IsSetCard(0xc904)
end
function c21113875.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
end
end
end
function c21113875.LCheckGoal(sg,tp,lc,lmat)
return #sg==1 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetFirst():IsLink(2) or #sg>=2
and sg:CheckWithSumEqual(c21113875.GetLinkCount,4,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat)) or #sg>=2
and sg:CheckWithSumEqual(aux.GetLinkCount,4,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function c21113875.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=4
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c21113875.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function c21113875.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=4
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c21113875.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c21113875.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c21113875.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c21113875.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113875.opq)
Duel.RegisterEffect(e1,tp)
end
function c21113875.opq(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,21113875)==0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21113875,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc904))
Duel.RegisterEffect(e1,tp)
end
Duel.ResetFlagEffect(tp,21113875)
e:Reset()
end
function c21113875.q(c,e,tp)
return c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(21113875) and Duel.GetLocationCount(tp,4)>0
end
function c21113875.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c21113875.q,tp,0x10,0,1,nil,e,tp) end
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21113875.q,tp,0x10,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,tp,0x10)
end
function c21113875.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113875,RESET_PHASE+PHASE_END,0,1)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c21113875.w(c)
return c:IsFaceup() and c:IsSetCard(0xc904) and c:IsAbleToRemoveAsCost()
end
function c21113875.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c21113875.w,tp,4,0,1,nil) end
Duel.Hint(3,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c21113875.w,tp,4,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(c21113875.opw)
Duel.RegisterEffect(e1,tp)
end
function c21113875.opw(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,12,12)
if Duel.GetFlagEffect(tp,21113875+1)==0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(21113875,0)) then
Duel.Hint(3,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,2,nil)
if #dg>0 then
Duel.Destroy(dg,REASON_RULE)
end
end
Duel.ResetFlagEffect(tp,21113875+1)
e:Reset()
end
function c21113875.e(c)
return c:IsType(1) and c:IsSetCard(0xc904) and c:IsAbleToDeck()
end
function c21113875.r(c,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,nil,c) and c:IsSetCard(0xc904) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and c:IsLink(3)
end
function c21113875.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.IsExistingMatchingCard(c21113875.e,tp,0x10,0,1,nil) and Duel.IsExistingMatchingCard(c21113875.r,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,0x10)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c21113875.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,21113875+1,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(3,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c21113875.e,tp,0x10,0,1,1,nil)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_DECK+LOCATION_EXTRA) and Duel.IsExistingMatchingCard(c21113875.r,tp,LOCATION_EXTRA,0,1,nil,e,tp) then
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c21113875.r,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #sg>0 then
sg:GetFirst():SetMaterial(nil)
if Duel.SpecialSummon(sg,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)>0 then
sg:GetFirst():CompleteProcedure()
end
end
end
end
function c21113875.cost5(e,c,tp)
return Duel.GetCustomActivityCount(21113875,tp,ACTIVITY_SPSUMMON)==0
end
function c21113875.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(c21113875.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c21113875.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
--芳青之梦 清风主
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(s.linkcon())
e0:SetTarget(s.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(s.discon)
c:RegisterEffect(e1)
--release
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
--e2:SetCondition(s.con)
e2:SetCost(s.recost)
e2:SetTarget(s.retg)
e2:SetOperation(s.reop)
c:RegisterEffect(e2)
--specialSummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetDescription(1,id+o)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(s.cost5)
e5:SetOperation(s.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counter)
end
function s.counter(c)
return c:IsSetCard(0xc904)
end
function s.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
end
end
end
function s.LCheckGoal(sg,tp,lc,lmat)
return sg:CheckWithSumEqual(s.GetLinkCount,3,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat)) or #sg>=2
and sg:CheckWithSumEqual(aux.GetLinkCount,3,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function s.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=3
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(s.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function s.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=4
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,s.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.recost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(s.opq)
Duel.RegisterEffect(e1,tp)
end
function s.opq(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,id)==0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Damage(1-tp,1000,REASON_EFFECT)
Duel.Recover(tp,1000,REASON_EFFECT)
end
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsReleasableByEffect() end
if chk==0 then return Duel.IsExistingTarget(Card.IsReleasableByEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,Card.IsReleasableByEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Release(tc,REASON_EFFECT)
end
end
function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) and chk~=c end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function s.cost5(e,c,tp)
return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0
end
function s.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
--芳青之梦 无暇缄默
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1166)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(s.linkcon())
e0:SetTarget(s.linktg())
e0:SetOperation(aux.LinkOperation())
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(s.discon)
c:RegisterEffect(e1)
--sset
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
--e2:SetCondition(s.con)
e2:SetCost(s.sscost)
e2:SetTarget(s.sstg)
e2:SetOperation(s.ssop)
c:RegisterEffect(e2)
--specialSummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e3:SetRange(LOCATION_MZONE)
e3:SetDescription(1,id+o)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCost(s.cost5)
e5:SetOperation(s.op5)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counter)
end
function s.counter(c)
return c:IsSetCard(0xc904)
end
function s.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
end
end
end
function s.LCheckGoal(sg,tp,lc,lmat)
return #sg==1 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetFirst():IsLink(3) or #sg==2
and sg:IsExists(Card.IsDisabled,2,nil) and sg:IsExists(Card.IsType,2,nil,TYPE_LINK)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetClassCount(Card.GetLink)==6 or #sg>=2
and sg:CheckWithSumEqual(s.GetLinkCount,6,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat)) or #sg>=2
and sg:CheckWithSumEqual(aux.GetLinkCount,6,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function s.linkcon()
return function(e,c,og,lmat)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=1
local maxc=6
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(s.LCheckGoal,minc,maxc,tp,c,lmat)
end
end
function s.linktg()
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=1
local maxc=6
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
end
if lmat~=nil then
if not Auxiliary.LConditionFilter(lmat,f,c,e) then return false end
mg:AddCard(lmat)
end
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,s.LCheckGoal,cancel,minc,maxc,tp,c,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(s.opq)
Duel.RegisterEffect(e1,tp)
end
function s.opq(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,id)==0 then
--negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(s.necon)
e1:SetOperation(s.neop)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(s.adcon)
e2:SetOperation(s.adop)
Duel.RegisterEffect(e2,tp)
end
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
function s.necon(e,tp,eg,ep,ev,re,r,rp)
local loc,p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_PLAYER)
if loc&(LOCATION_GRAVE+LOCATION_REMOVED)>0 and tp~=p then return true end
end
function s.neop(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tp~=p and te:GetHandler():IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) then
Duel.NegateEffect(ev)
end
end
function s.adfilter(c)
return c:GetFlagEffect(id+2)==0
end
function s.adcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.adfilter,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil)
end
function s.adop(e,tp,eg,ep,ev,re,r,rp)
--[[local g=Duel.GetMatchingGroup(s.adfilter,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,nil)
for tc in aux.Next(g) do]]
tc:RegisterFlagEffect(id+2,RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD,0,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(0,0x30)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
--end
Duel.AdjustAll()
end
function s.setfilter(c)
return c:IsSetCard(0xc904) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
local ct=g:GetCount()
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ct>0 and ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tg=g:Select(tp,1,2,nil)
Duel.SSet(tp,tg)
end
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtraAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.cost5(e,c,tp)
return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0
end
function s.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc904)
end
--芳青之梦 九魂猫秘术
local s,id,o=GetID()
function s.initial_effect(c)
--act in set turn
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetCondition(s.actcon)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.setcon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
function s.actfilter(c)
return c:IsDisabled() and c:IsSetCard(0xc904) and c:IsFaceup()
end
function s.actcon(e)
return Duel.GetMatchingGroupCount(s.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xc904,TYPES_NORMAL_TRAP_MONSTER,2000,2000,7,RACE_BEAST,ATTRIBUTE_WIND) and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,LOCATION_REMOVED)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,LOCATION_REMOVED,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,LOCATION_REMOVED,LOCATION_REMOVED)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,LOCATION_REMOVED)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xc904,TYPES_NORMAL_TRAP_MONSTER,2000,2000,7,RACE_BEAST,ATTRIBUTE_WIND) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
end
end
end
function s.setfilter(c)
return c:IsSetCard(0xc904) and c:IsFaceup()
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(s.setfilter,tp,LOCATION_MZONE,0,nil)>0
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
end
end
\ No newline at end of file
--芳青之梦 摘月梦
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(s.discon)
c:RegisterEffect(e1)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.seqcost)
e2:SetTarget(s.seqtg)
e2:SetOperation(s.seqop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id+1)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function s.seqcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(s.opq)
Duel.RegisterEffect(e1,tp)
end
function s.opq(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dg=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
if Duel.GetFlagEffect(tp,id)==0 and dg:GetCount()>=5 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
local rg=dg:RandomSelect(tp,5)
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
end
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 and Duel.IsExistingMatchingCard(s.seqfilter,tp,LOCATION_MZONE,0,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
end
function s.seqfilter(c,e,seq)
return c:IsSetCard(0xc904) and c:IsFaceup() and not c:IsImmuneToEffect(e) and c:GetSequence()~=seq
end
function s.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,s.seqfilter,tp,LOCATION_MZONE,0,1,1,nil,e,seq):GetFirst()
local dc=Duel.GetFieldCard(tp,LOCATION_MZONE,seq)
if dc then Duel.Destroy(dc,REASON_RULE) end
if Duel.CheckLocation(tp,LOCATION_MZONE,seq) then Duel.MoveSequence(tc,seq) end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc904))
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1800)
Duel.RegisterEffect(e3,tp)
end
function s.tdfilter(c)
return c:IsSetCard(0xc904) and not c:IsCode(id) and c:IsAbleToDeck()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) and chk~=c end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--芳青之梦 竹篮打水
function c21113900.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,21113900+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c21113900.tg)
e1:SetOperation(c21113900.op)
c:RegisterEffect(e1)
if not c21113900.check_limit then
c21113900.check_limit = true
record_limit_activate = {}
record_limit_trigger = {}
record_limit_spsummon = {}
resolve_table = {}
spsummon_limit_table = {}
local ce1=Effect.CreateEffect(c)
ce1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ce1:SetCode(EVENT_ADJUST)
ce1:SetCondition(c21113900.limit_check_con)
ce1:SetOperation(c21113900.limit_hack_op)
Duel.RegisterEffect(ce1,0)
local ce2=Effect.CreateEffect(c)
ce2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ce2:SetCode(EVENT_ADJUST)
ce2:SetCondition(c21113900.limit_check_con2)
ce2:SetOperation(c21113900.limit_hack_op2)
Duel.RegisterEffect(ce2,0)
end
end
function c21113900.record_doesnot_contain(tbl,effect)
for _, value in pairs(tbl) do
if value == effect then
return false
end
end
return true
end
function c21113900.check_or_add_new_limit(add_or_not)
local is_new_limit = false
for tp = 0,1 do
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_ACTIVATE) then
local limit_table = {Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_ACTIVATE)}
for _, limit_effect in ipairs(limit_table) do
if c21113900.record_doesnot_contain(record_limit_activate,limit_effect) then
if add_or_not then
table.insert(record_limit_activate,limit_effect)
table.insert(resolve_table,limit_effect)
end
is_new_limit = true
end
end
end
end
local ag = Duel.GetFieldGroup(0,0xff,0xff)
for tc in aux.Next(ag) do
if tc:IsHasEffect(tp,EFFECT_CANNOT_TRIGGER) then
local limit_table = {tc:IsHasEffect(EFFECT_CANNOT_TRIGGER)}
for _, limit_effect in ipairs(limit_table) do
if c21113900.record_doesnot_contain(record_redirect,limit_effect) then
if add_or_not then
table.insert(record_redirect,limit_effect)
table.insert(resolve_table,limit_effect)
end
is_new_limit = true
end
end
end
end
return is_new_limit
end
function c21113900.limit_check_con(e)
return c21113900.check_or_add_new_limit(false)
end
function c21113900.limit_hack_op(e)
resolve_table = {}
if c21113900.check_or_add_new_limit(true) then
for _, resolve_effect in ipairs(resolve_table) do
local resolve_condition = resolve_effect:GetCondition() or aux.TRUE
local resolve_target = resolve_effect:GetTarget() or aux.TRUE
local resolve_value = resolve_effect:GetValue() or aux.TRUE
if resolve_effect:IsHasType(EFFECT_TYPE_SINGLE) then
resolve_effect:SetCondition(
function(ne,...)
return not ne:GetHandler():IsCode(21113900) and not (ne:GetHandler():IsSetCard(0xc904) and Duel.IsPlayerAffectedByEffect(ne:GetHandlerPlayer(),21113900))and resolve_condition(ne,...)
end )
else
resolve_effect:SetTarget(
function(ne,nc,...)
return not nc:IsCode(21113900) and not (nc:IsSetCard(0xc904) and Duel.IsPlayerAffectedByEffect(nc:GetControler(),21113900)) and resolve_target(ne,nc,...)
end )
resolve_effect:SetValue(
function(ne,nte,ntp,...)
return not nte:GetHandler():IsCode(21113900) and not (nte:GetHandler():IsSetCard(0xc904) and Duel.IsPlayerAffectedByEffect(nte:GetHandlerPlayer(),21113900)) and resolve_value(ne,nte,ntp,...)
end )
end
end
end
end
function c21113900.record_doesnot_contain2(tbl,effect)
for _, value in pairs(tbl) do
if value == effect then
return false
end
end
return true
end
function c21113900.check_or_add_new_limit2(add_or_not)
local is_new_limit = false
for tp = 0,1 do
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_SPECIAL_SUMMON) then
local limit_table = {Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_SPECIAL_SUMMON)}
for _, limit_effect in ipairs(limit_table) do
if c21113900.record_doesnot_contain2(record_limit_spsummon,limit_effect) then
if add_or_not then
table.insert(record_limit_spsummon,limit_effect)
table.insert(spsummon_limit_table,limit_effect)
end
is_new_limit = true
end
end
end
end
return is_new_limit
end
function c21113900.limit_check_con2(e)
return c21113900.check_or_add_new_limit2(false)
end
function c21113900.limit_hack_op2(e)
spsummon_limit_table = {}
if c21113900.check_or_add_new_limit2(true) then
for _, spsummon_effect in ipairs(spsummon_limit_table) do
local spsummon_target = spsummon_effect:GetTarget() or aux.TRUE
local spsummon_value = spsummon_effect:GetValue() or aux.TRUE
spsummon_effect:SetTarget(
function(ne,nc,...)
return not (nc:IsSetCard(0xc904) and Duel.IsPlayerAffectedByEffect(nc:GetControler(),21113900)) and spsummon_target(ne,nc,...)
end )
spsummon_effect:SetValue(
function(ne,nte,ntp,...)
return not (nte:GetHandler():IsSetCard(0xc904) and Duel.IsPlayerAffectedByEffect(nc:GetControler(),21113900)) and spsummon_value(ne,nte,ntp,...)
end )
end
end
end
function c21113900.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.GetTurnPlayer()==tp then
e:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
end
end
function c21113900.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(21113900)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--芳青之梦 翡翠之想
local s,id,o=GetID()
function s.initial_effect(c)
--public
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PUBLIC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.pucon)
e2:SetTargetRange(0,LOCATION_HAND)
c:RegisterEffect(e2)
end
function s.pucon(e)
return e:GetHandler():IsPublic()
end
function s.thfilter(c)
return c:IsSetCard(0xc904) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and not c:IsCode(id)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--芳青之梦 紫绯天
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetCondition(s.discon)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.spcon)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetCost(s.seqcost)
e3:SetTarget(s.seqtg)
e3:SetOperation(s.seqop)
c:RegisterEffect(e3)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function s.cfilter(c)
return c:IsDisabled() and c:IsSetCard(0xc904) and c:IsFaceup()
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetMatchingGroupCount(s.cfilter,c:GetControler(),LOCATION_MZONE,0,nil)==Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsSetCard(0xc904)
end
function s.seqcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetOperation(s.opq)
Duel.RegisterEffect(e1,tp)
end
function s.opq(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
Duel.ResetFlagEffect(tp,id)
e:Reset()
end
function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 and Duel.IsExistingMatchingCard(s.seqfilter,tp,LOCATION_MZONE,0,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
end
function s.seqfilter(c,e,seq)
return c:IsSetCard(0xc904) and c:IsFaceup() and not c:IsImmuneToEffect(e) and c:GetSequence()~=seq
end
function s.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
local seq=e:GetLabel()
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,s.seqfilter,tp,LOCATION_MZONE,0,1,1,nil,e,seq):GetFirst()
local dc=Duel.GetFieldCard(tp,LOCATION_MZONE,seq)
if dc then Duel.Destroy(dc,REASON_RULE) end
if Duel.CheckLocation(tp,LOCATION_MZONE,seq) then Duel.MoveSequence(tc,seq) end
if Duel.Draw(tp,1,REASON_EFFECT)>0
then Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
\ No newline at end of file
...@@ -26,7 +26,7 @@ function s.initial_effect(c) ...@@ -26,7 +26,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.filter(c) function s.filter(c)
return c.MoJin==true and c:IsAbleToHand() and c:IsType(TYPE_SPELL) return c.MoJin and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
end end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
local s,id,o=GetID() local s,id,o=GetID()
s.MoJin=true s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -24,8 +25,8 @@ function s.initial_effect(c) ...@@ -24,8 +25,8 @@ function s.initial_effect(c)
e6:SetDescription(1130) e6:SetDescription(1130)
e6:SetType(EFFECT_TYPE_IGNITION) e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetRange(LOCATION_REMOVED+LOCATION_GRAVE) --e6:SetRange(LOCATION_REMOVED+LOCATION_GRAVE)
e6:SetCountLimit(1,id) e6:SetCountLimit(2,id)
e6:SetTarget(s.ovtg) e6:SetTarget(s.ovtg)
e6:SetOperation(s.ovop) e6:SetOperation(s.ovop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
...@@ -70,7 +71,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +71,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.ovfilter(c) function s.ovfilter(c)
return c:IsFaceup() and c.MoJin==true and c:IsType(TYPE_XYZ) return c:IsFaceup() and c.MoJin and c:IsType(TYPE_XYZ)
end end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.ovfilter(chkc) and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.ovfilter(chkc) and chkc~=e:GetHandler() end
......
...@@ -40,7 +40,7 @@ function s.initial_effect(c) ...@@ -40,7 +40,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.resfilter(c) function s.resfilter(c)
return c:IsReleasable() and c.MoJin==true return c:IsReleasable() and c.MoJin
end end
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -81,7 +81,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c.MoJin==true and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c.MoJin or c:IsSetCard(0x23c)) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -70,7 +70,7 @@ function s.initial_effect(c) ...@@ -70,7 +70,7 @@ function s.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function s.sfliter(c) function s.sfliter(c)
return c.MoJin==true return (c.MoJin or c:IsSetCard(0x23c))
end end
function s.cfilter(c,e) function s.cfilter(c,e)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c==e:GetHandler() return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c==e:GetHandler()
......
...@@ -24,12 +24,11 @@ function s.initial_effect(c) ...@@ -24,12 +24,11 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetValue(s.atkval) e2:SetValue(s.atkval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone() --local e4=e2:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) --e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4) --c:RegisterEffect(e4)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(48905153,1))
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
...@@ -49,10 +48,10 @@ function s.atkval(e,c) ...@@ -49,10 +48,10 @@ function s.atkval(e,c)
return c:GetOverlayCount()*1000 return c:GetOverlayCount()*1000
end end
function s.mfilter(c,xyzc) function s.mfilter(c,xyzc)
return c:IsLevelAbove(4) and c.MoJin==true return c:IsLevelAbove(4) and c.MoJin
end end
function s.ovfilter(c) function s.ovfilter(c)
return c:IsFaceup() and c.MoJin==true and c:IsLevelAbove(7) and c:IsLocation(LOCATION_MZONE) return c:IsFaceup() and c.MoJin and c:IsLevelAbove(17) and c:IsLocation(LOCATION_MZONE)
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
......
...@@ -27,13 +27,13 @@ function s.initial_effect(c) ...@@ -27,13 +27,13 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.cfilter(c) function s.cfilter(c)
return c.MoJin==true and c:IsAbleToRemoveAsCost() return c.MoJin and c:IsAbleToRemoveAsCost()
end end
function s.fselect(g,e,tp) function s.fselect(g,e,tp)
return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g) return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end end
function s.sfilter(c,e,tp,g) function s.sfilter(c,e,tp,g)
return c:IsFacedown() and c.MoJin==true return c:IsFacedown() and c.MoJin
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -45,7 +45,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,7 +45,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsFacedown() and c.MoJin==true return c:IsFacedown() and c.MoJin
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -82,10 +82,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,10 +82,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.tdfilter(c) function s.tdfilter(c)
return c:IsAbleToDeck() and c.MoJin==true return c:IsAbleToDeck() and c.MoJin
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsAbleToHand() and c:IsFaceup() and c.MoJin==true return c:IsAbleToHand() and c:IsFaceup() and c.MoJin
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
......
...@@ -34,7 +34,7 @@ function s.initial_effect(c) ...@@ -34,7 +34,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c.MoJin==true and c:IsAbleToRemoveAsCost() return c.MoJin and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -102,7 +102,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,7 +102,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function s.aclimit(e,re,tp) function s.aclimit(e,re,tp)
local rc=re:GetHandler() local rc=re:GetHandler()
return not s.MoJin==true return not s.MoJin
end end
function s.retop(e,tp,eg,ep,ev,re,r,rp) function s.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
...@@ -111,7 +111,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,7 +111,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.ndcfilter(c) function s.ndcfilter(c)
return c:IsFaceup() and c.MoJin==true return c:IsFaceup() and c.MoJin
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
--return Duel.IsExistingMatchingCard(s.ndcfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) --return Duel.IsExistingMatchingCard(s.ndcfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
--幻想杀手 --幻想杀手
local s,id,o=GetID() local s,id,o=GetID()
c5012608.MoJin=true s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,5012604) aux.AddCodeList(c,5012604)
--Activate --Activate
...@@ -26,7 +26,7 @@ function s.initial_effect(c) ...@@ -26,7 +26,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsFacedown() or (not c.MoJin==true) return c:IsFacedown() or not(c.MoJin or c:IsSetCard(0x23c))
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
...@@ -66,10 +66,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,10 +66,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
if tc:IsControler(tp) and Duel.IsPlayerCanDraw(tp,1) --if tc:IsControler(tp) and Duel.IsPlayerCanDraw(tp,1)
and tc:GetFlagEffect(id)>0 and Duel.SelectYesNo(tp,aux.Stringid(2857636,1)) then --and tc:GetFlagEffect(id)>0 and Duel.SelectYesNo(tp,aux.Stringid(2857636,1)) then
Duel.Draw(tp,1,REASON_EFFECT) --Duel.Draw(tp,1,REASON_EFFECT)
end --end
end end
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
......
...@@ -43,7 +43,7 @@ function s.initial_effect(c) ...@@ -43,7 +43,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.filter(c) function s.filter(c)
return c:IsType(TYPE_PENDULUM) and c.MoJin==true and c:IsAbleToGrave() return c:IsType(TYPE_PENDULUM) and c.MoJin and c:IsAbleToGrave()
end end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -37,7 +37,7 @@ function s.initial_effect(c) ...@@ -37,7 +37,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.mfilter(c,xyzc) function s.mfilter(c,xyzc)
return c.MoJin==true return (c.MoJin or c:IsSetCard(0x23c))
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsCode(5012604) and c:IsFaceup() return c:IsCode(5012604) and c:IsFaceup()
......
--欧提努斯 --欧提努斯
local s,id,o=GetID() local s,id,o=GetID()
c5012613.MoJin=true s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,5012604),1,1) aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,5012604),1,1)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -105,10 +106,12 @@ function s.initial_effect(c) ...@@ -105,10 +106,12 @@ function s.initial_effect(c)
e20:SetCode(EFFECT_CANNOT_DISEFFECT) e20:SetCode(EFFECT_CANNOT_DISEFFECT)
e20:SetValue(s.effectfilter) e20:SetValue(s.effectfilter)
c:RegisterEffect(e20) c:RegisterEffect(e20)
--cannot release
--不能当召唤用素材--
local e21=Effect.CreateEffect(c) local e21=Effect.CreateEffect(c)
e21:SetType(EFFECT_TYPE_SINGLE) e21:SetType(EFFECT_TYPE_SINGLE)
e21:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e21:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e21:SetRange(LOCATION_MZONE)
e21:SetCode(EFFECT_UNRELEASABLE_SUM) e21:SetCode(EFFECT_UNRELEASABLE_SUM)
e21:SetValue(1) e21:SetValue(1)
c:RegisterEffect(e21) c:RegisterEffect(e21)
...@@ -131,17 +134,35 @@ function s.initial_effect(c) ...@@ -131,17 +134,35 @@ function s.initial_effect(c)
local e16=e14:Clone() local e16=e14:Clone()
e16:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e16:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e16) c:RegisterEffect(e16)
--做超量素材时送去墓地
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_ADJUST)
e4:SetOperation(s.rmop)
Duel.RegisterEffect(e4,0)
--maintain --maintain
local e17=Effect.CreateEffect(c) local e17=Effect.CreateEffect(c)
e17:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e17:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e17:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e17:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e17:SetCode(EVENT_PHASE+PHASE_END) e17:SetCode(EVENT_PHASE+PHASE_END)
e17:SetRange(LOCATION_MZONE) --e17:SetRange(LOCATION_MZONE)
e17:SetCountLimit(1) e17:SetCountLimit(1)
e17:SetCondition(s.mtcon) e17:SetCondition(s.mtcon)
e17:SetOperation(s.mtop) e17:SetOperation(s.mtop)
c:RegisterEffect(e17) c:RegisterEffect(e17)
end end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.ndsfilter(c) function s.ndsfilter(c)
return c:IsFaceup() and c:IsCode(5012604) return c:IsFaceup() and c:IsCode(5012604)
end end
......
--学院都市 --学院都市
local s,id,o=GetID() local s,id,o=GetID()
c5012615.MoJin=true s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,5012604) aux.AddCodeList(c,5012604)
--Activate --Activate
...@@ -17,7 +17,7 @@ function s.initial_effect(c) ...@@ -17,7 +17,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(2) --e2:SetCountLimit(2)
e2:SetTarget(s.lvtg) e2:SetTarget(s.lvtg)
e2:SetOperation(s.lvop) e2:SetOperation(s.lvop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -36,7 +36,7 @@ function s.initial_effect(c) ...@@ -36,7 +36,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c.MoJin==true --and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and (c.MoJin or c:IsSetCard(0x23c)) and c:IsAbleToHand()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -45,8 +45,8 @@ end ...@@ -45,8 +45,8 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
--if g:GetCount()>0 then if g:GetCount()>0 then
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then --if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
local sg=g:RandomSelect(tp,1) local sg=g:RandomSelect(tp,1)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
...@@ -65,7 +65,7 @@ function s.aclimit(e,re,tp) ...@@ -65,7 +65,7 @@ function s.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsType(TYPE_FIELD) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsType(TYPE_FIELD)
end end
function s.filter(c) function s.filter(c)
return c:IsFaceup() and c.MoJin==true and (c:GetLevel()>0 or c:GetRank()>0) return c:IsFaceup() and (c.MoJin or c:IsSetCard(0x23c)) and (c:GetLevel()>0 or c:GetRank()>0)
end end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local s,id,o=GetID() local s,id,o=GetID()
s.MoJin=true s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--xyz summon --xyz summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,s.mfilter,nil,2,2) aux.AddXyzProcedureLevelFree(c,s.mfilter,nil,2,2)
...@@ -39,7 +38,7 @@ function s.initial_effect(c) ...@@ -39,7 +38,7 @@ function s.initial_effect(c)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
function s.mfilter(c,xyzc) function s.mfilter(c,xyzc)
return c:IsLevelAbove(7) and c.MoJin==true --and c:IsSummonType(SUMMON_TYPE_SPECIAL) return c:IsLevelAbove(8) and c.MoJin==true --and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return --Duel.GetCurrentChain()<1 and if chk==0 then return --Duel.GetCurrentChain()<1 and
......
--亚雷斯塔 --亚雷斯塔
local s,id,o=GetID() local s,id,o=GetID()
c5012617.MoJin=true s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,5012604) aux.AddCodeList(c,5012604)
--link summon --link summon
...@@ -37,6 +37,13 @@ function s.initial_effect(c) ...@@ -37,6 +37,13 @@ function s.initial_effect(c)
e5:SetRange(0xff) e5:SetRange(0xff)
e5:SetValue(s.effectfilter) e5:SetValue(s.effectfilter)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--做超量素材时送去墓地
local e7=Effect.CreateEffect(c)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e7:SetCode(EVENT_ADJUST)
e7:SetOperation(s.rmop)
Duel.RegisterEffect(e7,0)
--control --control
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE) e6:SetType(EFFECT_TYPE_SINGLE)
...@@ -87,6 +94,14 @@ function s.initial_effect(c) ...@@ -87,6 +94,14 @@ function s.initial_effect(c)
e11:SetCondition(s.descon) e11:SetCondition(s.descon)
c:RegisterEffect(e11) c:RegisterEffect(e11)
end end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.lcheck(g,lc) function s.lcheck(g,lc)
return g:IsExists(Card.IsLinkCode,1,nil,5012604) return g:IsExists(Card.IsLinkCode,1,nil,5012604)
end end
......
--蓝发耳环 --蓝发耳环
local s,id,o=GetID() local s,id,o=GetID()
c5012618.MoJin=true s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--level --level
...@@ -32,10 +31,10 @@ function s.initial_effect(c) ...@@ -32,10 +31,10 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.filter(c) function s.filter(c)
return c:IsFaceup() and c.MoJin==true return c:IsFaceup() and c.MoJin
end end
function s.tgfilter(c) function s.tgfilter(c)
return c.MoJin==true and c:IsAbleToGrave() return c.MoJin and c:IsAbleToGrave()
end end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
......
--云川芹亚 --云川芹亚
local cm,m,o=GetID()
local s,id,o=GetID() local s,id,o=GetID()
s.MoJin=true s.MoJin=true
function cm.initial_effect(c) local damageCnt=0
--special summon function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(cm.spcost) e1:SetCost(s.drcost)
e1:SetTarget(cm.sptg) e1:SetTarget(s.drtg)
e1:SetOperation(cm.spop) e1:SetOperation(s.drop)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.con)
e1:SetCost(cm.cost)
e1:SetOperation(cm.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--延迟伤害
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE+LOCATION_HAND)
e3:SetCost(s.cost)
e3:SetOperation(s.op)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PREDRAW)
e4:SetRange(0xff)
e4:SetCountLimit(1,id+EFFECT_COUNT_CODE_CHAIN)
e4:SetCondition(s.condition)
e4:SetOperation(s.operation)
c:RegisterEffect(e4)
end end
function cm.rmvfilter(c) function s.costfilterRem(c)
return c:IsAbleToRemoveAsCost() and c.MoJin==true return c.MoJin and c:IsAbleToGraveAsCost()
end end
function cm.tgfilter(c) function s.costfilterGra(c)
return c:IsAbleToGraveAsCost()and c.MoJin==true return c.MoJin and c:IsAbleToRemoveAsCost()
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmvfilter,tp,LOCATION_GRAVE,0,1,nil) or Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end local b1=Duel.IsExistingMatchingCard(s.costfilterGra,tp,LOCATION_GRAVE,0,1,nil)
local b1=false local b2=Duel.IsExistingMatchingCard(s.costfilterRem,tp,LOCATION_REMOVED,0,1,nil)
local b2=false if chk==0 then return b1 or b2 end
if Duel.IsExistingMatchingCard(cm.rmvfilter,tp,LOCATION_GRAVE,0,1,nil) then b1=true end local which=aux.SelectFromOptions(tp,
if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_REMOVED,0,1,nil) then b2=true end {b1,aux.Stringid(id,1),0},
local op=aux.SelectFromOptions(tp, {b2,aux.Stringid(id,2),1})
{b1,aux.Stringid(m,1)}, if which==0 then
{b2,aux.Stringid(m,2)})
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmvfilter,tp,LOCATION_GRAVE,0,1,1,nil) local rg=Duel.SelectMatchingCard(tp,s.costfilterGra,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
elseif op==2 then elseif which==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil) local rg=Duel.SelectMatchingCard(tp,s.costfilterRem,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(rg,REASON_COST+REASON_RETURN)
end end
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.tdfilter(c)
return (c:IsFaceup()or c:IsLocation(LOCATION_HAND)) and c:IsAbleToDeckAsCost() and c.MoJin
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end if chk==0 then return c:IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c) end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c)
if g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
end
g=g+c
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetTargetRange(1,0)
e3:SetValue(s.val)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.RegisterFlagEffect(tp,id,0,0,1)
end
function s.val(e,re,dam,r,rp,rc)
if dam>0 then
damageCnt=damageCnt+dam
end
return 0
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)>0
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
return ep==tp Duel.Damage(tp,damageCnt,REASON_EFFECT)
Duel.ResetFlagEffect(tp,id)
damageCnt=0
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,ev,REASON_EFFECT)
end
\ No newline at end of file
...@@ -41,7 +41,7 @@ function s.initial_effect(c) ...@@ -41,7 +41,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.thfilter(c) function s.thfilter(c)
return c.MoJin==true and c:IsAbleToRemove() return c.MoJin==true and c:IsAbleToRemove()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
local s,id,o=GetID() local s,id,o=GetID()
c5012622.MoJin=true c5012622.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,5012604)
--extra summon --extra summon
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
...@@ -18,7 +17,7 @@ function s.initial_effect(c) ...@@ -18,7 +17,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE) e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
--e3:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e3:SetCost(aux.bfgcost) e3:SetCost(aux.bfgcost)
e3:SetTarget(s.target) e3:SetTarget(s.target)
e3:SetOperation(s.operation) e3:SetOperation(s.operation)
...@@ -31,13 +30,15 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,13 +30,15 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
--e1:SetTargetRange(1,0)
e1:SetTarget(s.estg) e1:SetTarget(s.estg)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end end
function s.estg(e,c) function s.estg(e,c)
return c.MoJin==true --return c.MoJin==true
return not c:IsSetCard(0x23333a)
end end
function s.val(e,c) function s.val(e,c)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
local s,id,o=GetID() local s,id,o=GetID()
s.MoJin=true s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,5012604)
c:SetSPSummonOnce(id) c:SetSPSummonOnce(id)
--link summon --link summon
aux.AddLinkProcedure(c,nil,2,2,s.lcheck) aux.AddLinkProcedure(c,nil,2,2,s.lcheck)
...@@ -18,7 +19,7 @@ function s.initial_effect(c) ...@@ -18,7 +19,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.sfliter(c) function s.sfliter(c)
return c.MoJin==true return (c.MoJin or c:IsSetCard(0x23c))
end end
function s.lcheck(g,lc) function s.lcheck(g,lc)
return g:IsExists(s.sfliter,1,nil) return g:IsExists(s.sfliter,1,nil)
......
...@@ -59,17 +59,24 @@ function s.initial_effect(c) ...@@ -59,17 +59,24 @@ function s.initial_effect(c)
local e9=e8:Clone() local e9=e8:Clone()
e9:SetCode(EFFECT_UNRELEASABLE_NONSUM) e9:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e9) c:RegisterEffect(e9)
--做超量素材时送去墓地
local e11=Effect.CreateEffect(c)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e11:SetCode(EVENT_ADJUST)
e11:SetOperation(s.rmop)
Duel.RegisterEffect(e11,0)
--control --control
local e10=Effect.CreateEffect(c) local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE) e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e10:SetRange(LOCATION_MZONE) e10:SetRange(LOCATION_MZONE)
--e10:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) e10:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e10) c:RegisterEffect(e10)
--maintain --maintain
local e17=Effect.CreateEffect(c) local e17=Effect.CreateEffect(c)
e17:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e17:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e17:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) --e17:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e17:SetCode(EVENT_PHASE+PHASE_END) e17:SetCode(EVENT_PHASE+PHASE_END)
e17:SetRange(LOCATION_MZONE) e17:SetRange(LOCATION_MZONE)
e17:SetCountLimit(1) e17:SetCountLimit(1)
...@@ -77,6 +84,14 @@ function s.initial_effect(c) ...@@ -77,6 +84,14 @@ function s.initial_effect(c)
e17:SetOperation(s.mtop) e17:SetOperation(s.mtop)
c:RegisterEffect(e17) c:RegisterEffect(e17)
end end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.ndsfilter(c) function s.ndsfilter(c)
return c:IsFaceup() and c:IsCode(5012604) return c:IsFaceup() and c:IsCode(5012604)
end end
......
...@@ -9,8 +9,8 @@ function s.initial_effect(c) ...@@ -9,8 +9,8 @@ function s.initial_effect(c)
e0:SetCategory(CATEGORY_EQUIP) e0:SetCategory(CATEGORY_EQUIP)
e0:SetType(EFFECT_TYPE_IGNITION) e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET) e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetRange(LOCATION_GRAVE+LOCATION_REMOVED) e0:SetRange(LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED)
e0:SetCountLimit(1,id) e0:SetCountLimit(3,id)
e0:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e0:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e0:SetCondition(s.eqcon) e0:SetCondition(s.eqcon)
e0:SetTarget(s.eqtg) e0:SetTarget(s.eqtg)
...@@ -30,18 +30,11 @@ function s.initial_effect(c) ...@@ -30,18 +30,11 @@ function s.initial_effect(c)
e2:SetValue(900) e2:SetValue(900)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--indes --indes
local e5=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(s.valcon) e3:SetValue(1)
e5:SetCountLimit(1) c:RegisterEffect(e3)
c:RegisterEffect(e5)
--inde
--local e3=Effect.CreateEffect(c)
--e3:SetType(EFFECT_TYPE_EQUIP)
--e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
--e3:SetValue(1)
--c:RegisterEffect(e3)
--immune --immune
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP) e4:SetType(EFFECT_TYPE_EQUIP)
...@@ -49,9 +42,6 @@ function s.initial_effect(c) ...@@ -49,9 +42,6 @@ function s.initial_effect(c)
e4:SetValue(s.efilter) e4:SetValue(s.efilter)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.valcon(e,re,r,rp)
return r==REASON_BATTLE
end
function s.ndcfilter(c) function s.ndcfilter(c)
return c:IsFaceup() and c:IsCode(5012602,5012617) return c:IsFaceup() and c:IsCode(5012602,5012617)
end end
......
...@@ -32,7 +32,7 @@ function s.initial_effect(c) ...@@ -32,7 +32,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
--e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCost(s.rmcost) e2:SetCost(s.rmcost)
e2:SetTarget(s.rmtg) e2:SetTarget(s.rmtg)
......
...@@ -34,11 +34,11 @@ function s.initial_effect(c) ...@@ -34,11 +34,11 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.sfliter(c) function s.sfliter(c)
return c.MoJin==true return c.MoJin
end end
function s.cfilter(c,mc) function s.cfilter(c,mc)
return c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(mc) return c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(mc)
and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c.MoJin==true and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c.MoJin
end end
function s.fselect(g,tp,mc) function s.fselect(g,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,g,mc)>0 and g:IsExists(Card.IsSetCard,2,nil,MoJin==true) return Duel.GetLocationCountFromEx(tp,tp,g,mc)>0 and g:IsExists(Card.IsSetCard,2,nil,MoJin==true)
...@@ -46,11 +46,11 @@ end ...@@ -46,11 +46,11 @@ end
function s.hspcon(e,c) function s.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,c) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,c)
return g:CheckSubGroup(s.fselect,2,2,tp,c) return g:CheckSubGroup(s.fselect,2,2,tp,c)
end end
function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,c) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,s.fselect,false,2,2,tp,c) local sg=g:SelectSubGroup(tp,s.fselect,false,2,2,tp,c)
sg:KeepAlive() sg:KeepAlive()
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id) --e1:SetCountLimit(1,id)
e1:SetLabelObject(e4) e1:SetLabelObject(e4)
e1:SetTarget(cm.tg) e1:SetTarget(cm.tg)
e1:SetOperation(cm.op) e1:SetOperation(cm.op)
...@@ -29,7 +29,7 @@ function cm.initial_effect(c) ...@@ -29,7 +29,7 @@ function cm.initial_effect(c)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c.MoJin==true return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) --and c.MoJin
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -87,7 +87,6 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +87,6 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e2,true) rc:RegisterEffect(e2,true)
end end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp) function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
--Debug.Message("!")
local c=e:GetHandler() local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT) Duel.Destroy(c,REASON_EFFECT)
end end
......
...@@ -3,8 +3,19 @@ local cm,m,o=GetID() ...@@ -3,8 +3,19 @@ local cm,m,o=GetID()
local s,id,o=GetID() local s,id,o=GetID()
s.MoJin=true s.MoJin=true
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,5012604)
--爱丽丝漫游仙境--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetTarget(s.sp)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(cm.op) e3:SetOperation(cm.op)
...@@ -23,7 +34,7 @@ function cm.initial_effect(c) ...@@ -23,7 +34,7 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) --e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetOperation(cm.nop) e3:SetOperation(cm.nop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -37,26 +48,40 @@ function cm.initial_effect(c) ...@@ -37,26 +48,40 @@ function cm.initial_effect(c)
e51:SetOperation(cm.thop) e51:SetOperation(cm.thop)
c:RegisterEffect(e51) c:RegisterEffect(e51)
local e5=Effect.CreateEffect(c) --不能当召唤用素材--
e5:SetType(EFFECT_TYPE_SINGLE) local e21=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e21:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_UNRELEASABLE_SUM) e21:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetRange(LOCATION_MZONE) e21:SetRange(LOCATION_MZONE)
e5:SetValue(1) e21:SetCode(EFFECT_UNRELEASABLE_SUM)
c:RegisterEffect(e5) e21:SetValue(1)
local e7=e5:Clone() c:RegisterEffect(e21)
e7:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) local e12=e21:Clone()
e7:SetValue(cm.fuslimit) e12:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e7) c:RegisterEffect(e12)
local e8=e5:Clone() local e13=Effect.CreateEffect(c)
e8:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e13:SetType(EFFECT_TYPE_SINGLE)
c:RegisterEffect(e8) e13:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
local e9=e5:Clone() e13:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e9:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e13:SetValue(1)
c:RegisterEffect(e9) c:RegisterEffect(e13)
local e10=e5:Clone() local e14=e13:Clone()
e10:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e14:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e10) e14:SetValue(1)
c:RegisterEffect(e14)
local e15=e14:Clone()
e15:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e15)
local e16=e14:Clone()
e16:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e16)
--做超量素材时送去墓地
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_ADJUST)
e4:SetOperation(s.rmop)
Duel.RegisterEffect(e4,0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -67,6 +92,17 @@ function cm.initial_effect(c) ...@@ -67,6 +92,17 @@ function cm.initial_effect(c)
e1:SetTarget(cm.rellimit) e1:SetTarget(cm.rellimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.sp(e,c)
return not c:IsCode(m,5012604)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--阿拉迪娅 --阿拉迪娅
local cm,m,o=GetID()
local s,id,o=GetID() local s,id,o=GetID()
s.MoJin=true s.MoJin=true
function cm.initial_effect(c) s.Max=3
--special summon function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(s.linkfilter,c),0,0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(1166)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,m) e1:SetCondition(s.LinkCondition(aux.FilterBoolFunction(s.linkfilter),s.Max,s.Max))
e1:SetCondition(cm.spcon) e1:SetTarget(s.LinkTarget(aux.FilterBoolFunction(s.linkfilter),s.Max,s.Max))
e1:SetOperation(s.LinkOperation(aux.FilterBoolFunction(s.linkfilter),s.Max,s.Max))
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--battle indes --Destroy replace
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
--e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE) e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetValue(1) e2:SetTarget(s.desreptg)
e2:SetOperation(s.desrepop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search --battle
local eb1=Effect.CreateEffect(c)
eb1:SetType(EFFECT_TYPE_SINGLE)
eb1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
eb1:SetValue(1)
c:RegisterEffect(eb1)
--double
local eb2=Effect.CreateEffect(c)
eb2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
eb2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
eb2:SetRange(LOCATION_MZONE)
eb2:SetTargetRange(LOCATION_MZONE,0)
eb2:SetCondition(s.rdcon)
eb2:SetOperation(s.rdop)
c:RegisterEffect(eb2)
--to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCategory(CATEGORY_DESTROY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetOperation(s.reop)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Disable --des
local e5=Effect.CreateEffect(c) local ed1=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) ed1:SetDescription(aux.Stringid(id,1))
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) ed1:SetCategory(CATEGORY_DESTROY)
e5:SetRange(LOCATION_MZONE) ed1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EFFECT_DESTROY_REPLACE) ed1:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetTarget(s.desreptg) ed1:SetRange(LOCATION_MZONE)
c:RegisterEffect(e5) ed1:SetTarget(s.destg)
end ed1:SetOperation(s.desop)
function cm.spfilter(c) c:RegisterEffect(ed1)
return c:IsFaceup() and c:IsCode(5012604) local ed2=ed1:Clone()
end ed2:SetCode(EVENT_ATTACK_ANNOUNCE)
function cm.spcon(e,c) c:RegisterEffect(ed2)
if c==nil then return true end local ed3=ed1:Clone()
local tp=c:GetControler() ed3:SetCode(EVENT_BECOME_TARGET)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 c:RegisterEffect(ed3)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil) local ed4=ed1:Clone()
end ed4:SetCode(EVENT_BE_BATTLE_TARGET)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) c:RegisterEffect(ed4)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,nil) end if not s.global_check then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) s.global_check=true
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,3,nil) local ge1=Effect.CreateEffect(c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
end ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
function cm.thop(e,tp,eg,ep,ev,re,r,rp) ge1:SetOperation(s.chk)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) Duel.RegisterEffect(ge1,0)
local tg=g:Filter(Card.IsRelateToEffect,nil,e) end
if tg:GetCount()>0 then end
Duel.Destroy(tg,REASON_EFFECT) function s.LCheckGoal(sg,tp,lc,gf,lmat,max)
return sg:CheckWithSumEqual(s.GetLinkCount,max,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg,lc,tp))
and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function s.GetLinkCount(c)
return 1
end
function s.LinkCondition(f,minct,maxct,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minct
local maxc=maxct
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
if s.Max<3 then
minc=s.Max
maxc=s.Max
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,gf,lmat,maxc)
end
end
function s.LinkTarget(f,minct,maxct,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minct
local maxc=maxct
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
if s.Max<3 then
minc=s.Max
maxc=s.Max
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,gf,lmat,maxc)
if s.Max>0 then
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
elseif s.Max==0 then
e:SetLabelObject(nil)
return true
end
end
end
function s.LinkOperation(f,minct,maxct,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
if g then
c:SetMaterial(g)
Auxiliary.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
elseif g==nil then
end
end
end
function s.chkfilter(c)
return c:IsCode(5012604) and c:IsPosition(POS_FACEUP)
end
function s.chk(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if s.chkfilter(tc) and s.Max>0 then
s.Max=s.Max-1
end
tc=eg:GetNext()
end end
end end
function cm.indesval(e,re,r,rp) function s.linkfilter(c)
return bit.band(r,REASON_RULE)==0 return c:IsCanBeLinkMaterial(nil) and c.MoJin
end end
function s.repfilter(c) function s.repfilter(c)
return c:IsAbleToRemove() return not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) or c:IsReason(REASON_REPLACE) if chk==0 then
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end return c:IsReason(REASON_EFFECT+REASON_BATTLE) --and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
--and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
if Duel.SelectEffectYesNo(tp,c,96) then if Duel.SelectEffectYesNo(tp,c,96) then
local g=c:GetEquipGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) --local sg=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) local sg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetTargetCard(sg)
return true return true
else return false end else return false end
end end
\ No newline at end of file function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
function s.rdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep==1-tp and tc==e:GetHandler()
end
function s.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(1-tp,ev*3)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
s.Max=3
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,3,1,nil,LOCATION_ONFIELD)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,nil) then
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,3,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--安娜·施普伦格尔 --安娜·施普伦格尔
local cm,m,o=GetID()
local s,id,o=GetID() local s,id,o=GetID()
s.MoJin=true s.MoJin=true
function cm.initial_effect(c) function s.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(cm.sfilter),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--immune aux.AddMaterialCodeList(c,5012604)
local e3=Effect.CreateEffect(c) --synchro summon
e3:SetType(EFFECT_TYPE_SINGLE) aux.AddSynchroProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,5012604),1,1)
e3:SetCode(EFFECT_IMMUNE_EFFECT) --Activate
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) local e1=Effect.CreateEffect(c)
e3:SetRange(LOCATION_MZONE) e1:SetType(EFFECT_TYPE_QUICK_O)
e3:SetValue(cm.efilter) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e3) e1:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
local e3=Effect.CreateEffect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetDescription(aux.Stringid(m,4)) e1:SetRange(LOCATION_MZONE)
e3:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(3)
e3:SetRange(LOCATION_MZONE) e1:SetCost(s.cost)
e3:SetCountLimit(3) e1:SetTarget(s.tg)
e3:SetCost(cm.thcost) e1:SetOperation(s.op)
e3:SetTarget(cm.thtg) c:RegisterEffect(e1)
e3:SetOperation(cm.thop) local e5=Effect.CreateEffect(c)
c:RegisterEffect(e3) e5:SetType(EFFECT_TYPE_SINGLE)
end e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
function cm.sfilter(c) e5:SetRange(LOCATION_MZONE)
return c.MoJin==true e5:SetCode(EFFECT_IMMUNE_EFFECT)
end e5:SetValue(s.immval)
function cm.efilter(e,re) c:RegisterEffect(e5)
return re:IsActivated()
end
function cm.fil(c)
return not c:IsAttack(0) and c:IsFaceup()
end
function cm.fil2(c)
return c:IsCode(5012604) and c:IsFaceup()
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
if Duel.IsExistingMatchingCard(cm.fil2,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=false local b1=Duel.IsExistingTarget(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=false local b2=Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b3=false local b3=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)
if Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then b1=true end +Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
if Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then b2=true end +Duel.GetLocationCount(tp,LOCATION_SZONE,PLAYER_NONE,0)
if Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(tp,LOCATION_SZONE)+Duel.GetLocationCount(1-tp,LOCATION_SZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then b3=true end +Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)>0
if chk==0 then return b1 or b2 or b3 end if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,0)},
{b2,aux.Stringid(m,1)},
{b3,aux.Stringid(m,2)})
if op==1 then Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,PLAYER_ALL,LOCATION_MZONE)
elseif op==2 then Duel.SetOperationInfo(0,CATEGORY_NEGATE,nil,1,PLAYER_ALL,LOCATION_ONFIELD) end
e:SetLabel(op)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local op=e:GetLabel() local b1=Duel.IsExistingTarget(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
if op==1 then local b2=Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local g=Duel.GetMatchingGroup(cm.fil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local b3=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)
for ac in aux.Next(g) do +Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
local e1=Effect.CreateEffect(c) +Duel.GetLocationCount(tp,LOCATION_SZONE,PLAYER_NONE,0)
e1:SetType(EFFECT_TYPE_SINGLE) +Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)>0
e1:SetCode(EFFECT_SET_ATTACK_FINAL) local op=aux.SelectFromOptions(tp,
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) {b1,aux.Stringid(id,0),0},
e1:SetValue(0) {b2,aux.Stringid(id,1),1},
ac:RegisterEffect(e1) {b3,aux.Stringid(id,2),2})
end if op==0 then
elseif op==2 then local sg=Duel.GetMatchingGroup(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) if sg:GetCount()>0 then
for ac in aux.Next(g) do local sc=sg:GetFirst()
Duel.NegateRelatedChain(ac,RESET_TURN_SET) while sc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
ac:RegisterEffect(e1) e1:SetValue(0)
local e2=Effect.CreateEffect(c) sc:RegisterEffect(e1)
e2:SetType(EFFECT_TYPE_SINGLE) sc=sg:GetNext()
e2:SetCode(EFFECT_DISABLE_EFFECT) end
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e2)
end end
elseif op==3 then elseif op==1 then
local zone=0 local sg=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local num=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(tp,LOCATION_SZONE)+Duel.GetLocationCount(1-tp,LOCATION_SZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE)+2-Duel.GetMatchingGroupCount(cm.filx,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if sg:GetCount()>0 then
Debug.Message(num) local sc=sg:GetFirst()
while num>0 and Duel.SelectYesNo(tp,aux.Stringid(m,5)) do while sc do
Duel.BreakEffect() Duel.NegateRelatedChain(sc,RESET_TURN_SET)
local zone2=Duel.SelectDisableField(tp,1,LOCATION_ONFIELD,LOCATION_ONFIELD,zone) local e1=Effect.CreateEffect(c)
if tp==1 then e1:SetType(EFFECT_TYPE_SINGLE)
zone2=((zone2&0xffff)<<16)|((zone2>>16)&0xffff) e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
sc:RegisterEffect(e2)
if sc: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_CHAIN)
sc:RegisterEffect(e3)
end
sc=sg:GetNext()
end end
zone=bit.bor(zone,zone2)
num=num-1
end end
elseif op==2 then
local e1=Effect.CreateEffect(e:GetHandler()) if not c:IsRelateToEffect(e) then goto setting end
e1:SetType(EFFECT_TYPE_FIELD) local e3=Effect.CreateEffect(c)
e1:SetCode(EFFECT_DISABLE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e1:SetValue(zone) e3:SetCode(EFFECT_DISABLE_FIELD)
e1:SetReset(RESET_PHASE+PHASE_END) e3:SetValue(0xffffffff)
Duel.RegisterEffect(e1,tp) e3:SetReset(RESET_PHASE+PHASE_END+RESET_CHAIN)
Duel.RegisterEffect(e3,tp)
end
::setting::
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
function s.filter(c)
function cm.filx(c) return c:IsFaceup() and c:IsCode(5012604)
return c:GetSequence()>4 end
function s.immval(e,te)
return te:IsActivated()
end end
...@@ -4,6 +4,7 @@ s.MoJin=true ...@@ -4,6 +4,7 @@ s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
c:SetUniqueOnField(1,1,id) c:SetUniqueOnField(1,1,id)
c:SetSPSummonOnce(id) c:SetSPSummonOnce(id)
aux.AddCodeList(c,5012604)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,5012604,s.sfliter,1,true,true) aux.AddFusionProcCodeFun(c,5012604,s.sfliter,1,true,true)
......
--大星霸祭 --大星霸祭
local s,id,o=GetID() local s,id,o=GetID()
c5012638.MoJin=true s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,5012604) aux.AddCodeList(c,5012604)
--Activate --Activate
...@@ -37,7 +37,7 @@ function s.initial_effect(c) ...@@ -37,7 +37,7 @@ function s.initial_effect(c)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsLevelBelow(5) and c:IsType(TYPE_MONSTER) and c.MoJin==true and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(5) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c.MoJin or c:IsSetCard(0x23c))
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
--米娜·马瑟斯
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(1165)
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.XyzLevelFreeCondition(s.filter,nil,2,99))
e0:SetTarget(s.XyzLevelFreeTarget(s.filter,nil,2,99))
e0:SetOperation(Auxiliary.XyzLevelFreeOperation(s.filter,nil,2,99))
e0:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e0)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.SpiritReturnTargetForced)
e1:SetOperation(s.SpiritReturnOperation)
c:RegisterEffect(e1)
--remove
local ed1=Effect.CreateEffect(c)
ed1:SetDescription(aux.Stringid(id,1))
ed1:SetCategory(CATEGORY_REMOVE)
ed1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
ed1:SetCode(EVENT_SPSUMMON_SUCCESS)
ed1:SetRange(LOCATION_MZONE)
ed1:SetTarget(s.destg)
ed1:SetOperation(s.desop)
c:RegisterEffect(ed1)
local ed2=Effect.CreateEffect(c)
ed2:SetDescription(aux.Stringid(id,1))
ed2:SetCategory(CATEGORY_REMOVE)
ed2:SetType(EFFECT_TYPE_IGNITION)
ed2:SetRange(LOCATION_MZONE)
ed2:SetCost(s.cost)
ed2:SetTarget(s.destg)
ed2:SetOperation(s.desop)
c:RegisterEffect(ed2)
--做超量素材时送去墓地
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_ADJUST)
e4:SetOperation(s.rmop)
Duel.RegisterEffect(e4,0)
end
function s.SpiritReturnTargetForced(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function s.SpiritReturnOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function s.filter(c)
return c.MoJin and c:IsSummonableCard()
end
function s.XyzLevelFreeFilter(c,xyzc,f)
return (not (c:IsOnField()or c:IsLocation(LOCATION_REMOVED)) or c:IsFaceup()) and c:IsCanBeXyzMaterial(xyzc) and (not f or f(c,xyzc))
end
function s.XyzLevelFreeGoal(g,tp,xyzc,gf)
return (not gf or gf(g)) and Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
end
function s.XyzLevelFreeCondition(f,gf,minct,maxct)
return function(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=minct
local maxc=maxct
if min then
minc=math.max(minc,min)
maxc=math.min(maxc,max)
end
if maxc<minc then return false end
local mg=nil
if og then
mg=og:Filter(s.XyzLevelFreeFilter,nil,c,f)
else
mg=Duel.GetMatchingGroup(s.XyzLevelFreeFilter,tp,LOCATION_MZONE+LOCATION_REMOVED,0,nil,c,f)
end
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg)
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local res=mg:CheckSubGroup(Auxiliary.XyzLevelFreeGoal,minc,maxc,tp,c,gf)
Auxiliary.GCheckAdditional=nil
return res
end
end
function s.XyzLevelFreeTarget(f,gf,minct,maxct)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local minc=minct
local maxc=maxct
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local mg=nil
if og then
mg=og:Filter(s.XyzLevelFreeFilter,nil,c,f)
else
mg=Duel.GetMatchingGroup(s.XyzLevelFreeFilter,tp,LOCATION_MZONE+LOCATION_REMOVED,0,nil,c,f)
end
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
Duel.SetSelectedCard(sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local cancel=Duel.IsSummonCancelable()
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local g=mg:SelectSubGroup(tp,Auxiliary.XyzLevelFreeGoal,cancel,minc,maxc,tp,c,gf)
Auxiliary.GCheckAdditional=nil
if g and g:GetCount()>0 then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
function s.rmcon(e)
local c=e:GetHandler()
return true --c:IsAbleToGrave()
end
function s.rmop(e)
local g=Duel.GetOverlayGroup(0,LOCATION_MZONE,LOCATION_MZONE)
local tgg=g:Filter(Card.IsCode,nil,id)
if tgg and #tgg>0 then
Duel.SendtoGrave(tgg,REASON_EFFECT)
end
end
function s.refilter(c)
return c:IsAbleToRemove()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.refilter,tp,0xff,0xff,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,nil,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
--
local c=e:GetHandler()
Duel.RegisterFlagEffect(0,id+1,0,0,1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_ADJUST)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetLabel(ac)
e4:SetCondition(s.recon)
e4:SetOperation(s.reop)
Duel.RegisterEffect(e4,tp)
end
function s.retfilter(c,fid)
return c:GetFlagEffectLabel(id)==fid
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
if not e:GetLabelObject():IsExists(s.retfilter,1,nil,e:GetLabel()) then
e:GetLabelObject():DeleteGroup()
e:Reset()
return false
end
return true
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(0,id+1)
local fid=e:GetLabel()
local g=e:GetLabelObject():Filter(s.retfilter,nil,fid)
if #g<=0 then return end
Duel.Hint(HINT_CARD,0,id)
for p in aux.TurnPlayers() do
local tg=g:Filter(Card.IsPreviousControler,nil,p)
local mt=Duel.GetLocationCount(p,LOCATION_MZONE)
local st=Duel.GetLocationCount(p,LOCATION_SZONE)
local mg=tg:Filter(Card.IsType,nil,TYPE_MONSTER)
local sg=tg:Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
while #mg>0 and mt>0 do
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOFIELD)
local gg=mg:Select(p,1,1,nil)
Duel.ReturnToField(gg:GetFirst())
mg:Sub(gg)
end
while #sg>0 and st>0 do
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TOFIELD)
local gg=sg:Select(p,1,1,nil)
local gc=gg:GetFirst()
local sp=gc:GetPreviousControler()
if gc:IsType(TYPE_FIELD) then
local fc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(gc,p,sp,LOCATION_FZONE,POS_FACEUP,true)
else
Duel.ReturnToField(gc)
end
if not gc:IsType(TYPE_CONTINUOUS+TYPE_FIELD) then
Duel.SendtoGrave(gc,REASON_RULE)
end
sg:Sub(gg)
end
end
e:GetLabelObject():DeleteGroup()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.retifilter(c,code)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsCode(code)
end
function s.recon(e,tp)
local c=e:GetHandler()
local code=e:GetLabel()
local g=Duel.GetMatchingGroup(s.retifilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,code)
return g:IsExists(Card.IsAbleToRemove,1,nil,tp,POS_FACEUP) and Duel.GetFlagEffect(0,id+1)>0
end
function s.reop(e,tp)
local c=e:GetHandler()
local code=e:GetLabel()
local og=Duel.GetMatchingGroup(s.retifilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,code)
if og:GetCount()>0 then
Duel.Remove(og,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)
for tc in aux.Next(og) do
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
og:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCountLimit(1)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
end
end
--仙狸-陌陌 --仙狸-陌陌
function c62624135.initial_effect(c) function c62624135.initial_effect(c)
aux.AddCodeList(c,62624110) aux.AddCodeList(c,62624110,62624205)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
...@@ -24,7 +24,7 @@ function c62624135.initial_effect(c) ...@@ -24,7 +24,7 @@ function c62624135.initial_effect(c)
e4:SetType(EFFECT_TYPE_EQUIP) e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetValue(aux.imval1) e4:SetValue(aux.imval1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--spsummon --spsummon
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -72,11 +72,14 @@ end ...@@ -72,11 +72,14 @@ end
function c62624135.eqlimit(e,c) function c62624135.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function c62624135.ffilter(c)
return c:IsCode(62624205) and c:IsFaceup()
end
function c62624135.spcon(e,tp,eg,ep,ev,re,r,rp) function c62624135.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget() return e:GetHandler():GetEquipTarget() and Duel.IsExistingMatchingCard(c62624135.ffilter,tp,LOCATION_FZONE,0,1,nil)
end end
function c62624135.spfilter(c,e,tp) function c62624135.spfilter(c,e,tp)
return c:IsSetCard(0x6d0) and c:IsLevel(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x6d0) and c:IsLevel(7,8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c62624135.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624135.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
...@@ -93,33 +96,7 @@ function c62624135.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,33 +96,7 @@ function c62624135.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c62624135.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c62624135.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then if #g>0 then
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
local tc=g:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
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+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end end
end end
\ No newline at end of file
--仙狸-尘埃 --仙狸-尘埃
function c62624140.initial_effect(c) function c62624140.initial_effect(c)
aux.AddCodeList(c,62624205,62624110) aux.AddCodeList(c,62624205,62624110)
--special summon --tohand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,62624140) e1:SetCountLimit(1,62624140)
e1:SetCost(c62624140.spcost) e1:SetCost(c62624140.thcost)
e1:SetTarget(c62624140.sptg) e1:SetTarget(c62624140.thtg)
e1:SetOperation(c62624140.spop) e1:SetOperation(c62624140.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -34,36 +34,30 @@ function c62624140.initial_effect(c) ...@@ -34,36 +34,30 @@ function c62624140.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c62624140.costfilter(c) function c62624140.costfilter(c)
return c:IsCode(62624210) and not c:IsPublic() return c:IsCode(62624235) and c:IsAbleToGraveAsCost()
end end
function c62624140.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c62624140.costfilter,tp,LOCATION_HAND,0,1,nil) end function c62624140.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) if chk==0 then return Duel.IsExistingMatchingCard(c62624140.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c62624140.costfilter,tp,LOCATION_HAND,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.ConfirmCards(1-tp,g) local g=Duel.SelectMatchingCard(tp,c62624140.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
Duel.ShuffleHand(tp) Duel.SendtoGrave(g,REASON_COST)
end end
function c62624140.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624140.thfilter(c)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return c:IsCode(62625110) and c:IsAbleToHand()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c62624140.spop(e,tp,eg,ep,ev,re,r,rp) function c62624140.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(c62624140.thfilter,tp,LOCATION_DECK,0,1,nil) end
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c62624140.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
end
end end
function c62624140.splimit(e,c)
return not c:IsSetCard(0x6d0) function c62624140.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c62624140.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end end
function c62624140.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624140.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
......
--仙狸-染 --仙狸-染
function c62624145.initial_effect(c) function c62624145.initial_effect(c)
aux.AddCodeList(c,62624205)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62624145,0)) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,62624145) e1:SetCountLimit(1,62624145)
e1:SetTarget(c62624145.eqtg) e1:SetTarget(c62624145.thtg)
e1:SetOperation(c62624145.eqop) e1:SetOperation(c62624145.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--summon success --fusion summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62624145,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,62624146) e2:SetCountLimit(1,62624146)
e2:SetCost(c62624145.spcost) e2:SetCondition(c62624145.condition)
e2:SetTarget(c62624145.sptg) e2:SetTarget(c62624145.target)
e2:SetOperation(c62624145.spop) e2:SetOperation(c62624145.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not c62624145.global_check then
c62624145.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetLabel(62624145)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetOperation(aux.sumreg)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
ge2:SetLabel(62624145)
Duel.RegisterEffect(ge2,0)
end
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
...@@ -50,52 +35,92 @@ function c62624145.initial_effect(c) ...@@ -50,52 +35,92 @@ function c62624145.initial_effect(c)
e3:SetOperation(c62624145.tdop) e3:SetOperation(c62624145.tdop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c62624145.eqfilter(c,ec,tp) function c62624145.thfilter(c)
return c:IsCode(62624230) and c:CheckEquipTarget(ec) return c:IsCode(62624105,62624230) and c:IsAbleToHand()
and c:CheckUniqueOnField(tp,LOCATION_SZONE) and not c:IsForbidden()
end end
function c62624145.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624145.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.IsExistingMatchingCard(c62624145.thfilter,tp,LOCATION_DECK,0,1,nil) end
and Duel.IsExistingMatchingCard(c62624145.eqfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler(),tp) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end end
function c62624145.eqop(e,tp,eg,ep,ev,re,r,rp) function c62624145.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() local g=Duel.SelectMatchingCard(tp,c62624145.thfilter,tp,LOCATION_DECK,0,1,1,nil)
or not c:IsRelateToEffect(e) then return end if g:GetCount()>0 then
local g=Duel.GetMatchingGroup(c62624145.eqfilter,tp,LOCATION_DECK,0,nil,c,tp) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.ConfirmCards(1-tp,g)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
Duel.Equip(tp,tc,c)
end end
end end
function c62624145.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c62624145.condition(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return e:GetHandler():GetFlagEffect(62624145)~=0 end local ph=Duel.GetCurrentPhase()
e:GetHandler():ResetFlagEffect(62624145) return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function c62624145.spfilter(c,e,tp) function c62624145.filter1(c,e)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsImmuneToEffect(e)
end end
function c62624145.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c62624145.filter2(c,e,tp,m,f,chkf)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x6d0) and (not f or f(c))
and c62624145.spfilter(chkc) end and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
if chk==0 then return Duel.IsExistingTarget(c62624145.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c62624145.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c62624145.spop(e,tp,eg,ep,ev,re,r,rp) function c62624145.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget() if chk==0 then
if tc:IsRelateToEffect(e) then local chkf=tp
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c62624145.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c62624145.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c62624145.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c62624145.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c62624145.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c62624145.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if #sg1>0 or (sg2~=nil and #sg2>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c62624145.ffilter(c)
return c:IsCode(62624205) and c:IsFaceup()
end end
function c62624145.tdcon(e,tp,eg,ep,ev,re,r,rp) function c62624145.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and Duel.IsExistingMatchingCard(c62624145.ffilter,tp,LOCATION_FZONE,0,1,nil)
end end
function c62624145.spfilter2(c,e,tp) function c62624145.spfilter2(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(8) and not c:IsCode(62624145) return c:IsSetCard(0x6d0) and not c:IsCode(62624145)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c62624145.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c62624145.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -6,17 +6,39 @@ function c62624215.initial_effect(c) ...@@ -6,17 +6,39 @@ function c62624215.initial_effect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--Destroy --damage
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE+CATEGORY_RECOVER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,62624215) e1:SetCondition(c62624215.reccon)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetOperation(c62624215.recop)
e1:SetCondition(c62624215.descon)
e1:SetTarget(c62624215.destg)
e1:SetOperation(c62624215.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
local e12=e1:Clone()
e12:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e12)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,62624215)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c62624215.descon)
e2:SetTarget(c62624215.destg)
e2:SetOperation(c62624215.desop)
c:RegisterEffect(e2)
end
function c62624215.reccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
and Duel.IsExistingMatchingCard(aux.AND(Card.IsCode,Card.IsFaceup),tp,LOCATION_MZONE,0,1,nil,62624570)
end
function c62624215.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,62624215)
Duel.Damage(1-tp,600,REASON_EFFECT)
end end
function c62624215.ffilter(c) function c62624215.ffilter(c)
return c:IsCode(62624205) and c:IsFaceup() return c:IsCode(62624205) and c:IsFaceup()
......
--全世界猫咪联合起来! --全世界猫咪联合起来!
function c62624245.initial_effect(c) function c62624245.initial_effect(c)
--activate --activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--race
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetCountLimit(1,62624245+EFFECT_COUNT_CODE_OATH) e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(RACE_BEAST)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--race --indes
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_RACE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(RACE_BEAST) e2:SetTarget(aux.TRUE)
e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--indes --avoid battle damage
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c62624245.indtg) e3:SetTarget(aux.TRUE)
e3:SetValue(c62624245.indct) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,62624246+EFFECT_COUNT_CODE_OATH)
e4:SetCost(c62624245.spcost)
e4:SetTarget(c62624245.sptg)
e4:SetOperation(c62624245.spop)
c:RegisterEffect(e4)
end
function c62624245.indtg(e,c)
return c:IsSetCard(0x6d0,0x6d1)
end
function c62624245.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
function c62624245.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c62624245.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c62624245.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x6d0) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c62624245.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c62624245.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c62624245.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c62624245.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c62624245.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c62624245.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c62624245.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end end
\ No newline at end of file
--幻梦·水晶魔镜 --幻梦·水晶魔镜
function c62624260.initial_effect(c) function c62624260.initial_effect(c)
aux.AddCodeList(c,62624110) aux.AddCodeList(c,62624110)
c:SetUniqueOnField(1,0,62624260)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMING_END_PHASE)
e0:SetTarget(c62624260.tg)
c:RegisterEffect(e0)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62624260,0)) e1:SetDescription(aux.Stringid(62624260,0))
...@@ -31,40 +23,11 @@ function c62624260.initial_effect(c) ...@@ -31,40 +23,11 @@ function c62624260.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,62624260) e2:SetCountLimit(1)
e2:SetTarget(c62624260.sptg) e2:SetTarget(c62624260.sptg)
e2:SetOperation(c62624260.spop) e2:SetOperation(c62624260.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c62624260.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62624260,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c62624260.descon)
e1:SetOperation(c62624260.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3)
c:SetTurnCounter(0)
c:RegisterEffect(e1)
end
function c62624260.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c62624260.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
Duel.Destroy(c,REASON_RULE)
end
end
function c62624260.filter(c) function c62624260.filter(c)
return c:IsCode(62624110) and c:IsFaceup() return c:IsCode(62624110) and c:IsFaceup()
end end
......
--仙狸-苏酥 --仙狸-苏酥
function c62624510.initial_effect(c) function c62624510.initial_effect(c)
aux.AddCodeList(c,62624205)
local e0=aux.AddThisCardInGraveAlreadyCheck(c) local e0=aux.AddThisCardInGraveAlreadyCheck(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_RECOVER) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,62624510) e1:SetCountLimit(1,62624510)
...@@ -33,14 +34,14 @@ function c62624510.initial_effect(c) ...@@ -33,14 +34,14 @@ function c62624510.initial_effect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,62624510+2) e4:SetCountLimit(1,62624510+2)
e4:SetCondition(c62624510.spcon2) e4:SetCondition(c62624510.spcon2)
e4:SetTarget(c62624510.sptg2) e4:SetTarget(c62624510.sptg2)
e4:SetOperation(c62624510.spop2) e4:SetOperation(c62624510.spop2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c62624510.cfilter1(c) function c62624510.cfilter1(c)
return c:IsFaceup() and c:IsLevel(8) and c:IsRace(RACE_SPELLCASTER) return c:IsFaceup() and c:IsSetCard(0x6d0)
end end
function c62624510.spcon(e,tp,eg,ep,ev,re,r,rp) function c62624510.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c62624510.cfilter1,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c62624510.cfilter1,tp,LOCATION_MZONE,0,1,nil)
...@@ -48,29 +49,12 @@ end ...@@ -48,29 +49,12 @@ end
function c62624510.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624510.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,0)
end
function c62624510.desfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end end
function c62624510.spop(e,tp,eg,ep,ev,re,r,rp) function c62624510.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c62624510.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
local lv=g:GetFirst():GetLevel()
if Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.Recover(tp,lv*200,REASON_EFFECT)
end
end
end
end end
function c62624510.cfilter(c,tp,se) function c62624510.cfilter(c,tp,se)
return c:IsSetCard(0x6d0) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) return c:IsSetCard(0x6d0) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
...@@ -106,14 +90,14 @@ function c62624510.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,14 +90,14 @@ function c62624510.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c62624510.cfilter2(c) function c62624510.ffilter(c)
return c:IsFacedown() or not c:IsCode(62624510) return c:IsCode(62624205) and c:IsFaceup()
end end
function c62624510.spcon2(e,tp,eg,ep,ev,re,r,rp) function c62624510.spcon2(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c62624510.cfilter2,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c62624510.ffilter,tp,LOCATION_FZONE,0,1,nil)
end end
function c62624510.spfilter2(c,e,tp) function c62624510.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(8) and c:IsRace(RACE_SPELLCASTER) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x6d0)
end end
function c62624510.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c62624510.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -130,7 +114,7 @@ function c62624510.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -130,7 +114,7 @@ function c62624510.spop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(2600) e1:SetValue(2700)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c62624530.initial_effect(c) function c62624530.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c62624530.matfilter1,c62624530.matfilter2,true) aux.AddFusionProcCodeFun(c,62624105,c62624530.matfilter,1,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -11,9 +11,12 @@ function c62624530.initial_effect(c) ...@@ -11,9 +11,12 @@ function c62624530.initial_effect(c)
e1:SetValue(c62624530.splimit) e1:SetValue(c62624530.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCategory(CATEGORY_EQUIP)
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c62624530.eqtg)
e2:SetOperation(c62624530.eqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--actlimit --actlimit
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -48,15 +51,41 @@ function c62624530.initial_effect(c) ...@@ -48,15 +51,41 @@ function c62624530.initial_effect(c)
e6:SetOperation(c62624530.thop) e6:SetOperation(c62624530.thop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function c62624530.matfilter1(c) function c62624530.matfilter(c)
return c:IsFusionCode(62624105,62624315) return c:IsFusionCode(62624145,62624510)
end
function c62624530.matfilter2(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(8)
end end
function c62624530.splimit(e,se,sp,st) function c62624530.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end end
function c62624530.eqfilter(c,ec)
return c:IsType(TYPE_EQUIP) and c:CheckUniqueOnField() and not c:IsForbidden()
and c:CheckEquipTarget(ec)
end
function c62624530.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c62624530.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,c) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c62624530.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c62624530.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,c)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c62624530.eqlimit)
tc:RegisterEffect(e1)
end
end
function c62624530.eqlimit(e,c)
return e:GetOwner()==c
end
function c62624530.actcon(e) function c62624530.actcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
......
...@@ -12,14 +12,13 @@ function c62624570.initial_effect(c) ...@@ -12,14 +12,13 @@ function c62624570.initial_effect(c)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--tograve --tograve
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1)
e1:SetCountLimit(1,62624570) e1:SetCost(c62624570.cost)
e1:SetCondition(c62624570.tgcon) e1:SetTarget(c62624570.tg)
e1:SetTarget(c62624570.tgtg) e1:SetOperation(c62624570.op)
e1:SetOperation(c62624570.tgop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Damage --Damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -41,21 +40,50 @@ end ...@@ -41,21 +40,50 @@ end
function c62624570.lcheck(g) function c62624570.lcheck(g)
return g:IsExists(c62624570.mfilter,1,nil) return g:IsExists(c62624570.mfilter,1,nil)
end end
function c62624570.tgcon(e,tp,eg,ep,ev,re,r,rp) function c62624570.costfilter(c)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return c:IsSetCard(0x6d0) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end end
function c62624570.tgfilter(c) function c62624570.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsSetCard(0x6d0) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() if chk==0 then return Duel.IsExistingMatchingCard(c62624570.costfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c62624570.costfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end end
function c62624570.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624570.spfilter(c,e,tp)
if chk==0 then return Duel.IsExistingMatchingCard(c62624570.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end return c:IsType(TYPE_LINK) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
function c62624570.tgop(e,tp,eg,ep,ev,re,r,rp) function c62624570.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local b1=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
local g=Duel.SelectMatchingCard(tp,c62624570.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) local b2=Duel.IsExistingMatchingCard(c62624570.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp)
if g:GetCount()>0 then and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
Duel.SendtoGrave(g,REASON_EFFECT) if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(62624570,1)},{b2,aux.Stringid(62624570,2)})
e:SetLabel(op)
if op==1 then
e:SetCategory(CATEGORY_DAMAGE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)*300)
end
if op==2 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,tp,1,LOCATION_REMOVED)
end
end
function c62624570.op(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if op==1 then
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
elseif op==2 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local sg=Duel.GetMatchingGroup(c62624570.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp)
if #sg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end end
end end
function c62624570.filter(c,e,tp) function c62624570.filter(c,e,tp)
......
...@@ -2,115 +2,156 @@ ...@@ -2,115 +2,156 @@
function c62624615.initial_effect(c) function c62624615.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode3(c,62624130,62624140,62624310,false,false) aux.AddFusionProcCode3(c,62624130,62624140,62624575,true,true)
--tohand --spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c62624615.splimit)
c:RegisterEffect(e0)
--fusion
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,62624615) e1:SetCondition(c62624615.fspcon)
e1:SetCondition(c62624615.thcon) e1:SetTarget(c62624615.fsptg)
e1:SetTarget(c62624615.thtg) e1:SetOperation(c62624615.fspop)
e1:SetOperation(c62624615.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable --disable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c62624615.discon) e2:SetCountLimit(2)
e2:SetTarget(c62624615.distg) e2:SetCondition(c62624615.negcon)
e2:SetOperation(c62624615.disop) e2:SetTarget(c62624615.negtg)
e2:SetOperation(c62624615.negop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--indes --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetValue(1) e3:SetCondition(c62624615.spcon)
e3:SetTarget(c62624615.sptg)
e3:SetOperation(c62624615.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e33=e3:Clone()
e33:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e33)
--damage val
local e34=e3:Clone()
e34:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e34)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c62624615.spcon2)
e4:SetTarget(c62624615.sptg2)
e4:SetOperation(c62624615.spop2)
c:RegisterEffect(e4)
end end
function c62624615.thcon(e,tp,eg,ep,ev,re,r,rp) function c62624615.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c62624615.fspcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function c62624615.thfilter(c) function c62624615.filter0(c)
return ((c:IsSetCard(0x6d0) and c:IsType(0x1)) or c:IsCode(62624250)) and c:IsAbleToHand() return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c62624615.filter1(c,e)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) and c:IsAbleToDeck()
end end
function c62624615.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624615.filter2(c,e,tp,m,f,chkf)
if chk==0 then return return c:IsType(TYPE_FUSION) and c:IsSetCard(0x6d0) and (not f or f(c))
Duel.IsExistingMatchingCard(c62624615.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function c62624615.thop(e,tp,eg,ep,ev,re,r,rp) function c62624615.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) if chk==0 then
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c62624615.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local chkf=tp
if #g>0 then local mg1=Duel.GetMatchingGroup(c62624615.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
Duel.HintSelection(g) local res=Duel.IsExistingMatchingCard(c62624615.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
Duel.SendtoHand(g,nil,REASON_EFFECT) if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c62624615.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end end
function c62624615.discon(e,tp,eg,ep,ev,re,r,rp) function c62624615.fspop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end local chkf=tp
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local mg1=Duel.GetMatchingGroup(c62624615.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local sg1=Duel.GetMatchingGroup(c62624615.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
return tg and tg:IsContains(e:GetHandler()) and Duel.IsChainDisablable(ev) local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c62624615.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.HintSelection(mat1)
Duel.SendtoDeck(mat1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end end
function c62624615.spfilter(c,e,tp) function c62624615.negcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsSetCard(0x6d0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return rp==1-tp and Duel.IsChainDisablable(ev)
end end
function c62624615.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624615.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return true end
and Duel.IsExistingMatchingCard(c62624615.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c62624615.disop(e,tp,eg,ep,ev,re,r,rp) function c62624615.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) then if Duel.NegateEffect(ev) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local e1=Effect.CreateEffect(e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) e1:SetType(EFFECT_TYPE_FIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c62624615.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
if g:GetCount()>0 then e1:SetCode(EFFECT_CANNOT_ACTIVATE)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) e1:SetTargetRange(0,1)
end e1:SetValue(c62624615.aclimit)
e1:SetLabel(rc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end end
end end
function c62624615.spcon2(e,tp,eg,ep,ev,re,r,rp) function c62624615.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function c62624615.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function c62624615.spfilter2(c,e,tp) function c62624615.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsSetCard(0x6d0) and c:IsType(0x1) and not c:IsCode(62624615) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x6d0) and not c:IsCode(62624615)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0 and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
function c62624615.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c62624615.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c62624615.spfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function c62624615.spop2(e,tp,eg,ep,ev,re,r,rp) function c62624615.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c62624615.spfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c62624615.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
--圣翼仙狸-神羽/降临形态 --圣翼仙狸-神羽
function c62624630.initial_effect(c) function c62624630.initial_effect(c)
aux.AddCodeList(c,62624205) aux.AddCodeList(c,62624205)
--synchro summon --synchro summon
...@@ -25,11 +25,9 @@ function c62624630.initial_effect(c) ...@@ -25,11 +25,9 @@ function c62624630.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--immune --immune
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(c62624630.efilter)
e2:SetCondition(c62624630.imcon)
e2:SetOperation(c62624630.imop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--negate --negate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -40,7 +38,6 @@ function c62624630.initial_effect(c) ...@@ -40,7 +38,6 @@ function c62624630.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,62624630+1) e3:SetCountLimit(1,62624630+1)
e3:SetCondition(c62624630.negcon) e3:SetCondition(c62624630.negcon)
e3:SetCost(c62624630.negcost)
e3:SetTarget(aux.nbtg) e3:SetTarget(aux.nbtg)
e3:SetOperation(c62624630.negop) e3:SetOperation(c62624630.negop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -81,7 +78,7 @@ function c62624630.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +78,7 @@ function c62624630.rmop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(ct*400) e1:SetValue(ct*500)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
...@@ -89,19 +86,6 @@ function c62624630.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,19 +86,6 @@ function c62624630.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c62624630.imcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c62624630.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c62624630.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c62624630.efilter(e,te) function c62624630.efilter(e,te)
return te:GetOwner()~=e:GetHandler() return te:GetOwner()~=e:GetHandler()
end end
...@@ -112,16 +96,6 @@ function c62624630.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -112,16 +96,6 @@ function c62624630.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c62624630.ffilter,tp,LOCATION_FZONE,0,1,nil) and Duel.IsExistingMatchingCard(c62624630.ffilter,tp,LOCATION_FZONE,0,1,nil)
end end
function c62624630.cfilter(c,rtype)
return c:IsType(rtype) and c:IsAbleToGraveAsCost()
end
function c62624630.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rtype=bit.band(re:GetActiveType(),0x7)
if chk==0 then return Duel.IsExistingMatchingCard(c62624630.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,rtype) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c62624630.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,rtype)
Duel.SendtoGrave(g,REASON_COST)
end
function c62624630.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c62624630.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
......
...@@ -26,7 +26,7 @@ function c62624720.initial_effect(c) ...@@ -26,7 +26,7 @@ function c62624720.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
...@@ -71,17 +71,6 @@ function c62624720.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,17 +71,6 @@ function c62624720.operation(e,tp,eg,ep,ev,re,r,rp)
local mct=Duel.GetMatchingGroupCount(c62624720.cfilter,tp,LOCATION_MZONE,0,nil) local mct=Duel.GetMatchingGroupCount(c62624720.cfilter,tp,LOCATION_MZONE,0,nil)
Duel.Recover(tp,mct*500,0x40) Duel.Recover(tp,mct*500,0x40)
end end
if ct>=4 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>2 then ft=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c62624720.spfilter2,tp,LOCATION_DECK,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
if ct>=5 then if ct>=5 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -95,9 +84,6 @@ function c62624720.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,9 +84,6 @@ function c62624720.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c62624720.spfilter2(c,e,tp)
return c:IsRace(RACE_BEAST) and c:IsLevel(4) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c62624720.indtg(e,c) function c62624720.indtg(e,c)
return c:IsSetCard(0x6d1) return c:IsSetCard(0x6d1)
end end
......
...@@ -5,31 +5,29 @@ function c62624725.initial_effect(c) ...@@ -5,31 +5,29 @@ function c62624725.initial_effect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--atk/def --extra summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62624725,0))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x6d1)) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x6d1))
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(c62624725.val)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e11=e1:Clone() --atk/def
e11:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e11)
--lv change
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62624725,2)) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x6d1))
e2:SetTarget(c62624725.lvtg) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetOperation(c62624725.lvop) e2:SetValue(c62624725.val)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e22)
--sset --sset
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(62624725,3))
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
...@@ -41,35 +39,7 @@ function c62624725.cfilter(c) ...@@ -41,35 +39,7 @@ function c62624725.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6d1) return c:IsFaceup() and c:IsSetCard(0x6d1)
end end
function c62624725.val(e,c) function c62624725.val(e,c)
return Duel.GetMatchingGroupCount(c62624725.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)*50 return Duel.GetMatchingGroupCount(c62624725.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)*100
end
function c62624725.filter(c)
return c:IsFaceup() and c:IsSetCard(0x6d1) and c:IsLevelAbove(1)
end
function c62624725.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c62624725.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c62624725.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c62624725.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
local op=0
if tc:IsLevel(1) then op=Duel.SelectOption(tp,aux.Stringid(62624725,4))
else op=Duel.SelectOption(tp,aux.Stringid(62624725,4),aux.Stringid(62624725,5)) end
e:SetLabel(op)
end
function c62624725.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
if e:GetLabel()==0 then
e1:SetValue(1)
else e1:SetValue(-1) end
tc:RegisterEffect(e1)
end
end end
function c62624725.sfilter(c) function c62624725.sfilter(c)
return c:IsSetCard(0x6d1) and not c:IsCode(62624725) and c:IsType(0x2) and c:IsSSetable() return c:IsSetCard(0x6d1) and not c:IsCode(62624725) and c:IsType(0x2) and c:IsSSetable()
......
--世界猫咪联盟·Dawn
function c62625105.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,62625105)
e1:SetCondition(c62625105.negcon)
e1:SetTarget(c62625105.negtg)
e1:SetOperation(c62625105.negop)
c:RegisterEffect(e1)
end
function c62625105.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6d1) and c:IsType(TYPE_SYNCHRO)
end
function c62625105.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c62625105.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c62625105.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c62625105.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
and c:IsLevelAbove(5) and Duel.SelectYesNo(tp,aux.Stringid(62625105,0)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-4)
c:RegisterEffect(e1)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c62625105.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c62625105.splimit(e,c)
return not c:IsSetCard(0x6d1)
end
\ No newline at end of file
--漂泊宇宙-蓝点尘埃
function c62625110.initial_effect(c)
c:SetSPSummonOnce(62625110)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,62625110)
e1:SetCondition(c62625110.spcon)
e1:SetCost(c62625110.spcost)
e1:SetTarget(c62625110.sptg)
e1:SetOperation(c62625110.spop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62625110,0))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1)
e2:SetTarget(c62625110.distg)
e2:SetOperation(c62625110.disop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(62625110,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c62625110.cost)
e3:SetTarget(c62625110.target)
e3:SetOperation(c62625110.operation)
c:RegisterEffect(e3)
end
function c62625110.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c62625110.cfilter(c,tp)
return c:IsCode(62624140) and Duel.GetMZoneCount(tp,c)>0
end
function c62625110.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c62625110.cfilter,1,REASON_COST,true,nil,tp) end
local g=Duel.SelectReleaseGroupEx(tp,c62625110.cfilter,1,1,REASON_COST,true,nil,tp)
Duel.Release(g,REASON_COST)
end
function c62625110.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c62625110.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
end
end
function c62625110.disfilter(c)
return c:IsAbleToDeck() and aux.NegateAnyFilter(c)
end
function c62625110.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c62625110.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c62625110.disfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,c62625110.disfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c62625110.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
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
Duel.SendtoDeck(tc,nil,2,0x40)
end
end
function c62625110.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c62625110.spfilter(c,e,tp)
return c:IsCode(62624140) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c62625110.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c62625110.spfilter,tp,0x13,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13)
end
function c62625110.operation(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(c62625110.spfilter),tp,0x13,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--世界猫咪联盟·Min
function c62625115.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x6d1),aux.NonTuner(Card.IsSetCard,0x6d1),1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c62625115.thcon)
e1:SetTarget(c62625115.thtg)
e1:SetOperation(c62625115.thop)
c:RegisterEffect(e1)
--untargetable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_GRAVE+LOCATION_REMOVED,0)
e2:SetTarget(aux.TRUE)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,62625115)
e3:SetCondition(c62625115.negcon)
e3:SetCost(c62625115.negcost)
e3:SetTarget(aux.nbtg)
e3:SetOperation(c62625115.negop)
c:RegisterEffect(e3)
end
function c62625115.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c62625115.thfilter(c)
return c:IsAbleToHand()
end
function c62625115.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c62625115.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c62625115.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c62625115.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c62625115.xyzfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6d1) and c:IsType(TYPE_XYZ)
end
function c62625115.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT) and tc:IsLocation(LOCATION_HAND) then
local rg=Group.CreateGroup()
local xg=Duel.GetMatchingGroup(c62625115.xyzfilter,tp,LOCATION_MZONE,0,nil)
if xg:GetCount()<1 then return end
for tc in aux.Next(xg) do
local hg=tc:GetOverlayGroup()
if hg:GetCount()>0 then
rg:Merge(hg)
end
end
if rg:FilterCount(Card.IsAbleToHand,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(62625115,0)) then
Duel.BreakEffect()
local thg=rg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
Duel.SendtoHand(thg,nil,REASON_EFFECT)
local sg=thg:Filter(Card.IsControler,nil,tp)
if sg:GetCount()>0 then
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
local og=thg:Filter(Card.IsControler,nil,1-tp)
if og:GetCount()>0 then
Duel.ConfirmCards(tp,og)
Duel.ShuffleHand(1-tp)
end
end
end
end
function c62625115.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c62625115.cfilter(c)
return c:IsLevel(10) and c:IsType(0x6d0) and c:IsSetCard(0x6d0) and c:IsAbleToGraveAsCost()
end
function c62625115.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c62625115.cfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c62625115.cfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c62625115.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--世界猫咪联盟·Fam
function c62625120.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x6d1),4,2)
c:EnableReviveLimit()
--summon limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c62625120.regcon)
e0:SetOperation(c62625120.regop)
c:RegisterEffect(e0)
local e00=Effect.CreateEffect(c)
e00:SetType(EFFECT_TYPE_SINGLE)
e00:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e00:SetCode(EFFECT_SPSUMMON_CONDITION)
e00:SetValue(c62625120.splimit)
c:RegisterEffect(e00)
if not c62625120.global_check then
c62625120.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c62625120.checkop)
Duel.RegisterEffect(ge1,0)
end
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c62625120.target)
e1:SetOperation(c62625120.operation)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c62625120.discon)
e2:SetCost(c62625120.discost)
e2:SetTarget(c62625120.distg)
e2:SetOperation(c62625120.disop)
c:RegisterEffect(e2)
end
function c62625120.filter(c,mc)
return c:IsSetCard(0x6d1) and (c:IsAbleToHand() or (mc:IsType(TYPE_XYZ) and c:IsCanOverlay()))
end
function c62625120.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c62625120.filter,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
end
function c62625120.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c62625120.filter,tp,LOCATION_GRAVE,0,1,1,nil,c)
local tc=g:GetFirst()
if tc then
if c:IsType(TYPE_XYZ) and tc:IsCanOverlay() and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,aux.Stringid(62625120,0))==1) then
Duel.Overlay(c,Group.FromCards(tc))
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c62625120.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp
end
function c62625120.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c62625120.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c62625120.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c62625120.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if not tc:IsSetCard(0x6d1) then
if tc:IsSummonPlayer(0) then p1=true else p2=true end
end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,62625120,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,62625120,RESET_PHASE+PHASE_END,0,1) end
end
function c62625120.xyzfilter(c)
return Duel.GetFlagEffect(c:GetControler(),62625120)==0 and c:IsSetCard(0x6d1)
end
function c62625120.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c62625120.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c62625120.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function c62625120.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x6d1)
end
function c62625120.splimit(e,se,sp,st,spos,tgp)
return bit.band(st,SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ or Duel.GetFlagEffect(tgp,62625120)==0
end
\ No newline at end of file
--世界猫咪联盟·Gel
function c62625125.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,c62625125.mfilter,8,2,c62625125.ovfilter,aux.Stringid(62625125,0))
--summon limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c62625125.regcon)
e0:SetOperation(c62625125.regop)
c:RegisterEffect(e0)
local e00=Effect.CreateEffect(c)
e00:SetType(EFFECT_TYPE_SINGLE)
e00:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e00:SetCode(EFFECT_SPSUMMON_CONDITION)
e00:SetValue(c62625125.splimit)
c:RegisterEffect(e00)
if not c62625125.global_check then
c62625125.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c62625125.checkop)
Duel.RegisterEffect(ge1,0)
end
--material
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c62625125.mtcon)
e1:SetTarget(c62625125.mttg)
e1:SetOperation(c62625125.mtop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c62625125.cost)
e2:SetTarget(c62625125.target)
e2:SetOperation(c62625125.operation)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c62625125.reptg)
e3:SetValue(c62625125.repval)
c:RegisterEffect(e3)
end
function c62625125.mfilter(c)
return c:IsSetCard(0x6d1)
end
function c62625125.ovfilter(c)
return c:IsFaceup() and c:IsCode(62625120)
end
function c62625125.mtcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c62625125.mtfilter(c,e)
return c:IsCanOverlay() and c:IsCanBeEffectTarget(e)
end
function c62625125.mttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if chkc then return g:IsContains(chkc) and c62625125.mtfilter(chkc,e) end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and g:IsExists(c62625125.mtfilter,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tg=g:FilterSelect(tp,c62625125.mtfilter,1,2,nil,e)
Duel.SetTargetCard(tg)
end
function c62625125.matfilter(c,e)
return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and c:IsCanOverlay()
end
function c62625125.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c62625125.matfilter,nil,e)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
tc=g:GetNext()
end
Duel.Overlay(c,g)
end
end
function c62625125.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST)
end
function c62625125.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local b1=Duel.IsPlayerCanDraw(tp,2)
local b2=true
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(62625125,1)},
{b2,aux.Stringid(62625125,2)})
e:SetLabel(op)
end
function c62625125.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
if op==1 then
if Duel.Draw(tp,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(p)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(p,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,1,nil)
if #sg>0 then
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)
end
end
elseif op==2 then
--cannot set
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_MSET)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,1)
e4:SetTarget(aux.TRUE)
e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e4,tp)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_SSET)
Duel.RegisterEffect(e5,tp)
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_TURN_SET)
Duel.RegisterEffect(e6,tp)
local e7=e4:Clone()
e7:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e7:SetTarget(c62625125.sumlimit)
Duel.RegisterEffect(e7,tp)
end
end
function c62625125.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function c62625125.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0x6d1) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c62625125.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c62625125.repfilter,1,nil,tp)
and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
end
return false
end
function c62625125.repval(e,c)
return c62625125.repfilter(c,e:GetHandlerPlayer())
end
function c62625125.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if not tc:IsSetCard(0x6d1) then
if tc:IsSummonPlayer(0) then p1=true else p2=true end
end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,62625125,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,62625125,RESET_PHASE+PHASE_END,0,1) end
end
function c62625125.xyzfilter(c)
return Duel.GetFlagEffect(c:GetControler(),62625125)==0 and c:IsSetCard(0x6d1)
end
function c62625125.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c62625125.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c62625125.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function c62625125.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x6d1)
end
function c62625125.splimit(e,se,sp,st,spos,tgp)
return bit.band(st,SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ or Duel.GetFlagEffect(tgp,62625125)==0
end
\ No newline at end of file
--世界猫咪联盟:伪和平
function c62625130.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,62625130)
e1:SetCondition(c62625130.condition)
e1:SetTarget(c62625130.target)
e1:SetOperation(c62625130.operation)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,62625130)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c62625130.tdtg)
e2:SetOperation(c62625130.tdop)
c:RegisterEffect(e2)
end
function c62625130.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x6d1)
end
function c62625130.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c62625130.cfilter,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c62625130.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c62625130.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.NegateActivation(ev) then return end
Duel.BreakEffect()
local ct=Duel.GetMatchingGroupCount(aux.AND(Card.IsFaceup,Card.IsSetCard),tp,LOCATION_MZONE,0,nil,0x6d1)
if ct>=3 then
if Duel.Recover(tp,3000,REASON_EFFECT)>0 and Duel.Recover(1-tp,3000,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetValue(c62625130.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
if ct>=5 then
local ct1=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ct2=6-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local ck=0
if ct1>0 and Duel.Draw(tp,ct1,REASON_EFFECT)>0 then ck=1 end
if ct2>0 and Duel.Draw(1-tp,ct2,REASON_EFFECT)>0 then ck=1 end
if ck==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,1)
e1:SetTarget(c62625130.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function c62625130.aclimit(e,re,tp)
return (re:GetActivateLocation()==LOCATION_HAND or re:GetActivateLocation()==LOCATION_MZONE)
and re:IsActiveType(TYPE_MONSTER)
end
function c62625130.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA) and c:IsType(TYPE_MONSTER)
end
function c62625130.tdfilter(c)
return c:IsSetCard(0x6d1) and not c:IsCode(62625130) and c:IsAbleToDeck()
end
function c62625130.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c62625130.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c62625130.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c62625130.tdfilter,tp,LOCATION_GRAVE,0,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
end
function c62625130.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain()
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--世界猫咪联盟:杀戮光环!
function c62625135.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,62625135)
e1:SetCondition(c62625135.condition)
e1:SetTarget(c62625135.target)
e1:SetOperation(c62625135.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,62625135)
e2:SetCost(aux.bfgcost)
e2:SetCondition(c62625135.descon)
e2:SetTarget(c62625135.destg)
e2:SetOperation(c62625135.desop)
c:RegisterEffect(e2)
end
function c62625135.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x6d1)
end
function c62625135.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c62625135.cfilter,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c62625135.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c62625135.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c62625135.descon(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(aux.AND(Card.IsCode,Card.IsFaceup),tp,LOCATION_MZONE,0,1,nil,62624720)
local b2=Duel.IsExistingMatchingCard(aux.AND(Card.IsCode,Card.IsFaceup),tp,LOCATION_MZONE,0,1,nil,62625115)
return b1 and b2
end
function c62625135.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,1-tp,LOCATION_MZONE)
end
function c62625135.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
if #g>0 then
local ct=Duel.Destroy(g,0x40)
if ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x6d1))
e1:SetValue(ct)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
\ No newline at end of file
--<复兴官>的万圣惊魂夜之逝者请安息 --<复兴官>的万圣惊魂夜之逝者请安息
function c62699865.initial_effect(c) function c62699865.initial_effect(c)
c:SetSPSummonOnce(62699865)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -43,6 +44,7 @@ function c62699865.initial_effect(c) ...@@ -43,6 +44,7 @@ function c62699865.initial_effect(c)
e3:SetTarget(c62699865.negtg) e3:SetTarget(c62699865.negtg)
e3:SetOperation(c62699865.negop) e3:SetOperation(c62699865.negop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
aux.EnableChangeCode(c,62699895,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
end end
function c62699865.spLimit(e,se,sp,st) function c62699865.spLimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x6df) or not e:GetHandler():IsLocation(LOCATION_EXTRA) return se:GetHandler():IsSetCard(0x6df) or not e:GetHandler():IsLocation(LOCATION_EXTRA)
......
--命运之女神 魔女·Erwin
function c62699885.initial_effect(c)
c:SetUniqueOnField(1,0,62699885)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,4,c62699885.lcheck)
--cannot be material
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_SINGLE)
e01:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e01:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e01:SetValue(1)
c:RegisterEffect(e01)
local e02=e01:Clone()
e02:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e02)
local e03=e01:Clone()
e03:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e03)
--summon limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c62699885.regcon)
e0:SetOperation(c62699885.regop)
c:RegisterEffect(e0)
--counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c62699885.condition)
e1:SetTarget(c62699885.target)
e1:SetOperation(c62699885.operation)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c62699885.tdcon)
e2:SetTarget(c62699885.tdtg)
e2:SetOperation(c62699885.tdop)
c:RegisterEffect(e2)
--disable and to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetCondition(c62699885.discon)
e3:SetTarget(c62699885.distg)
e3:SetOperation(c62699885.disop)
c:RegisterEffect(e3)
end
function c62699885.matfilter(c)
return c:GetCounter(0x16df)>0
end
function c62699885.lcheck(g,lc)
return g:IsExists(c62699885.matfilter,1,nil)
end
function c62699885.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c62699885.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c62699885.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function c62699885.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x6df) and c:IsLocation(LOCATION_EXTRA)
end
function c62699885.condition(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re)
and Duel.GetTurnCount()>=4
end
function c62699885.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsCanAddCounter(0x16df,1) end
end
function c62699885.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) then
Duel.Hint(HINT_CARD,0,62699885)
rc:AddCounter(0x16df,1)
if rc:IsType(0x1) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c62699885.ctrcon)
e1:SetValue(RACE_INSECT)
rc:RegisterEffect(e1)
end
end
end
function c62699885.ctrcon(e)
return e:GetHandler():GetCounter(0x16df)>0
end
function c62699885.tdcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:GetHandler():GetCounter(0x16df)>0
and Duel.GetTurnCount()>=2
end
function c62699885.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0x30,0x30,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0x30,0x30,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c62699885.tdop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(62699885,0))
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0x30,0x30,1,nil) then
Duel.Hint(HINT_CARD,0,62699885)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0x30,0x30,1,1,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
function c62699885.discon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return not (rc:GetCounter(0x16df)>0 or rc:IsSetCard(0x6df))
and Duel.IsChainDisablable(ev)
and Duel.GetTurnCount()>=6
end
function c62699885.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c62699885.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,62699885)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
rc:CancelToGrave()
Duel.SendtoDeck(rc,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--沉溺的旅者
function c62699890.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,62699890)
e1:SetTarget(c62699890.target)
e1:SetOperation(c62699890.operation)
c:RegisterEffect(e1)
--code
aux.EnableChangeCode(c,62699999,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK+LOCATION_HAND)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,62699890+1)
e3:SetCondition(c62699890.thcon)
e3:SetTarget(c62699890.thtg)
e3:SetOperation(c62699890.thop)
c:RegisterEffect(e3)
end
function c62699890.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,62699890)==0
end
function c62699890.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6df) and c:IsAbleToHand()
end
function c62699890.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c62699890.thfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToHand()
and Duel.IsExistingTarget(c62699890.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c62699890.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g+e:GetHandler(),2,0,0)
end
function c62699890.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoHand(c,nil,0x40)
end
end
function c62699890.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c62699890.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x6df) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function c62699890.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c62699890.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c62699890.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c62699890.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c62699890.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c62699890.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c62699890.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
Duel.RegisterFlagEffect(tp,62699890,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
--<复兴官>0001
function c62699895.initial_effect(c)
aux.AddCodeList(c,0x16df)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,62699895)
e1:SetCost(c62699895.imcost)
e1:SetTarget(c62699895.imtg)
e1:SetOperation(c62699895.imop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62699895,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,62699895)
e2:SetTarget(c62699895.destg)
e2:SetOperation(c62699895.desop)
c:RegisterEffect(e2)
end
function c62699895.imcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c62699895.imfilter(c)
return c:IsFaceup() and c:IsType(0x6)
end
function c62699895.imtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c62699895.imfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c62699895.imfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c62699895.imfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
function c62699895.imop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c62699895.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
tc:RegisterEffect(e1)
end
end
function c62699895.efilter(e,re)
return e:GetHandler()~=re:GetOwner()
end
function c62699895.desfilter(c)
return c:GetCounter(0x16df)>0
end
function c62699895.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and c62699895.desfilter(chkc) end
if chk==0 then return c:IsAbleToHand()
and Duel.IsExistingTarget(c62699895.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c62699895.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c62699895.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoHand(c,nil,0x40)
end
end
end
\ No newline at end of file
--凛冽之冬 沙银
function c62699950.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,62699950)
e1:SetTarget(c62699950.eqtg)
e1:SetOperation(c62699950.eqop)
c:RegisterEffect(e1)
--code
aux.EnableChangeCode(c,62699998,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK+LOCATION_HAND)
--Atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(-1000)
c:RegisterEffect(e3)
local e33=e3:Clone()
e33:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e33)
--actlimit
local e34=Effect.CreateEffect(c)
e34:SetType(EFFECT_TYPE_FIELD)
e34:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e34:SetRange(LOCATION_SZONE)
e34:SetCode(EFFECT_CANNOT_ACTIVATE)
e34:SetTargetRange(0,1)
e34:SetCondition(c62699950.actcon)
e34:SetValue(1)
c:RegisterEffect(e34)
--chain atk
local e35=Effect.CreateEffect(c)
e35:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e35:SetCode(EVENT_DAMAGE_STEP_END)
e35:SetRange(LOCATION_SZONE)
e35:SetCondition(c62699950.chacon)
e35:SetCost(c62699950.chacost)
e35:SetOperation(c62699950.chaop)
c:RegisterEffect(e35)
end
function c62699950.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6df)
end
function c62699950.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c62699950.eqfilter(chkc)end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and c:CheckUniqueOnField(tp)
and Duel.IsExistingTarget(c62699950.eqfilter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c62699950.eqfilter,tp,LOCATION_MZONE,0,1,1,c)
end
function c62699950.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c62699950.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
function c62699950.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c62699950.actcon(e)
local tc=e:GetHandler():GetEquipTarget()
return tc~=nil and (Duel.GetAttacker()==tc or Duel.GetAttackTarget()==tc)
end
function c62699950.chacon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return Duel.GetAttacker()==ec and ec:IsChainAttackable()
end
function c62699950.chacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c62699950.chaop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
\ No newline at end of file
--摇落之秋 尤利西斯
function c62699960.initial_effect(c)
aux.AddCodeList(c,0x16df)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62699960,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetCountLimit(1,62699960)
e1:SetCondition(c62699960.ctcon)
e1:SetTarget(c62699960.cttg)
e1:SetOperation(c62699960.ctop)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--spsummon from szone
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(62699960,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCountLimit(1,62699960+1)
e3:SetCondition(c62699960.spcon)
e3:SetTarget(c62699960.sptg)
e3:SetOperation(c62699960.spop)
c:RegisterEffect(e3)
--sum limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e5:SetTargetRange(1,0)
e5:SetTarget(c62699960.sumlimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(EFFECT_CANNOT_SUMMON)
e6:SetTargetRange(1,0)
e6:SetTarget(c62699960.sumlimit)
c:RegisterEffect(e6)
--to grave
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_TOGRAVE)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_SUMMON_SUCCESS)
e7:SetRange(LOCATION_MZONE)
e7:SetOperation(c62699960.tgop)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e9)
end
function c62699960.confilter(c,tp)
return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsCanAddCounter(0x16df,1)
end
function c62699960.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c62699960.confilter,1,nil,tp)
end
function c62699960.tfilter(c,g)
return g:IsContains(c)
end
function c62699960.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c62699960.confilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c62699960.tfilter(chkc,g) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c62699960.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,g) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c62699960.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g)
end
function c62699960.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:AddCounter(0x16df,1) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c62699960.ctrcon)
e1:SetValue(RACE_INSECT)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(100)
tc:RegisterEffect(e2)
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
end
function c62699960.ctrcon(e)
return e:GetHandler():GetCounter(0x16df)>0
end
function c62699960.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and e:GetHandler():GetType()==TYPE_TRAP+TYPE_CONTINUOUS
end
function c62699960.desfilter(c,tp)
return c:IsFaceup() and c:GetCounter(0x16df)>0 and Duel.GetMZoneCount(tp,c)>0
end
function c62699960.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c62699960.desfilter(chkc,tp) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c62699960.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c62699960.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c62699960.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c62699960.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(62699997)
end
function c62699960.tgfilter(c)
return c:IsCode(62699997) and c:IsFaceup()
end
function c62699960.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c62699960.tgfilter,tp,LOCATION_MZONE,0,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--炽烈之夏 尤利
function c62699970.initial_effect(c)
aux.AddCodeList(c,0x16df)
--add counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER+CATEGORY_TOGRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,62699970)
e1:SetTarget(c62699970.target)
e1:SetOperation(c62699970.operation)
c:RegisterEffect(e1)
--Code
aux.EnableChangeCode(c,62699997,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK+LOCATION_HAND)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,62699970+1)
e3:SetCondition(c62699970.tgcon)
e3:SetTarget(c62699970.tgtg)
e3:SetOperation(c62699970.tgop)
c:RegisterEffect(e3)
end
function c62699970.filter(c,tp)
return c:IsCanAddCounter(0x16df,1)
end
function c62699970.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c62699970.filter(chkc) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c62699970.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c62699970.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c62699970.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:AddCounter(0x16df,1) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c62699970.ctrcon)
e1:SetValue(RACE_INSECT)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(100)
tc:RegisterEffect(e2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
end
end
function c62699970.ctrcon(e)
return e:GetHandler():GetCounter(0x16df)>0
end
function c62699970.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS)
end
function c62699970.tgfilter(c,tp)
return c:GetCounter(0x16df)>0 and Duel.GetMZoneCount(tp,c)>0
end
function c62699970.spfilter(c,e,tp)
return c:IsSetCard(0x6df) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c62699970.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c62699970.tgfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c62699970.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c62699970.spfilter,tp,LOCATION_SZONE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c62699970.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_SZONE+LOCATION_HAND)
end
function c62699970.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c62699970.spfilter,tp,LOCATION_SZONE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
\ No newline at end of file
--魔女的恶作剧
function c62699980.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c62699980.ffilter,2,true)
--draw and destory
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,62699980)
e1:SetTarget(c62699980.ddtg)
e1:SetOperation(c62699980.ddop)
c:RegisterEffect(e1)
--tribute summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,62699980+1)
e2:SetCondition(c62699980.drcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c62699980.drtg)
e2:SetOperation(c62699980.drop)
c:RegisterEffect(e2)
end
function c62699980.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x6df) and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end
function c62699980.ddtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.IsPlayerCanDraw(1-tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,1-tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,1-tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
Duel.SetChainLimit(c62699980.chainlm)
end
function c62699980.chainlm(re,rp,tp)
return tp~=rp or re:GetHandler():IsSetCard(0x6df)
end
function c62699980.ddop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local g2=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if g:GetCount()==0 or g2:GetCount()==0 then return end
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.SendtoDeck(g2,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
Duel.BreakEffect()
Duel.Draw(tp,g:GetCount(),REASON_EFFECT)
Duel.Draw(1-tp,g2:GetCount(),REASON_EFFECT)
end
function c62699980.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) and not c:IsReason(REASON_DRAW)
end
function c62699980.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and eg:IsExists(c62699980.cfilter,1,nil,1-tp)
end
function c62699980.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1)
and Duel.IsPlayerCanSendtoDeck(tp) and Duel.IsPlayerCanSendtoDeck(1-tp) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,0,LOCATION_HAND)
end
function c62699980.drop(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.Draw(tp,1,REASON_EFFECT)
local h2=Duel.Draw(1-tp,1,REASON_EFFECT)
if h1>0 or h2>0 then Duel.BreakEffect() end
if h1>0 then
Duel.ShuffleHand(tp)
local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local sg1=g1:RandomSelect(0,1)
Duel.SendtoDeck(sg1,nil,2,REASON_EFFECT)
end
if h2>0 then
Duel.ShuffleHand(1-tp)
local g2=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
local sg2=g2:RandomSelect(0,1)
Duel.SendtoDeck(sg2,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--和熙之春 艾文
function c62699990.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62699990,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_REMOVED)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,62699990)
e1:SetTarget(c62699990.thtg)
e1:SetOperation(c62699990.thop)
c:RegisterEffect(e1)
--
aux.EnableChangeCode(c,62699999,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND+LOCATION_DECK)
--half damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
c:RegisterEffect(e3)
--atk
local e34=Effect.CreateEffect(c)
e34:SetCategory(CATEGORY_ATKCHANGE)
e34:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e34:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e34:SetRange(LOCATION_SZONE)
e34:SetCondition(c62699990.atkcon)
e34:SetOperation(c62699990.atkop)
c:RegisterEffect(e34)
--special summon
local e35=Effect.CreateEffect(c)
e35:SetCategory(CATEGORY_RECOVER)
e35:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e35:SetCode(EVENT_BATTLE_DAMAGE)
e35:SetRange(LOCATION_SZONE)
e35:SetCondition(c62699990.reccon)
e35:SetTarget(c62699990.rectg)
e35:SetOperation(c62699990.recop)
c:RegisterEffect(e35)
end
function c62699990.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6df) and c:IsAbleToHand()
end
function c62699990.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c62699990.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c62699990.thfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c62699990.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c62699990.spfilter(c,e,tp)
return c:IsSetCard(0x6df) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c62699990.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c62699990.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(62699990,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c62699990.spfilter,tp,LOCATION_HAND,0,1,1,aux.ExceptThisCard(e),e,tp)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
if not Duel.Equip(tp,c,sg:GetFirst()) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c62699990.eqlimit)
e1:SetLabelObject(sg:GetFirst())
c:RegisterEffect(e1)
end
end
end
end
function c62699990.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c62699990.eftg(e,c)
return c:IsType(TYPE_MONSTER) and c:GetEquipGroup():IsContains(e:GetHandler())
end
function c62699990.atktg(e,c)
return c==e:GetHandler():GetBattleTarget()
end
function c62699990.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local tc=ec:GetBattleTarget()
return ec and tc and tc:IsFaceup() and tc:IsControler(1-tp)
end
function c62699990.atkop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local tc=ec:GetBattleTarget()
if tc and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1)
end
end
function c62699990.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst()==e:GetHandler():GetEquipTarget()
end
function c62699990.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function c62699990.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
...@@ -154,6 +154,7 @@ ...@@ -154,6 +154,7 @@
!setname 0x6904 阿巴阿巴 !setname 0x6904 阿巴阿巴
!setname 0x3907 幻想时间 !setname 0x3907 幻想时间
!setname 0x90b 赛博 !setname 0x90b 赛博
!setname 0xc904 芳青之梦
!counter 0x903 自然界指示物 !counter 0x903 自然界指示物
!counter 0x1904 阿巴阿巴指示物 !counter 0x1904 阿巴阿巴指示物
......
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