Commit 53908f2f authored by tsubaki's avatar tsubaki

1.999zz

parent 6c541d2a
No preview for this file type
......@@ -7,6 +7,7 @@
#counters
!counter 0x1 魔力指示物
!counter 0x119 盘子指示物
!counter 0x123a 梦魂指示物
!counter 0x223 表情指示物
!counter 0x128a 信仰指示物
!counter 0x128b 魂指示物
......@@ -39,6 +40,8 @@
!setname 0xaa1 三种神器
!setname 0xaa4 蕾蒂
!setname 0xaa5 萃香
!setname 0xaa6 濑笈叶
!setname 0xaa7 叠光
!setname 0x100 灵梦
!setname 0x104e Lost
!setname 0x1011 灵符
......
No preview for this file type
#[1.999zyua HCG][2015.10][2015.4.1][2015.4.1 TCG][2015.1.1][2015.1.1 TCG][2014.10.1][2014.10.1 TCG][2014.7.1][2014.7.14 TCG][2014世界赛][2014.4.1][2014.4.1 TCG][2014.2.1][2014.1.1 TCG][2013.9.1][2013.10.11 TCG][2013.9.1 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1][2011.3.1][2010.9.1][2010.3.1][2009.9.1][2009.3.1][2008.9.1][2008.3.1][2007.9.1][2007.3.1][2006.9.1][2006.3.1][2005.9.1][2005.3.1][2004.9.1][2004.3.1][2003.10.15][2003.7.1][2003.4.10][2003.1.1][2002.10.1][2002.1.1][2000.12.1][2000.4.1][1999.8.26]
#[1.999zz HCG][2015.10][2015.4.1][2015.4.1 TCG][2015.1.1][2015.1.1 TCG][2014.10.1][2014.10.1 TCG][2014.7.1][2014.7.14 TCG][2014世界赛][2014.4.1][2014.4.1 TCG][2014.2.1][2014.1.1 TCG][2013.9.1][2013.10.11 TCG][2013.9.1 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1][2011.3.1][2010.9.1][2010.3.1][2009.9.1][2009.3.1][2008.9.1][2008.3.1][2007.9.1][2007.3.1][2006.9.1][2006.3.1][2005.9.1][2005.3.1][2004.9.1][2004.3.1][2003.10.15][2003.7.1][2003.4.10][2003.1.1][2002.10.1][2002.1.1][2000.12.1][2000.4.1][1999.8.26]
!1.999zyua HCG
!1.999zz HCG
#limit
23252 0 --暴力取材
14028 2 --BAD APPLE!!
......@@ -13,7 +13,6 @@
--油卡
999701 2 --✿伊吹萃香✿
999019 0 --地底蔷薇✿濑笈叶
999013 0 --水边的幻想 濑笈叶
--AOJ
4031101 1 --可怜
--DPL
......@@ -61,7 +60,6 @@
74561020 2 --女神天子
74561011 2 --暴风文
74561017 1 --盲目的贤者✿格洛丽亚
74562021 0 --月之天使✿萨丽爱尔
--L
--金卡
......@@ -77,6 +75,7 @@
--k
66915002 0 --星曜观星台
66915038 0 --行星女神
66917017 0 --粲星魔女
--C9
20100208 1 --御刀使米露亚
20100227 0 --御刀使夜见
......
pics/14000558.jpg

46.6 KB | W: | H:

pics/14000558.jpg

47.2 KB | W: | H:

pics/14000558.jpg
pics/14000558.jpg
pics/14000558.jpg
pics/14000558.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/14000559.jpg

46 KB | W: | H:

pics/14000559.jpg

46.5 KB | W: | H:

pics/14000559.jpg
pics/14000559.jpg
pics/14000559.jpg
pics/14000559.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/14000560.jpg

42.5 KB | W: | H:

pics/14000560.jpg

43.2 KB | W: | H:

pics/14000560.jpg
pics/14000560.jpg
pics/14000560.jpg
pics/14000560.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/14000561.jpg

45 KB | W: | H:

pics/14000561.jpg

45.7 KB | W: | H:

pics/14000561.jpg
pics/14000561.jpg
pics/14000561.jpg
pics/14000561.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/14000564.jpg

47.5 KB | W: | H:

pics/14000564.jpg

46.6 KB | W: | H:

pics/14000564.jpg
pics/14000564.jpg
pics/14000564.jpg
pics/14000564.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/99999002.jpg

54.5 KB | W: | H:

pics/99999002.jpg

48 KB | W: | H:

pics/99999002.jpg
pics/99999002.jpg
pics/99999002.jpg
pics/99999002.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -3,7 +3,6 @@ local m=14000556
local cm=_G["c"..m]
cm.named_with_ReDeath=1
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......@@ -11,6 +10,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
......
......@@ -20,6 +20,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
......@@ -30,14 +31,14 @@ function cm.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_HAND+LOCATION_ONFIELD)
e3:SetCountLimit(1,m)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.sptg1)
e3:SetOperation(cm.spop1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EFFECT_REMOVE_TYPE)
e4:SetRange(LOCATION_SZONE)
e4:SetValue(TYPE_CONTINUOUS)
......@@ -51,6 +52,9 @@ end
function cm.actlimit(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():GetOriginalCode()==m
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function cm.spfilter(c,e,tp)
return cm.ReD(c) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
......
......@@ -20,6 +20,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
......@@ -31,14 +32,13 @@ function cm.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e3:SetTarget(cm.eqtg)
e3:SetOperation(cm.eqop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_CANNOT_DISABLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EFFECT_REMOVE_TYPE)
e4:SetRange(LOCATION_SZONE)
e4:SetValue(TYPE_CONTINUOUS)
......@@ -48,6 +48,9 @@ end
function cm.actlimit(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():GetOriginalCode()==m
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function cm.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_DECK))
end
......
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.tgcost)
e2:SetCondition(cm.tgcon)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
......@@ -29,7 +30,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_HAND+LOCATION_ONFIELD)
e3:SetCountLimit(1,m)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
......@@ -42,6 +43,9 @@ end
function cm.actlimit(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():GetOriginalCode()==m
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function cm.costfilter(c)
return cm.ReD(c) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
......
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
......@@ -27,7 +28,7 @@ function cm.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND+LOCATION_ONFIELD)
e3:SetCountLimit(1,m)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
......@@ -40,6 +41,9 @@ end
function cm.actlimit(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():GetOriginalCode()==m
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -9,7 +9,6 @@ function cm.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
......@@ -27,9 +26,6 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function cm.filter(c)
return c:IsType(TYPE_SPIRIT) and c:IsAbleToHand() and not cm.PP(c)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,LOCATION_REMOVED)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,LOCATION_REMOVED)
......
--再起罔晟-唤魂
local m=14000565
local cm=_G["c"..m]
cm.named_with_ReDeath=1
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,m)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.ReD(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ReDeath
end
function cm.filter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.rmfilter(c)
return cm.ReD(c) and c:IsAbleToRemove()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)==0 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
end
function cm.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,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)==0 and Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--再起罔晟-鬼术
local m=14000566
local cm=_G["c"..m]
cm.named_with_ReDeath=1
function cm.initial_effect(c)
--cannot be activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.actlimit)
Duel.RegisterEffect(e1,tp)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.rmcon)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
end
function cm.ReD(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ReDeath
end
function cm.actlimit(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():GetOriginalCode()==m
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function cm.rmfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemove() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rmfilter),tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
if #g>0 then
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function cm.tgfilter(c)
return cm.ReD(c) and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--再起罔晟-回魂
local m=14000567
local cm=_G["c"..m]
cm.named_with_ReDeath=1
function cm.initial_effect(c)
--cannot be activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.actlimit)
Duel.RegisterEffect(e1,tp)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.tgcon)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--Equip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e3:SetTarget(cm.eqtg)
e3:SetOperation(cm.eqop)
c:RegisterEffect(e3)
end
function cm.ReD(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ReDeath
end
function cm.actlimit(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():GetOriginalCode()==m
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function cm.tgfilter(c)
return not (c:IsRace(RACE_ZOMBIE) or c:IsFaceup()) and c:IsAbleToGrave()
end
function cm.spfilter(c,e,tp)
return not c:IsRace(RACE_ZOMBIE) and c:IsLocation(LOCATION_GRAVE)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,c:GetControler())
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local g=og:Filter(cm.spfilter,nil,e,tp)
if #g==0 then return end
for p=0,1 do
local tg=g:Filter(Card.IsControler,nil,p)
local ft=Duel.GetLocationCount(p,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(p,59822133) then ft=1 end
if tg:GetCount()>ft then
tg=tg:Select(tp,ft,ft,nil)
end
for tc in aux.Next(tg) do
Duel.SpecialSummonStep(tc,0,tp,p,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_ZOMBIE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
Duel.SpecialSummonComplete()
end
end
function cm.eqfilter(c)
return cm.ReD(c) and c:IsFaceup()
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_MZONE)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
Duel.Equip(tp,c,tc,true)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--再起罔晟-天灵
local m=14000568
local cm=_G["c"..m]
cm.named_with_ReDeath=1
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(cm.synfilter),1)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
function cm.synfilter(c)
return c:IsRace(RACE_ZOMBIE)
end
function cm.cfilter(c)
return not c:IsRace(RACE_ZOMBIE) and c:IsFaceup()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.negfilter(c)
return c:IsFaceup() and not c:IsDisabled() and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0) and not c:IsRace(RACE_ZOMBIE)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.negfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.negfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.negfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetValue(RACE_ZOMBIE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
end
--再起罔晟-太岁
local m=14000569
local cm=_G["c"..m]
cm.named_with_ReDeath=1
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.ReD(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_ReDeath
end
function cm.spfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsControler(tp)
end
function cm.thfilter(c)
return c:IsFaceup() and cm.ReD(c)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spfilter,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
Chikichikibanban={}
chiki=Chikichikibanban
POS_FACEUP_DEFENCE=POS_FACEUP_DEFENSE
POS_FACEDOWN_DEFENCE=POS_FACEDOWN_DEFENSE
RACE_CYBERS=RACE_CYBERSE
--Synchro monster, 1 tuner + min to max monsters
function Chikichikibanban.AddSynchroProcedure(c,f1,f2,minc,loc1,loc2,maxc,op)
if maxc==nil then maxc=99 end
local e1=Effect.CreateEffect(c)
e1:SetDescription(1164)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(Chikichikibanban.SynCondition(f1,f2,minc,loc1,loc2,maxc,op))
e1:SetTarget(Chikichikibanban.SynTarget(f1,f2,minc,loc1,loc2,maxc,op))
e1:SetOperation(Chikichikibanban.SynOperation(f1,f2,minc,loc1,loc2,maxc,op))
e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1)
end
function Chikichikibanban.SynCondition(f1,f2,minc,loc1,loc2,maxc,op)
return function(e,c,smat,mg,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local exg=Duel.GetFieldGroup(c:GetControler(),loc1+LOCATION_MZONE,loc2)
if not mg then
mg=exg
else
mg:Merge(exg)
end
if smat and smat:IsType(TYPE_TUNER) and (not f1 or f1(smat)) then
return Duel.CheckTunerMaterial(c,smat,f1,f2,minc,maxc,mg) end
return Duel.CheckSynchroMaterial(c,f1,f2,minc,maxc,smat,mg)
end
end
function Chikichikibanban.SynTarget(f1,f2,minc,loc1,loc2,maxc,op)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,smat,mg,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local g=nil
local exg=Duel.GetFieldGroup(c:GetControler(),loc1+LOCATION_MZONE,loc2)
if not mg then
mg=exg
else
mg:Merge(exg)
end
if smat and smat:IsType(TYPE_TUNER) and (not f1 or f1(smat)) then
g=Duel.SelectTunerMaterial(c:GetControler(),c,smat,f1,f2,minc,maxc,mg)
else
g=Duel.SelectSynchroMaterial(c:GetControler(),c,f1,f2,minc,maxc,smat,mg)
end
if op then op(e,tp,1,g:GetFirst()) end
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
function Chikichikibanban.SynOperation(f1,f2,minc,loc1,loc2,maxc,op)
return function(e,tp,eg,ep,ev,re,r,rp,c,smat,mg,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
end
--Xyz monster, lv k*n
function Chikichikibanban.AddXyzProcedure(c,f,lv,ct,loc1,loc2,alterf,desc,maxc,op)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1165)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
if not maxc then maxc=ct end
if alterf then
e1:SetCondition(Chikichikibanban.XyzCondition2(f,lv,ct,loc1,loc2,maxc,alterf,desc,op))
e1:SetTarget(Chikichikibanban.XyzTarget2(f,lv,ct,loc1,loc2,maxc,alterf,desc,op))
e1:SetOperation(Chikichikibanban.XyzOperation2(f,lv,ct,loc1,loc2,maxc,alterf,desc,op))
else
e1:SetCondition(Chikichikibanban.XyzCondition(f,lv,ct,loc1,loc2,maxc))
e1:SetTarget(Chikichikibanban.XyzTarget(f,lv,ct,loc1,loc2,maxc))
e1:SetOperation(Chikichikibanban.XyzOperation(f,lv,ct,loc1,loc2,maxc))
end
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
end
--Xyz Summon(normal)
function Chikichikibanban.XyzCondition(f,lv,minc,loc1,loc2,maxc)
--og: use special material
return function(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=Group.CreateGroup()
if og then
mg:Merge(og)
end
local exg=Duel.GetFieldGroup(tp,loc1+LOCATION_MZONE,loc2)
mg:Merge(exg)
return Duel.CheckXyzMaterial(c,f,lv,minc,maxc,mg)
end
end
function Chikichikibanban.XyzTarget(f,lv,minc,loc1,loc2,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local mg=Group.CreateGroup()
local exg=Duel.GetFieldGroup(tp,loc1+LOCATION_MZONE,loc2)
mg:Merge(exg)
if og then
mg:Merge(og)
end
local g=Duel.SelectXyzMaterial(tp,c,f,lv,minc,maxc,mg)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
function Chikichikibanban.XyzOperation(f,lv,minc,loc1,loc2,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
--Xyz summon(alterf)
function Chikichikibanban.XyzCondition2(f,lv,minc,loc1,loc2,maxc,alterf,desc,op)
return function(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=nil
if og then
mg=og
else
mg=Duel.GetFieldGroup(tp,LOCATION_MZONE+loc1,loc2)
end
if (not min or min<=1) and mg:IsExists(Auxiliary.XyzAlterFilter,1,nil,alterf,c,e,tp,op) then
return true
end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
return Duel.CheckXyzMaterial(c,f,lv,minc,maxc,mg)
end
end
function Chikichikibanban.XyzTarget2(f,lv,minc,loc1,loc2,maxc,alterf,desc,op)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local mg=nil
if og then
mg=og
else
mg=Duel.GetFieldGroup(tp,LOCATION_MZONE+loc1,loc2)
end
local b1=Duel.CheckXyzMaterial(c,f,lv,minc,maxc,mg)
local b2=(not min or min<=1) and mg:IsExists(Auxiliary.XyzAlterFilter,1,nil,alterf,c,e,tp,op)
local g=nil
if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then
e:SetLabel(1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
g=mg:FilterSelect(tp,Auxiliary.XyzAlterFilter,1,1,nil,alterf,c,e,tp,op)
if op then op(e,tp,1,g:GetFirst()) end
else
e:SetLabel(0)
g=Duel.SelectXyzMaterial(tp,c,f,lv,minc,maxc,mg)
end
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
function Chikichikibanban.XyzOperation2(f,lv,minc,loc1,loc2,maxc,alterf,desc,op)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
else
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
--Xyz Summon(free)
function Chikichikibanban.AddXyzProcedureLevelFree(c,f,gf,minc,loc1,loc2,maxc,alterf,desc,op)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1165)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
if alterf then
e1:SetCondition(Chikichikibanban.XyzLevelFreeCondition2(f,gf,minc,loc1,loc2,maxc,alterf,desc,op))
e1:SetTarget(Chikichikibanban.XyzLevelFreeTarget2(f,gf,minc,loc1,loc2,maxc,alterf,desc,op))
e1:SetOperation(Chikichikibanban.XyzLevelFreeOperation2(f,gf,minc,loc1,loc2,maxc,alterf,desc,op))
else
e1:SetCondition(Chikichikibanban.XyzLevelFreeCondition(f,gf,minc,loc1,loc2,maxc))
e1:SetTarget(Chikichikibanban.XyzLevelFreeTarget(f,gf,minc,loc1,loc2,maxc))
e1:SetOperation(Chikichikibanban.XyzLevelFreeOperation(f,gf,minc,loc1,loc2,maxc))
end
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
end
--Xyz Summon(level free)
function Chikichikibanban.XyzLevelFreeFilter(c,xyzc,f)
return (c:IsFaceup() or not c:IsLocation(LOCATION_ONFIELD)) and c:IsCanBeXyzMaterial(xyzc) and (not f or f(c,xyzc))
end
function Chikichikibanban.XyzLevelFreeGoal(g,tp,xyzc,gf)
return (not gf or gf(g)) and Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
end
function Chikichikibanban.XyzLevelFreeCondition(f,gf,minc,loc1,loc2,maxc)
return function(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=minc
local maxc=maxc
if not maxc then maxc=minc end
if min then
minc=math.max(minc,min)
maxc=math.min(maxc,max)
end
if maxc<minc then return false end
local mg=nil
if og then
mg=og:Filter(Chikichikibanban.XyzLevelFreeFilter,nil,c,f)
else
mg=Duel.GetMatchingGroup(Chikichikibanban.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
end
local exg=Duel.GetMatchingGroup(Chikichikibanban.XyzLevelFreeFilter,tp,loc1,loc2,nil,c,f)
mg:Merge(exg)
local sg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg)
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local res=mg:CheckSubGroup(Chikichikibanban.XyzLevelFreeGoal,minc,maxc,tp,c,gf)
Auxiliary.GCheckAdditional=nil
return res
end
end
function Chikichikibanban.XyzLevelFreeTarget(f,gf,minc,loc1,loc2,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local minc=minc
local maxc=maxc
if not maxc then maxc=minc end
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local mg=nil
if og then
mg=og:Filter(Chikichikibanban.XyzLevelFreeFilter,nil,c,f)
else
mg=Duel.GetMatchingGroup(Chikichikibanban.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
end
local exg=Duel.GetMatchingGroup(Chikichikibanban.XyzLevelFreeFilter,tp,loc1,loc2,nil,c,f)
mg:Merge(exg)
local sg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL)
Duel.SetSelectedCard(sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local cancel=Duel.IsSummonCancelable()
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local g=mg:SelectSubGroup(tp,Chikichikibanban.XyzLevelFreeGoal,cancel,minc,maxc,tp,c,gf)
Auxiliary.GCheckAdditional=nil
if g and g:GetCount()>0 then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
function Chikichikibanban.XyzLevelFreeOperation(f,gf,minc,loc1,loc2,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
else
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
--Xyz summon(level free&alterf)
function Chikichikibanban.XyzLevelFreeCondition2(f,gf,minc,loc1,loc2,maxc,alterf,desc,op)
return function(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=nil
if og then
mg=og
else
mg=Duel.GetFieldGroup(tp,LOCATION_MZONE+loc1,loc2)
end
local altg=mg:Filter(Auxiliary.XyzAlterFilter,nil,alterf,c,e,tp,op):Filter(Auxiliary.MustMaterialCheck,nil,tp,EFFECT_MUST_BE_XMATERIAL)
if (not min or min<=1) and altg:GetCount()>0 then
return true
end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
mg=mg:Filter(Chikichikibanban.XyzLevelFreeFilter,nil,c,f)
local sg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg)
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local res=mg:CheckSubGroup(Chikichikibanban.XyzLevelFreeGoal,minc,maxc,tp,c,gf)
Auxiliary.GCheckAdditional=nil
return res
end
end
function Chikichikibanban.XyzLevelFreeTarget2(f,gf,minc,loc1,loc2,maxc,alterf,desc,op)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local mg=nil
if og then
mg=og
else
mg=Duel.GetFieldGroup(tp,LOCATION_MZONE+loc1,loc2)
end
local sg=Auxiliary.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL)
local mg2=mg:Filter(Chikichikibanban.XyzLevelFreeFilter,nil,c,f)
Duel.SetSelectedCard(sg)
local b1=mg2:CheckSubGroup(Chikichikibanban.XyzLevelFreeGoal,minc,maxc,tp,c,gf)
local b2=(not min or min<=1) and mg:IsExists(Auxiliary.XyzAlterFilter,1,nil,alterf,c,e,tp,op)
local g=nil
if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then
e:SetLabel(1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
g=mg:FilterSelect(tp,Auxiliary.XyzAlterFilter,1,1,nil,alterf,c,e,tp,op)
if op then op(e,tp,1,g:GetFirst()) end
else
e:SetLabel(0)
Duel.SetSelectedCard(sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local cancel=Duel.IsSummonCancelable()
Auxiliary.GCheckAdditional=Auxiliary.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
g=mg2:SelectSubGroup(tp,Chikichikibanban.XyzLevelFreeGoal,cancel,minc,maxc,tp,c,gf)
Auxiliary.GCheckAdditional=nil
end
if g and g:GetCount()>0 then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
function Chikichikibanban.XyzLevelFreeOperation2(f,gf,minc,loc1,loc2,maxc,alterf,desc,op)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
else
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
--Fake dark synchro
function Chikichikibanban.FakeDarkSynchroProcedure(c,f,gf,minc,maxc,op,self_location,opponent_location,mat_operation,...)
local self_location=self_location or 0
local opponent_location=opponent_location or 0
local operation_params={...}
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(Chikichikibanban.FakeDarkSynchroCondition(f,gf,minc,maxc,op,self_location,opponent_location))
e1:SetTarget(Chikichikibanban.FakeDarkSynchroTarget(f,gf,minc,maxc,op,self_location,opponent_location))
e1:SetOperation(Chikichikibanban.FakeDarkSynchroOperation(f,gf,minc,maxc,op,self_location,opponent_location,mat_operation,operation_params))
c:RegisterEffect(e1)
end
function Chikichikibanban.FakeDarkSynchroMaterialFilter(c,sc,f)
return (not f or f(c,sc))
end
function Chikichikibanban.FakeDarkSynchroFreeGoal(g,tp,sc,gf)
return (not gf or gf(g)) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
end
function Chikichikibanban.FakeDarkSynchroMaterialFilter2(c,sc,e,tp,op)
return (not op or op(e,tp,0,c))
end
function Chikichikibanban.FakeDarkSynchroCondition(f,gf,minc,maxc,op,self_location,opponent_location)
return function(e,c,og,min,max)
if c==nil then return true end
if og and not min then return true end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local tp=c:GetControler()
local mg=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=mg:Filter(Chikichikibanban.FakeDarkSynchroMaterialFilter,nil,c,f)
return sg:CheckSubGroup(Chikichikibanban.FakeDarkSynchroFreeGoal,minc,maxc,tp,c,gf)
and sg:IsExists(Chikichikibanban.FakeDarkSynchroMaterialFilter2,1,nil,c,e,tp,op)
end
end
function Chikichikibanban.FakeDarkSynchroTarget(f,gf,minc,maxc,op,self_location,opponent_location)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
if og and not min then
return true
end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local tp=c:GetControler()
local mg=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=mg:Filter(Chikichikibanban.FakeDarkSynchroMaterialFilter,nil,c,f)
local cancel=Duel.IsSummonCancelable()
local tg=sg:SelectSubGroup(tp,Chikichikibanban.FakeDarkSynchroFreeGoal,cancel,minc,maxc,tp,c,gf)
if tg then
if op then op(e,tp,1,tg:GetFirst()) end
tg:KeepAlive()
e:SetLabelObject(tg)
return true
else return false end
end
end
function Chikichikibanban.FakeDarkSynchroOperation(f,gf,minc,maxc,op,self_location,opponent_location,mat_operation,operation_params)
return function(e,tp,eg,ep,ev,re,r,rp,c)
local tg=e:GetLabelObject()
c:SetMaterial(tg)
mat_operation(tg,table.unpack(operation_params))
tg:DeleteGroup()
end
end
--special summon procedure
function Chikichikibanban.SpecialSummonProcedure(c,f,gf,minc,maxc,op,c_location,self_location,opponent_location,mat_operation,...)
local c_location=c_location or 0
local self_location=self_location or 0
local opponent_location=opponent_location or 0
local operation_params={...}
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(c_location)
e1:SetCondition(Chikichikibanban.SpecialSummonProcedureCondition(f,gf,minc,maxc,op,self_location,opponent_location))
e1:SetTarget(Chikichikibanban.SpecialSummonProcedureTarget(f,gf,minc,maxc,op,self_location,opponent_location))
e1:SetOperation(Chikichikibanban.SpecialSummonProcedureOperation(f,gf,minc,maxc,op,self_location,opponent_location,mat_operation,operation_params))
c:RegisterEffect(e1)
return e1
end
function Chikichikibanban.SpecialSummonProcedureMaterialFilter(c,sc,f)
return (not f or f(c,sc))
end
function Chikichikibanban.SpecialSummonProcedureFreeGoal(g,tp,sc,gf)
return (not gf or gf(g)) and ((Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not sc:IsLocation(LOCATION_EXTRA)) or
(sc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0))
end
function Chikichikibanban.SpecialSummonProcedureMaterialFilter2(c,sc,e,tp,op)
return (not op or op(e,tp,0,c))
end
function Chikichikibanban.SpecialSummonProcedureCondition(f,gf,minc,maxc,op,self_location,opponent_location)
return function(e,c,og,min,max)
if c==nil then return true end
if og and not min then return true end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local tp=c:GetControler()
local mg=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=mg:Filter(Chikichikibanban.SpecialSummonProcedureMaterialFilter,nil,c,f)
return sg:CheckSubGroup(Chikichikibanban.SpecialSummonProcedureFreeGoal,minc,maxc,tp,c,gf)
and sg:IsExists(Chikichikibanban.SpecialSummonProcedureMaterialFilter2,1,nil,c,e,tp,op)
end
end
function Chikichikibanban.SpecialSummonProcedureTarget(f,gf,minc,maxc,op,self_location,opponent_location)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
if og and not min then
return true
end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local tp=c:GetControler()
local mg=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=mg:Filter(Chikichikibanban.SpecialSummonProcedureMaterialFilter,nil,c,f)
local cancel=Duel.IsSummonCancelable()
local tg=sg:SelectSubGroup(tp,Chikichikibanban.SpecialSummonProcedureFreeGoal,cancel,minc,maxc,tp,c,gf)
if tg then
if op then op(e,tp,1,tg:GetFirst()) end
tg:KeepAlive()
e:SetLabelObject(tg)
return true
else return false end
end
end
function Chikichikibanban.SpecialSummonProcedureOperation(f,gf,minc,maxc,op,self_location,opponent_location,mat_operation,operation_params)
return function(e,tp,eg,ep,ev,re,r,rp,c)
local tg=e:GetLabelObject()
c:SetMaterial(tg)
mat_operation(tg,table.unpack(operation_params))
tg:DeleteGroup()
end
end
--special summon procedure(nomal)
function Chikichikibanban.SpecialSummonProcedureN(c,c_location,c_condition,op)
local c_location=c_location or 0
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(c_location)
e1:SetCondition(Chikichikibanban.SpecialSummonProcedureConditionN(c_condition,op))
e1:SetOperation(Chikichikibanban.SpecialSummonProcedureOperationN(c_condition,op))
c:RegisterEffect(e1)
return e1
end
function Chikichikibanban.SpecialSummonProcedureConditionN(c_condition,op)
return function(e,c)
if c==nil then return true end
local tp=c:GetControler()
return (not c_condition or c_condition(e,c)) and (not op or op(e,tp,0,c)) end
end
function Chikichikibanban.SpecialSummonProcedureOperationN(c_condition,op)
return function(e,tp,eg,ep,ev,re,r,rp,c)
if op then op(e,tp,1,e:GetHandler()) end
end
end
--special summon procedure(special)
function Chikichikibanban.SpecialSummonProcedureS(c,c_location,c_pos,c_condition,op)
local c_location=c_location or 0
local c_pos=c_pos or 0
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetTargetRange(c_pos,1)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(c_location)
e1:SetCondition(Chikichikibanban.SpecialSummonProcedureConditionS(c_condition,op))
e1:SetOperation(Chikichikibanban.SpecialSummonProcedureOperationS(c_condition,op))
c:RegisterEffect(e1)
return e1
end
function Chikichikibanban.SpecialSummonProcedureConditionS(c_condition,op)
return function(e,c)
if c==nil then return true end
local tp=c:GetControler()
return (not c_condition or c_condition(e,c)) and (not op or op(e,tp,0,c)) end
end
function Chikichikibanban.SpecialSummonProcedureOperationS(c_condition,op)
return function(e,tp,eg,ep,ev,re,r,rp,c)
if op then op(e,tp,1,e:GetHandler()) end
end
end
function Chikichikibanban.releasablehspfilter(c,sc,f)
return (not f or f(c,sc)) and c:IsReleasable()
end
function Chikichikibanban.releasablehspcon(self_location,opponent_location,controler,f,gf,minc,maxc)
return function(e,c)
if c==nil then return true end
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local tp=c:GetControler()
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.releasablehspfilter,nil,c,f)
return sg:CheckSubGroup(Chikichikibanban.SpecialSummonProcedureFreeGoal,minc,maxc,controler,c,gf)
end
end
function Chikichikibanban.releasablehspop(self_location,opponent_location,controler,f,gf,minc,maxc)
return function(e,tp,chk)
if chk==0 then return true end
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.SpecialSummonProcedureMaterialFilter,nil,c,f)
local tg=sg:SelectSubGroup(tp,Chikichikibanban.SpecialSummonProcedureFreeGoal,false,minc,maxc,controler,e:GetHandler(),gf)
Duel.Release(tg,REASON_COST)
end
end
function Chikichikibanban.togravehspfilter(c,sc,f)
return (not f or f(c,sc)) and c:IsAbleToGraveAsCost()
end
function Chikichikibanban.togravehspcon(self_location,opponent_location,controler,f,gf,minc,maxc)
return function(e,c)
if c==nil then return true end
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local tp=c:GetControler()
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.togravehspfilter,nil,c,f)
return sg:CheckSubGroup(Chikichikibanban.SpecialSummonProcedureFreeGoal,minc,maxc,controler,c,gf)
end
end
function Chikichikibanban.togravehspop(self_location,opponent_location,controler,f,gf,minc,maxc)
return function(e,tp,chk)
if chk==0 then return true end
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.togravehspfilter,nil,c,f)
local tg=sg:SelectSubGroup(tp,Chikichikibanban.SpecialSummonProcedureFreeGoal,false,minc,maxc,controler,e:GetHandler(),gf)
Duel.SendtoGrave(tg,REASON_COST)
end
end
function Chikichikibanban.todeckhspfilter(c,sc,f)
return (not f or f(c,sc)) and c:IsAbleToDeckAsCost()
end
function Chikichikibanban.todeckhspcon(self_location,opponent_location,controler,f,gf,minc,maxc)
return function(e,c)
if c==nil then return true end
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local tp=c:GetControler()
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.todeckhspfilter,nil,c,f)
return sg:CheckSubGroup(Chikichikibanban.SpecialSummonProcedureFreeGoal,minc,maxc,controler,c,gf)
end
end
function Chikichikibanban.todeckhspop(self_location,opponent_location,controler,f,gf,minc,maxc)
return function(e,tp,chk)
if chk==0 then return true end
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.todeckhspfilter,nil,c,f)
local tg=sg:SelectSubGroup(tp,Chikichikibanban.SpecialSummonProcedureFreeGoal,false,minc,maxc,controler,e:GetHandler(),gf)
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
end
function Chikichikibanban.removehspfilter(c,sc,f)
return (not f or f(c,sc)) and c:IsAbleToRemoveAsCost()
end
function Chikichikibanban.removehspcon(self_location,opponent_location,controler,f,gf,minc,maxc)
return function(e,c)
if c==nil then return true end
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local tp=c:GetControler()
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.removehspfilter,nil,c,f)
return sg:CheckSubGroup(Chikichikibanban.SpecialSummonProcedureFreeGoal,minc,maxc,controler,c,gf)
end
end
function Chikichikibanban.removehspop(self_location,opponent_location,pos,controler,f,gf,minc,maxc)
return function(e,tp,chk)
if chk==0 then return true end
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.removehspfilter,nil,c,f)
local tg=sg:SelectSubGroup(tp,Chikichikibanban.SpecialSummonProcedureFreeGoal,false,minc,maxc,controler,e:GetHandler(),gf)
Duel.Remove(g,pos,REASON_COST)
end
end
function Chikichikibanban.handspfilter(c,e,tp,f)
return (not f or f(c,sc)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and ((Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not c:IsLocation(LOCATION_EXTRA)) or
(c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0))
end
function Chikichikibanban.handsptg(self_location,opponent_location,op,controler,f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
local controler=controler
if not controler then controler=tp end
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.handspfilter,nil,e,controler,f)
if chk==0 then return (not op or op(e,tp,eg,ep,ev,re,r,rp,0,e:GetHandler()))
and sg:CheckSubGroup(Chikichikibanban.SpecialSummonProcedureFreeGoal2,minc,maxc,controler,gf) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,controler,self_location+opponent_location)
end
end
function Chikichikibanban.SpecialSummonProcedureFreeGoal2(g,tp,gf)
return (not gf or gf(g))
end
function Chikichikibanban.handspop(self_location,opponent_location,op,controler,f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp)
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
local controler=controler
if not controler then controler=tp end
if Duel.GetLocationCount(controler,LOCATION_MZONE,tp)<minc then return end
if minc>=2 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>maxc then ft=maxc elseif Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.handspfilter,nil,e,controler,f)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:SelectSubGroup(tp,Chikichikibanban.SpecialSummonProcedureFreeGoal2,false,minc,maxc,controler,gf)
if tg:GetCount()>0 then
Duel.SpecialSummon(tg,0,tp,controler,false,false,POS_FACEUP)
if op then Duel.BreakEffect() op(e,tp,eg,ep,ev,re,r,rp,1,e:GetHandler()) end
end
end
end
function Chikichikibanban.dccost(minc)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local minc=minc
if not minc then minc=1 end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,minc,minc,REASON_COST+REASON_DISCARD,e:GetHandler())
end
end
function Chikichikibanban.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
--special summon procedure(special)
function Chikichikibanban.reposcon(c,c_location,tg,op,con,etype,gategory,...)
local c_location=c_location
if not c_location then c_location=LOCATION_HAND end
local tg=tg
if not tg then tg=chiki.sptg end
local op=op
if not op then op=chiki.spop end
if not gategory then gategory=CATEGORY_SPECIAL_SUMMON end
if not etype then etype=EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O end
local limt={...}
local e1=Effect.CreateEffect(c)
e1:SetCategory(gategory)
e1:SetType(etype)
e1:SetCode(EVENT_RECOVER)
e1:SetRange(c_location)
if limt then
e1:SetCountLimit(limt)
end
if con then
e1:SetCondition(con)
end
e1:SetTarget(tg)
e1:SetOperation(op)
c:RegisterEffect(e1)
end
function Chikichikibanban.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function Chikichikibanban.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function Chikichikibanban.pocfilter(c)
return c:GetAttackAnnouncedCount()>0
end
function Chikichikibanban.poccon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Chikichikibanban.pocfilter,tp,LOCATION_MZONE,0,1,nil)
end
--tohand
function Chikichikibanban.thfilter(c,f)
return (not f or f(c)) and c:IsAbleToHand()
end
function Chikichikibanban.thtg(f)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Chikichikibanban.thfilter,tp,LOCATION_DECK,0,1,nil,f) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function Chikichikibanban.thop(f,op1,op2)
return function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Chikichikibanban.thfilter,tp,LOCATION_DECK,0,1,1,nil,f)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if op1 then op1(e,tp,eg,ep,ev,re,r,rp,1,e:GetHandler()) end
end
if op2 then op2(e,tp,eg,ep,ev,re,r,rp,1,e:GetHandler()) end
end
end
function Chikichikibanban.reposcost(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OATH)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function Chikichikibanban.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function Chikichikibanban.tgsptg(self_location,opponent_location,op,controler,f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local minc=minc
if not minc then minc=1 end
local maxc=maxc
if not maxc then maxc=minc end
local controler=controler
if not controler then controler=tp end
local g=Duel.GetFieldGroup(tp,self_location,opponent_location)
local sg=g:Filter(Chikichikibanban.handspfilter,nil,e,controler,f)
if chkc then return chkc:IsControler(controler) and chkc:IsLocation(loc) and Chikichikibanban.handspfilter(chkc,e,tp,f) end
if chk==0 then return (not op or op(e,tp,eg,ep,ev,re,r,rp,0,e:GetHandler()))
and sg:CheckSubGroup(Chikichikibanban.SpecialSummonProcedureFreeGoal2,minc,maxc,controler,gf) end
local ft=maxc
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ft=math.min(ft,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:SelectSubGroup(tp,Chikichikibanban.SpecialSummonProcedureFreeGoal2,false,minc,maxc,controler,gf)
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,tg:GetCount(),0,0)
end
end
function Chikichikibanban.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function Chikichikibanban.tgspop1(op)
return function(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if op then Duel.BreakEffect() op(e,tp,eg,ep,ev,re,r,rp,1,e:GetHandler()) end
end
end
end
function Chikichikibanban.tgspop2(op)
return function(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if g:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
if op then Duel.BreakEffect() op(e,tp,eg,ep,ev,re,r,rp,1,e:GetHandler()) end
end
end
end
......@@ -15,7 +15,7 @@ function c20197.cfilter(c)
return c:IsSetCard(0x713) and c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x201)
end
function c20197.filter(c)
return c:GetSequence()<5
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c20197.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local bns=1
......@@ -24,12 +24,12 @@ function c20197.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if bns==2 then
return false
else
return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c20197.filter(chkc) and chkc~=e:GetHandler()
return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c20197.filter(chkc) and chkc~=e:GetHandler()
end
end
if chk==0 then return Duel.IsExistingTarget(c20197.filter,tp,0,LOCATION_SZONE,bns,e:GetHandler()) end
if chk==0 then return Duel.IsExistingTarget(c20197.filter,tp,0,LOCATION_ONFIELD,bns,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c20197.filter,tp,0,LOCATION_SZONE,bns,bns,e:GetHandler())
local g=Duel.SelectTarget(tp,c20197.filter,tp,0,LOCATION_ONFIELD,bns,bns,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,bns,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,bns*500)
end
......
......@@ -4,7 +4,7 @@ function c20201.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(20201,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetTarget(c20201.tgtg)
......
--白玉潇潇✿魂魄妖梦
function c20229.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x208),1)
c:EnableReviveLimit()
--synchro summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(20229,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c20229.spcon)
e0:SetOperation(c20229.spop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
--wan jian gui zong !
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(20229,1))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c20229.cost)
e1:SetTarget(c20229.eqtg)
e1:SetOperation(c20229.eqop)
c:RegisterEffect(e1)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(20229,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCountLimit(1,20229)
e3:SetTarget(c20229.sptg2)
e3:SetOperation(c20229.spop2)
c:RegisterEffect(e3)
end
function c20229.sprfilter1(c,tp,syn)
return c:IsFaceup() and c:IsType(TYPE_TUNER) and c:GetSynchroLevel(syn)==2
and Duel.IsExistingMatchingCard(c20229.sprfilter2,tp,LOCATION_MZONE,0,1,c,syn) and c:IsCanBeSynchroMaterial(syn)
end
function c20229.sprfilter2(c,syn)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x713)
end
function c20229.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c20229.sprfilter1,tp,LOCATION_MZONE,0,1,nil,tp,c)
end
function c20229.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c20229.sprfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c20229.sprfilter2,tp,LOCATION_MZONE,0,1,1,g1,c)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST+REASON_SYNCHRO)
c:SetMaterial(g1)
c:CompleteProcedure()
end
function c20229.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c20229.eqfilter(c,ec)
return c:IsType(TYPE_EQUIP) and c:GetEquipTarget() and c:GetEquipTarget()~=ec and c:CheckEquipTarget(ec)
end
function c20229.gsfilter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c20229.eqfilter,tp,LOCATION_SZONE,0,1,nil,c)
end
function c20229.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c20229.gsfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c20229.gsfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c20229.gsfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c20229.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local sg=Duel.SelectMatchingCard(tp, c20229.eqfilter, tp, LOCATION_SZONE, LOCATION_SZONE, 1, 12, nil, tc)
local ec=sg:GetFirst()
while ec and ec:CheckEquipTarget(tc) do
Duel.Equip(tp,ec,tc)
ec=sg:GetNext()
end
end
end
function c20229.cfilter2(c)
return c:IsReason(REASON_DESTROY) and (c:IsSetCard(0x713) or c:IsSetCard(0x201)) and c:IsAbleToHand()
end
function c20229.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c20229.cfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c20229.cfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c20229.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c20229.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
......@@ -2,8 +2,7 @@
function c22234.initial_effect(c)
--fusion material
c:EnableReviveLimit()
Fus.AddFusionProcFunMulti(c,true,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_EARTH),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_LIGHT),
c22234.mfilter1)
Fus.AddFusionProcFunMulti(c,true,c22234.mfilter3,c22234.mfilter2,c22234.mfilter1)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22234,0))
......@@ -46,6 +45,12 @@ end
function c22234.mfilter1(c)
return c:IsRace(RACE_SPELLCASTER)
end
function c22234.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) or (c:IsOriginalCodeRule(22161) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22234.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_EARTH) or (c:IsOriginalCodeRule(22135) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22234.filter(c)
return c:IsSetCard(0xb046) and c:IsAbleToHand()
end
......
......@@ -2,7 +2,7 @@
function c22236.initial_effect(c)
--fusion material
c:EnableReviveLimit()
Fus.AddFusionProcFunMulti(c,true,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_EARTH),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),
Fus.AddFusionProcFunMulti(c,true,c22236.mfilter3,c22236.mfilter2,
c22236.mfilter1)
--search
local e1=Effect.CreateEffect(c)
......@@ -43,6 +43,12 @@ end
function c22236.mfilter1(c)
return c:IsRace(RACE_SPELLCASTER)
end
function c22236.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_DARK) or (c:IsOriginalCodeRule(22162) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22236.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_EARTH) or (c:IsOriginalCodeRule(22135) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22236.thfilter1(c)
return c:IsSetCard(0xb046) and c:IsAbleToHand()
end
......
......@@ -2,8 +2,7 @@
function c22238.initial_effect(c)
--fusion material
c:EnableReviveLimit()
Fus.AddFusionProcFunMulti(c,true,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_WATER),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_FIRE),
aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_WIND))
Fus.AddFusionProcFunMulti(c,true,c22238.mfilter1,c22238.mfilter2,c22238.mfilter3)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22238,0))
......@@ -38,6 +37,17 @@ function c22238.initial_effect(c)
e5:SetOperation(c22238.operation1)
c:RegisterEffect(e5)
end
--
function c22238.mfilter1(c)
return c:IsAttribute(ATTRIBUTE_WIND) or (c:IsOriginalCodeRule(22133) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22238.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_WATER) or (c:IsOriginalCodeRule(22132) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22238.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_FIRE) or (c:IsOriginalCodeRule(22131,22191) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
--
function c22238.filters(c)
return c:IsFaceup() and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
end
......
......@@ -2,8 +2,8 @@
function c22240.initial_effect(c)
--fusion material
c:EnableReviveLimit()
Fus.AddFusionProcFunMulti(c,true,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_LIGHT),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),
aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_WIND))
Fus.AddFusionProcFunMulti(c,true,c22240.mfilter1,c22240.mfilter2,
c22240.mfilter3)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22240,0))
......@@ -37,6 +37,17 @@ function c22240.initial_effect(c)
e6:SetValue(c22240.efilter)
c:RegisterEffect(e6)
end
--
function c22240.mfilter1(c)
return c:IsAttribute(ATTRIBUTE_DARK) or (c:IsOriginalCodeRule(22162) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22240.mfilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) or (c:IsOriginalCodeRule(22161) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
function c22240.mfilter3(c)
return c:IsAttribute(ATTRIBUTE_WIND) or (c:IsOriginalCodeRule(22133) and Duel.IsPlayerAffectedByEffect(c:GetControler(),22249))
end
--
function c22240.filter(c)
return c:IsSetCard(0xb046) and c:IsAbleToHand()
end
......
......@@ -19,15 +19,79 @@ function c22249.initial_effect(c)
c:RegisterEffect(e2)
end
function c22249.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_WATER+ATTRIBUTE_FIRE)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_WATER+ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178,0x179,0x184))
end
function c22249.filter00(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsOriginalSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184)
end
function c22249.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c22249.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x811)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
--
function c22249.filter3(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
--
function c22249.tsfilter00(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22234)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_FIRE+ATTRIBUTE_WATER))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter10(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22236)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_FIRE+ATTRIBUTE_WATER))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter20(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22238)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x179)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter30(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22240)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter31(c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
......@@ -35,7 +99,12 @@ function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg2=Duel.GetMatchingGroup(c22249.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c22249.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local exg=Duel.GetMatchingGroup(c22249.filter3,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
local res0=exg:IsExists(c22249.tsfilter01,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter00,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res1=exg:IsExists(c22249.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22249.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22249.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3) then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
......@@ -44,15 +113,25 @@ function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22249.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
return res or res0 or res1 or res2 or res3
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22249.activate(e,tp,eg,ep,ev,re,r,rp)
--effect flag
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
--
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22249.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22249.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local exg=Duel.GetMatchingGroup(c22249.filter00,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
mg1:Merge(exg)
local sg1=Duel.GetMatchingGroup(c22249.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
......@@ -82,6 +161,8 @@ function c22249.activate(e,tp,eg,ep,ev,re,r,rp)
end
tc:CompleteProcedure()
end
--flag reset
e1:Reset()
end
function c22249.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -19,7 +19,10 @@ function c22250.initial_effect(c)
c:RegisterEffect(e2)
end
function c22250.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178,0x182))
end
function c22250.filter00(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsOriginalSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184)
end
function c22250.filter1(c,e)
return not c:IsImmuneToEffect(e)
......@@ -28,6 +31,66 @@ function c22250.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x811)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22250.filter3(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
--
function c22250.tsfilter00(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22234)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22250.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter10(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22236)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22250.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22250.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter20(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22238)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22250.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x179)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter30(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22240)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22250.tsfilter31(c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
......@@ -35,7 +98,12 @@ function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg2=Duel.GetMatchingGroup(c22250.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c22250.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local exg=Duel.GetMatchingGroup(c22250.filter3,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
local res0=exg:IsExists(c22250.tsfilter01,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter00,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res1=exg:IsExists(c22250.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22250.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22250.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3) then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
......@@ -44,15 +112,25 @@ function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22250.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
return res or res0 or res1 or res2 or res3
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22250.activate(e,tp,eg,ep,ev,re,r,rp)
--effect flag
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
--
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22250.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22250.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local exg=Duel.GetMatchingGroup(c22250.filter00,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
mg1:Merge(exg)
local sg1=Duel.GetMatchingGroup(c22250.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
......@@ -82,6 +160,8 @@ function c22250.activate(e,tp,eg,ep,ev,re,r,rp)
end
tc:CompleteProcedure()
end
--flag reset
e1:Reset()
end
function c22250.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -19,7 +19,10 @@ function c22251.initial_effect(c)
c:RegisterEffect(e2)
end
function c22251.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183,0x184))
end
function c22251.filter00(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsOriginalSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184)
end
function c22251.filter1(c,e)
return not c:IsImmuneToEffect(e)
......@@ -28,6 +31,66 @@ function c22251.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x811)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22251.filter3(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
--
function c22251.tsfilter00(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22234)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter10(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22236)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter20(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22238)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x179)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter30(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22240)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter31(c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and not c:IsLocation(LOCATION_DECK) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22251.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22251.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
......@@ -35,7 +98,12 @@ function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg2=Duel.GetMatchingGroup(c22251.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c22251.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local exg=Duel.GetMatchingGroup(c22251.filter3,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
local res0=exg:IsExists(c22251.tsfilter01,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter00,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res1=exg:IsExists(c22251.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22251.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22251.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3) then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
......@@ -44,15 +112,25 @@ function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22251.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
return res or res0 or res1 or res2 or res3
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22251.activate(e,tp,eg,ep,ev,re,r,rp)
--effect flag
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
--
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22251.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22251.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local exg=Duel.GetMatchingGroup(c22251.filter00,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
mg1:Merge(exg)
local sg1=Duel.GetMatchingGroup(c22251.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
......@@ -82,6 +160,8 @@ function c22251.activate(e,tp,eg,ep,ev,re,r,rp)
end
tc:CompleteProcedure()
end
--flag reset
e1:Reset()
end
function c22251.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -19,7 +19,10 @@ function c22252.initial_effect(c)
c:RegisterEffect(e2)
end
function c22252.filter0(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and ((c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x179,0x180,0x182))
end
function c22252.filter00(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave() and c:IsOriginalSetCard(0x178,0x179,0x180,0x181,0x182,0x183,0x184)
end
function c22252.filter1(c,e)
return not c:IsImmuneToEffect(e)
......@@ -28,6 +31,66 @@ function c22252.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x811)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22252.filter3(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
--
function c22252.tsfilter00(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22234)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter01(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter02,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter03,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter02(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter03(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter10(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22236)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter11(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter12,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter12(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter13,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c)
end
function c22252.tsfilter13(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x182)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter20(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22238)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter21(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter22,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter22(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x179)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter23,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter23(c)
return ((c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x178)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter30(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(22240)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter31(c)
return((c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x180)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter32,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter32(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER))or c:IsOriginalSetCard(0x184)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter33,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsOriginalSetCard(0x183)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
......@@ -35,7 +98,12 @@ function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg2=Duel.GetMatchingGroup(c22252.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c22252.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local exg=Duel.GetMatchingGroup(c22252.filter3,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_DECK,0,nil)
local res0=exg:IsExists(c22252.tsfilter01,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter00,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res1=exg:IsExists(c22252.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22252.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22252.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3) then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
......@@ -44,15 +112,25 @@ function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22252.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
return res or res0 or res1 or res2 or res3
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22252.activate(e,tp,eg,ep,ev,re,r,rp)
--effect flag
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
--
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22252.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c22252.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local exg=Duel.GetMatchingGroup(c22252.filter00,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
mg1:Merge(exg)
local sg1=Duel.GetMatchingGroup(c22252.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
......@@ -82,6 +160,8 @@ function c22252.activate(e,tp,eg,ep,ev,re,r,rp)
end
tc:CompleteProcedure()
end
--flag reset
e1:Reset()
end
function c22252.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
--巨大涡流✿河城荷取
function c23110.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c23110.mfilter,nil,2,2)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetCondition(c23110.adcon)
e1:SetValue(c23110.atkval)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(23110,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c23110.sptg)
e2:SetOperation(c23110.spop)
c:RegisterEffect(e2)
end
function c23110.mfilter(c,xyzc)
return c:IsSetCard(0x817) or c:IsXyzLevel(xyzc,2)
end
function c23110.adcon(e)
return e:GetHandler():GetEquipCount()>0
end
function c23110.atkval(e,c)
return c:GetBaseAttack()*2
end
function c23110.spfilter(c,e,tp)
return c:IsLevel(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c23110.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c23110.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c23110.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c23110.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(c23110.spfilter,tp,0,LOCATION_DECK,nil,e,tp)
if Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local t1=g:Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local t2=g2:Select(1-tp,1,1,nil):GetFirst()
Duel.SpecialSummonStep(t1,0,tp,tp,false,false,POS_FACEUP)
if t2 then
Duel.SpecialSummonStep(t2,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,1)
e1:SetTarget(c23110.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c23110.splimit(e,c)
return c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)
end
--秘术『九字切』
function c23199.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c23199.target)
e1:SetOperation(c23199.activate)
c:RegisterEffect(e1)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(23199,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c23199.thtg)
e3:SetOperation(c23199.thop)
c:RegisterEffect(e3)
end
function c23199.filter1(c)
return c:IsSetCard(0x496) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c23199.filter2(c)
return c:IsSetCard(0x496) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c23199.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c23199.filter1,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:GetCount()>0 and Duel.IsExistingMatchingCard(c23199.filter2,tp,LOCATION_DECK,0,1,g:GetFirst()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c23199.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c23199.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c23199.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoGrave(g2,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c23199.aclimit1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
Duel.RegisterEffect(e1,tp)
end
function c23199.acfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_RITUAL) and c:IsSetCard(0x208) and c:IsFaceup() and c:GetLevel()>0
end
function c23199.aclimit1(e,re,tp)
local g=Duel.GetMatchingGroup(c23199.acfilter, tp, LOCATION_MZONE, 0, nil)
local lv=g:GetSum(Card.GetLevel)/3
return re:IsActiveType(TYPE_MONSTER) and (re:GetHandler():GetLevel()<=lv or re:GetHandler():GetRank()<=lv or re:GetHandler():GetLink()<=lv)
end
function c23199.thfilter(c)
return c:IsSetCard(0x496) and c:IsFaceup()
end
function c23199.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return (chkc:IsLocation(LOCATION_REMOVED) or chkc:IsLocation(LOCATION_GRAVE)) and c23199.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c23199.thfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c23199.thfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c23199.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
end
......@@ -14,7 +14,6 @@ function c23203.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCost(c23203.ctcost)
e2:SetTarget(c23203.cttg)
e2:SetOperation(c23203.ctop)
......
......@@ -35,6 +35,15 @@ function c31027.initial_effect(c)
e3:SetTarget(c31027.destg)
e3:SetOperation(c31027.desop)
c:RegisterEffect(e3)
--effect flag
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(31027)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c31027.sdcon)
e4:SetTargetRange(1,1)
c:RegisterEffect(e4)
end
c31027.DescSetName = 0x258
......
......@@ -6,7 +6,7 @@ function c50153.initial_effect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(2,50153)
e4:SetCountLimit(1,50153)
e4:SetTarget(c50153.btg)
e4:SetOperation(c50153.bop)
c:RegisterEffect(e4)
......
......@@ -46,7 +46,7 @@ function c50219.bop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c50219.natfilter,tp,0,LOCATION_MZONE,nil)
Duel.Draw(tp, ct, REASON_EFFECT)
Duel.Recover(tp, ct*1000, REASON_EFFECT)
Duel.Recover(tp, ct*400, REASON_EFFECT)
end
function c50219.value(e,c)
local ct=400
......
......@@ -45,7 +45,7 @@ function c50277.ccon(e,tp,eg,ep,ev,re,r,rp)
end
function c50277.cop(e,tp,eg,ep,ev,re,r,rp)
local atk=e:GetLabelObject():GetAttack()
Duel.Recover(tp,atk*3,REASON_EFFECT)
Duel.Recover(tp,atk*2,REASON_EFFECT)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<3 then
Duel.Draw(tp,1,REASON_EFFECT)
end
......
......@@ -45,7 +45,7 @@ function c50331.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*400)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*200)
end
function c50331.bop(e,tp,eg,ep,ev,re,r,rp)
local num=1
......@@ -55,7 +55,7 @@ function c50331.bop(e,tp,eg,ep,ev,re,r,rp)
TET.ELCounter.Add(nil,tp,50216,num,e)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.Recover(p,ct*400,REASON_EFFECT)
Duel.Recover(p,ct*200,REASON_EFFECT)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -72,5 +72,5 @@ function c50331.bbop(e,tp,eg,ep,ev,re,r,rp)
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50216,num,e)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.Recover(tp,ct*400,REASON_EFFECT)
Duel.Recover(tp,ct*200,REASON_EFFECT)
end
......@@ -39,7 +39,7 @@ function c50501.filter(c)
end
function c50501.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c50501.filter,tp,LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetOriginalCode)>3
return g:GetClassCount(Card.GetOriginalCode)>6
end
function c50501.spfilter4(c,e,tp)
return c:IsSetCard(0x250) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==4
......
--虔诚的人类僧侣✿圣白莲
function c60151301.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151301,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,60151301)
e1:SetTarget(c60151301.sptg)
e1:SetOperation(c60151301.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Special Summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151301,1))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,60151302)
e3:SetCondition(c60151301.sumcon)
e3:SetTarget(c60151301.sumtg)
e3:SetOperation(c60151301.sumop)
c:RegisterEffect(e3)
--equip effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(300)
e4:SetCondition(c60151301.con)
c:RegisterEffect(e4)
end
function c60151301.filter(c,e,tp)
return c:IsLocation(LOCATION_SZONE) and c:IsSetCard(0x252a)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60151301.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c60151301.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c60151301.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c60151301.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c60151301.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():GetLocation()~=LOCATION_DECK
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and not e:GetHandler():IsReason(REASON_BATTLE)
end
function c60151301.filter2(c,e,tp)
return c:GetCode()~=60151301 and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151301.filter3(c,e,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPosition(POS_FACEUP) and c:GetControler()==tp
and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151301.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151301.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c60151301.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=Duel.GetMatchingGroup(c60151301.filter2,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c60151301.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151301,3))
local g=Duel.SelectMatchingCard(tp,c60151301.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151301,2))
local g1=Duel.SelectMatchingCard(tp,c60151301.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.HintSelection(g1)
local tc2=g1:GetFirst()
Duel.Equip(tp,tc2,tc,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c60151301.eqlimit)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
end
function c60151301.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c60151301.con(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg:IsSetCard(0x252a) and tg:IsType(TYPE_MONSTER)
end
--教授法的阿阇梨✿圣白莲
function c60151303.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151303,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,60151303)
e1:SetTarget(c60151303.sptg)
e1:SetOperation(c60151303.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Special Summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151303,1))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,60151304)
e3:SetCondition(c60151303.sumcon)
e3:SetTarget(c60151303.sumtg)
e3:SetOperation(c60151303.sumop)
c:RegisterEffect(e3)
--equip effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e4:SetCountLimit(1)
e4:SetValue(c60151303.valcon)
e4:SetCondition(c60151303.con)
c:RegisterEffect(e4)
--equip effect
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e5:SetCountLimit(1)
e5:SetValue(c60151303.valcon2)
e5:SetCondition(c60151303.con)
c:RegisterEffect(e5)
end
function c60151303.tgfilter(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c60151303.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151303.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c60151303.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60151303.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c60151303.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():GetLocation()~=LOCATION_DECK
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and not e:GetHandler():IsReason(REASON_BATTLE)
end
function c60151303.filter2(c,e,tp)
return c:GetCode()~=60151303 and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151303.filter3(c,e,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPosition(POS_FACEUP) and c:GetControler()==tp
and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151303.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151303.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c60151303.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=Duel.GetMatchingGroup(c60151303.filter2,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c60151303.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151303,3))
local g=Duel.SelectMatchingCard(tp,c60151303.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151303,2))
local g1=Duel.SelectMatchingCard(tp,c60151303.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.HintSelection(g1)
local tc2=g1:GetFirst()
Duel.Equip(tp,tc2,tc,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c60151303.eqlimit)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
end
function c60151303.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c60151303.filter4(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151303.con(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg:IsSetCard(0x252a) and tg:IsType(TYPE_MONSTER)
end
function c60151303.efilter(e,te)
return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c60151303.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
function c60151303.valcon2(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
--德高望重的住持✿圣白莲
function c60151305.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151305,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,60151305)
e1:SetTarget(c60151305.sptg)
e1:SetOperation(c60151305.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Special Summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151305,1))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,60151306)
e3:SetCondition(c60151305.sumcon)
e3:SetTarget(c60151305.sumtg)
e3:SetOperation(c60151305.sumop)
c:RegisterEffect(e3)
--equip effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetValue(c60151305.tgvalue)
e4:SetCondition(c60151305.con)
c:RegisterEffect(e4)
end
function c60151305.tgfilter(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c60151305.tgfilter2(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c60151305.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151305.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60151305.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60151305.tgfilter,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 c60151305.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():GetLocation()~=LOCATION_DECK
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and not e:GetHandler():IsReason(REASON_BATTLE)
end
function c60151305.filter2(c,e,tp)
return c:GetCode()~=60151305 and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151305.filter3(c,e,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPosition(POS_FACEUP) and c:GetControler()==tp
and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151305.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151305.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c60151305.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=Duel.GetMatchingGroup(c60151305.filter2,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c60151305.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151305,3))
local g=Duel.SelectMatchingCard(tp,c60151305.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151305,2))
local g1=Duel.SelectMatchingCard(tp,c60151305.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.HintSelection(g1)
local tc2=g1:GetFirst()
Duel.Equip(tp,tc2,tc,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c60151305.eqlimit)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
end
function c60151305.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c60151305.filter4(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151305.con(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg:IsSetCard(0x252a) and tg:IsType(TYPE_MONSTER)
end
function c60151305.efilter(e,te)
return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c60151305.tgvalue(e,re,rp)
return rp~=e:GetHandlerPlayer()
end
--囿于短生之痛✿圣白莲
function c60151307.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c60151307.spcon)
e1:SetOperation(c60151307.spop2)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151307,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,60151308)
e2:SetTarget(c60151307.sptg)
e2:SetOperation(c60151307.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--Special Summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(60151307,1))
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,60151309)
e4:SetCondition(c60151307.sumcon)
e4:SetTarget(c60151307.sumtg)
e4:SetOperation(c60151307.sumop)
c:RegisterEffect(e4)
end
function c60151307.spfilter(c)
return c:IsSetCard(0x252a) and c:IsAbleToDeckOrExtraAsCost()
end
function c60151307.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c60151307.spfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c60151307.spop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c60151307.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c60151307.tgfilter(c,e,tp)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(3)
end
function c60151307.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c60151307.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 c60151307.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60151307.tgfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(c60151307.exlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
tc:RegisterEffect(e4,true)
end
end
function c60151307.exlimit(e,c)
return not c:IsSetCard(0x252a)
end
--
function c60151307.xyzlimit(e,c)
if not c then return false end
return not c:IsSetCard(0x252a)
end
function c60151307.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():GetLocation()~=LOCATION_DECK
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and not e:GetHandler():IsReason(REASON_BATTLE)
end
function c60151307.filter2(c,e,tp)
return c:GetCode()~=60151307 and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151307.filter3(c,e,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPosition(POS_FACEUP) and c:GetControler()==tp
and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151307.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151307.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c60151307.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=Duel.GetMatchingGroup(c60151307.filter2,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c60151307.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151307,3))
local g=Duel.SelectMatchingCard(tp,c60151307.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151307,2))
local g1=Duel.SelectMatchingCard(tp,c60151307.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.HintSelection(g1)
local tc2=g1:GetFirst()
Duel.Equip(tp,tc2,tc,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c60151307.eqlimit)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
end
function c60151307.eqlimit(e,c)
return c==e:GetLabelObject()
end
--觅得长生之法✿圣白莲
function c60151310.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c60151310.spcon)
e1:SetOperation(c60151310.spop2)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151310,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,60151311)
e2:SetTarget(c60151310.sptg)
e2:SetOperation(c60151310.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--Special Summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(60151310,1))
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,60151312)
e4:SetCondition(c60151310.sumcon)
e4:SetTarget(c60151310.sumtg)
e4:SetOperation(c60151310.sumop)
c:RegisterEffect(e4)
end
function c60151310.spfilter(c)
return c:IsSetCard(0x252a) and c:IsAbleToDeckOrExtraAsCost()
end
function c60151310.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c60151310.spfilter,tp,LOCATION_SZONE,0,1,e:GetHandler())
end
function c60151310.spop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c60151310.spfilter,tp,LOCATION_SZONE,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c60151310.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():GetLocation()~=LOCATION_DECK
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and not e:GetHandler():IsReason(REASON_BATTLE)
end
function c60151310.filter2(c,e,tp)
return c:GetCode()~=60151310 and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151310.filter3(c,e,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPosition(POS_FACEUP) and c:GetControler()==tp
and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151310.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151310.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c60151310.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=Duel.GetMatchingGroup(c60151310.filter2,tp,LOCATION_DECK,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c60151310.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151310,3))
local g=Duel.SelectMatchingCard(tp,c60151310.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151310,2))
local g1=Duel.SelectMatchingCard(tp,c60151310.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
local tc2=g1:GetFirst()
Duel.Equip(tp,tc2,tc,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c60151310.eqlimit)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
end
function c60151310.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151310.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c60151310.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=Duel.GetMatchingGroup(c60151310.filter2,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c60151310.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151310,3))
local g=Duel.SelectMatchingCard(tp,c60151310.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151310,2))
local g1=Duel.SelectMatchingCard(tp,c60151310.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.HintSelection(g1)
local tc2=g1:GetFirst()
Duel.Equip(tp,tc2,tc,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c60151310.eqlimit)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
end
function c60151310.eqlimit(e,c)
return c==e:GetLabelObject()
end
--善意而恶意的行僧✿圣白莲
function c60151313.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),3,2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151301,1))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c60151313.regcon)
e1:SetTarget(c60151313.sptg)
e1:SetOperation(c60151313.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151313,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,60151313)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c60151313.cost)
e2:SetTarget(c60151313.target)
e2:SetOperation(c60151313.operation)
c:RegisterEffect(e2)
--Actlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetOperation(c60151313.lmop)
c:RegisterEffect(e3)
end
function c60151313.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c60151313.filter2(c,e,tp)
return not c:IsType(TYPE_XYZ) and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151313.filter3(c,e,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPosition(POS_FACEUP) and c:GetControler()==tp
and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151313.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151313.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c60151313.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=Duel.GetMatchingGroup(c60151313.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c60151313.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151301,3))
local g=Duel.SelectMatchingCard(tp,c60151313.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151301,2))
local g1=Duel.SelectMatchingCard(tp,c60151313.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
local tc2=g1:GetFirst()
if tc2:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(g1) end
Duel.Equip(tp,tc2,tc,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c60151313.eqlimit)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
end
function c60151313.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c60151313.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c60151313.filter(c)
return ((c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x206)) and c:IsAbleToHand()
end
function c60151313.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151313.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c60151313.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60151313.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
local tc2=g:GetFirst()
if tc2:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(g) end
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c60151313.lmop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetCondition(c60151313.actcon)
e1:SetValue(c60151313.aclimit)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c60151313.actcon(e)
return Duel.GetAttacker()==e:GetHandler():GetEquipTarget()
or Duel.GetAttackTarget()==e:GetHandler():GetEquipTarget()
end
function c60151313.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
--被世人封印的妖僧✿圣白莲
function c60151315.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),3,2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151315,1))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c60151315.regcon)
e1:SetTarget(c60151315.sptg)
e1:SetOperation(c60151315.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151315,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1e0)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60151315)
e2:SetCost(c60151315.thcost)
e2:SetOperation(c60151315.thop)
c:RegisterEffect(e2)
--equip effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(3)
e3:SetCondition(c60151315.con)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_RANK)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetValue(c60151315.atkup)
e5:SetCondition(c60151315.con)
c:RegisterEffect(e5)
end
function c60151315.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c60151315.filter2(c,e,tp)
return not c:IsType(TYPE_XYZ) and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151315.filter3(c,e,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsPosition(POS_FACEUP) and c:GetControler()==tp
and c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151315.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151315.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c60151315.filter3,tp,LOCATION_ONFIELD,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=Duel.GetMatchingGroup(c60151315.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c60151315.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151315,3))
local g=Duel.SelectMatchingCard(tp,c60151315.filter3,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151315,2))
local g1=Duel.SelectMatchingCard(tp,c60151315.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
local tc2=g1:GetFirst()
if tc2:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(g1) end
Duel.Equip(tp,tc2,tc,true,true)
Duel.EquipComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c60151315.eqlimit)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
end
function c60151315.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c60151315.dfilter2(c)
return c:IsType(TYPE_EQUIP)
end
function c60151315.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and e:GetHandler():GetEquipGroup():FilterCount(c60151315.dfilter2,nil)>0 end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c60151315.dfilter(c,atk)
return c:IsFaceup()
end
function c60151315.thop(e,tp,eg,ep,ev,re,r,rp)
local z=e:GetHandler():GetEquipCount()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
e1:SetValue(z*600)
e:GetHandler():RegisterEffect(e1)
end
function c60151315.con(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg:IsSetCard(0x252a) and tg:IsType(TYPE_MONSTER)
end
function c60151315.atkup(e,c)
if e:GetHandler():GetEquipTarget():IsType(TYPE_XYZ) then
return e:GetHandler():GetEquipTarget():GetRank()*100
else
return e:GetHandler():GetEquipTarget():GetLevel()*100
end
end
--圣人的行方✿圣白莲
function c60151317.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),6,2,c60151317.ovfilter,aux.Stringid(60151317,0),2,c60151317.xyzop)
c:EnableReviveLimit()
--EQUIP
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151317,1))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60151317)
e2:SetCondition(c60151317.setcon)
e2:SetCost(c60151317.thcost)
e2:SetTarget(c60151317.target)
e2:SetOperation(c60151317.thop)
c:RegisterEffect(e2)
local e13=e2:Clone()
e13:SetDescription(aux.Stringid(60151317,3))
e13:SetType(EFFECT_TYPE_QUICK_O)
e13:SetCode(EVENT_FREE_CHAIN)
e13:SetHintTiming(0,0x1e0)
e13:SetCondition(c60151317.setcon2)
c:RegisterEffect(e13)
--equip effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(3)
e3:SetCondition(c60151317.con)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_RANK)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetValue(c60151317.atkup)
e5:SetCondition(c60151317.con)
c:RegisterEffect(e5)
end
function c60151317.ovfilter(c)
return c:IsFaceup() and (c:GetLevel()==6 or c:GetRank()==6) and c:IsSetCard(0x252a)
end
function c60151317.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
--
function c60151317.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c60151317.cfilter(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_XYZ)
end
function c60151317.setcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(c60151317.cfilter,1,nil)
end
function c60151317.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c60151317.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c60151317.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c60151317.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,c60151317.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE)
end
function c60151317.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Equip(tp,tc,e:GetHandler(),false,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetLabelObject(tc)
e3:SetValue(c60151317.eqlimit2)
tc:RegisterEffect(e3)
Duel.EquipComplete()
--[[local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetTargetRange(0,1)
if Duel.GetTurnPlayer()~=tp then
e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
else
e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
end
e4:SetValue(c60151317.aclimit)
e4:SetLabel(tc:GetCode())
Duel.RegisterEffect(e4,tp)]]
end
end
end
function c60151317.eqlimit2(e,c)
return e:GetOwner()==c
end
function c60151317.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and not re:GetHandler():IsImmuneToEffect(e)
end
function c60151317.cfilter2(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_XYZ)
end
function c60151317.setcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(c60151317.cfilter2,1,nil)
end
function c60151317.con(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg:IsSetCard(0x252a) and tg:IsType(TYPE_MONSTER)
end
function c60151317.atkup(e,c)
if e:GetHandler():GetEquipTarget():IsType(TYPE_XYZ) then
return e:GetHandler():GetEquipTarget():GetRank()*100
else
return e:GetHandler():GetEquipTarget():GetLevel()*100
end
end
--法界的华莲 圣白莲
function c60151319.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),9,2,c60151319.ovfilter,aux.Stringid(60151319,0),2,c60151319.xyzop)
c:EnableReviveLimit()
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151319,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60151319)
e2:SetCondition(c60151319.setcon)
e2:SetCost(c60151319.descost)
e2:SetTarget(c60151319.destg)
e2:SetOperation(c60151319.desop)
c:RegisterEffect(e2)
local e13=e2:Clone()
e13:SetDescription(aux.Stringid(60151319,4))
e13:SetType(EFFECT_TYPE_QUICK_O)
e13:SetCode(EVENT_FREE_CHAIN)
e13:SetHintTiming(0,0x1e0)
e13:SetCondition(c60151319.setcon2)
c:RegisterEffect(e13)
--equip effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(3)
e3:SetCondition(c60151319.con)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_RANK)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetValue(c60151319.atkup)
e5:SetCondition(c60151319.con)
c:RegisterEffect(e5)
--actlimit
--[[local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(1,1)
e6:SetCondition(c60151319.con2)
e6:SetValue(c60151319.actlimit)
c:RegisterEffect(e6)]]
end
function c60151319.ovfilter(c)
return c:IsFaceup() and (c:GetLevel()==9 or c:GetRank()==9) and c:IsSetCard(0x252a)
end
function c60151319.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
--
function c60151319.cfilter(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_XYZ)
end
function c60151319.setcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(c60151319.cfilter,1,nil)
end
function c60151319.dfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsReleasable() and c:IsFaceup()
end
function c60151319.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.IsExistingMatchingCard(c60151319.dfilter,tp,LOCATION_ONFIELD,0,1,nil) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=Duel.SelectMatchingCard(tp,c60151319.dfilter,tp,LOCATION_ONFIELD,0,1,ct1,nil)
local ct2=Duel.Release(rg,REASON_COST)
e:SetLabel(ct2)
end
function c60151319.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c60151319.filter(c)
return true
end
function c60151319.desop(e,tp,eg,ep,ev,re,r,rp)
local ct2=e:GetLabel()
if ct2==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct2,nil)
if dg:GetCount()>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
function c60151319.eqlimit2(e,c)
return e:GetOwner()==c
end
function c60151319.cfilter2(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_XYZ)
end
function c60151319.setcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(c60151319.cfilter2,1,nil)
end
function c60151319.con(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg:IsSetCard(0x252a) and tg:IsType(TYPE_MONSTER)
end
function c60151319.atkup(e,c)
if e:GetHandler():GetEquipTarget():IsType(TYPE_XYZ) then
return e:GetHandler():GetEquipTarget():GetRank()*100
else
return e:GetHandler():GetEquipTarget():GetLevel()*100
end
end
function c60151319.con2(e)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c60151319.actlimit(e,te,tp)
return te:IsActiveType(TYPE_TRAP)
end
--后光 圣白莲
function c60151321.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),12,2,c60151321.ovfilter,aux.Stringid(60151321,3),2,c60151321.xyzop)
c:EnableReviveLimit()
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151321,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60151321)
e2:SetCondition(c60151321.setcon)
e2:SetTarget(c60151321.thtg)
e2:SetCost(c60151321.thcost)
e2:SetOperation(c60151321.thop)
c:RegisterEffect(e2)
local e13=e2:Clone()
e13:SetDescription(aux.Stringid(60151321,4))
e13:SetType(EFFECT_TYPE_QUICK_O)
e13:SetCode(EVENT_FREE_CHAIN)
e13:SetHintTiming(0,0x1e0)
e13:SetCondition(c60151321.setcon2)
c:RegisterEffect(e13)
--equip effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c60151321.tgvalue)
e4:SetCondition(c60151321.con)
c:RegisterEffect(e4)
end
function c60151321.ovfilter(c)
return c:IsFaceup() and (c:GetLevel()==12 or c:GetRank()==12) and c:IsSetCard(0x252a)
end
function c60151321.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
--
function c60151321.cfilter(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_XYZ)
end
function c60151321.setcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(c60151321.cfilter,1,nil)
end
function c60151321.ccfilter(c)
return c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(Card.IsReleasable,1,nil)
end
function c60151321.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(c60151321.ccfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local g=Duel.GetMatchingGroup(c60151321.ccfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local lg=Group.CreateGroup()
local tc=g:GetFirst()
while tc do
local sg=tc:GetEquipGroup()
lg:Merge(sg)
tc=g:GetNext()
end
local fg=lg:Filter(Card.IsReleasable,nil)
Duel.Release(fg,REASON_COST)
fg:KeepAlive()
e:SetLabelObject(fg)
end
function c60151321.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()<PHASE_MAIN2 end
end
function c60151321.acfilter1(c)
return bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0
end
function c60151321.acfilter2(c)
return bit.band(c:GetOriginalType(),TYPE_SPELL)~=0
end
function c60151321.acfilter3(c)
return bit.band(c:GetOriginalType(),TYPE_TRAP)~=0
end
function c60151321.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetCurrentPhase()<PHASE_MAIN2 then
local fg=e:GetLabelObject()
if fg:IsExists(c60151321.acfilter1,1,nil) 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(c60151321.aclimit1)
e1:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e1,tp)
end
if fg:IsExists(c60151321.acfilter2,1,nil) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1)
e2:SetValue(c60151321.aclimit2)
e2:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e2,tp)
end
if fg:IsExists(c60151321.acfilter3,1,nil) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(0,1)
e3:SetValue(c60151321.aclimit3)
e3:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e3,tp)
end
end
end
function c60151321.aclimit1(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
end
function c60151321.aclimit2(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and not re:GetHandler():IsImmuneToEffect(e)
end
function c60151321.aclimit3(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and not re:GetHandler():IsImmuneToEffect(e)
end
function c60151321.cfilter2(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_XYZ)
end
function c60151321.setcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(c60151321.cfilter2,1,nil)
end
function c60151321.tgvalue(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c60151321.con(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget()
return tg:IsSetCard(0x252a) and tg:IsType(TYPE_MONSTER)
end
--顿悟『醒悟的世界』
function c60151325.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151325,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c60151325.target)
e1:SetOperation(c60151325.activate)
c:RegisterEffect(e1)
end
function c60151325.filter1(c,e,tp)
if c:IsType(TYPE_XYZ) then
local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x252a) and not c:IsType(TYPE_LINK)
and Duel.IsExistingMatchingCard(c60151325.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+3)
else
local rk=c:GetLevel()
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x252a) and not c:IsType(TYPE_LINK)
and Duel.IsExistingMatchingCard(c60151325.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+3)
end
end
function c60151325.filter2(c,e,tp,mc,rk)
return c:GetRank()==rk and c:IsSetCard(0x252a) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and not c:IsType(TYPE_LINK)
end
function c60151325.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60151325.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c60151325.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c60151325.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60151325.spfilter(c,rk2)
if c:IsType(TYPE_XYZ) then
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x252a) and c:GetRank()<rk2 and not c:IsType(TYPE_LINK)
else
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x252a) and c:GetLevel()<rk2 and not c:IsType(TYPE_LINK)
end
end
function c60151325.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
if tc:IsType(TYPE_XYZ) then
local rk=tc:GetRank()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60151325.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,rk+3)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
local rk2=sc:GetRank()
local g1=Duel.GetMatchingGroup(c60151325.spfilter,tp,LOCATION_EXTRA,0,nil,rk2)
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(60151325,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151325,2))
local sg=g1:Select(tp,1,1,nil)
Duel.Overlay(sc,sg)
end
end
else
local rk=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60151325.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,rk+3)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
local rk2=sc:GetRank()
local g1=Duel.GetMatchingGroup(c60151325.spfilter,tp,LOCATION_EXTRA,0,nil,rk2)
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(60151325,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151325,2))
local sg=g1:Select(tp,1,1,nil)
Duel.Overlay(sc,sg)
end
end
end
end
--天符「大日如来的光辉」
function c60151327.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_MSET,TIMING_SSET,TIMING_END_PHASE)
e1:SetCountLimit(1,60151327)
e1:SetCondition(c60151327.condition)
e1:SetTarget(c60151327.target)
e1:SetOperation(c60151327.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60151328)
e2:SetCondition(aux.exccon)
e2:SetCost(c60151327.negcost)
e2:SetTarget(c60151327.target2)
e2:SetOperation(c60151327.activate2)
c:RegisterEffect(e2)
end
function c60151327.atkfilter1(c)
return c:IsFacedown()
end
function c60151327.atkfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP)
end
function c60151327.condition(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetMatchingGroupCount(c60151327.atkfilter1,tp,0,LOCATION_ONFIELD,nil)
local ct2=Duel.GetMatchingGroupCount(c60151327.atkfilter2,tp,LOCATION_ONFIELD,0,nil)
return ct2>=ct1
end
function c60151327.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151327.atkfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c60151327.atkfilter1,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetChainLimit(aux.FALSE)
end
function c60151327.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c60151327.atkfilter1,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
--
function c60151327.cfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function c60151327.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c60151327.cfilter,tp,LOCATION_ONFIELD,0,2,nil) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60151327.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c60151327.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c60151327.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
--天符「释迦牟尼的五行山」
function c60151331.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60151331+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c60151331.condition)
e1:SetTarget(c60151331.target)
e1:SetOperation(c60151331.activate)
c:RegisterEffect(e1)
end
function c60151331.ccfilter(c)
return c:GetOverlayCount()>0 and c:IsType(TYPE_XYZ) and c:IsSetCard(0x252a)
and c:GetOverlayGroup():IsExists(c60151331.ccfilter2,1,nil)
end
function c60151331.ccfilter2(c)
return c:IsSetCard(0x252a)
end
function c60151331.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c60151331.ccfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c60151331.filter(c)
return c:IsAbleToHand()
end
function c60151331.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151331.filter,tp,0,LOCATION_SZONE,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(c60151331.filter,tp,0,LOCATION_SZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c60151331.filter2(c)
return c:IsSetCard(0x252a) and c:IsType(TYPE_MONSTER)
end
function c60151331.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(c60151331.filter,tp,0,LOCATION_SZONE,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT) then
if Duel.GetLocationCount(1-tp,LOCATION_SZONE)<=0 then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil,e,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151331,0))
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
if not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
e4:SetValue(0)
e4:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e4)
--
local ft=Duel.GetLocationCount(1-tp,LOCATION_SZONE)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60151331,1))
local sg2=Duel.SelectMatchingCard(tp,c60151331.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,ft,ft,nil)
local tc2=sg2:GetFirst()
while tc2 do
Duel.MoveToField(tc2,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.Equip(tp,tc2,tc,false,true)
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EQUIP_LIMIT)
e6:SetReset(RESET_EVENT+0x1fe0000)
e6:SetValue(1)
tc2:RegisterEffect(e6)
local e7=Effect.CreateEffect(e:GetHandler())
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e7:SetReset(RESET_EVENT+0x1fe0000)
e7:SetValue(LOCATION_DECKSHF)
tc2:RegisterEffect(e7)
tc2=sg2:GetNext()
end
Duel.EquipComplete()
end
end
end
end
function c60151331.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattleTarget()~=nil
end
function c60151331.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
--感情的摩天楼
function c60151333.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151333,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,60151333)
e3:SetRange(LOCATION_SZONE)
e3:SetCost(c60151333.negcost)
e3:SetTarget(c60151333.sptg)
e3:SetOperation(c60151333.spop)
c:RegisterEffect(e3)
--special summon2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151333,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,60151333)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c60151333.target)
e3:SetOperation(c60151333.activate)
c:RegisterEffect(e3)
end
function c60151333.cfilter(c)
return c:IsDiscardable()
end
function c60151333.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151333.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c60151333.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c60151333.filter(c,e,tp)
return c:IsSetCard(0x252a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(3)
end
function c60151333.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c60151333.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60151333.spop(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_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60151333.filter,tp,LOCATION_DECK,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 c60151333.filter1(c,e,tp)
if c:IsType(TYPE_XYZ) then
local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x252a) and not c:IsType(TYPE_LINK)
and Duel.IsExistingMatchingCard(c60151333.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk)
else
local rk=c:GetLevel()
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x252a) and not c:IsType(TYPE_LINK)
and Duel.IsExistingMatchingCard(c60151333.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk)
end
end
function c60151333.filter2(c,e,tp,mc,rk)
return c:GetRank()==rk and c:IsSetCard(0x252a) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c60151333.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60151333.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c60151333.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c60151333.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60151333.activate(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
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
if tc:IsType(TYPE_XYZ) then
local rk=tc:GetRank()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60151333.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,rk)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
else
local rk=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60151333.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,rk)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
......@@ -29,7 +29,8 @@ end
c61023.DescSetName = 0x229
function c61023.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
return re:GetHandler():IsAttribute(0x7d) and (re:GetActivateLocation()>LOCATION_GRAVE or re:GetActivateLocation()<LOCATION_MZONE) and ep~=tp
return re:GetHandler():IsAttribute(0x7d) and (re:GetActivateLocation()>LOCATION_GRAVE or re:GetActivateLocation()<LOCATION_MZONE)
and ep~=tp and re:IsActiveType(TYPE_MONSTER)
end
function c61023.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
......
......@@ -89,17 +89,17 @@ function cCardno.spfilter(c,e,tp)
return c:IsSetCard(0x298) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cCardno.detg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local flag1 = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0
local flag1 = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
local flag2 = Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0
if chk==0 then return flag1 or flag2 end
if flag1 then Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE),Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE),tp,LOCATION_MZONE) end
if chk==0 then return flag2 end
if flag1 then Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,LOCATION_MZONE,0),Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0),tp,LOCATION_MZONE) end
if flag2 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end
end
function cCardno.deop(e,tp,eg,ep,ev,re,r,rp)
local flag1 = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0
local flag1 = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
local flag2 = Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0
if flag1 then
local g1=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local g1=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
Duel.Destroy(g1,REASON_EFFECT)
end
if flag2 then
......
--连接海与山的月之公主✿绵月丰姬
function c74563043.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c74563043.mfilter,2,4)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c74563043.matcheck)
c:RegisterEffect(e1)
--move
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(74563043,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c74563043.seqtg)
e3:SetOperation(c74563043.seqop)
c:RegisterEffect(e3)
--Remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74563043,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c74563043.vntg)
e1:SetOperation(c74563043.vnop)
c:RegisterEffect(e1)
end
function c74563043.vntg(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup():Filter(Card.IsAbleToRemove,nil,POS_FACEDOWN)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil,e,tp,lg) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,lg,lg:GetCount(),0,0)
end
function c74563043.vnop(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup():Filter(Card.IsAbleToRemove,nil,POS_FACEDOWN)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<lg:GetCount() then return end
local c=e:GetHandler()
local tc=lg:GetFirst()
while tc do
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
tc=lg:GetNext()
end
end
function c74563043.mfilter(c)
return c:IsLinkAttribute(ATTRIBUTE_WATER) or c:IsLinkAttribute(ATTRIBUTE_EARTH)
end
function c74563043.matcheck(e,c)
local ct=c:GetMaterial()
local tc=ct:GetFirst()
local wat=0
local ear=0
while tc do
if tc:IsAttribute(ATTRIBUTE_WATER) then
wat=wat+1
else
ear=ear+1
end
tc=ct:GetNext()
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(wat*ear*1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c74563043.seqfilter(c)
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
end
function c74563043.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c74563043.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c74563043.seqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
end
function c74563043.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(74563043,1))
local g=Duel.SelectMatchingCard(tp,c74563043.seqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
local tc=g:GetFirst()
local ttp=tc:GetControler()
if tc:IsImmuneToEffect(e)
or Duel.GetLocationCount(ttp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
local p1,p2
if tc:IsControler(tp) then
p1=LOCATION_MZONE
p2=0
else
p1=0
p2=LOCATION_MZONE
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local seq=math.log(Duel.SelectDisableField(tp,1,p1,p2,0),2)
if tc:IsControler(1-tp) then seq=seq-16 end
Duel.MoveSequence(tc,seq)
end
\ No newline at end of file
--蛇符『伏地的巨蛇星』
function c74563045.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74563045.target)
e1:SetOperation(c74563045.activate)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,74563045)
e3:SetCost(c74563045.thcost)
e3:SetTarget(c74563045.thtg)
e3:SetOperation(c74563045.thop)
c:RegisterEffect(e3)
end
function c74563045.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,74563045,0,TYPE_NORMAL+TYPE_MONSTER,0,2000,1,RACE_REPTILE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c74563045.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetFlagEffect(tp,74563045)==0 then
Duel.RegisterFlagEffect(tp,74563045,0,0,1)
Duel.RegisterFlagEffect(tp,74563002,0,0,1)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,74563045,0,TYPE_NORMAL+TYPE_MONSTER,0,2000,1,RACE_REPTILE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
if Duel.IsCanRemoveCounter(tp,1,1,0x128a,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(74563045,0)) then
if c:IsFacedown() then return end
local t={}
local i=1
for i=1,Duel.GetCounter(tp,1,1,0x128a) do t[i]=i end
local a1=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.RemoveCounter(tp,1,1,0x128a,a1,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_UPDATE_ATTACK)
e12:SetValue(a1*500)
e12:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e13)
local e14=Effect.CreateEffect(c)
e14:SetType(EFFECT_TYPE_SINGLE)
e14:SetCode(EFFECT_UPDATE_LEVEL)
e14:SetReset(RESET_EVENT+RESETS_STANDARD)
e14:SetValue(a1)
c:RegisterEffect(e14)
end
end
function c74563045.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x128a,5,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x128a,5,REASON_COST)
end
function c74563045.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c74563045.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
\ No newline at end of file
--梦符『漆黑的宇宙梦』
function c86379025.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(2,31051)
c:RegisterEffect(e0)
--deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379025,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(c86379025.con1)
e1:SetTarget(c86379025.tg1)
e1:SetOperation(c86379025.op1)
c:RegisterEffect(e1)
--indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c86379025.con2)
e2:SetTarget(c86379025.tg2)
e2:SetValue(1)
c:RegisterEffect(e2)
--effect flag
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(86379025)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c86379025.con3)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c86379025.con4)
e4:SetValue(c86379025.efilter4)
c:RegisterEffect(e4)
end
--
function c86379025.filter(c,tp)
return c:IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027)
end
--
function c86379025.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379025.filter,tp,LOCATION_DECK,0,nil,tp)>=1
end
function c86379025.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x279) end
end
function c86379025.op1(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,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x279)
if g:GetCount()>0 then
local tc=g:GetFirst()
local opt=Duel.SelectOption(tp,aux.Stringid(86379025,1),aux.Stringid(86379025,2))
Duel.ShuffleDeck(tp)
if opt==0 and tc:GetSequence()~=(Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1) then
Duel.MoveSequence(tc,0)
end
if opt==1 and tc:GetSequence()~=0 then
Duel.MoveSequence(tc,1)
end
end
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)
end
--
function c86379025.con3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379025.filter,tp,LOCATION_DECK,0,nil,tp)>=3
end
--
function c86379025.con4(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c86379025.filter,tp,LOCATION_DECK,0,nil,tp)>=23
end
function c86379025.efilter4(e,te)
return not te:GetHandler():IsSetCard(0x279)
end
--梦符『漆黑的宇宙梦』
function c86379027.initial_effect(c)
--dream
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,31051)
e1:SetTarget(c86379027.tg)
e1:SetOperation(c86379027.op)
c:RegisterEffect(e1)
end
--
function c86379027.filter(c)
return c:IsAbleToHand()
end
function c86379027.filter2(c,tp)
return c:GetSequence()==(Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1)
end
function c86379027.filter3(c)
return c:GetSequence()==0
end
function c86379027.filter4(c,tp)
return c:IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027)
end
function c86379027.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379027.filter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c86379027.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c86379027.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=2 then
local sg=Group.CreateGroup()
local g1=g:Filter(c86379027.filter2,nil,tp)
local g2=g:Filter(c86379027.filter3,nil)
sg:Merge(g1)
sg:Merge(g2)
local cp=1-tp
if sg:FilterCount(c86379027.filter4,nil,tp)==2 then
cp=tp
end
Duel.ConfirmCards(cp,sg)
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_ATOHAND)
local tg=sg:Select(cp,1,1,nil)
local tc=tg:GetFirst()
if tc:GetSequence()==0 then
Duel.Hint(HINT_OPSELECTED,1-cp,aux.Stringid(86379027,0))
else
Duel.Hint(HINT_OPSELECTED,1-cp,aux.Stringid(86379027,1))
end
Duel.DisableShuffleCheck()
Duel.SendtoHand(tg,tp,REASON_EFFECT)
end
end
--梦符『取而代之的蝴蝶』
function c86379029.initial_effect(c)
--dream1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379029,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,31051)
e1:SetTarget(c86379029.tg1)
e1:SetOperation(c86379029.op1)
c:RegisterEffect(e1)
--dream2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379029,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(2,31051)
e2:SetTarget(c86379029.tg2)
e2:SetOperation(c86379029.op2)
c:RegisterEffect(e2)
--dream3
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379029,2))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(2,31051)
e3:SetTarget(c86379029.tg3)
e3:SetOperation(c86379029.op3)
c:RegisterEffect(e3)
end
--
function c86379029.filter1(c)
return c:GetSequence()==0
end
function c86379029.filter2(c,tp)
return c:GetSequence()==(Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1)
end
--
function c86379029.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_DECK,0,2,nil) end
end
function c86379029.op1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if g:GetCount()>=2 then
local tc1=g:Filter(c86379029.filter1,nil):GetFirst()
local tc2=g:Filter(c86379029.filter2,nil,tp):GetFirst()
Duel.MoveSequence(tc1,0)
Duel.MoveSequence(tc2,1)
end
end
--
function c86379029.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,1-tp,LOCATION_DECK,0,2,nil) end
end
function c86379029.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(1-tp,LOCATION_DECK,0)
if g:GetCount()>=2 then
local tc1=g:Filter(c86379029.filter1,nil):GetFirst()
local tc2=g:Filter(c86379029.filter2,nil,1-tp):GetFirst()
Duel.MoveSequence(tc1,0)
Duel.MoveSequence(tc2,1)
end
end
--
function c86379029.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,1-tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_DECK)
end
function c86379029.op3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(1-tp,LOCATION_DECK,0)
if g:GetCount()>0 then
local tc1=e:GetHandler()
local tc2=g:Filter(c86379029.filter2,nil,1-tp):GetFirst()
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc2,tp,REASON_EFFECT)
if tc1:IsRelateToEffect(e) then
tc1:CancelToGrave()
if tc1:IsAbleToDeck() then
Duel.SendtoDeck(tc1,1-tp,1,REASON_EFFECT)
tc1:ReverseInDeck()
else
Duel.SendtoGrave(tc1,REASON_RULE)
end
end
end
end
--清爽的天人✿比那名居天子
function c86379362.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379362,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,86379362)
e1:SetCondition(c86379362.condition)
e1:SetTarget(c86379362.target)
e1:SetOperation(c86379362.operation)
c:RegisterEffect(e1)
--weather
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379362,1))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c86379362.xtg)
e2:SetOperation(c86379362.xop)
c:RegisterEffect(e2)
end
--
function c86379362.cfilter(c)
local np=c:GetPosition()
local pp=c:GetPreviousPosition()
return ((np<3 and pp>3) or (pp<3 and np>3))
end
function c86379362.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c86379362.cfilter,1,nil)
end
function c86379362.target(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 c86379362.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~0 then
if c:IsPreviousLocation(LOCATION_GRAVE) 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+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
end
end
--
function c86379362.filter(c,tp)
return c:IsFaceup() and (Duel.IsExistingMatchingCard(c86379362.xfilter,tp,LOCATION_ONFIELD,0,1,nil) or not c:IsSetCard(0x701))
end
function c86379362.xfilter(c)
return c:GetCounter(0x245)>0
end
function c86379362.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c86379362.filter(chkc,tp) and chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(c86379362.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c86379362.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
function c86379362.xop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local b1=tc:IsSetCard(0x701)
local b2=Duel.IsExistingMatchingCard(c86379362.xfilter,tp,LOCATION_ONFIELD,0,1,nil)
if b2 or not b1 then
local off=1
local ops={}
local opval={}
if not b1 then
ops[off]=aux.Stringid(86379362,2)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(86379362,3)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379362,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(0x701)
tc:RegisterEffect(e1)
end
if sel==2 then
local ct=Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x245)
local t={}
for i=1,ct do
t[i]=i
end
local cnt=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x245,cnt,REASON_EFFECT)
if not tc:IsCanHaveCounter(0x245) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379362,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_COUNTER_PERMIT|0x245)
e2:SetRange(LOCATION_ONFIELD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e2)
end
tc:AddCounter(0x245,cnt)
end
end
end
end
--玄云海
function c86379366.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(c86379366.val)
c:RegisterEffect(e2)
--def up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(c86379366.val)
c:RegisterEffect(e3)
-- to zone
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86379366,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_DECK)
e4:SetCountLimit(1,86379366)
e4:SetCondition(c86379366.thcon)
e4:SetTarget(c86379366.thtg)
e4:SetOperation(c86379366.thop)
c:RegisterEffect(e4)
--to deck
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(86379366,2))
e5:SetCategory(CATEGORY_TODECK+CATEGORY_COUNTER)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,86379367)
e5:SetCondition(c86379366.gcon)
e5:SetTarget(c86379366.gtg)
e5:SetOperation(c86379366.gop)
c:RegisterEffect(e5)
end
--
function c86379366.val(e,c)
return Duel.GetCounter(tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0x245)*100
end
--
function c86379366.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x701) and c:IsDisabled()
end
function c86379366.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c86379366.filter1,tp,LOCATION_ONFIELD,0,1,nil)
end
function c86379366.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c86379366.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.MoveToField(c,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
--
function c86379366.cfilter(c)
return c:IsPreviousLocation(LOCATION_FZONE) and not c:IsCode(86379366)
end
function c86379366.gcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c86379366.cfilter,1,nil)
end
function c86379366.tdfilter(c)
return c:IsAbleToDeck()
end
function c86379366.xfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x245,1)
end
function c86379366.gtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379366.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.IsExistingMatchingCard(c86379366.xfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c86379366.gop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c86379366.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,3,nil)
if g:GetCount()>0 then
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,c86379366.xfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
tc:AddCounter(0x245,1)
end
end
end
end
......@@ -108,14 +108,6 @@ function c86379374.gop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
--cannot remove
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+RESETS_STANDARD-RESET_TURN_SET)
c:RegisterEffect(e2)
--link
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......
--天气『绯想天促』
function c86379376.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379376,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,86379376+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c86379376.cost)
e1:SetTarget(c86379376.target)
e1:SetOperation(c86379376.activate)
c:RegisterEffect(e1)
--grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379376,1))
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c86379376.gtg)
e2:SetOperation(c86379376.gop)
c:RegisterEffect(e2)
end
--
function c86379376.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x245,1,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x245,1,REASON_COST)
end
function c86379376.filter(c)
return (c:IsSetCard(0x226) or c:IsSetCard(0x703)) and c:IsAbleToHand()
end
function c86379376.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379376.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c86379376.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c86379376.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(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c86379376.filter2)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(0x701)
Duel.RegisterEffect(e1,tp)
end
end
function c86379376.filter2(e,c)
return c:GetCounter(0x245)>0
end
--
function c86379376.gtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
function c86379376.gop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if not tc:IsCanHaveCounter(0x245) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379376,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_COUNTER_PERMIT|0x245)
e2:SetRange(LOCATION_ONFIELD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e2)
end
tc:AddCounter(0x245,1)
local ct=tc:GetCounter(0x245)
if ct>3 then ct=3 end
Duel.BreakEffect()
for i=1,ct do
Duel.Recover(tp,500,REASON_EFFECT)
end
end
end
--雷符『神鸣者的住处』
function c86379382.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379382,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetCountLimit(1,86379382+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c86379382.tg)
e1:SetOperation(c86379382.op)
c:RegisterEffect(e1)
--c1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379382,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c86379382.cost1)
e2:SetTarget(c86379382.tg1)
e2:SetOperation(c86379382.op1)
c:RegisterEffect(e2)
--c2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379382,2))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCost(c86379382.cost2)
e3:SetTarget(c86379382.tg2)
e3:SetOperation(c86379382.op2)
c:RegisterEffect(e3)
--c4
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86379382,3))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCost(c86379382.cost4)
e4:SetTarget(c86379382.tg4)
e4:SetOperation(c86379382.op4)
c:RegisterEffect(e4)
--c8
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(86379382,4))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCost(c86379382.cost8)
e5:SetTarget(c86379382.tg8)
e5:SetOperation(c86379382.op8)
c:RegisterEffect(e5)
end
--
function c86379382.filter(c)
return c:IsSetCard(0x190) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c86379382.tg(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 c86379382.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c86379382.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(86379382,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)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--
function c86379382.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x245,1,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x245,1,REASON_COST)
end
function c86379382.filter1(c)
return c:IsSetCard(0x190) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(2)
end
function c86379382.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379382.filter1,tp,LOCATION_HAND,0,1,nil) end
end
function c86379382.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c86379382.filter1,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(-1)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
end
--
function c86379382.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x245,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x245,2,REASON_COST)
end
function c86379382.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function c86379382.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if not tc:IsCanHaveCounter(0x245) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379382,5))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_COUNTER_PERMIT|0x245)
e2:SetRange(LOCATION_ONFIELD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e2)
end
tc:AddCounter(0x245,1)
end
end
--
function c86379382.cost4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x245,4,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x245,4,REASON_COST)
end
function c86379382.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c86379382.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(0,LOCATION_ONFIELD)
e1:SetTarget(c86379382.disable)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,86379382+RESET_PHASE+PHASE_END,0,1)
end
function c86379382.disable(e,c)
return c:GetCounter(0x245)>0
end
--
function c86379382.cost8(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x245,8,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x245,8,REASON_COST)
end
function c86379382.filter8(c)
return c:IsAttribute(ATTRIBUTE_DIVINE) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c86379382.tg8(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379382.filter8,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c86379382.op8(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c86379382.filter8,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 c86379554.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x208),6,2,c86379554.ovfilter,aux.Stringid(86379554,0))
c:EnableReviveLimit()
--[[--battle target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetValue(c86379554.tlimit)
c:RegisterEffect(e1)
--effect target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c86379554.tlimit)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)]]
--san check
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379554,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DICE+CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c86379554.descon)
e3:SetCost(c86379554.descost)
e3:SetTarget(c86379554.destg)
e3:SetOperation(c86379554.desop)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86379554,2))
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1,86379554)
e4:SetTarget(c86379554.sptg)
e4:SetOperation(c86379554.spop)
c:RegisterEffect(e4)
end
--
function c86379554.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x255) and c:IsLevel(6)
end
--
function c86379554.tlimit(e,c)
return not c:IsSetCard(0x255)
end
--
c86379554.toss_dice=true
function c86379554.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x257)
end
function c86379554.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c86379554.desfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
function c86379554.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
local g=e:GetHandler():GetOverlayGroup()
Duel.SendtoGrave(g,REASON_COST)
end
function c86379554.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c86379554.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if g:GetCount()<=0 then return end
local a=Group.CreateGroup()
local b=Group.CreateGroup()
local tc=g:GetFirst()
while tc do
--[[local res=Duel.TossCoin(tp,1)
if res==1 then
a:AddCard(tc)
else
if tc:IsFaceup() and tc:IsCanTurnSet() then
b:AddCard(tc)
end
end]]
local hg=Group.CreateGroup()
hg:AddCard(tc)
Duel.HintSelection(hg)
hg:DeleteGroup()
local res=Duel.TossDice(tp,1)
if res<=3 then
a:AddCard(tc)
elseif res>=6 then
if tc:IsFaceup() and tc:IsCanTurnSet() then
b:AddCard(tc)
end
end
tc=g:GetNext()
end
if a:GetCount()>0 then
Duel.Destroy(a,REASON_EFFECT)
end
if b:GetCount()>0 then
local b1=b:Filter(Card.IsType,nil,TYPE_MONSTER)
b:Remove(Card.IsType,nil,TYPE_MONSTER)
if b1:GetCount()>0 then
Duel.ChangePosition(b1,POS_FACEDOWN_DEFENSE)
end
if b:GetCount()>0 then
Duel.ChangePosition(b,POS_FACEDOWN)
Duel.RaiseEvent(b,EVENT_SSET,e,REASON_EFFECT,tp,1-tp,0)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local d=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if d:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(d,REASON_EFFECT)
end
end
--
function c86379554.spfilter(c,e,tp)
local hasRoom=false
if c:IsLocation(LOCATION_EXTRA) then
hasRoom=Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
else
hasRoom=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
return c:IsSetCard(0x255) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and hasRoom
end
function c86379554.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
function c86379554.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.Destroy(c,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c86379554.spfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,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 c86379562.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--dice
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TOSS_DICE_NEGATE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c86379562.dicecon)
e2:SetOperation(c86379562.diceop)
c:RegisterEffect(e2)
--dice+1
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCategory(CATEGORY_DICE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c86379562.gcon)
e3:SetTarget(c86379562.gtg)
e3:SetOperation(c86379562.gop)
c:RegisterEffect(e3)
end
--
function c86379562.dicecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(86379562)==0
end
function c86379562.diceop(e,tp,eg,ep,ev,re,r,rp)
local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
local dc={Duel.GetDiceResult()}
local ct=(ev&0xff)+(ev>>16&0xff)
local dcc={}
if ct>1 then
--choose the index of results
local tc=1
while tc<=8 do
if dc[tc]==2 or dc[tc]==5 then
table.insert(dcc,tc)
end
tc=tc+1
end
end
local flag = (dc[1]==2) or (dc[1]==5) or (#dcc>0)
if aux.dice_chain_id~=cid and flag and Duel.SelectYesNo(tp,aux.Stringid(86379562,1)) then
Duel.Hint(HINT_CARD,0,86379562)
e:GetHandler():RegisterFlagEffect(86379562,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local ac=1
if ct>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(86379562,2))
local val,idx=Duel.AnnounceNumber(tp,table.unpack(dcc))
ac=val
end
local fc=0
if dc[ac]==2 then fc=1 end
if dc[ac]==5 then fc=6 end
dc[ac]=fc
Duel.SetDiceResult(table.unpack(dc))
aux.dice_chain_id=cid
end
end
--
function c86379562.gcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c86379562.gtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c86379562.gop(e,tp,eg,ep,ev,re,r,rp)
--dice
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TOSS_DICE_NEGATE)
e2:SetCondition(c86379562.dicecon2)
e2:SetOperation(c86379562.diceop2)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
function c86379562.dicecon2(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c86379562.diceop2(e,tp,eg,ep,ev,re,r,rp)
local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
local dc={Duel.GetDiceResult()}
local ct=(ev&0xff)+(ev>>16&0xff)
if aux.dice_chain_id~=cid then
Duel.Hint(HINT_CARD,0,86379562)
local ac=1
while ct>0 do
dc[ac]=dc[ac]+1
ac=ac+1
ct=ct-1
end
Duel.SetDiceResult(table.unpack(dc))
aux.dice_chain_id=cid
end
end
......@@ -22,6 +22,16 @@ function c86379854.initial_effect(c)
e2:SetTarget(c86379854.target)
e2:SetOperation(c86379854.negop)
c:RegisterEffect(e2)
--field2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379854,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCondition(c86379854.scon)
e3:SetTarget(c86379854.stg)
e3:SetOperation(c86379854.sop)
c:RegisterEffect(e3)
end
--
function c86379854.actlimit(e,re,tp)
......@@ -47,7 +57,7 @@ function c86379854.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
Duel.MoveToField(rc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
--[[local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379854,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
......@@ -56,7 +66,7 @@ function c86379854.negop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetTargetRange(0,1)
e1:SetValue(c86379854.neglimit)
rc:RegisterEffect(e1)
rc:RegisterEffect(e1)]]
end
end
function c86379854.neglimit(e,re,tp)
......@@ -66,3 +76,103 @@ function c86379854.neglimit(e,re,tp)
local rcode=rc:GetCode()
return re:IsActiveType(TYPE_SPELL) and rc:IsType(TYPE_FIELD) and not re:GetHandler():IsImmuneToEffect(e) and code==rcode
end
--
function c86379854.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c86379854.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c86379854.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local Tpe=c:GetOriginalType()
Card.SetCardData(c,4,TYPE_FIELD+TYPE_SPELL)
if Duel.MoveToField(c,tp,tp,LOCATION_FZONE,POS_FACEUP,true) then
Card.SetCardData(c,4,Tpe)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetValue(TYPE_SPELL+TYPE_FIELD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetProperty(EFFECT_CANNOT_DISABLE)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(0,LOCATION_FZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetTarget(c86379854.distarget)
c:RegisterEffect(e2)
--disable effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_FZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e3:SetOperation(c86379854.disoperation)
c:RegisterEffect(e3)
--code
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e4:SetCode(EFFECT_CHANGE_CODE)
e4:SetValue(c86379854.efv)
c:RegisterEffect(e4)
--copy
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_ADJUST)
e5:SetRange(LOCATION_FZONE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e5:SetCondition(c86379854.cpcon)
e5:SetOperation(c86379854.cpop)
c:RegisterEffect(e5)
end
end
end
function c86379854.distarget(e,c)
return c:IsFaceup()
end
function c86379854.disoperation(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if bit.band(tl,LOCATION_FZONE)~=0 and rp==1-tp then
Duel.NegateEffect(ev)
end
end
function c86379854.efv(e,c)
local ec=Duel.GetFieldCard(1-e:GetHandlerPlayer(),LOCATION_SZONE,5)
if ec and ec:IsFaceup() then
return ec:GetCode()
else
return e:GetHandler():GetCode()
end
end
--
function c86379854.cpcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
return tc and tc:IsFaceup() and tc:GetFlagEffect(86379854)==0
end
function c86379854.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
tc:RegisterFlagEffect(86379854,RESET_EVENT+RESETS_STANDARD,0,1)
local cid=c:CopyEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_LEAVE_FIELD_P)
e1:SetLabel(cid)
e1:SetLabelObject(c)
e1:SetOperation(c86379854.rstop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
function c86379854.rstop(e,tp,eg,ep,ev,re,r,rp)
local cid=e:GetLabel()
local tc=e:GetLabelObject()
if cid~=0 then tc:ResetEffect(cid,RESET_COPY) end
end
......@@ -18,7 +18,6 @@ function c86379858.initial_effect(c)
c:RegisterEffect(e2)
--field
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetDescription(aux.Stringid(86379858,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
......@@ -87,13 +86,12 @@ function c86379858.scon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c86379858.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c86379858.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)<=0 then return end
if c:IsRelateToEffect(e) then
local Tpe=c:GetOriginalType()
Card.SetCardData(c,4,TYPE_FIELD+TYPE_SPELL)
if Duel.MoveToField(c,tp,tp,LOCATION_FZONE,POS_FACEUP,true) then
......
--七曜『元素拆解』
require "expansions/script/nef/msc"
function c86379883.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
--e1:SetCountLimit(1,86379883)
e1:SetTarget(c86379883.tg)
e1:SetOperation(c86379883.op)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
--e2:SetCountLimit(1,86379883)
e2:SetCondition(aux.exccon)
e2:SetCost(c86379883.gcost)
e2:SetTarget(c86379883.gtg)
e2:SetOperation(c86379883.gop)
c:RegisterEffect(e2)
--
end
--
function c86379883.filter(c)
return c:IsSetCard(0x177) and c:IsType(TYPE_SPELL) and c:IsFaceup()
and c86379883.MqFot_Check_SpellCard(c)
end
function c86379883.MqFot_Check_SpellCard(c)
local List_Num=0
local Add_Group={}
for i=1,#FusMqCardList do
if FusMqCardList[i]==c:GetCode() then List_Num=i end
end
if List_Num<1 then return false end
local CardSetCode={}
for i=1,#FusMqSetCode[List_Num] do
local _,setcode=FusMqSetCode[List_Num][i](c)
table.insert(CardSetCode,setcode)
end
return #CardSetCode>1,CardSetCode
end
function c86379883.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and c86379883.filter(c) end
if chk==0 then return Duel.IsExistingTarget(c86379883.filter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c86379883.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
end
function c86379883.op(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local check,Fot_Group=c86379883.MqFot_Check_SpellCard(c)
if Duel.Release(c,REASON_EFFECT)<1 then return end
if (not check) then return end
local tg=Group.CreateGroup()
for i=1,#Fot_Group do
local code=0
local code_Group={}
for j=1,#FusMqBase do
if Fot_Group[i]==FusMqBase[j][2] then
table.insert(code_Group,FusMqBase[j][1])
end
end
table.sort(code_Group)
if #code_Group<2 then
code=code_Group[1]
else
local off=1
local ops={}
local opval={}
for i=1,#code_Group do
ops[off]=aux.Stringid(code_Group[i],0)
opval[off-1]=i
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
code=code_Group[sel]
end
local token=Duel.CreateToken(tp,code)
tg:AddCard(token)
end
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c86379883.aclimit)
e1:SetLabel(c:GetOriginalCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function c86379883.aclimit(e,re,tp)
return re:GetHandler():GetOriginalCode()==e:GetLabel()
end
--
function c86379883.gcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c86379883.gfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x177) and c86379883.MqFot_Check_SpellCard(c)
end
function c86379883.gtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and c86379883.gfilter(c) end
if chk==0 then return Duel.IsExistingTarget(c86379883.gfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c86379883.gfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
end
function c86379883.DelectTheSameElement(Table)
local exist={}
for k,value in pairs(Table) do
exist[value]=true
end
local newtable={}
for k,v in pairs(exist) do
table.insert(newtable,k)
end
table.sort(newtable)
return newtable
end
function c86379883.gop(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local check,Fot_Group=c86379883.MqFot_Check_SpellCard(c)
if Duel.Release(c,REASON_EFFECT)<1 then return end
if (not check) then return end
local code=0
local code_Group={}
for i=1,#Fot_Group do
for j=1,#FusMqBase do
if FusMqBase[j][2]==Fot_Group[i] then
table.insert(code_Group,FusMqBase[j][1])
end
end
end
if #code_Group<1 then return end
local code_List=c86379883.DelectTheSameElement(code_Group)
if #code_List<2 then
code=code_List[1]
else
local off=1
local ops={}
local opval={}
for i=1,#code_List do
ops[off]=aux.Stringid(code_List[i],0)
opval[off-1]=i
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
code=code_List[sel]
end
local token=Duel.CreateToken(tp,code)
Duel.SendtoHand(token,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,token)
end
end
\ No newline at end of file
......@@ -26,7 +26,7 @@ end
function M.filter(c, e, tp, mg)
local chkf = Duel.GetLocationCountFromEx(tp, tp, mg, c) > 0 and PLAYER_NONE or tp
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_FUSION, tp, false, false)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_FUSION, tp, false, false)
and c:CheckFusionMaterial(mg, e:GetHandler(), chkf)
end
......
......@@ -17,29 +17,23 @@ function M.initial_effect(c)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(M.sptg)
e1:SetOperation(M.spop)
e1:SetCountLimit(1, EFFECT_COUNT_CODE_SINGLE)
e1:SetCountLimit(1, Mid)
e1:SetLabel(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(999)
e2:SetLabel(2)
c:RegisterEffect(e2)
-- to hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetDescription(aux.Stringid(Mid, 1))
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE+LOCATION_DECK)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1, Mid)
e3:SetCost(M.thcost)
e3:SetTarget(M.thtg)
e3:SetOperation(M.thop)
c:RegisterEffect(e3)
end
function M.spfliter(c, tp)
return c:IsLocation(LOCATION_MZONE) and c:GetSummonPlayer() == tp and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
function M.spfliter(c, tp, lab)
local f = c:IsLocation(LOCATION_MZONE) and c:GetSummonPlayer() == tp and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
if lab == 1 then
return f and not c:IsCode(999001)
else
return f and c:IsCode(999001)
end
end
function M.fusionfilter(c, e, tp, mc, chkf)
......@@ -58,7 +52,7 @@ function M.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsOnField() then return false end
if not eg or eg:GetCount()==0 then return false end
if chk == 0 then
local g = eg:Filter(M.spfliter, nil, tp)
local g = eg:Filter(M.spfliter, nil, tp, e:GetLabel())
if g:GetCount() == 1 then
local chkf = Duel.GetLocationCountFromEx(tp, tp, g:GetFirst(), TYPE_FUSION) > 0 and PLAYER_NONE or tp
return Duel.IsExistingMatchingCard(M.fusionfilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp, g:GetFirst(), chkf)
......@@ -70,7 +64,7 @@ end
function M.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g = eg:Filter(M.spfliter, nil, tp)
local g = eg:Filter(M.spfliter, nil, tp, e:GetLabel())
if g:GetCount() ~= 1 then return end
local chkf = Duel.GetLocationCountFromEx(tp, tp, g:GetFirst(), TYPE_FUSION) > 0 and PLAYER_NONE or tp
......@@ -90,29 +84,4 @@ function M.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(fc, SUMMON_TYPE_FUSION, tp, tp, false, false, POS_FACEUP)
fc:CompleteProcedure()
end
end
--
function M.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp, 1000) end
Duel.PayLPCost(tp, 1000)
end
function M.thfilter(c, tp)
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0xaa6) and c:GetSummonPlayer() == tp
end
function M.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk == 0 then return eg:FilterCount(M.thfilter, nil, tp) > 0 and c:IsAbleToHand() end
Duel.SetOperationInfo(0, CATEGORY_TOHAND, c, 1, tp, c:GetLocation())
end
function M.thop(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
if c:IsAbleToHand() and c:IsLocation(LOCATION_GRAVE+LOCATION_DECK) then
Duel.SendtoHand(c, nil, REASON_EFFECT)
Duel.ConfirmCards(1-tp, c)
end
end
end
\ No newline at end of file
......@@ -14,7 +14,7 @@ function M.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(M.sptg)
e1:SetOperation(M.spop)
e1:SetCountLimit(1, Mid*10+1)
e1:SetCountLimit(1, Mid)
c:RegisterEffect(e1)
--indes
......@@ -33,7 +33,7 @@ function M.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1, Mid*10+2)
e2:SetCountLimit(1, Mid)
e2:SetCondition(M.thcon)
e2:SetOperation(M.repop)
c:RegisterEffect(e2)
......
......@@ -149,12 +149,16 @@ function M.lkop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoGrave(dis1, REASON_MATERIAL+REASON_LINK)
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+0xfe0000+RESET_PHASE+PHASE_END)
e1:SetValue(1)
c:RegisterEffect(e1, true)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1, 0)
e1:SetTarget(M.sumlimit)
Duel.RegisterEffect(e1, tp)
end
function M.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xaa6)
end
--
......
......@@ -55,7 +55,7 @@ function M.addEff1(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1, Mid * 10 + 1)
e1:SetCountLimit(1, Mid)
e1:SetCode(EVENT_DAMAGE)
e1:SetCondition(con)
e1:SetTarget(tg)
......@@ -94,7 +94,7 @@ function M.addEff2(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetCountLimit(1, Mid * 10 + 2)
e2:SetCountLimit(1, Mid)
e2:SetTarget(tg)
e2:SetOperation(op)
c:RegisterEffect(e2)
......@@ -143,7 +143,7 @@ function M.addCommonEff(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1, Mid*10+3)
e2:SetCountLimit(1, Mid)
e2:SetCondition(thcon)
e2:SetOperation(repop)
c:RegisterEffect(e2)
......
......@@ -49,7 +49,7 @@ function M.addEff1(c)
e:SetCode(EVENT_SPSUMMON_SUCCESS)
e:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e:SetRange(LOCATION_MZONE)
e:SetCountLimit(1, Mid*10+1)
e:SetCountLimit(1, Mid)
e:SetTarget(target)
e:SetOperation(operation)
c:RegisterEffect(e)
......@@ -98,7 +98,7 @@ function M.addEff2(c)
e1:SetDescription(aux.Stringid(Mid, 1))
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1, Mid*10+2)
e1:SetCountLimit(1, Mid)
e1:SetCost(cost)
e1:SetTarget(tg)
e1:SetOperation(op)
......@@ -148,7 +148,7 @@ function M.addCommonEff(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1, Mid*10+3)
e2:SetCountLimit(1, Mid)
e2:SetCondition(thcon)
e2:SetOperation(repop)
c:RegisterEffect(e2)
......
......@@ -46,7 +46,7 @@ function M.addEff1(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1, Mid*10+1)
e2:SetCountLimit(1, Mid)
e2:SetCondition(cond)
e2:SetTarget(target)
e2:SetOperation(operation)
......@@ -91,7 +91,7 @@ function M.addEff2(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_MSET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1, Mid * 10 + 2)
e2:SetCountLimit(1, Mid)
e2:SetTarget(tg)
e2:SetOperation(op)
c:RegisterEffect(e2)
......@@ -157,7 +157,7 @@ function M.addCommonEff(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1, Mid*10+3)
e2:SetCountLimit(1, Mid)
e2:SetCondition(thcon)
e2:SetOperation(repop)
c:RegisterEffect(e2)
......
--无何有的净化
local M = c999221
local Mid = 999221
function M.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1, Mid * 10 + 1)
e1:SetTarget(M.tg)
e1:SetOperation(M.op)
c:RegisterEffect(e1)
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(Mid, 1))
e2:SetCountLimit(1, Mid * 10 + 2)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(M.thcost)
e2:SetCondition(M.thcon)
e2:SetTarget(M.thtg)
e2:SetOperation(M.thop)
c:RegisterEffect(e2)
end
function M.dualFilter(c)
return c:IsType(TYPE_DUAL) and c:IsFaceup()
end
function M.filter(c)
return not c:IsType(TYPE_DUAL) and c:IsType(TYPE_EFFECT) and c:IsSummonableCard()
end
function M.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and M.filter(chkc) end
if chk == 0 then return Duel.IsExistingTarget(M.filter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil) end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EFFECT)
Duel.SelectTarget(tp, M.filter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
end
function M.op(e,tp,eg,ep,ev,re,r,rp)
local tg = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
if tg:FilterCount(Card.IsRelateToEffect, nil, e) ~= 1 then return end
local tc = tg:GetFirst()
local c = e:GetHandler()
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DUAL_SUMMONABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetDescription(aux.Stringid(Mid, 2))
tc:RegisterEffect(e1)
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(aux.DualNormalCondition)
e2:SetValue(TYPE_NORMAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3 = e2:Clone()
e3:SetCode(EFFECT_REMOVE_TYPE)
e3:SetValue(TYPE_EFFECT)
c:RegisterEffect(e3)
local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_TRIGGER)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(aux.DualNormalCondition)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetValue(1)
tc:RegisterEffect(e4)
local e0 = Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SUMMON_SUCCESS)
e0:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetOperation(function (e,tp,eg,ep,ev,re,r,rp)
e1:Reset()
e2:Reset()
e3:Reset()
e4:Reset()
end)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e0)
end
function M.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return true end
Duel.PayLPCost(tp, math.floor(Duel.GetLP(tp) / 2))
end
function M.thfilter(c)
return c:IsType(TYPE_DUAL) and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function M.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(M.thfilter, tp, LOCATION_MZONE, 0, 1, nil)
end
function M.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk == 0 then return c:IsAbleToHand() and c:IsLocation(LOCATION_GRAVE) end
e:GetHandler():CreateEffectRelation(e)
Duel.SetOperationInfo(0, CATEGORY_TOHAND, e:GetHandler(), 1, 0, 0)
end
function M.thop(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c, nil, REASON_EFFECT)
Duel.ConfirmCards(1-tp, c)
end
end
\ No newline at end of file
--幸魂
local M = c999222
local Mid = 999222
function M.initial_effect(c)
if M.counter == nil then
M.counter = true
local ge0 = Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge0:SetCode(EVENT_SPSUMMON_SUCCESS)
ge0:SetOperation(M.addcount)
Duel.RegisterEffect(ge0, 0)
end
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(M.tg)
e1:SetOperation(M.op)
c:RegisterEffect(e1)
end
function M.ctFilter(c)
local st = c:GetSummonType()
local flag = (st & SUMMON_TYPE_FUSION == SUMMON_TYPE_FUSION) or (st & SUMMON_TYPE_SYNCHRO == SUMMON_TYPE_SYNCHRO)
or (st & SUMMON_TYPE_XYZ == SUMMON_TYPE_XYZ) or (st & SUMMON_TYPE_LINK == SUMMON_TYPE_LINK)
if not flag then return false end
if c:IsSetCard(0xaa1) then return false end
local mg = c:GetMaterial()
if not mg or mg:GetCount() < 1 then return false end
return mg:FilterCount(Card.IsSetCard, nil, 0xaa1) > 0
end
function M.addcount(e,tp,eg,ep,ev,re,r,rp)
if eg:FilterCount(M.ctFilter, nil) > 0 and Nef.PLCounter.Get(tp, 999222) < 10 then
Nef.PLCounter.Add(tp, 999222, 1)
end
end
function M.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk == 0 then
return M.con1(tp) or M.con2(tp, e) or M.con3(tp) or M.con4(tp)
end
end
function M.op(e,tp,eg,ep,ev,re,r,rp)
local exit = 0
local canExit = 0
local sel4 = 0
local c = e:GetHandler()
local cond = {
[1] = function() return M.con1(tp) end,
[2] = function() return M.con2(tp, e) end,
[3] = function() return M.con3(tp) end,
[4] = function() return sel4 == 0 and M.con4(tp) end,
[5] = function() return canExit == 1 end,
}
local operation = {
[1] = function()
canExit = 1
Nef.PLCounter.Add(tp, 999222, -1)
local tc = Duel.SelectMatchingCard(tp, M.filter1, tp, LOCATION_MZONE, 0, 1, 1, nil)
if tc:GetCount() > 0 then
tc = tc:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(TYPE_TUNER)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(400)
tc:RegisterEffect(e2)
end
end,
[2] = function ()
canExit = 1
Nef.PLCounter.Add(tp, 999222, -2)
local tc = Duel.SelectMatchingCard(tp, M.filter2, tp, LOCATION_DECK, 0, 1, 1, nil, e, tp)
if tc:GetCount() > 0 then
Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP)
end
end,
[3] = function ()
canExit = 1
Nef.PLCounter.Add(tp, 999222, -3)
local tc = Duel.SelectMatchingCard(tp, M.filter3, tp, 0, LOCATION_ONFIELD, 1, 1, nil)
if tc:GetCount() > 0 then
Duel.Remove(tc, POS_FACEUP, REASON_EFFECT)
Duel.Draw(tp, 1, REASON_EFFECT)
end
end,
[4] = function ()
sel4 = 1
canExit = 1
Nef.PLCounter.Add(tp, 999222, -4)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1, 1)
e1:SetTarget(M.sumlimit4)
Duel.RegisterEffect(e1, tp)
end,
[5] = function ()
exit = 1
if c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
c:CancelToGrave()
Duel.SendtoDeck(c, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
end
end,
}
while exit ~= 1 do
local t = {}
for i = 1, 5 do
if cond[i]() then
table.insert(t, {desc = aux.Stringid(999222, 10+i), op = operation[i]})
end
end
local opt = Duel.SelectOption(tp, Nef.unpackOneMember(t, "desc"))+1
t[opt].op()
end
end
function M.filter1(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function M.con1(tp)
return Nef.PLCounter.Get(tp, 999222) >= 1
and Duel.IsExistingMatchingCard(M.filter1, tp, LOCATION_MZONE, 0, 1, nil)
end
function M.filter2(c, e, tp)
return c:IsLevelBelow(4) and (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsType(TYPE_DUAL)) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
function M.con2(tp, e)
return Nef.PLCounter.Get(tp, 999222) >= 2
and Duel.IsExistingMatchingCard(M.filter2, tp, LOCATION_DECK, 0, 1, nil, e, tp)
end
function M.filter3(c)
return c:IsAbleToRemove() and (not c:IsFaceup() or not c:IsAttribute(ATTRIBUTE_LIGHT))
end
function M.con3(tp)
return Nef.PLCounter.Get(tp, 999222) >= 3
and Duel.IsExistingMatchingCard(M.filter3, tp, 0, LOCATION_ONFIELD, 1, nil)
end
function M.con4(tp)
return Nef.PLCounter.Get(tp, 999222) >= 4
end
function M.sumlimit4(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_LIGHT)
end
\ No newline at end of file
--逐暗之光
local M = c999224
local Mid = 999224
function M.initial_effect(c)
--act in hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetCondition(M.handcon)
c:RegisterEffect(e1)
--Activate(summon)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_SPSUMMON)
e2:SetCondition(M.condition1)
e2:SetTarget(M.target1)
e2:SetOperation(M.activate1)
c:RegisterEffect(e2)
--
local e3=e2:Clone()
e2:SetCode(EVENT_SUMMON)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e4)
end
function M.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(), LOCATION_ONFIELD, 0) == 0
end
function M.filter(c, tp)
return c:GetSummonPlayer() == tp
and (c:IsAttribute(ATTRIBUTE_DARK)
or c:IsType(TYPE_XYZ)
or (c:IsSetCard(0x6208) and c:IsType(TYPE_TUNER))
or c:IsSetCard(0x5208))
end
function M.spfilter(c, e, tp)
if c:IsLocation(LOCATION_EXTRA) and (c:IsFacedown() or not c:IsType(TYPE_PENDULUM)) then return false end
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP)
end
function M.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain() == 0
end
function M.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local g = eg:Filter(M.filter, nil, 1-tp)
if chk == 0 then
return g:GetCount() > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
and Duel.GetMatchingGroupCount(M.spfilter, tp, LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA, 0, nil, e, tp) > 0
end
Duel.SetOperationInfo(0, CATEGORY_DISABLE_SUMMON, g, g:GetCount(), 0, 0)
Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, 0)
end
function M.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg, REASON_EFFECT)
Duel.BreakEffect()
if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
local sg = Duel.SelectMatchingCard(tp, M.spfilter, tp, LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA, 0, 1, 1, nil, e, tp)
if sg:GetCount() > 0 then
Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP)
end
end
end
\ No newline at end of file
......@@ -12,6 +12,7 @@ function M.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCategory(CATEGORY_DRAW)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetOperation(M.op)
......@@ -38,6 +39,10 @@ function M.initial_effect(c)
e3:SetCondition(M.chCon)
e3:SetOperation(M.chOp)
c:RegisterEffect(e3)
aux.AddCodeList(c, 999521)
aux.AddCodeList(c, 999522)
aux.AddCodeList(c, 999523)
end
function M.changeCounter(tp, canCancel)
......
......@@ -10,6 +10,10 @@ function M.initial_effect(c)
e1:SetTarget(M.target)
e1:SetOperation(M.operation)
c:RegisterEffect(e1)
aux.AddCodeList(c, 999521)
aux.AddCodeList(c, 999522)
aux.AddCodeList(c, 999523)
end
function M.tgfilter(c)
......
......@@ -22,6 +22,10 @@ function M.initial_effect(c)
e2:SetTarget(M.tg2)
e2:SetOperation(M.op2)
c:RegisterEffect(e2)
aux.AddCodeList(c, 999521)
aux.AddCodeList(c, 999522)
aux.AddCodeList(c, 999523)
end
function M.spfilter(c, code, e, tp)
......
......@@ -9,6 +9,8 @@ function M.initial_effect(c)
e1:SetTarget(M.target)
e1:SetOperation(M.operation)
c:RegisterEffect(e1)
aux.AddCodeList(c, 999521)
end
function M.spfilter(c, e, tp)
......
......@@ -10,6 +10,8 @@ function M.initial_effect(c)
e1:SetTarget(M.target)
e1:SetOperation(M.operation)
c:RegisterEffect(e1)
aux.AddCodeList(c, 999522)
end
function M.spfilter(c, e, tp)
......
......@@ -21,6 +21,8 @@ function M.initial_effect(c)
e1:SetTarget(M.target)
e1:SetOperation(M.operation)
c:RegisterEffect(e1)
aux.AddCodeList(c, 999523)
end
function M.spfilter(c, e, tp)
......
--叠光融合
local M = c999525
local Mid = 999525
function M.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetDescription(aux.Stringid(Mid, 0))
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1, Mid)
e1:SetTarget(M.tg)
e1:SetOperation(M.op)
c:RegisterEffect(e1)
end
--
function M.filter(c, e, tp)
if c:IsFaceup() and c:IsType(TYPE_XYZ) and aux.MustMaterialCheck(c, tp, EFFECT_MUST_BE_XMATERIAL) then
return Duel.IsExistingMatchingCard(M.fusSPFilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp, c)
elseif c:IsFaceup() and c:IsType(TYPE_FUSION) then
return Duel.IsExistingMatchingCard(M.xyzSPFilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp, c)
end
return false
end
function M.filter2(c)
return c:IsSetCard(0x999) and c:GetLevel() == 2
end
function M.fusSPFilter(c, e, tp, mc)
if not mc:IsAbleToGrave() then return false end
local mg = mc:GetMaterial()
if not mg or mg:GetCount() < 1 then return false end
return mg:FilterCount(M.filter2, nil) > 0 and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_FUSION, tp, false, false)
and c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp, tp, mc, c) > 0
end
function M.xyzSPFilter(c, e, tp, mc)
local mg = mc:GetMaterial()
if not mg or mg:GetCount() < 2 then return false end
return mg:GetClassCount(Card.GetLevel) == 1 and c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_XYZ, tp, false, false)
and c:IsType(TYPE_XYZ) and c:GetRank() == mg:GetFirst():GetLevel() and Duel.GetLocationCountFromEx(tp, tp, mc, c) > 0
end
function M.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.IsExistingMatchingCard(M.filter, tp, LOCATION_MZONE, 0, 1, nil, e, tp) end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end
function M.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(M.filter, tp, LOCATION_MZONE, 0, 1, nil, e, tp) then return end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
local mc = Duel.SelectMatchingCard(tp, M.filter, tp, LOCATION_MZONE, 0, 1, 1, nil, e, tp)
mc = mc:GetFirst()
mc:GetMaterial():ForEach(function (c)
Duel.Hint(HINT_CARD, 0, c:GetOriginalCode())
end)
if mc:IsType(TYPE_XYZ) then
local sg = Duel.SelectMatchingCard(tp, M.fusSPFilter, tp, LOCATION_EXTRA, 0, 1, 1, nil, e, tp, mc)
local sc = sg:GetFirst()
if sc then
sc:SetMaterial(nil)
Duel.SendtoGrave(mc, REASON_EFFECT)
Duel.SpecialSummon(sc, SUMMON_TYPE_FUSION, tp, tp, false, false, POS_FACEUP)
end
elseif mc:IsType(TYPE_FUSION) then
local sg = Duel.SelectMatchingCard(tp, M.xyzSPFilter, tp, LOCATION_EXTRA, 0, 1, 1, nil, e, tp, mc)
local sc = sg:GetFirst()
if sc then
local mg = mc:GetOverlayGroup()
if mg:GetCount() ~= 0 then
Duel.Overlay(sc, mg)
end
sc:SetMaterial(Group.FromCards(mc))
Duel.Overlay(sc, Group.FromCards(mc))
Duel.SpecialSummon(sc, SUMMON_TYPE_XYZ, tp, tp, false, false, POS_FACEUP)
sc:CompleteProcedure()
end
end
end
--烈阳冲击☆桑尼✿米尔可
local M = c999526
local Mid = 999526
function M.initial_effect(c)
M.EnableChangeCode(c, 25020, LOCATION_EXTRA+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
-- fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c, aux.FilterBoolFunction(Card.IsCode, 25020), aux.FilterEqualFunction(Card.GetLevel, 2), true)
-- no star
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Mid, 0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1, EFFECT_COUNT_CODE_SINGLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(M.descon1)
e1:SetTarget(M.destg)
e1:SetOperation(M.desop)
c:RegisterEffect(e1)
-- has star
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(M.descon2)
e2:SetHintTiming(0, TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e2)
aux.AddCodeList(c, 999521)
aux.AddCodeList(c, 999522)
aux.AddCodeList(c, 999523)
end
M.hana_mat = {
aux.FilterBoolFunction(Card.IsCode, 25020),
aux.FilterEqualFunction(Card.GetLevel, 2),
}
function M.EnableChangeCode(c, code, location, condition)
aux.AddCodeList(c,code)
local loc = c:GetOriginalType()&TYPE_MONSTER ~= 0 and LOCATION_MZONE or LOCATION_SZONE
loc = location or loc
if condition == nil then condition = aux.TRUE end
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(loc)
e1:SetCondition(condition)
e1:SetValue(code)
c:RegisterEffect(e1)
return e1
end
function M.descon1(e,tp,eg,ep,ev,re,r,rp)
return Nef.PLCounter.Get(tp, 999523) < 1
end
function M.descon2(e,tp,eg,ep,ev,re,r,rp)
return Nef.PLCounter.Get(tp, 999523) > 0
end
function M.desfilter(c, tp)
return c:IsSetCard(0x999) and Duel.IsExistingTarget(aux.TRUE, tp, 0, LOCATION_ONFIELD, 1, nil)
end
function M.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk == 0 then return Duel.IsExistingTarget(M.desfilter, tp, LOCATION_ONFIELD, 0, 1, nil, tp) end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
local g1 = Duel.SelectTarget(tp, M.desfilter, tp, LOCATION_ONFIELD, 0, 1, 1, nil)
local ct = 1
if Nef.PLCounter.Get(tp, 999521) >= 2 then ct = 2 end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
local g2 = Duel.SelectTarget(tp, aux.TRUE, tp, 0, LOCATION_ONFIELD, 1, ct, nil)
g1:Merge(g2)
if Nef.PLCounter.Get(tp, 999522) >= 2 then
Duel.SetChainLimit(M.chlimit)
end
Duel.SetOperationInfo(0, CATEGORY_DESTROY, g1, g1:GetCount(), 0, 0)
end
function M.desop(e,tp,eg,ep,ev,re,r,rp)
local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
Duel.Destroy(g, REASON_EFFECT)
end
function M.chlimit(e,ep,tp)
return tp == ep
end
\ No newline at end of file
--寂静风暴☆露娜✿查尔德
local M = c999527
local Mid = 999527
function M.initial_effect(c)
M.EnableChangeCode(c, 25021, LOCATION_EXTRA+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
-- fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c, aux.FilterBoolFunction(Card.IsCode, 25021), aux.FilterEqualFunction(Card.GetLevel, 2), true)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(Mid,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1, Mid)
e3:SetTarget(M.dctg)
e3:SetOperation(M.dcop)
c:RegisterEffect(e3)
aux.AddCodeList(c, 999521)
aux.AddCodeList(c, 999522)
aux.AddCodeList(c, 999523)
end
M.hana_mat = {
aux.FilterBoolFunction(Card.IsCode, 25021),
aux.FilterEqualFunction(Card.GetLevel, 2),
}
function M.EnableChangeCode(c, code, location, condition)
aux.AddCodeList(c,code)
local loc = c:GetOriginalType()&TYPE_MONSTER ~= 0 and LOCATION_MZONE or LOCATION_SZONE
loc = location or loc
if condition == nil then condition = aux.TRUE end
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(loc)
e1:SetCondition(condition)
e1:SetValue(code)
c:RegisterEffect(e1)
return e1
end
function M.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then
return Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0) > 0 and Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0
end
local f = 0
local category = 0
if Nef.PLCounter.Get(tp, 999521) < 1 then
f = f + 1
end
if Nef.PLCounter.Get(tp, 999522) >= 2 then
category = category + CATEGORY_TODECK
Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, 1-tp, LOCATION_HAND)
else
f = f + 2
end
if f > 0 then
category = category + CATEGORY_HANDES
local ctp
if f == 1 then
ctp = tp
elseif f == 2 then
ctp = 1-tp
else
ctp = PLAYER_ALL
end
Duel.SetOperationInfo(0, CATEGORY_HANDES, nil, 1, ctp, LOCATION_HAND)
end
e:SetCategory(category)
end
function M.dcop(e,tp,eg,ep,ev,re,r,rp)
if Nef.PLCounter.Get(tp, 999521) > 0 then
local g = Duel.SelectMatchingCard(tp, aux.TRUE, tp, LOCATION_HAND, 0, 1, 1, nil)
Duel.ConfirmCards(1-tp, g)
else
Duel.DiscardHand(tp, aux.TRUE, 1, 1, REASON_EFFECT+REASON_DISCARD)
end
local g2 = Duel.GetFieldGroup(tp, 0, LOCATION_HAND)
local sg
if Nef.PLCounter.Get(tp, 999523) > 0 then
Duel.ConfirmCards(tp, g2)
sg = g2:Select(tp, 1, 1, nil)
else
sg = g2:Select(1-tp, 1, 1, nil)
end
if Nef.PLCounter.Get(tp, 999522) >= 2 then
Duel.SendtoDeck(sg, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
else
Duel.SendtoGrave(sg, REASON_EFFECT+REASON_DISCARD)
end
end
\ No newline at end of file
--闪耀蓝石☆斯塔✿萨菲雅
local M = c999528
local Mid = 999528
function M.initial_effect(c)
M.EnableChangeCode(c, 25022, LOCATION_EXTRA+LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED)
aux.AddXyzProcedure(c, nil, 2, 2)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetDescription(aux.Stringid(Mid, 0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1, Mid)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(M.cost)
e1:SetTarget(M.target)
e1:SetOperation(M.operation)
c:RegisterEffect(e1)
aux.AddCodeList(c, 999521)
aux.AddCodeList(c, 999522)
aux.AddCodeList(c, 999523)
end
function M.EnableChangeCode(c, code, location, condition)
aux.AddCodeList(c,code)
local loc = c:GetOriginalType()&TYPE_MONSTER ~= 0 and LOCATION_MZONE or LOCATION_SZONE
loc = location or loc
if condition == nil then condition = aux.TRUE end
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(loc)
e1:SetCondition(condition)
e1:SetValue(code)
c:RegisterEffect(e1)
return e1
end
function M.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return e:GetHandler():CheckRemoveOverlayCard(tp, 1, REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp, 1, 1, REASON_COST)
end
function M.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.IsPlayerCanDraw(tp, 1) and Duel.IsPlayerCanDraw(1-tp, 1) end
Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, PLAYER_ALL, 1)
end
function M.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Draw(tp, 1, REASON_EFFECT)
if Nef.PLCounter.Get(tp, 999521) > 0 then
Duel.ConfirmCards(tp, Duel.GetDecktopGroup(1-tp, 1))
end
Duel.Draw(1-tp, 1, REASON_EFFECT)
if Nef.PLCounter.Get(tp, 999522) > 0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0, 1)
e1:SetValue(M.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1, tp)
end
if Nef.PLCounter.Get(tp, 999523) >= 2 then
if Duel.IsPlayerCanDraw(tp, 1) and Duel.IsExistingMatchingCard(M.filter, tp, LOCATION_HAND, 0, 1, nil) and Duel.SelectYesNo(tp, aux.Stringid(Mid, 1)) then
local g = Duel.SelectMatchingCard(tp, M.filter, tp, LOCATION_HAND, 0, 1, 1, nil)
Duel.SendtoGrave(g, REASON_EFFECT+REASON_DISCARD)
Duel.Draw(tp, 1, REASON_EFFECT)
end
end
end
function M.filter(c)
return c:IsSetCard(0x999) and c:IsDiscardable()
end
function M.aclimit(e, re, tp)
return re:GetActivateLocation() == LOCATION_HAND
end
--叠光妖精☆宙光✿
local M = c999529
local Mid = 999529
function M.initial_effect(c)
c:EnableReviveLimit()
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Mid, 1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(M.cost)
e2:SetCondition(M.negcon)
e2:SetTarget(M.negtg)
e2:SetOperation(M.negop)
c:RegisterEffect(e2)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Mid, 1))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(M.thtg)
e1:SetOperation(M.thop)
c:RegisterEffect(e1)
end
function M.negcon(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
return c:GetControler() ~= rp and Duel.IsChainNegatable(ev) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function M.cfilter(c, type)
return c:IsType(type) and c:IsSetCard(0x999) and c:IsAbleToGraveAsCost()
end
function M.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local typ = bit.band(re:GetActiveType(), TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
if chk == 0 then return Duel.IsExistingMatchingCard(M.cfilter, tp, LOCATION_HAND+LOCATION_ONFIELD, 0, 1, nil, typ) end
local g = Duel.SelectMatchingCard(tp, M.cfilter, tp, LOCATION_HAND+LOCATION_ONFIELD, 0, 1, 1, nil, typ)
Duel.SendtoGrave(g, REASON_COST)
e:SetLabel(typ)
end
function M.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return true end
Duel.SetOperationInfo(0, CATEGORY_NEGATE, eg, 1, 0, 0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0, CATEGORY_DESTROY, eg, 1, 0, 0)
end
end
function M.negop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateActivation(ev) then return end
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg, REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_TO_GRAVE)
e1:SetTargetRange(1, 0)
e1:SetTarget(M.rmlimit)
e1:SetLabel(e:GetLabel())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1, tp)
end
function M.rmlimit(e,c,tp)
return c:IsType(e:GetLabel()) and e and e:IsActiveType(TYPE_MONSTER) and e:GetHandler():IsCode(999529)
end
function M.thfilter(c)
return c:IsSetCard(0xaa7) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function M.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and M.thfilter(chkc) end
if chk == 0 then return Duel.IsExistingTarget(M.thfilter, tp, LOCATION_GRAVE, 0, 1, nil) end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
local g = Duel.SelectTarget(tp, M.thfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_GRAVE)
end
function M.thop(e,tp,eg,ep,ev,re,r,rp)
local tc = Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc, nil, REASON_EFFECT)
end
end
\ No newline at end of file
--叠光转生
local M = c999530
local Mid = 999530
function M.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(Mid, 0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(M.tg)
e1:SetOperation(M.op)
e1:SetCountLimit(1, Mid)
c:RegisterEffect(e1)
end
function M.filter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x999) and c:GetLevel() == 2
end
function M.filter2(c, e, tp)
return M.filter(c) and Duel.IsExistingMatchingCard(M.filter3, tp, LOCATION_SZONE+LOCATION_DECK+LOCATION_GRAVE, 0, 1, nil, e, tp, c, c:GetCode())
end
function M.filter3(c, e, tp, mat1, code)
return c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_XYZ, tp, false, false) and c:IsCode(code)
and Duel.IsExistingMatchingCard(M.filterEx, tp, LOCATION_EXTRA+LOCATION_HAND, 0, 1, nil, e, tp, Group.FromCards(c, mat1), code)
end
function M.filterEx(c, e, tp, g, code)
if c:IsCode(code) and c:IsLocation(LOCATION_EXTRA) and c:IsType(TYPE_XYZ) then
return c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_XYZ, tp, false, false) and c:IsXyzSummonable(mg, 2, 2)
elseif c:IsCode(code) and c:IsLocation(LOCATION_EXTRA) and c:IsType(TYPE_FUSION) then
return c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_FUSION, tp, false, false) and c:CheckFusionMaterial(g, nil, tp)
elseif c:IsLocation(LOCATION_HAND) and c:IsType(TYPE_RITUAL) and c:IsSetCard(0x999) then
return c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_RITUAL, tp, false, true)
and Duel.IsExistingMatchingCard(M.RMatFilter, tp, LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD, 0, 3, nil, code)
end
end
function M.RMatFilter(c, code)
return c:IsCode(code) and c:IsAbleToRemove()
end
function M.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return M.filter(chkc) end
if chk == 0 then
return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(M.filter2, tp, LOCATION_MZONE, 0, 1, nil, e, tp)
end
Duel.SelectTarget(tp, M.filter2, tp, LOCATION_MZONE, 0, 1, 1, nil, e, tp)
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_SZONE+LOCATION_DECK+LOCATION_GRAVE)
end
function M.op(e,tp,eg,ep,ev,re,r,rp)
local mat1 = Duel.GetFirstTarget()
if mat1 and mat1:IsRelateToEffect(e) then
local code = mat1:GetCode()
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local mat2 = Duel.SelectMatchingCard(tp, M.filter3, tp, LOCATION_SZONE+LOCATION_DECK+LOCATION_GRAVE, 0, 1, 1, nil, e, tp, mat1, code)
if mat2:GetCount() > 0 and Duel.SpecialSummon(mat2, 0, tp, tp, false, false, POS_FACEUP) > 0 then
Duel.RaiseEvent(e:GetHandler(), EVENT_ADJUST, nil, 0, PLAYER_NONE, PLAYER_NONE, 0)
mat2 = mat2:GetFirst()
local loc = LOCATION_HAND
if mat1:IsLocation(LOCATION_MZONE) and mat2:IsLocation(LOCATION_MZONE) then
loc = loc + LOCATION_EXTRA
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local matg = Group.FromCards(mat1, mat2)
local exc = Duel.SelectMatchingCard(tp, M.filterEx, tp, loc, 0, 1, 1, nil, e, tp, matg, code)
if exc:GetCount() > 0 then
exc = exc:GetFirst()
if exc:IsType(TYPE_XYZ) then
Duel.XyzSummon(tp, exc, matg)
elseif exc:IsType(TYPE_FUSION) then
exc:SetMaterial(matg)
Duel.SendtoGrave(matg, REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(exc, SUMMON_TYPE_FUSION, tp, tp, false, false, POS_FACEUP)
exc:CompleteProcedure()
elseif exc:IsType(TYPE_RITUAL) then
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
matg = Duel.SelectMatchingCard(tp, M.RMatFilter, tp, LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD, 0, 3, 3, nil, code)
exc:SetMaterial(matg)
Duel.Remove(matg, POS_FACEUP, REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(exc, SUMMON_TYPE_RITUAL, tp, tp, false, true, POS_FACEUP)
exc:CompleteProcedure()
end
end
end
end
end
\ No newline at end of file
......@@ -8,7 +8,7 @@ function M.initial_effect(c)
local function filter(mat)
local tp = c:GetOwner()
return (Duel.GetMatchingGroupCount(Card.IsSetCard, tp, LOCATION_DECK, 0, nil, 0xaa9) * 2) >= Duel.GetFieldGroupCount(tp, LOCATION_DECK, 0)
and mat:IsSetCard(0xaa9)
and mat:IsSetCard(0xaa9) and not mat:IsType(TYPE_LINK)
end
Auxiliary.AddLinkProcedure(c, filter, 1, 1)
......
--妖精☆式英雄登场
function c99999006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DRAW)
e1:SetCondition(c99999006.regcon)
e1:SetOperation(c99999006.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c99999006.condition)
e2:SetCost(c99999006.cost)
e2:SetTarget(c99999006.target)
e2:SetOperation(c99999006.activate)
c:RegisterEffect(e2)
--set
local e21=Effect.CreateEffect(c)
e21:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_REMOVE)
e21:SetType(EFFECT_TYPE_IGNITION)
e21:SetRange(LOCATION_GRAVE)
e21:SetTarget(c99999006.settg)
e21:SetOperation(c99999006.setop)
c:RegisterEffect(e21)
end
function c99999006.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFlagEffect(tp,99999006)==0 and Duel.GetCurrentPhase()==PHASE_DRAW and c:IsReason(REASON_RULE)
end
function c99999006.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(99999006,0)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1)
c:RegisterEffect(e1)
c:RegisterFlagEffect(99999006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1,EFFECT_FLAG_CLIENT_HINT,1,0,66)
end
end
function c99999006.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c99999006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(99999006)~=0 end
end
function c99999006.filter(c,e,tp)
return c:IsSetCard(0x999) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c99999006.filter1(c,e,tp)
return c:IsSetCard(0x999) and c:IsFaceup()
end
function c99999006.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
local b=Duel.GetMatchingGroup(c99999006.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local b1=Duel.GetMatchingGroup(c99999006.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
local scount=Duel.GetLocationCount(tp,LOCATION_SZONE)
local b2=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return (#b>0 and scount>0) or (#b2>0 and #b1>0) end
local off=1
local ops={}
local opval={}
if (#b>0 and scount>0) then
ops[off]=aux.Stringid(99999006,1)
opval[off]=0
off=off+1
end
if (#b2>0 and #b1>0) then
ops[off]=aux.Stringid(99999006,2)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
if sel==0 then
e:SetCategory(CATEGORY_EQUIP)
e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c99999006.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
else
e:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON)
e:SetProperty(EFFECT_FLAG_DELAY)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
end
function c99999006.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
local ice=Duel.CreateToken(tp,22085)
Duel.MoveToField(ice,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
ice:CancelToGrave()
Duel.Equip(tp,ice,tc,false)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(aux.TRUE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
else
local c=e:GetHandler()
local b2=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local nc=b2:GetFirst()
while nc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
nc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
nc:RegisterEffect(e2)
nc=b2:GetNext()
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c99999006.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c99999006.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingMatchingCard(c99999006.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function c99999006.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetLocation()~=LOCATION_GRAVE then return end
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c99999006.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Destroy(g:GetFirst(),REASON_EFFECT)
end
end
end
\ No newline at end of file
--
Gds={}
--
local GDS = false
local Gdslist = {}
local Gdsflag=286379010
function Gds.Adjustdreamsequence(c)
if GDS == true then return end
GDS = true
--adjust
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PREDRAW)
e1:SetOperation(Gds.dsop)
Duel.RegisterEffect(e1,0)
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetOperation(Gds.dsop2)
Duel.RegisterEffect(e2,0)
end
function Gds.dsop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,Gdsflag)>0 then return end
Duel.RegisterFlagEffect(0,Gdsflag,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetMatchingGroup(aux.TRUE,0,0xff,0xff,nil)
if g:GetCount()>0 then
local gc=g:GetCount()
for i=1,gc do
Gdslist[i]={}
end
local tc=g:GetFirst()
local ti=1
while tc do
Gdslist[ti][1]=tc
Gdslist[ti][2]=tc:GetSequence()
Gdslist[ti][3]=tc:GetFieldID()
tc:RegisterFlagEffect(Gdsflag+ti,RESET_PHASE+PHASE_END,0,1)
ti=ti+1
tc=g:GetNext()
end
end
end
function Gds.dsop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,Gdsflag)<=0 then return end
local g=Duel.GetMatchingGroup(aux.TRUE,0,LOCATION_DECK,LOCATION_DECK,nil):Filter(Card.IsOriginalSetCard,nil,0x279)
local tc=g:GetFirst()
while tc do
local ti=1
local ci=1
while ti>0 do
if tc:GetFlagEffect(Gdsflag+ti)>0 then
ci=ti
ti=0
else
ti=ti+1
end
end
local seq=tc:GetSequence()
local fid=tc:GetFieldID()
if seq~=Gdslist[ci][2] and fid==Gdslist[ci][3] and tc:IsLocation(LOCATION_DECK) then
Duel.RaiseEvent(tc,EVENT_CUSTOM+86379010,e,0,0,tc:GetControler(),seq)
end
Gdslist[ci][2]=tc:GetSequence()
Gdslist[ci][3]=tc:GetFieldID()
tc=g:GetNext()
end
end
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