Commit 0f453807 authored by tsubaki's avatar tsubaki

1.999zz22试做更新

parent 4fae1324
Pipeline #19711 passed with stage
in 53 seconds
No preview for this file type
......@@ -44,11 +44,14 @@
!setname 0xaa6 濑笈叶
!setname 0xaa7 叠光
!setname 0x100 灵梦
!setname 0x101 矜羯罗
!setname 0x104e Lost
!setname 0x1011 灵符
!setname 0x1012 宝具
!setname 0x1013 夏彩
!setname 0x1014 结界
!setname 0xa26 星熊勇仪
!setname 0xa03 茨木华扇
!setname 0x110 露米娅
!setname 0x111 小恶魔
!setname 0x112 艾丽
......@@ -64,6 +67,7 @@
!setname 0x126 风神
!setname 0x127 鸦符
!setname 0x132 绵月
!setname 0x134 魅魔
!setname 0x137 妹红
!setname 0x138 梦幻馆
!setname 0x139 梦月幻月
......@@ -140,7 +144,7 @@
!setname 0x251b 云山
!setname 0x251c
!setname 0x251d 水蜜
!setname 0x251e 纳兹琳
!setname 0x251e 娜兹玲
!setname 0x252 命莲
!setname 0x252a 白莲
!setname 0x253 小槌
......@@ -156,6 +160,7 @@
!setname 0x262 黑谷山女
!setname 0x263 战车
!setname 0x267 瘴气
!setname 0x272 清兰
!setname 0x273 哆来咪
!setname 0x274 稀神探女
!setname 0x274f 玉符
......@@ -309,11 +314,16 @@
!setname 0x3e15 戎璎花
!setname 0x5e15 石符
!setname 0x3e1f 飘零之城
!setname 0x5e1f 蝶翼幻想
!setname 0x6e1f 飘零之音
!setname 0x9e1f 飘零之秘
!setname 0x1141 天恸
#冥月凌 - 231 0xf60-0xf6f
!counter 0x1f61 许逆指示物
!counter 0x1f62 伸冤者指示物
!counter 0x1f63 归乡指示物
!counter 0x1f64 狼影指示物
#setname 0x2141 魂之契源
!setname 0x6141 魂之契源
!setname 0xe39 2Pick技能
No preview for this file type
pics/99999010.jpg

55.9 KB | W: | H:

pics/99999010.jpg

48.3 KB | W: | H:

pics/99999010.jpg
pics/99999010.jpg
pics/99999010.jpg
pics/99999010.jpg
  • 2-up
  • Swipe
  • Onion skin
--巨力锤
function c10901.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c10901.cost)
e1:SetTarget(c10901.target)
e1:SetOperation(c10901.activate)
c:RegisterEffect(e1)
--exsummon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e4:SetRange(LOCATION_GRAVE)
e4:SetTarget(c10901.tg)
e4:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
c:RegisterEffect(e4)
end
function c10901.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local fa=Duel.GetFlagEffect(tp,10901)
if chk==0 then return fa==0 end
Duel.RegisterFlagEffect(tp,10901,RESET_PHASE+PHASE_END,0,3)
end
function c10901.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c10901.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetTarget(c10901.tg)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(c10901.efilter)
Duel.RegisterEffect(e1,tp)
end
function c10901.tg(e,c)
return c:IsSetCard(0xaa2) or c:IsSetCard(0x272) or c:IsSetCard(0x259)
end
function c10901.efilter(e,c)
return c:GetAttack()*2
end
--悔念剑
function c10903.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c10903.target)
e1:SetOperation(c10903.activate)
c:RegisterEffect(e1)
end
function c10903.filter(c)
return (c:IsSetCard(0x101) or c:IsSetCard(0x275)) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c10903.tg(e,c)
local c=e:GetHandler()
return (c:IsSetCard(0x101) or c:IsSetCard(0x275)) and c:IsFaceup()
end
function c10903.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10903.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10903.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10903.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetTarget(c10903.tg)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(c10903.efilter)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(c10903.condition)
e2:SetOperation(c10903.operation)
Duel.RegisterEffect(e2,tp)
end
end
function c10903.efilter(e,re,rp)
return rp~=e:GetHandlerPlayer()
end
function c10903.cxfilter(c,tp)
return (c:IsSetCard(0x101) or c:IsSetCard(0x275)) and c:IsFaceup() and c:IsControler(tp)
end
function c10903.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:FilterCount(c10903.cxfilter,nil,tp)>0
end
function c10903.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,ev/2,REASON_EFFECT)
end
--星碎
function c10905.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c10905.eftg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_BATTLE)
e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(c10905.lpcon)
e6:SetOperation(c10905.lpop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(LOCATION_MZONE,0)
e7:SetTarget(c10905.eftg)
e7:SetLabelObject(e6)
c:RegisterEffect(e7)
end
function c10905.eftg(e,c)
return c:IsSetCard(0x134)
end
function c10905.lpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0 or e:GetHandler():GetAttackedCount()>0
end
function c10905.filter(c)
return ((c:IsSetCard(0x200) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x2024)) and c:IsAbleToHand()
end
function c10905.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10905.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--暗冥强击
function c10907.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c10907.activate)
c:RegisterEffect(e1)
end
function c10907.activate(e,tp,eg,ep,ev,re,r,rp)
--damage
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(c10907.dcon)
e1:SetOperation(c10907.dop)
Duel.RegisterEffect(e1,tp)
end
function c10907.cxfilter(c,tp)
return (c:IsSetCard(0xaa5) or c:IsSetCard(0xa26) or c:IsSetCard(0xa03)) and c:IsFaceup() and c:IsControler(tp)
end
function c10907.dcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:FilterCount(c10907.cxfilter,nil,tp)>0
end
function c10907.dop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*1.5)
end
--水流连打
function c10909.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetCondition(c10909.dcon)
e3:SetOperation(c10909.dop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c10909.eftg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c10909.eftg(e,c)
return c:IsSetCard(0x817) or c:IsSetCard(0x229) or c:IsSetCard(0x499)
end
function c10909.dcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler()==Duel.GetAttacker()
end
function c10909.dop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*1.5)
end
--尖刺防守
function c10911.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c10911.condition)
e1:SetTarget(c10911.target)
e1:SetOperation(c10911.activate)
c:RegisterEffect(e1)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(c10911.handcon)
c:RegisterEffect(e3)
end
function c10911.filter(c)
return (c:IsSetCard(0x300) or c:IsSetCard(0x514a)) and c:IsFaceup()
end
function c10911.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c10911.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
end
function c10911.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
local tg=Duel.GetFirstTarget()
local dmg=tg:GetAttack()/2
if Duel.GetMatchingGroupCount(c10911.filter,tp,LOCATION_MZONE,0,nil)>0 then
dmg=dmg*2
end
Duel.Damage(1-tp, dmg, REASON_EFFECT)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c10911.handcon(e)
return Duel.GetMatchingGroupCount(c10911.filter,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)>0
end
--群魔乱舞
function c10913.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c10913.activate)
c:RegisterEffect(e1)
end
function c10913.activate(e,tp,eg,ep,ev,re,r,rp)
--atkup
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_START)
e2:SetCondition(c10913.atkcon)
e2:SetOperation(c10913.atkop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
--atk change
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_BATTLED)
e6:SetCondition(c10913.condition)
e6:SetOperation(c10913.operation)
e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp)
end
function c10913.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
return (ac:IsSetCard(0x163) or ac:IsSetCard(0x275)) and ac:IsControler(tp) and bc and bc:GetAttack()~=bc:GetBaseAttack()
end
function c10913.atkop(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(ac:GetAttack()*2)
ac:RegisterEffect(e1)
end
function c10913.condition(e,tp,eg,ep,ev,re,r,rp)
local aa=Duel.GetAttacker()
return Duel.GetAttackTarget() and aa:IsControler(tp) and (aa:IsSetCard(0x163) or aa:IsSetCard(0x275))
end
function c10913.operation(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d:GetControler()==tp then d=Duel.GetAttacker() end
if not d:IsRelateToBattle() then return end
Duel.Hint(HINT_CARD, 0, 10913)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(d:GetAttack()/2)
e1:SetReset(RESET_EVENT+0x1fe0000)
d:RegisterEffect(e1)
end
--大扫除
function c10915.initial_effect(c)
--act
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10915,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c10915.tg1)
e1:SetOperation(c10915.op1)
c:RegisterEffect(e1)
end
function c10915.tfilter1(c,e,tp)
return (c:IsSetCard(0x527) or c:IsSetCard(0x251e)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10915.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10915.tfilter1,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c10915.dfilter(c)
return (c:IsType(TYPE_CONTINUOUS) or c:IsType(TYPE_FIELD)) and c:IsFaceup()
end
function c10915.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c10915.tfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
local lc=Duel.GetOperatedGroup():GetFirst()
if not lc then return end
local bg=Duel.GetMatchingGroup(c10915.dfilter, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, nil)
Duel.Destroy(bg,REASON_EFFECT)
end
end
--鼠数儿
function c10917.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c10917.con)
e1:SetTarget(c10917.tg)
e1:SetOperation(c10917.op)
c:RegisterEffect(e1)
end
function c10917.confilter(c)
return c:IsSetCard(0x251e) and c:IsFaceup()
end
function c10917.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp, LOCATION_MZONE, 0) == 1
end
function c10917.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c10917.confilter, tp, LOCATION_MZONE, 0, nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetTargetCard(g:GetFirst())
end
function c10917.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetCountLimit(9)
e1:SetCondition(c10917.elccon)
e1:SetOperation(c10917.eleop)
tc:RegisterEffect(e1)
end
function c10917.elccon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
return a and a==e:GetHandler()
end
function c10917.eleop(e,tp,eg,ep,ev,re,r,rp)
local d1,d2=Duel.TossDice(tp,2)
local ac=e:GetLabel()
if not ac then ac=0 end
if d1+d2 ~= 9 then
ac=ac+1
e:SetLabel(ac)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(ac)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e2)
end
end
--扫墓
function c10919.initial_effect(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetTarget(c10919.sptg)
e2:SetOperation(c10919.spop)
c:RegisterEffect(e2)
end
function c10919.tgfilter(c,e,tp)
return (c:IsSetCard(0x527) or c:IsSetCard(0x229)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10919.ctfilter(c)
return (c:IsRace(RACE_ZOMBIE) or c:IsRace(RACE_BEAST))
end
function c10919.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=0
local class=Duel.GetMatchingGroupCount(c10919.ctfilter, tp, LOCATION_GRAVE, 0, nil)
if class>2 then ct=math.floor(class/3) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>ct
and Duel.IsExistingMatchingCard(c10919.tgfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c10919.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=1
local class=Duel.GetMatchingGroupCount(c10919.ctfilter, tp, LOCATION_GRAVE, 0, nil)
if class>2 then ct=math.floor(class/3) end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<ct then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10919.tgfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ct,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--淘金潮
function c10921.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DIRECT_ATTACK)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c10921.eftg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_DRAW)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_BATTLE)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCondition(c10921.lpcon)
e6:SetOperation(c10921.lpop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(LOCATION_MZONE,0)
e7:SetTarget(c10921.eftg)
e7:SetLabelObject(e6)
c:RegisterEffect(e7)
end
function c10921.eftg(e,c)
return c:IsSetCard(0x251e) or c:IsSetCard(0x5779)
end
function c10921.shzfilter(c)
return (c:IsSetCard(0x100) or c:IsSetCard(0x6779)) and c:IsFaceup()
end
function c10921.lpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttackedCount()>0 or e:GetHandler():GetBattledGroupCount()>0
end
function c10921.filter(c)
return c:IsCode(10921) and c:IsFaceup()
end
function c10921.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10921.filter,tp,LOCATION_SZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Draw(tp,2,REASON_EFFECT)
local dg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if Duel.IsExistingMatchingCard(c10921.shzfilter, tp, 0, LOCATION_MZONE, 1, nil) and dg:GetCount()>0 then
local rg=dg:RandomSelect(tp,1)
Duel.SendtoGrave(rg, REASON_EFFECT)
end
end
end
--流水旋舞
function c10923.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,10923)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c10923.target)
e3:SetOperation(c10923.activate)
c:RegisterEffect(e3)
end
function c10923.filter(c)
return c:IsSetCard(0x9432) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c10923.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10923.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10923.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10923.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--闪焰高歌
function c10925.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,10925)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c10925.target)
e3:SetOperation(c10925.operation)
c:RegisterEffect(e3)
end
function c10925.filter(c,e,tp)
return c:IsSetCard(0x522) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10925.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10925.filter,tp,0x212,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c10925.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c10925.filter,tp,0x212,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--千变万花
function c10927.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--attack all
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetCondition(c10927.dcon)
e3:SetOperation(c10927.dop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c10927.eftg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetCondition(c10927.econ)
e6:SetValue(c10927.efilter)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(LOCATION_MZONE,0)
e7:SetTarget(c10927.eftg)
e7:SetLabelObject(e6)
c:RegisterEffect(e7)
end
function c10927.eftg(e,c)
return c:IsSetCard(0xc999)
end
function c10927.dcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler()==Duel.GetAttacker()
end
function c10927.dop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*1.5)
end
function c10927.econ(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c10927.efilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
--装饰
function c10929.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c10929.target1)
e1:SetOperation(c10929.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetTarget(c10929.target2)
c:RegisterEffect(e2)
end
function c10929.filter(c)
return c:IsSetCard(0xc999) and c:IsFaceup()
end
function c10929.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return not Duel.IsExistingMatchingCard(c10929.filter, tp, LOCATION_MZONE, 0, 1, nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c10929.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingMatchingCard(c10929.filter, tp, LOCATION_MZONE, 0, 1, nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c10929.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
local res=RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(res)
e1:SetValue(tc:GetBaseAttack()*2)
tc:RegisterEffect(e1)
end
--东花坊时雨✿多多良小伞
function c26330.initial_effect(c)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(26330,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,26330)
e3:SetCost(c26330.discost)
e3:SetTarget(c26330.sptg)
e3:SetOperation(c26330.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e4)
--flip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(26330,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,26331)
e2:SetCode(EVENT_FLIP)
e2:SetTarget(c26330.thtg)
e2:SetOperation(c26330.thop)
c:RegisterEffect(e2)
end
function c26330.cfilter(c)
return c:IsSetCard(0x306) and c:IsDiscardable()
end
function c26330.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard( c26330.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp, c26330.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c26330.pfilter(c)
return c:IsCanChangePosition() and c:IsFacedown()
end
function c26330.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c26330.pfilter, tp, LOCATION_MZONE, 0, 1, nil)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c26330.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c26330.pfilter, tp, LOCATION_MZONE, 0, nil)
if Duel.ChangePosition(g, POS_FACEUP_DEFENSE) > 0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
end
end
function c26330.filter(c)
return c:IsSetCard(0x229) and c:IsFaceup() and c:IsCanChangePosition()
end
function c26330.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c26330.filter, tp, LOCATION_MZONE, 0, e:GetHandler())
return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),tp,LOCATION_MZONE)
end
function c26330.thop(e,tp,eg,ep,ev,re,r,rp)
g=Duel.GetMatchingGroup(c26330.filter, tp, LOCATION_MZONE, 0, e:GetHandler())
if g:GetCount()>0 then
Duel.ChangePosition(g, POS_FACEDOWN_DEFENSE)
end
end
--妮娅
function c4114202.initial_effect(c)
--summon_search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114202,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c4114202.tg1)
e1:SetOperation(c4114202.op1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4114202,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,4114202)
e3:SetCost(c4114202.cost2)
e3:SetTarget(c4114202.tg2)
e3:SetOperation(c4114202.op2)
c:RegisterEffect(e3)
end
function c4114202.filter1(c)
return c:IsSetCard(0x6141) and c:IsAbleToHand()
end
function c4114202.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114202.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c4114202.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4114202.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c4114202.filter2(c)
return c:IsSetCard(0x6141) and c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function c4114202.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114202.filter2,tp,LOCATION_ONFIELD,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c4114202.filter2,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c4114202.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c4114202.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
\ No newline at end of file
--魂之契源
function c4114204.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114204,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c4114204.tg1)
e1:SetOperation(c4114204.op1)
c:RegisterEffect(e1)
local e1_1=e1:Clone()
e1_1:SetRange(LOCATION_GRAVE)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,4114224) and e:GetHandler():IsSetCard(0x6141) end)
c:RegisterEffect(e1_1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c4114204.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(c4114204.desop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(4114204,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c4114204.con2)
e4:SetTarget(c4114204.tg2)
e4:SetOperation(c4114204.op2)
c:RegisterEffect(e4)
end
function c4114204.filter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLevelBelow(4) or c:IsRankBelow(4))
end
function c4114204.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation(LOCATION_GRAVE) and chkc:GetControler(tp) and c4114204.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c4114204.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c4114204.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c4114204.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
c:SetCardTarget(tc)
end
Duel.SpecialSummonComplete()
end
function c4114204.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c4114204.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c4114204.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:GetHandler():IsSetCard(0x2141)
end
function c4114204.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c4114204.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e4)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(4114204,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetCountLimit(1)
e5:SetLabel(fid)
e5:SetLabelObject(tc)
e5:SetCondition(c4114204.endcon)
e5:SetOperation(c4114204.endop)
Duel.RegisterEffect(e5,tp)
end
end
function c4114204.endcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(4114204)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c4114204.endop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
--魂之契源-交织
function c4114206.initial_effect(c)
c:SetUniqueOnField(1,0,4114206)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114206,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e1_1=e1:Clone()
e1_1:SetRange(LOCATION_GRAVE)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,4114224) and e:GetHandler():IsSetCard(0x6141) end)
c:RegisterEffect(e1_1)
--Trap activate in set turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,4114206)
e2:SetTargetRange(LOCATION_SZONE,0)
c:RegisterEffect(e2)
--indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(c4114206.infilter)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c4114206.infilter(e,c)
return c:IsSetCard(0x2141) and not c:IsCode(4114206)
end
\ No newline at end of file
--魂之契源-晓夜
function c4114210.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114210,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e1_1=e1:Clone()
e1_1:SetRange(LOCATION_GRAVE)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,4114224) and e:GetHandler():IsSetCard(0x6141) end)
c:RegisterEffect(e1_1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(c4114210.con1)
e2:SetValue(1)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4114210,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c4114210.con2)
e3:SetTarget(c4114210.tg2)
e3:SetOperation(c4114210.op2)
c:RegisterEffect(e3)
end
function c4114210.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x6141)
end
function c4114210.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c4114210.filter1,e:GetHandlerPlayer(),LOCATION_SZONE,0,2,e:GetHandler())
end
function c4114210.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c4114210.filter2(c)
return c:IsSetCard(0x2141) and c:IsAbleToHand() and not c:IsCode(4114210)
end
function c4114210.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114210.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c4114210.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4114210.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--魂之契源-幻痛
function c4114212.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114212,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e1_1=e1:Clone()
e1_1:SetRange(LOCATION_GRAVE)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,4114224) and e:GetHandler():IsSetCard(0x6141) end)
c:RegisterEffect(e1_1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114212,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetTarget(c4114212.tg1)
e2:SetOperation(c4114212.op1)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4114212,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(3,4114212)
e3:SetCondition(c4114212.con2)
e3:SetTarget(c4114212.tg2)
e3:SetOperation(c4114212.op2)
c:RegisterEffect(e3)
end
function c4114212.filter1(c)
return c:IsSetCard(0x2141) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c4114212.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c4114212.filter1(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c4114212.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c4114212.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c4114212.op1(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if not og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then return end
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
function c4114212.con2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_TRAP+TYPE_SPELL) and re:IsActiveType(TYPE_CONTINUOUS) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c4114212.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(4114212)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,4114212,0x6141,TYPES_NORMAL_TRAP_MONSTER,700,500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) end
e:GetHandler():RegisterFlagEffect(4114212,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c4114212.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,4114212,0x6141,TYPES_NORMAL_TRAP_MONSTER,700,500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2,true)
end
end
\ No newline at end of file
--魂之契源-双子
function c4114214.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114214,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c4114214.cost1)
e1:SetTarget(c4114214.tg1)
e1:SetOperation(c4114214.op1)
c:RegisterEffect(e1)
local e1_1=e1:Clone()
e1_1:SetRange(LOCATION_GRAVE)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,4114224) and e:GetHandler():IsSetCard(0x6141) end)
c:RegisterEffect(e1_1)
--act in set turn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCondition(c4114214.con1)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,4114214)
e3:SetCondition(c4114214.con2)
e3:SetTarget(c4114214.tg2)
e3:SetOperation(c4114214.op2)
c:RegisterEffect(e3)
end
function c4114214.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c4114214.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,4114214,0x6141,TYPES_NORMAL_TRAP_MONSTER,700,500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c4114214.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,4114214,0x6141,TYPES_NORMAL_TRAP_MONSTER,700,500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
function c4114214.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x6141)
end
function c4114214.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c4114214.filter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function c4114214.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c4114214.filter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) and Duel.GetTurnPlayer()==tp
end
function c4114214.filter2(c)
return c:IsSetCard(0x2141) and c:IsAbleToGrave()
end
function c4114214.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114214.filter2,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c4114214.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c4114214.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and c:IsRelateToEffect(e) then
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.SSet(tp,c)
end
end
\ No newline at end of file
--魂之契源-荧火
function c4114216.initial_effect(c)
c:SetUniqueOnField(1,0,4114216)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114216,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c4114216.tg1)
e1:SetOperation(c4114216.op1)
c:RegisterEffect(e1)
local e1_1=e1:Clone()
e1_1:SetRange(LOCATION_GRAVE)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,4114224) and e:GetHandler():IsSetCard(0x6141) end)
c:RegisterEffect(e1_1)
--Attach
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114216,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c4114216.tg2)
e2:SetOperation(c4114216.op2)
c:RegisterEffect(e2)
end
function c4114216.filter1(c)
return c:IsSetCard(0x6141) and c:IsAbleToGrave()
end
function c4114216.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114216.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c4114216.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c4114216.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT)
end
end
function c4114216.filter2(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRace(RACE_SPELLCASTER)
end
function c4114216.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4114216.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c4114216.filter2,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x2141) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c4114216.filter2,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c4114216.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_GRAVE,0,1,1,nil,0x2141)
if g:GetCount()>0 then
Duel.Overlay(tc,g)
end
end
end
\ No newline at end of file
--魂之契源-花火
function c4114218.initial_effect(c)
c:SetUniqueOnField(1,0,4114218)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114218,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e1_1=e1:Clone()
e1_1:SetRange(LOCATION_GRAVE)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,4114224) and e:GetHandler():IsSetCard(0x6141) end)
c:RegisterEffect(e1_1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114218,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(c4114218.cost1)
e2:SetTarget(c4114218.tg1)
e2:SetOperation(c4114218.op1)
c:RegisterEffect(e2)
end
function c4114218.costfilter(c,tp)
return c:IsSetCard(0x6141) and c:IsAbleToGraveAsCost() and c:IsFaceup()
and Duel.IsExistingMatchingCard(c4114218.filter1,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c4114218.filter1(c,code)
return c:IsSetCard(0x2141) and not c:IsCode(code) and c:IsAbleToHand()
end
function c4114218.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114218.costfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c4114218.costfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
local tc1=tc:GetFirst()
e:SetLabel(tc1:GetCode())
Duel.SendtoGrave(tc1,REASON_COST)
end
function c4114218.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c4114218.op1(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4114218.filter1,tp,LOCATION_DECK,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--春之愫樱-妮娅
function c4114222.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,3)
c:EnableReviveLimit()
--atk def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c4114222.value)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114222,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(c4114222.con1)
e2:SetCost(c4114222.cost1)
e2:SetTarget(c4114222.tg1)
e2:SetOperation(c4114222.op1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(4114222,1))
e3:SetCondition(c4114222.con2)
e3:SetTarget(c4114222.tg2)
c:RegisterEffect(e3)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(4114222,2))
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c4114222.con3)
e4:SetTarget(c4114222.tg3)
e4:SetOperation(c4114222.op3)
c:RegisterEffect(e4)
end
function c4114222.filter4(c)
return c:IsSetCard(0x6141) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c4114222.value(e,c)
local g=Duel.GetMatchingGroup(c4114222.filter4,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct*150
end
function c4114222.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c4114222.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c4114222.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c4114222.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return count>=2 and Duel.GetDecktopGroup(tp,2):IsExists(Card.IsAbleToHand,1,nil) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
end
local num,num2,max,check=1,2,1,true
while check do
if count>=num2 and Duel.GetDecktopGroup(tp,num2):IsExists(Card.IsAbleToHand,1,nil) and e:GetHandler():CheckRemoveOverlayCard(tp,num,REASON_COST) then
max=num
else
check=nil
end
num=num+1
num2=num*2
end
local ct=e:GetHandler():RemoveOverlayCard(tp,1,max,REASON_COST)*2
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c4114222.costfilter(c)
return c:IsSetCard(0x6141) and c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function c4114222.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return count>=2 and Duel.GetDecktopGroup(tp,2):IsExists(Card.IsAbleToHand,1,nil) and Duel.IsExistingMatchingCard(c4114222.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
local num,num2,max,check=1,2,1,true
while check do
if count>=num2 and Duel.GetDecktopGroup(tp,num2):IsExists(Card.IsAbleToHand,1,nil) and Duel.IsExistingMatchingCard(c4114222.costfilter,tp,LOCATION_ONFIELD,0,num,nil) then
max=num
else
check=nil
end
num=num+1
num2=num*2
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c4114222.costfilter,tp,LOCATION_ONFIELD,0,1,max,nil)
local ct=g:GetCount()*2
Duel.SendtoGrave(g,REASON_COST)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c4114222.thfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c4114222.op1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.ConfirmDecktop(p,d)
local g=Duel.GetDecktopGroup(p,d)
if g:GetCount()>0 then
if g:IsExists(c4114222.thfilter,1,nil) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c4114222.thfilter,1,1,nil)
if sg:GetFirst():IsAbleToHand() then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sg)
Duel.ShuffleHand(p)
else
Duel.SendtoGrave(sg,REASON_RULE)
end
Duel.ShuffleDeck(p)
end
end
end
function c4114222.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:GetHandler():IsSetCard(0x2141)
end
function c4114222.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c4114222.op3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Draw(tp,1,REASON_EFFECT)
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(4114222,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c4114222.endcon)
e1:SetOperation(c4114222.endop)
Duel.RegisterEffect(e1,tp)
end
end
function c4114222.endcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(4114222)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c4114222.endop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
\ No newline at end of file
--夏之传承-妮娅
function c4114224.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2)
c:EnableReviveLimit()
--atk def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c4114224.value)
c:RegisterEffect(e1)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(4114224)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
if not c4114224.global_check then
c4114224.global_check=true
local ex1=Effect.CreateEffect(c)
ex1:SetType(EFFECT_TYPE_FIELD)
ex1:SetCode(EFFECT_ACTIVATE_COST)
ex1:SetRange(LOCATION_GRAVE)
ex1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
ex1:SetTargetRange(1,0)
ex1:SetTarget(c4114224.costtg)
ex1:SetCost(c4114224.costchk)
ex1:SetOperation(c4114224.costop)
local ex2=Effect.CreateEffect(c)
ex2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ex2:SetTargetRange(LOCATION_GRAVE,0)
ex2:SetCondition(c4114224.excon)
ex2:SetTarget(c4114224.extg)
ex2:SetLabelObject(ex1)
Duel.RegisterEffect(ex2,tp)
end
end
function c4114224.filter1(c)
return c:IsSetCard(0x6141) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c4114224.value(e,c)
local g=Duel.GetMatchingGroup(c4114224.filter1,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct*150
end
function c4114224.costtg(e,te,tp)
local c=te:GetHandler()
return c==e:GetHandler() and c:IsSetCard(0x6141) and c:IsType(TYPE_SPELL+TYPE_TRAP) and te:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c4114224.costfilter1(c)
return c:IsSetCard(0x6141) and c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function c4114224.costfilter2(c)
return c:IsOriginalCodeRule(4114224) and c:IsFaceup() and not c:IsDisabled() and not c:IsForbidden() and c:CheckRemoveOverlayCard(tp,1,REASON_COST)
end
function c4114224.costchk(e,c,tp)
return Duel.IsExistingMatchingCard(c4114224.costfilter1,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(c4114224.costfilter2,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,4114224) and Duel.GetFlagEffect(tp,4114225)==0
end
function c4114224.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,4114225,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_CARD,0,4114224)
Duel.Hint(HINT_SELECTMSG,0,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c4114224.costfilter1,tp,LOCATION_SZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,0,HINTMSG_TARGET)
local g2=Duel.SelectMatchingCard(tp,c4114224.costfilter2,tp,LOCATION_MZONE,0,1,1,nil)
local tg2=g2:GetFirst()
Duel.Hint(HINT_SELECTMSG,0,HINTMSG_REMOVEXYZ)
tg2:RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.SendtoGrave(g1,REASON_COST)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,false)
end
function c4114224.excon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,4114224)
end
function c4114224.extg(e,c)
return c:IsSetCard(0x6141) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetActivateEffect()
end
\ No newline at end of file
--秋之约束-妮娅
function c4114226.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,3)
c:EnableReviveLimit()
--atk def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c4114226.value)
c:RegisterEffect(e1)
--be material from grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114226,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetCost(c4114226.cost1)
e2:SetTarget(c4114226.tg1)
e2:SetOperation(c4114226.op1)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c4114226.con2)
e3:SetOperation(c4114226.op2)
c:RegisterEffect(e3)
end
function c4114226.filter4(c)
return c:IsSetCard(0x6141) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c4114226.value(e,c)
local g=Duel.GetMatchingGroup(c4114226.filter4,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct*150
end
function c4114226.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=not c:GetOverlayGroup()
local b2=c:GetOverlayGroup() and c:CheckRemoveOverlayCard(tp,1,REASON_COST)
if chk==0 then return b1 or b2 end
if b2 then
local g=c:GetOverlayGroup()
Duel.SendtoGrave(g,REASON_COST)
end
end
function c4114226.filter1(c)
return c:IsCanOverlay() and c:IsSetCard(0x2141)
end
function c4114226.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:GetLocation(LOCATION_GRAVE) and chkc:GetControler(tp) and c4114226.filter1(chkc) end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingTarget(c4114226.filter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectTarget(tp,c4114226.filter1,tp,LOCATION_GRAVE,0,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,g:GetCount(),tp,0)
end
function c4114226.filter2(c,e)
return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e)
end
function c4114226.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c4114226.filter2,nil,e)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
function c4114226.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetOverlayCount()>0 and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT))
end
function c4114226.op2(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(4114226,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetCondition(c4114226.con3)
e1:SetTarget(c4114226.tg3)
e1:SetOperation(c4114226.op3)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetLabel(Duel.GetTurnCount())
Duel.RegisterEffect(e1,tp)
end
function c4114226.con3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel()
end
function c4114226.filter3(c,e,tp)
return c:IsSetCard(0x2141) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c4114226.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c4114226.filter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c4114226.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,c4114226.filter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,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
--神心流剑豪·厄科
function c66914000.initial_effect(c)
--activate from hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x373))
e1:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66914000,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,66914000)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c66914000.condition)
e1:SetTarget(c66914000.thtg)
e1:SetOperation(c66914000.thop)
c:RegisterEffect(e1)
end
function c66914000.condition(e,tp,eg,ep,ev,re,r,rp)
local count=0
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp and te:GetHandler():IsSetCard(0x373) then
count=count+1
end
end
return count>=1 and Duel.GetCurrentChain()>0
end
function c66914000.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local count=0
local chain=Duel.GetCurrentChain()
for i=1,chain do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp then
count=count+1
end
end
if chk==0 then return count>0 and (Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=count or count<3) and (count<2 or Duel.IsPlayerCanDraw(tp,1)) end
local cat=0
if count>=2 then
cat=cat|CATEGORY_DRAW
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if count>=3 then
cat=cat|CATEGORY_TOHAND
cat=cat|CATEGORY_SEARCH
end
e:SetCategory(cat)
e:SetLabel(count)
end
function c66914000.filter(c)
return c:IsSetCard(0x373) and c:IsAbleToHand()
end
function c66914000.thop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
if count>=1 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e:GetHandler():RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e:GetHandler():RegisterEffect(e2)
end
if count>=2 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
if count>=3 then
Duel.BreakEffect()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,count)
local dg=Duel.GetDecktopGroup(tp,count)
local g=dg:Filter(c66914000.filter,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
Duel.ShuffleDeck(tp)
end
end
\ No newline at end of file
--神心一刀流·樱繁风光
function c66914001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c66914001.thtg)
e1:SetOperation(c66914001.thop)
c:RegisterEffect(e1)
end
function c66914001.filter(c)
return c:IsSetCard(0x373) and c:IsAbleToHand() and not c:IsCode(66914001)
end
function c66914001.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local count=0
local chain=Duel.GetCurrentChain()
for i=1,chain do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp and te:GetHandler():IsSetCard(0x373) then
count=count+1
end
end
if chk==0 then return (count~=1 or Duel.IsExistingMatchingCard(c66914001.filter,tp,LOCATION_GRAVE,0,1,nil)) and (count~=2 or Duel.IsExistingMatchingCard(c66914001.filter,tp,LOCATION_DECK,0,1,nil)) end
local cat=0
if count==2 then
cat=cat|CATEGORY_TOHAND
cat=cat|CATEGORY_SEARCH
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
if count==1 then
cat=cat|CATEGORY_TOHAND
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
e:SetCategory(cat)
e:SetLabel(count)
end
function c66914001.thop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(500)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if count==3 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c66914001.filter,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
if count==2 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c66914001.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
local ct=Duel.GetCurrentChain()
if ct>=2 then
local te,tep=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tep==1-tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(66914001,0)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
if (Duel.GetFlagEffect(tp,66914007)>0 or Duel.GetFlagEffect(tp,66914006)>0) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(66914007,0)) then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.Destroy(g,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.GetFlagEffect(tp,66914006)~=0 then
Duel.ResetFlagEffect(tp,66914006)
else
Duel.ResetFlagEffect(tp,66914007)
end
end
end
\ No newline at end of file
--神心一刀流·樱飞闪影
function c66914003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c66914003.thtg)
e1:SetOperation(c66914003.thop)
c:RegisterEffect(e1)
end
function c66914003.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local count=0
local chain=Duel.GetCurrentChain()
for i=1,chain do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp and te:GetHandler():IsSetCard(0x373) then
count=count+1
end
end
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) and (count~=3 or Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,66914000)) end
e:SetLabel(count)
end
function c66914003.filter(c)
return c:IsFaceup() and c:IsCode(66914000)
end
function c66914003.thop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
--indes
local e21=Effect.CreateEffect(e:GetHandler())
e21:SetType(EFFECT_TYPE_FIELD)
e21:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e21:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e21:SetRange(LOCATION_MZONE)
e21:SetTargetRange(LOCATION_ONFIELD,0)
e21:SetReset(RESET_PHASE+PHASE_END)
e21:SetValue(c66914003.indct)
Duel.RegisterEffect(e21,tp)
if count==3 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c66914003.damval2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetCondition(c66914003.damcon)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
if count==4 then
local g=Duel.GetMatchingGroup(c66914003.filter,tp,LOCATION_ONFIELD,0,nil)
local tc=g:GetFirst()
while tc do
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c66914003.efilter1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e4:SetOwnerPlayer(tp)
tc:RegisterEffect(e4)
tc=g:GetNext()
end
end
local ct=Duel.GetCurrentChain()
if ct>=2 then
local te,tep=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tep==1-tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.SelectYesNo(tp,aux.Stringid(66914003,0)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c66914003.etarget)
e1:SetValue(c66914003.efilter)
e1:SetLabelObject(te)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
end
end
if (Duel.GetFlagEffect(tp,66914007)>0 or Duel.GetFlagEffect(tp,66914006)>0) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(66914007,0)) then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.Destroy(g,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.GetFlagEffect(tp,66914006)~=0 then
Duel.ResetFlagEffect(tp,66914006)
else
Duel.ResetFlagEffect(tp,66914007)
end
end
end
function c66914003.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function c66914003.efilter1(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c66914003.efilter(e,re)
return re==e:GetLabelObject()
end
function c66914003.etarget(e,c)
return c:IsType(TYPE_MONSTER)
end
function c66914003.damval2(e,re,val,r,rp,rc)
local c=e:GetHandler()
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 and c:GetFlagEffect(2220237)==0 then
c:RegisterFlagEffect(2220237,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
return 0
end
return val
end
function c66914003.damcon(e)
return e:GetHandler():GetFlagEffect(66914003)==0
end
\ No newline at end of file
--神心一刀流·樱落刀舞
function c66914004.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c66914004.thtg)
e1:SetOperation(c66914004.thop)
c:RegisterEffect(e1)
end
function c66914004.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local count=0
local chain=Duel.GetCurrentChain()
for i=1,chain do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp and te:GetHandler():IsSetCard(0x373) then
count=count+1
end
end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end
e:SetLabel(count)
end
function c66914004.thop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
local ct1=1
local dam=0
if count==3 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,2,nil) and Duel.SelectYesNo(tp,aux.Stringid(66914004,0)) then
ct1=2
end
if count==5 then
dam=1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,ct1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) and dam==1 then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c66914004.distg1)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c66914004.discon)
e2:SetOperation(c66914004.disop)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c66914004.distg2)
e3:SetLabelObject(tc)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
local ct=Duel.GetCurrentChain()
if ct>=2 then
local te,tep=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tep==1-tp and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.SelectYesNo(tp,aux.Stringid(66914004,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
if (Duel.GetFlagEffect(tp,66914007)>0 or Duel.GetFlagEffect(tp,66914006)>0) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(66914007,0)) then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.Destroy(g,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.GetFlagEffect(tp,66914006)~=0 then
Duel.ResetFlagEffect(tp,66914006)
else
Duel.ResetFlagEffect(tp,66914007)
end
end
end
function c66914004.distg1(e,c)
local tc=e:GetLabelObject()
if c:IsType(TYPE_SPELL+TYPE_TRAP) then
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
else
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
end
function c66914004.distg2(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c66914004.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c66914004.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--神心一刀流·樱乱纷飞
function c66914005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c66914005.condition)
e1:SetTarget(c66914005.thtg)
e1:SetOperation(c66914005.thop)
c:RegisterEffect(e1)
end
function c66914005.condition(e,tp,eg,ep,ev,re,r,rp)
local count=0
local chain=Duel.GetCurrentChain()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp and te:GetHandler():IsSetCard(0x373) then
count=count+1
end
end
return count>=1 and Duel.GetCurrentChain()>1
end
function c66914005.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local count=0
local chain=Duel.GetCurrentChain()
for i=1,chain do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp and te:GetHandler():IsSetCard(0x373) then
count=count+1
end
end
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end
local te1,tep1=Duel.GetChainInfo(chain,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tep1~=tp then
Duel.SetChainLimit(c66914005.chainlm)
end
e:SetLabel(count)
end
function c66914005.thop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if count==4 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c66914005.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
if count==5 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c66914005.aclimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) 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_CHAIN)
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_CHAIN)
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_CHAIN)
tc:RegisterEffect(e3)
end
end
if (Duel.GetFlagEffect(tp,66914007)>0 or Duel.GetFlagEffect(tp,66914006)>0) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(66914007,0)) then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.Destroy(g,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.GetFlagEffect(tp,66914006)~=0 then
Duel.ResetFlagEffect(tp,66914006)
else
Duel.ResetFlagEffect(tp,66914007)
end
end
end
function c66914005.chainlm(e,ep,tp)
return tp==ep
end
function c66914005.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
function c66914005.aclimit1(e,re,tp)
return re:GetActivateLocation()==LOCATION_HAND
end
--神心一刀流·樱散回返
function c66914006.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,66914006)
e2:SetCondition(c66914006.spcon)
e2:SetTarget(c66914006.cptg)
e2:SetOperation(c66914006.cpop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,66914006)
e3:SetCondition(c66914006.condition)
e3:SetTarget(c66914006.settg)
e3:SetOperation(c66914006.setop)
c:RegisterEffect(e3)
end
function c66914006.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x373) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c66914006.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():CheckActivateEffect(true,true,false)~=nil end
local te,ceg,cep,cev,cre,cr,crp=re:GetHandler():CheckActivateEffect(false,true,true)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function c66914006.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
if (Duel.GetFlagEffect(tp,66914007)>0 or Duel.GetFlagEffect(tp,66914006)>0) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) and not re:GetHandler():IsCode(66914007) and Duel.SelectYesNo(tp,aux.Stringid(66914007,0)) then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.Destroy(g,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.GetFlagEffect(tp,66914006)~=0 then
Duel.ResetFlagEffect(tp,66914006)
else
Duel.ResetFlagEffect(tp,66914007)
end
end
end
function c66914006.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and rp==tp and re:GetHandler():IsSetCard(0x373)
end
function c66914006.tgfilter(c)
return c:IsSetCard(0x373) and c:IsAbleToDeck()
end
function c66914006.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c66914006.tgfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
return g:GetClassCount(Card.GetCode)>1 and Duel.IsPlayerCanDraw(tp,1) and e:GetHandler():IsAbleToDeck()
end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c66914006.setop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c66914006.tgfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
if g:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg1=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
tg1:AddCard(e:GetHandler())
if Duel.SendtoDeck(tg1,nil,2,REASON_EFFECT)~=0 and tg1:IsExists(Card.IsLocation,3,nil,LOCATION_DECK) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--神心一刀流·樱舞回天
function c66914007.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,66914007)
e1:SetTarget(c66914007.target)
e1:SetOperation(c66914007.activate)
c:RegisterEffect(e1)
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,66914007)
e3:SetCondition(c66914007.condition)
e3:SetTarget(c66914007.settg)
e3:SetOperation(c66914007.setop)
c:RegisterEffect(e3)
end
function c66914007.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c66914007.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,66914007)~=0 then
Duel.RegisterFlagEffect(tp,66914006,RESET_PHASE+PHASE_END,0,1)
else
Duel.RegisterFlagEffect(tp,66914007,RESET_PHASE+PHASE_END,0,1)
end
end
function c66914007.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and rp==tp and re:GetHandler():IsSetCard(0x373)
end
function c66914007.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 c66914007.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECK)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--神心一刀流·樱尽消华
function c66914008.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,66914008+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c66914008.condition)
e1:SetTarget(c66914008.target)
e1:SetOperation(c66914008.activate)
c:RegisterEffect(e1)
end
function c66914008.condition(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()<1 then return false end
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then
return true
end
end
return false
end
function c66914008.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ng=Group.CreateGroup()
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then
local tc=te:GetHandler()
ng:AddCard(tc)
if tc:IsOnField() and tc:IsRelateToEffect(te) and tc:IsAbleToDeck() then
dg:AddCard(tc)
end
end
end
local dc=dg:GetCount()
if chk==0 then return (dc<3 or Duel.IsPlayerCanDraw(tp,dc)) and (dc<2 or Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)) end
Duel.SetTargetCard(dg)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
end
function c66914008.activate(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup()
local count=0
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) then
count=count+1
end
if tgp==tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.NegateActivation(i) then
local tc=te:GetHandler()
dg:AddCard(tc)
end
end
if dg:GetCount()>=1 then
Duel.Damage(1-tp,count*1500,REASON_EFFECT)
end
if dg:GetCount()>=2 then
local tg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local cg=math.min(tg:GetCount(),dg:GetCount())
local g=tg:Select(tp,1,cg,nil)
Duel.Destroy(g,REASON_EFFECT)
end
if dg:GetCount()>=3 then
Duel.Draw(tp,dg:GetCount(),REASON_EFFECT)
end
if dg:GetCount()>=4 then
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) then
Duel.NegateActivation(i)
end
end
end
end
\ No newline at end of file
--神心一刀流·樱染明镜
function c66914009.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--to extra
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66914009,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c66914009.spcon)
e1:SetTarget(c66914009.target)
e1:SetOperation(c66914009.activate)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71696014,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,66914009)
e3:SetCondition(c66914009.condition2)
e3:SetTarget(c66914009.target2)
e3:SetOperation(c66914009.operation2)
c:RegisterEffect(e3)
end
function c66914009.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler()
end
function c66914009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(66914009)<=1 end
e:GetHandler():RegisterFlagEffect(66914009,RESET_CHAIN,0,1)
end
function c66914009.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c66914009.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:GetHandler():IsSetCard(0x373)
end
function c66914009.filter(c,e,tp)
return c:IsCode(66914000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c66914009.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c66914009.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c66914009.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c66914009.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--神心一刀流·樱环妖现
function c66914010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c66914010.thtg)
e1:SetOperation(c66914010.thop)
c:RegisterEffect(e1)
end
function c66914010.filter(c)
return (c:IsCode(66914011) or c:IsCode(66914000)) and c:IsAbleToHand()
end
function c66914010.filter1(c,tc)
return tc:CheckEquipTarget(c)
end
function c66914010.filter2(c,e,tp)
return c:IsCode(66914000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c66914010.filter4(c)
return c:IsCode(66914011) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD)
end
function c66914010.filter3(c)
return c:IsCode(66914011) and c:IsFaceup()
end
function c66914010.eqfilter(c,tc,tp)
return c:IsType(TYPE_EQUIP) and c:IsCode(66914011) and c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp)
end
function c66914010.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local count=0
local chain=Duel.GetCurrentChain()
for i=1,chain do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp and te:GetHandler():IsSetCard(0x373) then
count=count+1
end
end
if chk==0 then return Duel.IsExistingMatchingCard(c66914010.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and (count~=3 or (Duel.IsExistingMatchingCard(c66914010.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c66914010.filter4,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)) end
local cat=CATEGORY_TOHAND|CATEGORY_SEARCH
if count==3 then
cat=cat|CATEGORY_SPECIAL_SUMMON
cat=cat|CATEGORY_EQUIP
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
e:SetCategory(cat)
e:SetLabel(count)
end
function c66914010.thop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
local eq=0
local sp=0
if count==2 then
eq=1
end
if count==4 then
sp=1
end
if sp==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c66914010.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc:IsCode(66914011) then
if eq==1 and Duel.IsExistingMatchingCard(c66914010.filter1,tp,LOCATION_MZONE,0,1,nil,tc) and tc:CheckUniqueOnField(tp,LOCATION_ONFIELD) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not tc:IsForbidden() and Duel.SelectYesNo(tp,aux.Stringid(66914010,0)) then
local g1=Duel.SelectMatchingCard(tp,c66914010.filter1,tp,LOCATION_MZONE,0,1,1,nil,tc):GetFirst()
Duel.Equip(tp,tc,g1)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
if eq==1 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(66914010,0)) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
else
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c66914010.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local tg=Duel.GetMatchingGroup(c66914010.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,tc,tp)
if tg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=tg:Select(tp,1,1,nil)
Duel.Equip(tp,sg:GetFirst(),tc)
end
end
local ct=Duel.GetCurrentChain()
if ct>=2 then
local te,tep=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tep==1-tp and e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(c66914010.filter3,tp,LOCATION_SZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(66914010,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=Duel.SelectMatchingCard(tp,c66914010.filter3,tp,LOCATION_SZONE,0,1,1,nil):GetFirst()
local opt=Duel.SelectOption(tp,aux.Stringid(66914010,2),aux.Stringid(66914010,3),aux.Stringid(66914010,4))+1
if opt==1 then
tc:AddCounter(0x1371,1)
elseif opt==2 then
tc:AddCounter(0x1372,1)
else
tc:AddCounter(0x1373,1)
end
end
end
if (Duel.GetFlagEffect(tp,66914007)>0 or Duel.GetFlagEffect(tp,66914006)>0) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(66914007,0)) then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.Destroy(g,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.GetFlagEffect(tp,66914006)~=0 then
Duel.ResetFlagEffect(tp,66914006)
else
Duel.ResetFlagEffect(tp,66914007)
end
end
end
\ No newline at end of file
--妖刀·星切
function c66914011.initial_effect(c)
c:EnableCounterPermit(0x1371)
c:EnableCounterPermit(0x1372)
c:EnableCounterPermit(0x1373)
c:SetUniqueOnField(1,0,66914011)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c66914011.target)
e1:SetOperation(c66914011.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c66914011.eqlimit)
c:RegisterEffect(e2)
--special summon
local e21=Effect.CreateEffect(c)
e21:SetDescription(aux.Stringid(66914011,0))
e21:SetCategory(CATEGORY_DESTROY+CATEGORY_COUNTER)
e21:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e21:SetRange(LOCATION_SZONE)
e21:SetCode(EVENT_CHAINING)
e21:SetCountLimit(1)
e21:SetProperty(EFFECT_FLAG_DELAY)
e21:SetCondition(c66914011.spcon1)
e21:SetTarget(c66914011.destg)
e21:SetOperation(c66914011.desop)
c:RegisterEffect(e21)
--atk/def
local e24=Effect.CreateEffect(c)
e24:SetType(EFFECT_TYPE_EQUIP)
e24:SetCode(EFFECT_UPDATE_ATTACK)
e24:SetValue(c66914011.atkval)
c:RegisterEffect(e24)
--redirect
local e23=Effect.CreateEffect(c)
e23:SetType(EFFECT_TYPE_EQUIP)
e23:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e23:SetValue(LOCATION_REMOVED)
e23:SetCondition(c66914011.indcon)
c:RegisterEffect(e23)
--immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetCondition(c66914011.indcon1)
e5:SetValue(c66914011.efilter)
c:RegisterEffect(e5)
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_SINGLE)
e13:SetCode(EFFECT_IMMUNE_EFFECT)
e13:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e13:SetRange(LOCATION_SZONE)
e13:SetCondition(c66914011.indcon1)
e13:SetValue(c66914011.efilter)
c:RegisterEffect(e13)
end
function c66914011.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c66914011.atkval(e,c)
local count=0
if e:GetHandler():GetCounter(0x1371)>0 then
count=count+1
end
if e:GetHandler():GetCounter(0x1372)>0 then
count=count+1
end
if e:GetHandler():GetCounter(0x1373)>0 then
count=count+1
end
return count*500
end
function c66914011.indcon(e)
local count=0
if e:GetHandler():GetCounter(0x1371)>0 then
count=count+1
end
if e:GetHandler():GetCounter(0x1372)>0 then
count=count+1
end
if e:GetHandler():GetCounter(0x1373)>0 then
count=count+1
end
return count>=2
end
function c66914011.indcon1(e)
local count=0
if e:GetHandler():GetCounter(0x1371)>0 then
count=count+1
end
if e:GetHandler():GetCounter(0x1372)>0 then
count=count+1
end
if e:GetHandler():GetCounter(0x1373)>0 then
count=count+1
end
return count>=3 and e:GetHandler():GetEquipTarget()
end
function c66914011.eqlimit(e,c)
return c:GetControler()==e:GetHandler():GetControler()
and (c:IsCode(66914000) or c:IsCode(66914013))
end
function c66914011.filter(c,tp)
return c:IsControler(tp) and c:IsFaceup()
and (c:IsCode(66914000) or c:IsCode(66914013))
end
function c66914011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c66914011.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c66914011.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c66914011.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c66914011.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsControler(tp) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c66914011.spcon1(e,tp,eg,ep,ev,re,r,rp)
local count=0
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp==tp and te:GetHandler():IsSetCard(0x373) then
count=count+1
end
end
return count>=2
end
function c66914011.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c66914011.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.BreakEffect()
local tc=g:GetFirst()
if tc:IsType(TYPE_MONSTER) then
e:GetHandler():AddCounter(0x1371,1)
elseif tc:IsType(TYPE_SPELL) then
e:GetHandler():AddCounter(0x1372,1)
else
e:GetHandler():AddCounter(0x1373,1)
end
end
end
end
\ No newline at end of file
--神心一刀流·樱华盛舞
function c66914012.initial_effect(c)
--Activate
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_ACTIVATE)
e12:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e12)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetOperation(c66914012.adop)
c:RegisterEffect(e2)
--salvage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,66914013)
e1:SetRange(LOCATION_FZONE)
e1:SetCost(c66914012.thcost)
e1:SetTarget(c66914012.thtg)
e1:SetOperation(c66914012.thop)
c:RegisterEffect(e1)
end
function c66914012.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetCurrentChain()
if ct<2 then return end
local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if te and p==tp then
if rp==tp then
Duel.RegisterFlagEffect(tp,66914013,RESET_CHAIN,0,1)
end
if rp==1-tp then
Duel.RegisterFlagEffect(tp,66914014,RESET_CHAIN,0,1)
end
end
if Duel.GetFlagEffect(tp,66914013)>=4 and Duel.GetFlagEffect(tp,66914011)==0 and Duel.IsExistingMatchingCard(c66914012.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(66914013,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c66914012.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.RegisterFlagEffect(tp,66914011,0,0,1)
end
if Duel.GetFlagEffect(tp,66914014)>=2 and Duel.GetFlagEffect(tp,66914012)==0 and Duel.SelectYesNo(tp,aux.Stringid(66914013,1)) then
local tg=Duel.GetMatchingGroup(c66914012.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,tp)
if tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=tg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
Duel.RegisterFlagEffect(tp,66914012,0,0,1)
end
end
function c66914012.rmfilter(c,tp)
return c:IsAbleToRemove(tp,POS_FACEDOWN)
end
function c66914012.thcost(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
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c66914012.filter(c)
return c:IsSetCard(0x373) and c:IsAbleToHand()
end
function c66914012.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c66914012.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c66914012.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c66914012.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--神心樱舞·厄科
function c66914013.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,4,c66914013.ovfilter,aux.Stringid(66914013,0),4,c66914013.xyzop)
c:EnableReviveLimit()
--activate from hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x373))
e1:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
--Overlay&Tohand
local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_TOHAND)
e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetCode(EVENT_FREE_CHAIN)
e12:SetRange(LOCATION_MZONE)
e12:SetCost(c66914013.disrmcost)
e12:SetTarget(c66914013.disrmtg)
e12:SetOperation(c66914013.disrmop)
c:RegisterEffect(e12)
--
Duel.AddCustomActivityCounter(66914013,ACTIVITY_CHAIN,c66914013.chainfilter)
end
function c66914013.chainfilter(re,tp,cid)
return not (Duel.GetCurrentChain()>4)
end
function c66914013.ovfilter(c)
return c:IsFaceup() and c:IsCode(66914000)
end
function c66914013.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,66914010)==0
and (Duel.GetCustomActivityCount(66914013,tp,ACTIVITY_CHAIN)>0
or Duel.GetCustomActivityCount(66914013,1-tp,ACTIVITY_CHAIN)>0) end
Duel.RegisterFlagEffect(tp,66914010,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c66914013.disrmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(66914009)==0 end
c:RegisterFlagEffect(66914009,RESET_CHAIN,0,1)
end
function c66914013.disrmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetOverlayGroup()
local b1=e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(c66914013.ofilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) and Duel.GetFlagEffect(tp,6691408)==0
local b2=g:IsExists(Card.IsAbleToHand,1,nil) and Duel.GetFlagEffect(tp,6691405)==0
if chk==0 then return b1 or b2 end
end
function c66914013.ofilter(c,e)
return c:IsCanOverlay() and (not e or not c:IsImmuneToEffect(e)) and c:IsSetCard(0x373)
end
function c66914013.disrmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=e:GetHandler():GetOverlayGroup()
local b1=e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(c66914013.ofilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) and Duel.GetFlagEffect(tp,6691408)==0
local b2=g:IsExists(Card.IsAbleToHand,1,nil) and Duel.GetFlagEffect(tp,6691405)==0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(66914013,1),aux.Stringid(66914013,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(66914013,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(66914013,2))+1
else return end
if op==0 then
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c66914013.ofilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler(),e)
local tc=g:GetFirst()
if tc then
Duel.Overlay(c,tc)
end
Duel.ShuffleDeck(tp)
end
Duel.RegisterFlagEffect(tp,6691408,RESET_PHASE+PHASE_END,0,1)
else
if c:IsRelateToEffect(e) then
local g=c:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
Duel.RegisterFlagEffect(tp,6691405,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
......@@ -17,8 +17,10 @@ function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
......@@ -28,7 +30,7 @@ function cm.cfilters(c)
return c:IsFaceup() and c:IsCode(66915001)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and Duel.IsExistingMatchingCard(cm.cfilters,tp,LOCATION_SZONE,0,1,nil)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and Duel.IsExistingMatchingCard(cm.cfilters,tp,LOCATION_SZONE,0,1,nil) and Duel.GetTurnPlayer()==tp
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
......
......@@ -7,7 +7,7 @@ function cCardno.initial_effect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EQUIP_LIMIT)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetValue(1)
e0:SetValue(cCardno.eqlimit)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -61,6 +61,9 @@ function cCardno.initial_effect(c)
e6:SetOperation(cCardno.thop)
c:RegisterEffect(e6)
end
function cCardno.eqlimit(e,c)
return c:IsSetCard(0x713,0x5208)
end
--tohand
function cCardno.thfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x713) or c:IsAttribute(ATTRIBUTE_LIGHT))
......
......@@ -3,6 +3,7 @@ require "expansions/script/nef/Gds"
function c86379013.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
--Gds.Checkdeckpublic(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -23,87 +24,66 @@ function c86379013.initial_effect(c)
end
--
function c86379013.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler() and e:GetHandler():GetFlagEffect(86379013)==0
return eg:GetFirst()==e:GetHandler()
end
function c86379013.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil))
or ((ev==0) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil))
end
local ti=0
if e:GetHandler():IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027) then
ti=10
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else
e:GetHandler():ReverseInDeck()
end
e:GetHandler():RegisterFlagEffect(86379013,RESET_CHAIN,0,1)
if ((ev==Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)) then
e:SetLabel(1+ti)
else
e:SetLabel(0+ti)
e:GetHandler():GetFlagEffect(86379013)==0
and
(Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
or Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
or (Duel.IsPlayerCanSpecialSummonMonster(tp,86379013,0x279,TYPES_NORMAL_TRAP_MONSTER,1500,1500,1,RACE_PSYCHO,ATTRIBUTE_DARK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c86379013.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local flag=0
local face=0
if ct>=10 then
face=1
ct=ct-10
end
if ct==1 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
--flag=1
local tc=g:GetFirst()
while tc do
--atkupdown
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g1:GetCount()>0 then
local tc1=g1:GetFirst()
while tc1 do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc1:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(500)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
tc1:RegisterEffect(e2)
tc1=g1:GetNext()
end
end
else
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
--flag=1
local tc=g:GetFirst()
while tc do
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
while tc2 do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc2:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(-500)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
tc2:RegisterEffect(e2)
tc2=g2:GetNext()
end
end
end
--SpecialSummon
if not c:IsRelateToEffect(e) then return end
--if flag==0 then return end
if face==1
and Duel.IsPlayerCanSpecialSummonMonster(tp,86379013,0x279,TYPES_NORMAL_TRAP_MONSTER,1500,1500,1,RACE_PSYCHO,ATTRIBUTE_DARK)
if Duel.IsPlayerCanSpecialSummonMonster(tp,86379013,0x279,TYPES_NORMAL_TRAP_MONSTER,1500,1500,1,RACE_PSYCHO,ATTRIBUTE_DARK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
......@@ -140,20 +120,81 @@ function c86379013.operation(e,tp,eg,ep,ev,re,r,rp)
e9:SetValue(1500)
e9:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e9,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(86379014,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_IMMUNE_EFFECT)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e10:SetRange(LOCATION_MZONE)
e10:SetCondition(c86379013.flagcon)
e10:SetValue(c86379013.efilter)
e10:SetReset(RESET_EVENT+RESETS_STANDARD)
e10:SetCode(EFFECT_UPDATE_LEVEL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e10:SetValue(1)
e10:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e10,true)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
c:RegisterFlagEffect(86379014,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_IMMUNE_EFFECT)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e11:SetRange(LOCATION_MZONE)
e11:SetCondition(c86379013.flagcon)
e11:SetValue(c86379013.efilter)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e11,true)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetValue(c86379013.efilter4)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e4,true)
Duel.SpecialSummonComplete()
--if e:GetHandler():GetTurnCounter()==0 then
c:RegisterFlagEffect(86379011,RESET_EVENT+RESETS_STANDARD,0,1)
if Duel.GetFlagEffect(tp,86379011)<=0 then
Duel.RegisterFlagEffect(tp,86379011,0,0,1)
local e222=Effect.CreateEffect(c)
e222:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e222:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e222:SetCode(EVENT_PHASE+PHASE_END)
e222:SetCountLimit(1)
e222:SetCondition(c86379013.countercon)
e222:SetOperation(c86379013.counterop)
Duel.RegisterEffect(e222,tp)
end
--end
end
end
function c86379013.counterfilter(c)
return c:IsOriginalCodeRule(86379013,86379015,86379017,86379019,86379023)
end
function c86379013.countercon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379013.counterfilter,tp,LOCATION_MZONE,0,nil)>0
end
function c86379013.counterop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c86379013.counterfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local ft=tc:GetFlagEffect(86379011)
local ct=0
if ft>0 then
ct=ft
tc:ResetFlagEffect(86379011)
else
ct=tc:GetTurnCounter()
ct=ct+1
end
tc:SetTurnCounter(ct)
tc=g:GetNext()
end
end
function c86379013.flagcon(e)
return e:GetHandler():GetFlagEffect(86379014)>0 or Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),86379025)
end
......@@ -161,3 +202,7 @@ function c86379013.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER)
and not te:GetHandler():IsSetCard(0x279)
end
function c86379013.efilter4(e,c)
if not c then return false end
return not c:IsSetCard(0x273)
end
......@@ -15,20 +15,19 @@ function c86379025.initial_effect(c)
e1:SetDescription(aux.Stringid(86379025,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(c86379025.con1)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
--e1:SetCondition(c86379025.con1)
e1:SetTarget(c86379025.tg1)
e1:SetOperation(c86379025.op1)
c:RegisterEffect(e1)
--indestructable
--deck public
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetDescription(aux.Stringid(86379025,3))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c86379025.con2)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetTarget(c86379025.tg2)
e2:SetValue(1)
e2:SetOperation(c86379025.op2)
c:RegisterEffect(e2)
--effect flag
local e3=Effect.CreateEffect(c)
......@@ -70,9 +69,11 @@ function c86379025.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleDeck(tp)
if opt==0 and tc:GetSequence()~=(Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) then
Duel.MoveSequence(tc,0)
Duel.ConfirmCards(1-tp,tc)
end
if opt==1 and tc:GetSequence()~=0 then
Duel.MoveSequence(tc,1)
Duel.ConfirmCards(1-tp,tc)
end
end
end
......@@ -80,8 +81,21 @@ end
function c86379025.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379025.filter,tp,LOCATION_DECK,0,nil,tp)>=2
end
function c86379025.tg2(e,c)
return c:IsSetCard(0x279)
function c86379025.filter2(c,tp)
return not (c:IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027))
end
function c86379025.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379025.filter2,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c86379025.op2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c86379025.filter2,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
tc:ReverseInDeck()
Duel.ShuffleDeck(tp)
end
end
--
function c86379025.con3(e,tp,eg,ep,ev,re,r,rp)
......@@ -89,7 +103,7 @@ function c86379025.con3(e,tp,eg,ep,ev,re,r,rp)
end
--
function c86379025.con4(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379025.filter,tp,LOCATION_DECK,0,nil,tp)>=23
return Duel.GetMatchingGroupCount(c86379025.filter,tp,LOCATION_DECK,0,nil,tp)>=12
end
function c86379025.efilter4(e,te)
return not te:GetHandler():IsSetCard(0x279)
......
......@@ -84,7 +84,7 @@ function c86379035.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,g,g:GetCount(),0,0)
end
function c86379035.ctfilter(c,e,adt)
return ((c:GetLevel()>1 or c:GetRank()>1) or (adt>0 and (c:GetAttack()>0 or c:GetDefense()>0))) and not c:IsImmuneToEffect(e)
return (c:GetLevel()>1 or c:GetRank()>1) or (adt>0 and (c:GetAttack()>0 or c:GetDefense()>0))
end
function c86379035.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -92,8 +92,8 @@ function c86379035.ctop(e,tp,eg,ep,ev,re,r,rp)
local ct=ev
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()<=0 then return end
local adt=c:GetCounter(0x123a)*200
local st=g:FilterCount(c86379035.ctfilter,nil,e,adt)*300
local adt=c:GetCounter(0x123a)*300
local st=g:FilterCount(c86379035.ctfilter,nil,e,adt)*200
local tc=g:GetFirst()
while tc do
if tc:GetLevel()>1 then
......@@ -130,12 +130,12 @@ function c86379035.ctop(e,tp,eg,ep,ev,re,r,rp)
end
tc=g:GetNext()
end
if st>0 then
--[[if st>0 then
local lp=Duel.GetLP(1-tp)
if lp>st then
Duel.SetLP(1-tp,lp-st)
else
Duel.SetLP(1-tp,0)
end
end
end]]--
end
--有顶天的大小姐✿比那名居天子
function c86379060.initial_effect(c)
c:EnableReviveLimit()
c:EnableCounterPermit(0x245)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND+LOCATION_DECK)
e2:SetCondition(c86379060.spcon)
e2:SetOperation(c86379060.spop)
c:RegisterEffect(e2)
--counter
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetLabelObject(e2)
e3:SetOperation(c86379060.ctop)
c:RegisterEffect(e3)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetCondition(c86379060.imcon)
e4:SetValue(c86379060.val)
c:RegisterEffect(e4)
end
--
function c86379060.spfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() and c:IsReleasable()
end
function c86379060.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and ((Duel.IsExistingMatchingCard(c86379060.spfilter,tp,LOCATION_ONFIELD,0,1,c) and c:IsLocation(LOCATION_HAND)) or (Duel.IsExistingMatchingCard(c86379060.spfilter,tp,LOCATION_ONFIELD,0,5,c) and c:IsLocation(LOCATION_DECK)))
end
function c86379060.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rt=1
if e:GetHandler():IsLocation(LOCATION_DECK) then
rt=5
end
local g=Duel.SelectMatchingCard(tp,c86379060.spfilter,tp,LOCATION_ONFIELD,0,rt,99,nil)
local et=0
local tc=g:GetFirst()
while tc do
local ct=tc:GetCounter(0x245)
et=et+ct+2
--[[if bit.band(tc:GetOriginalType(),TYPE_MONSTER)~=0 then
et=et+3
else
et=et+2
end]]--
tc=g:GetNext()
end
e:SetLabel(et)
Duel.Release(g,REASON_COST)
e:GetHandler():RegisterFlagEffect(86379060,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1)
end
--
function c86379060.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(86379060)<=0 then return end
local ct=e:GetLabelObject():GetLabel()
c:AddCounter(0x245,ct)
end
--
function c86379060.imcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x245)>=20
end
function c86379060.val(e,te)
return e:GetOwnerPlayer()~=te:GetOwnerPlayer()
end
--反狱的怨灵✿宫出口瑞灵
function c86379064.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x208),2)
c:EnableReviveLimit()
c:SetSPSummonOnce(86379064)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379064,0))
e1:SetCategory(CATEGORY_DESTROY)
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(c86379064.condition)
e1:SetTarget(c86379064.target)
e1:SetOperation(c86379064.operation)
c:RegisterEffect(e1)
end
--
function c86379064.condition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function c86379064.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c86379064.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and c86379064.filter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c86379064.filter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c86379064.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c86379064.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+0x1fc0000)
c:RegisterEffect(e2)
if tc:IsType(TYPE_CONTINUOUS) and tc:IsPreviousPosition(POS_FACEUP) then
local code=tc:GetOriginalCode()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetValue(code)
c:RegisterEffect(e3)
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD)
end
end
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment