Commit 60a2ba7f authored by tsubaki's avatar tsubaki

1.999yua更新

parent 35f166f7
Pipeline #11809 passed with stage
in 38 seconds
No preview for this file type
This diff is collapsed.
......@@ -16,6 +16,7 @@
!counter 0x128f 厄指示物
!counter 0x28d 命莲指示物
!counter 0x208 阳光指示物
!counter 0x245 气质指示物
!counter 0x254c 虚幻指示物
!counter 0x500d 结晶指示物
......@@ -29,10 +30,13 @@
!counter 0x10a2 种子衍生物
#setnames, using tab for comment
!setname 0x1 正义盟军 A·O·J
!setname 0xb1 彼岸 A·O·J
!setname 0x46 融合
!setname 0xaa1 三种神器
!setname 0xaa4 蕾蒂
!setname 0xaa5 萃香
!setname 0x100 灵梦
......@@ -139,6 +143,7 @@
!setname 0x254 月都
!setname 0x255 铃仙
!setname 0x256 因幡
!setname 0x3256 因幡帝
!setname 0x257 永夜
!setname 0x258 月兔
!setname 0x259 小人
......@@ -208,6 +213,10 @@
!setname 0x666 灵乌路空
!setname 0x666a 焰星
!setname 0x684 反魂碟
!setname 0x700 绯想
!setname 0x701 天候
!setname 0x702 符器
!setname 0x742 妖魔书
!setname 0x713 妖梦
!setname 0x721 Gust
!setname 0x740 亚玛萨那度
......@@ -266,6 +275,7 @@
!setname 0x411 游戏人生
!setname 0x511 摇曳百合
!setname 0x703 有顶天
!setname 0x711 No Name
!setname 0x8a1 魔女
!setname 0x911 深海栖舰
......@@ -295,5 +305,3 @@
!setname 0x5e15 石符
!setname 0xe39 2Pick技能
!setname 0x562 虚网
No preview for this file type
pics/66915009.jpg

48.2 KB | W: | H:

pics/66915009.jpg

46.9 KB | W: | H:

pics/66915009.jpg
pics/66915009.jpg
pics/66915009.jpg
pics/66915009.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/66915010.jpg

51.2 KB | W: | H:

pics/66915010.jpg

48.9 KB | W: | H:

pics/66915010.jpg
pics/66915010.jpg
pics/66915010.jpg
pics/66915010.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/66915026.jpg

56.4 KB | W: | H:

pics/66915026.jpg

56.9 KB | W: | H:

pics/66915026.jpg
pics/66915026.jpg
pics/66915026.jpg
pics/66915026.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -50,8 +50,7 @@ function c200007.initial_effect(c)
c:RegisterEffect(e3)
end
function c200007.synfilter(c)
local x=c:GetOriginalCode()
return x>=200001 and x<=200020
return c:IsOriginalSetCard(0x700)
end
function c200007.seqcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -58,8 +58,7 @@ function c200008.initial_effect(c)
c:RegisterEffect(e5)
end
function c200008.synfilter(c)
local x=c:GetOriginalCode()
return x>=200001 and x<=200020
return c:IsOriginalSetCard(0x700)
end
function c200008.fcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
......@@ -89,7 +88,7 @@ function c200008.sop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTargetRange(0,1)
e1:SetValue(c200008.damval)
e1:SetReset(RESET_PHASE+PHASE_END,1)
-- Duel.RegisterEffect(e1,tp)
-- Duel.RegisterEffect(e1,tp)
end
end
end
......@@ -125,13 +124,13 @@ function c200008.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(-500)
-- tc:RegisterEffect(e2)
-- tc:RegisterEffect(e2)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(-500)
-- tc:RegisterEffect(e2)
-- tc:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......
......@@ -66,7 +66,7 @@ function c200009.initial_effect(c)
end
function c200009.spfilter(c)
local x=c:GetOriginalCode()
return x>=200001 and x<=200020 and x~=200009 and c:IsReleasable()
return c:IsOriginalSetCard(0x700) and x~=200009 and c:IsReleasable()
end
function c200009.spcon(e,c)
if c==nil then return true end
......@@ -102,7 +102,7 @@ function c200009.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c200009.filter(c,e,tp)
local x=c:GetOriginalCode()
return x>=200001 and x<=200020 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsOriginalSetCard(0x700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c200009.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -63,7 +63,7 @@ function c200016.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c200016.filter(c)
local x=c:GetOriginalCode()
return x>=200001 and x<=200020 and c:IsAbleToHand() and x~=200016
return c:IsOriginalSetCard(0x700) and c:IsAbleToHand() and x~=200016
end
function c200016.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c200016.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -30,7 +30,7 @@ function c200017.initial_effect(c)
end
function c200017.filter(c)
local x=c:GetOriginalCode()
return x>=200001 and x<=200020 and c:IsAbleToGrave() --and c:GetLevel()<=8
return c:IsOriginalSetCard(0x700) and c:IsAbleToGrave() --and c:GetLevel()<=8
end
function c200017.rfilter(c,lv)
return c:GetLevel()==lv
......
--天候-快晴
function c200101.initial_effect(c)
function c200101.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -36,7 +36,7 @@ function c200101.initial_effect(c)
end
function c200101.filter(c)
local x=c:GetOriginalCode()
return ((x>=200001 and x<=200020) or (x==25016))
return c:IsOriginalSetCard(0x700)
end
function c200101.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(aux.TRUE,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)==1
......
......@@ -33,5 +33,5 @@ function c200103.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c200103.tg(e,c)
local x=c:GetOriginalCode()
return (x>=200001 and x<=200020)
return c:IsOriginalSetCard(0x700)
end
\ No newline at end of file
......@@ -18,7 +18,7 @@ function c200113.initial_effect(c)
end
function c200113.filter(c)
local x=c:GetOriginalCode()
return ((x>=200001 and x<=200020) or x==25016) and c:IsFaceup()
return c:IsOriginalSetCard(0x700) and c:IsFaceup()
end
function c200113.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c200113.filter(chkc) end
......
......@@ -26,11 +26,11 @@ function c200114.initial_effect(c)
end
function c200114.target(e,c)
local x=c:GetOriginalCode()
return c:IsPosition(POS_FACEUP_ATTACK) and ((x>=200001 and x<=200020) or (x==25016))
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsOriginalSetCard(0x700)
end
function c200114.filter(c)
local x=c:GetOriginalCode()
return c:IsPosition(POS_FACEUP_ATTACK) and ((x>=200001 and x<=200020) or (x==25016))
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsOriginalSetCard(0x700)
end
function c200114.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
......
......@@ -57,7 +57,7 @@ function c200115.efilter1(e,re,tp)
end]]
function c200115.val(e,re)
local x=re:GetHandler():GetOriginalCode()
return ((x>=200001 and x<=200020) or (x==200115) or (x==200215) or (x==200302) or (x==25016))
return c:IsOriginalSetCard(0x700)
end
function c200115.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local f=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
......
......@@ -18,7 +18,7 @@ function c200120.initial_effect(c)
end
function c200120.filter(c)
local x=c:GetOriginalCode()
return ((x>=200001 and x<=200020) or (x>=200201 and x<=200221) or (x==200302) or (x==25016)) and c:IsAbleToDeck()
return (c:IsOriginalSetCard(0x700) or c:IsOriginalSetCard(0x702)) and c:IsAbleToDeck()
end
function c200120.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c200120.filter,tp,LOCATION_GRAVE,0,nil)
......
......@@ -7,13 +7,13 @@ function c200201.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_MAIN_END,TIMING_MAIN_END)
e1:SetCondition(c200201.con)
-- e1:SetCost(c200201.cost)
-- e1:SetCost(c200201.cost)
e1:SetOperation(c200201.op)
c:RegisterEffect(e1)
end
function c200201.filter(c)
local x=c:GetOriginalCode()
return (x>=200001 and x<=200020) or (x==200115) or (x==200215) or (x==200302) or (x==25016)
return c:IsOriginalSetCard(0x700)
end
function c200201.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.IsExistingMatchingCard(c200201.filter,tp,LOCATION_ONFIELD,0,1,nil)
......
......@@ -9,7 +9,7 @@ function c200215.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,200215+EFFECT_COUNT_CODE_OATH)
-- e1:SetCost(c200215.cost)
-- e1:SetCost(c200215.cost)
e1:SetTarget(c200215.destg)
e1:SetOperation(c200215.desop)
c:RegisterEffect(e1)
......@@ -21,7 +21,7 @@ function c200215.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,200215+EFFECT_COUNT_CODE_OATH)
-- e1:SetCost(c200215.cost)
-- e1:SetCost(c200215.cost)
e1:SetTarget(c200215.destg2)
e1:SetOperation(c200215.desop)
c:RegisterEffect(e1)
......@@ -46,7 +46,7 @@ function c200215.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c200215.filter2(c)
local x=c:GetOriginalCode()
return c:IsFaceup() and ((x>=200001 and x<=200020) or (x==200115) or (x==200215) or (x==200302) or (x==25016))
return c:IsFaceup() and c:IsOriginalSetCard(0x700)
end
function c200215.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
......
......@@ -34,7 +34,7 @@ function c200219.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c200219.filter(c,e,tp)
local x=c:GetOriginalCode()
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((x>=200001 and x<=200020) or x==25016)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsOriginalSetCard(0x700)
and bit.band(c:GetReason(),REASON_EFFECT)~=0 and c:GetReasonPlayer()==tp
end
function c200219.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -36,9 +36,9 @@ end
function c200301.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and c200301.filter2(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c200301.filter2,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
and Duel.IsExistingTarget(c200301.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c200301.filter2,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c200301.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
......
......@@ -13,7 +13,7 @@ function c200305.initial_effect(c)
end
function c200305.filter(c)
local x=c:GetOriginalCode()
return x>=200001 and x<=200020 and c:IsAbleToHand()
return c:IsOriginalSetCard(0x700) and c:IsAbleToHand()
end
function c200305.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c200305.filter,tp,LOCATION_DECK,0,nil)
......
......@@ -37,6 +37,7 @@ function c20114.initial_effect(c)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(2)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==tp end)
e6:SetCost(c20114.descost)
e6:SetTarget(c20114.destg)
e6:SetOperation(c20114.desop)
......
......@@ -16,7 +16,7 @@ function c210021.sfilter(c,e,tp)
return c:IsSetCard(0x710) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c210021.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c210021.filter,tp,LOCATION_ONFIELD,0,5,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c210021.filter,tp,LOCATION_ONFIELD,0,4,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,1,nil)
and Duel.IsExistingMatchingCard(c210021.sfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,nil)
......
......@@ -54,7 +54,7 @@ function c21083.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,21083,RESET_PHASE+PHASE_END,0,1)
end
function c21083.sfilter(c)
return c:IsSetCard(0x257) and c:IsSSetable()
return c:IsSetCard(0x257) and c:IsSSetable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c21083.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -14,7 +14,7 @@ function c21101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,21101,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c21101.sfilter(c)
return c:IsSetCard(0x257) and c:IsSSetable() and not c:IsCode(21101)
return c:IsSetCard(0x257) and c:IsSSetable() and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(21101)
end
function c21101.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -10,7 +10,7 @@ function c21102.initial_effect(c)
c:RegisterEffect(e1)
end
function c21102.filter(c)
return c:IsSetCard(0x257) and c:IsSSetable()
return c:IsSetCard(0x257) and c:IsSSetable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c21102.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return true end
......@@ -39,5 +39,5 @@ function c21102.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterFlagEffect(21101,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
tc=tg:GetNext()
end
end
end
end
......@@ -10,7 +10,7 @@ function c21103.initial_effect(c)
c:RegisterEffect(e1)
end
function c21103.sfilter(c)
return c:IsSetCard(0x257) and c:IsSSetable()
return c:IsSetCard(0x257) and c:IsSSetable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c21103.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end
......@@ -19,7 +19,7 @@ function c21103.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,4)
local g=Duel.GetDecktopGroup(tp,4)
if g:GetCount()>0 then
local gc=g:FilterCount(Card.IsSetCard,nil,0x257)
local gc=g:Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP):FilterCount(Card.IsSetCard,nil,0x257)
if g:IsExists(c21103.sfilter,1,nil) then
local sg=g:FilterSelect(tp,c21103.sfilter,1,1,nil)
local tg=sg:GetFirst()
......
--天恸 璃染
function c4114101.initial_effect(c)
--nontuner
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_NONTUNER)
e1:SetValue(c4114101.tnval)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114101,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,4114101)
e2:SetTarget(c4114101.target)
e2:SetOperation(c4114101.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(4114101,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,4114101+40)
e4:SetTarget(c4114101.sptg)
e4:SetOperation(c4114101.spop)
c:RegisterEffect(e4)
end
function c4114101.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
end
function c4114101.filter(c)
return c:IsSetCard(0x1141) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function c4114101.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114101.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c4114101.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c4114101.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c4114101.spfilter(c,e,tp)
return c:IsSetCard(0x1141) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function c4114101.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c4114101.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,LOCATION_HAND)
end
function c4114101.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,c4114101.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c4114101.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
function c4114101.splimit(e,c)
return not c:IsSetCard(0x1141)
end
\ No newline at end of file
--天恸 白纱
function c4114103.initial_effect(c)
--nontuner
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_NONTUNER)
e1:SetValue(c4114103.tnval)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114103,0))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,4114103)
e2:SetTarget(c4114103.target)
e2:SetOperation(c4114103.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(4114103,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,4114103+40)
e4:SetTarget(c4114103.sptg)
e4:SetOperation(c4114103.spop)
c:RegisterEffect(e4)
end
function c4114103.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
end
function c4114103.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function c4114103.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
function c4114103.filter(c)
return c:IsSetCard(0x1141) and c:IsAbleToHand() and not c:IsCode(4114103)
end
function c4114103.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114103.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c4114103.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4114103.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c4114103.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c4114103.actlimit(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(0x1141)
end
\ No newline at end of file
--天恸 天上院
function c4114105.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1141),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(aux.chainreg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114105,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c4114105.setcon)
e2:SetTarget(c4114105.settg)
e2:SetOperation(c4114105.setop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,4114105)
e3:SetTarget(c4114105.sptg)
e3:SetOperation(c4114105.spop)
c:RegisterEffect(e3)
end
function c4114105.setfilter(c)
return c:IsFaceup() and c:IsCanTurnSet() and c:IsType(TYPE_MONSTER)
end
function c4114105.setcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and re:GetHandler():IsSetCard(0x1141) and e:GetHandler():GetFlagEffect(1)>0
end
function c4114105.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingTarget(c4114105.setfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c4114105.setfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c4114105.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
end
end
function c4114105.spfilter(c,e,tp)
return c:IsSetCard(0x1141) and not c:IsCode(4114105) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function c4114105.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c4114105.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c4114105.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c4114105.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--天恸 妖海歌
function c4114106.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1141),aux.NonTuner(nil),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114106,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c4114106.setcon)
e1:SetTarget(c4114106.settg)
e1:SetOperation(c4114106.setop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetCountLimit(1)
e2:SetValue(c4114106.indct)
c:RegisterEffect(e2)
end
function c4114106.filter(c)
return c:IsFaceup() and not c:IsSetCard(0x1141) and c:IsType(TYPE_MONSTER)
end
function c4114106.setcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c4114106.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c4114106.filter2(c)
return c:IsSetCard(0x1141) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c4114106.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114106.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,0,0)
end
function c4114106.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c4114106.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
Duel.ConfirmCards(1-tp,g)
end
end
function c4114106.indct(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
\ No newline at end of file
--天恸 斯坦里特
function c4114109.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114109,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c4114109.cost)
e1:SetCountLimit(1,4114109)
e1:SetTarget(c4114109.target)
e1:SetOperation(c4114109.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(4114109,ACTIVITY_SPSUMMON,c4114109.counterfilter)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1,4114109+40)
e3:SetCondition(c4114109.spcon)
e3:SetTarget(c4114109.sptg)
e3:SetOperation(c4114109.spop)
c:RegisterEffect(e3)
end
function c4114109.counterfilter(c)
return c:IsRace(RACE_SPELLCASTER) or c:IsRace(RACE_FAIRY)
end
function c4114109.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(4114109,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(c4114109.splimit)
Duel.RegisterEffect(e1,tp)
end
function c4114109.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsRace(RACE_SPELLCASTER) or c:IsRace(RACE_FAIRY))
end
function c4114109.filter(c,e,tp)
return c:IsSetCard(0x1141) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4) and c:IsType(TYPE_MONSTER)
end
function c4114109.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c4114109.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c4114109.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c4114109.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
function c4114109.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function c4114109.sptg(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)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c4114109.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
\ No newline at end of file
--天恸 云蒸雾变
function c4114110.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(c4114110.target)
e1:SetOperation(c4114110.operation)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c4114110.handcon)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1,4114110)
e3:SetCondition(c4114110.spcon)
e3:SetTarget(c4114110.sptg)
e3:SetOperation(c4114110.spop)
c:RegisterEffect(e3)
end
function c4114110.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function c4114110.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsSetCard(0x1141) and tc:IsAbleToDeck() then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(1)
tc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e3)
end
end
end
function c4114110.handfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsSetCard(0x1141)
end
function c4114110.handcon(e)
return Duel.IsExistingMatchingCard(c4114110.handfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c4114110.filter(c)
return c:IsSetCard(0x1141) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and not c:IsCode(4114110)
end
function c4114110.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function c4114110.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114110.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,0,0)
end
function c4114110.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c4114110.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
Duel.ConfirmCards(1-tp,g)
end
end
--天恸 孤落凄星
function c4114111.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c4114111.condition)
e1:SetTarget(c4114111.target)
e1:SetOperation(c4114111.activate)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(c4114111.spcon)
e2:SetTarget(c4114111.sptg)
e2:SetOperation(c4114111.spop)
c:RegisterEffect(e2)
end
function c4114111.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c4114111.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,tg,1,0,0)
end
function c4114111.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e2)
Duel.BreakEffect()
if tc:IsControlerCanBeChanged() then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
end
function c4114111.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function c4114111.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,nil,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,nil,1,nil,LOCATION_MZONE)
end
function c4114111.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
Duel.BreakEffect()
if tc:IsAbleToHand() and tc:IsAttack(0) or tc:IsDefense(0) then
if Duel.SelectYesNo(tp,aux.Stringid(4114111,0)) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--天恸 机巧始动
function c4114112.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c4114112.condition)
e1:SetTarget(c4114112.target)
e1:SetOperation(c4114112.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c4114112.handcon)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1,4114112)
e3:SetCondition(c4114112.spcon)
e3:SetTarget(c4114112.sptg)
e3:SetOperation(c4114112.spop)
c:RegisterEffect(e3)
end
function c4114112.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1141)
end
function c4114112.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c4114112.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c4114112.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c4114112.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c4114112.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(600)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(c4114112.efilter)
tc:RegisterEffect(e2)
end
end
function c4114112.efilter(c,te,tp)
return te:GetHandlerPlayer()~=tp
end
function c4114112.handfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFacedown() or not c:IsSetCard(0x1141)
end
function c4114112.handcon(e)
return not Duel.IsExistingMatchingCard(c4114112.handfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c4114112.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function c4114112.spfilter(c,e,tp)
return c:IsSetCard(0x1141) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function c4114112.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c4114112.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c4114112.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c4114112.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--天恸 风卷龙阁
function c4114113.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c4114113.target)
e1:SetOperation(c4114113.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c4114113.handcon)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCondition(c4114113.spcon)
e3:SetTarget(c4114113.sptg)
e3:SetOperation(c4114113.spop)
c:RegisterEffect(e3)
end
function c4114113.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c4114113.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c4114113.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c4114113.filter,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c4114113.filter,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c4114113.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.BreakEffect()
if not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.IsPlayerCanDraw(1-tp,1) then
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
end
function c4114113.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0
end
function c4114113.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function c4114113.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE)
end
function c4114113.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
Duel.BreakEffect()
g1=g:GetFirst()
if g1:IsFaceup() and g1:IsLevelAbove(1) and Duel.SelectYesNo(tp,aux.Stringid(4114113,0))then
local op=Duel.SelectOption(tp,aux.Stringid(4114113,1),aux.Stringid(4114113,2))
if op==0 then
op=1
else
op=2
end
local e1=Effect.CreateEffect(g1)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(op)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
g1:RegisterEffect(e1)
end
end
end
--来自星光的祝福
local m=66915009
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.tdcon)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
function c66915009.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c66915009.target)
e1:SetOperation(c66915009.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,66915009)
e2:SetCondition(aux.exccon)
e2:SetCost(c66915009.thcost)
e2:SetTarget(c66915009.thtg)
e2:SetOperation(c66915009.thop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1374) and c:IsType(TYPE_MONSTER)
function c66915009.cfilter(c)
return (c:IsSetCard(0x1374) and c:IsType(TYPE_MONSTER)) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x374)) and c:IsAbleToRemoveAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
function c66915009.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c66915009.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c66915009.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.cfilters(c)
return (c:IsSetCard(0x374) and c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToGraveAsCost()
function c66915009.thfilter(c)
return c:IsCode(66915001) and c:IsSSetable()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(cm.cfilters,tp,LOCATION_SZONE+LOCATION_HAND,0,2,nil) end
if Duel.IsExistingMatchingCard(cm.cfilters,tp,LOCATION_SZONE+LOCATION_HAND,0,2,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,cm.cfilters,tp,LOCATION_SZONE+LOCATION_HAND,0,2,2,nil)
Duel.SendtoGrave(g1,REASON_COST)
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
function c66915009.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66915009.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.filter(c)
return c:IsCode(66915001) and c:IsSSetable()
function c66915009.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c66915009.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
function c66915009.filter(c)
return c:IsSetCard(0x374) and c:IsAbleToDeck()
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL) and re and re:GetHandler():IsCode(66915008)
function c66915009.filter2(c)
return c:IsCode(66915001) and c:IsAbleToHand()
end
function cm.tdtg(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)
function c66915009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66915009.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c66915009.filter2,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_ONFIELD)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
function c66915009.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c66915009.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c66915009.filter2),tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil)
if mg:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=mg:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
\ No newline at end of file
--星光指引之路
local m=66915010
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.tdcon)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
if not StarLight_from_K then
StarLight_from_K={}
StarLight_from_K.Brightstarlight_Effect={}
end
function cm.filter(c)
return (c:IsSetCard(0x1374) and c:IsType(TYPE_MONSTER)) or (c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToDeck()
function c66915010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c66915010.target)
e1:SetOperation(c66915010.atkop)
c:RegisterEffect(e1)
--Activate
local e11=Effect.CreateEffect(c)
e11:SetCategory(CATEGORY_SPECIAL_SUMMON)
e11:SetType(EFFECT_TYPE_IGNITION)
e11:SetRange(LOCATION_GRAVE)
e11:SetCountLimit(1,66915010)
e11:SetCost(aux.bfgcost)
e11:SetCondition(aux.exccon)
e11:SetTarget(c66915010.targets)
e11:SetOperation(c66915010.spop)
c:RegisterEffect(e11)
StarLight_from_K.Brightstarlight_Effect[e11]=true
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,5,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
function c66915010.tdfilter(c)
return c:IsAbleToDeck()
end
function cm.filters(c)
return c:IsCode(66915001) or (c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsSSetable()
function c66915010.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_ONFIELD,0,nil,0x374)
local ct=g:GetClassCount(Card.GetCode)
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c66915010.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==5 then
Duel.BreakEffect()
if Duel.Draw(tp,1,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filters,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
end
function c66915010.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_ONFIELD,0,nil,0x374)
local ct=g:GetClassCount(Card.GetCode)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c66915010.tdfilter,tp,LOCATION_GRAVE,0,1,ct,nil)
local dr=(#g)//4
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==0 then return end
if dr>0 then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,dr,REASON_EFFECT)
end
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL) and re and re:GetHandler():IsCode(66915008)
function c66915010.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x1374) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.tdtg(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)
function c66915010.filters(c)
return c:IsType(TYPE_MONSTER)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
function c66915010.targets(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66915010.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and not Duel.IsExistingMatchingCard(c66915010.filters,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c66915010.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c66915010.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
g:GetFirst():CompleteProcedure()
end
end
\ No newline at end of file
--星曜女神·哈蕾
local m=66915026
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--send to grave
local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(m,0))
e11:SetCategory(CATEGORY_REMOVE)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e11:SetTarget(cm.target)
e11:SetOperation(cm.operation)
c:RegisterEffect(e11)
--salvage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,m+1)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.discon)
e3:SetCost(cm.cost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
--atk&def
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetValue(cm.atkval)
c:RegisterEffect(e5)
function c66915026.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c66915026.splimit)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(66915026,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetCondition(c66915026.rmcon)
e2:SetTarget(c66915026.rmtg)
e2:SetOperation(c66915026.rmop)
c:RegisterEffect(e2)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e12:SetRange(LOCATION_REMOVED)
e12:SetCode(EFFECT_IMMUNE_EFFECT)
e12:SetCondition(c66915026.con)
e12:SetValue(c66915026.efilter)
c:RegisterEffect(e12)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler():IsCode(66915001)
function c66915026.splimit(e,se,sp,st)
if not StarLight_from_K and bit.band(st,SUMMON_TYPE_FUSION)~=SUMMON_TYPE_SYNCHRO then return false end
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_SYNCHRO or StarLight_from_K.Brightstarlight_Effect[se]
end
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() and c:IsSetCard(0x374)
function c66915026.con(e)
return e:GetHandler():GetFlagEffect(66915026)~=0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>4
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,5,tp,LOCATION_DECK)
function c66915026.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
local rg=Group.CreateGroup()
if g:GetCount()<5 then return end
for i=1,5 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local hg=g:Select(tp,1,1,nil)
local tc=hg:GetFirst()
rg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode())
end
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
local ta=rg:GetFirst()
while ta do
ta:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
ta=rg:GetNext()
end
function c66915026.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
Duel.RegisterFlagEffect(tp,m+1,0,0,1)
function c66915026.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),2,0,0)
end
function cm.thfilter(c)
return c:GetFlagEffect(m)~=0 and c:IsAbleToHand()
function c66915026.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
local counter=0
if not c:IsRelateToEffect(e) or not c:IsFaceup() then return end
if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
if Duel.SelectYesNo(tp,aux.Stringid(66915026,10)) then
counter=1
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66915026,0))
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66915026,1))
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66915026,2))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66915026,0))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66915026,1))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66915026,2))
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetOperation(c66915026.retop)
e1:SetCountLimit(1)
e1:SetLabel(counter)
if Duel.GetCurrentPhase()==PHASE_END then
e1:SetReset(RESET_PHASE+PHASE_END,77)
c:RegisterFlagEffect(66915026,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,77)
else
e1:SetReset(RESET_PHASE+PHASE_END,76)
c:RegisterFlagEffect(66915026,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,76)
end
Duel.RegisterEffect(e1,tp)
c:SetTurnCounter(0)
end
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function cm.atkval(e)
local tp=e:GetHandler():GetControler()
local num=Duel.GetFlagEffect(tp,m+1)
return num*500
function c66915026.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==15 and e:GetLabel()==1 then
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66915026,3))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66915026,3))
end
if ct==30 and e:GetLabel()==1 then
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66915026,4))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66915026,4))
end
if ct==45 and e:GetLabel()==1 then
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66915026,5))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66915026,5))
end
if ct==60 and e:GetLabel()==1 then
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66915026,6))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66915026,6))
end
if ct==70 and e:GetLabel()==1 then
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66915026,7))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66915026,7))
end
if ct==75 and e:GetLabel()==1 then
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(66915026,8))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(66915026,8))
end
if ct==76 then
if Duel.ReturnToField(e:GetLabelObject())~=0 then
if e:GetLabel()==1 then
Duel.Hint(HINT_MESSAGE,tp,9)
Duel.Hint(HINT_MESSAGE,1-tp,9)
end
local WIN_REASON_STARRETURN=0x374
local p=e:GetHandler():GetControler()
Duel.Win(p,WIN_REASON_STARRETURN)
end
end
end
\ No newline at end of file
--本 気 ✿ 灵 梦
require "expansions/script/nef/darksyn"
local Cardno=74561015
local cCardno=c74561015
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
DS.DarkTunerLimit(c)
--本気亲捏造
......@@ -21,6 +21,7 @@ function cCardno.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,Cardno)
e3:SetCost(cCardno.dccost)
e3:SetTarget(cCardno.dctg)
e3:SetOperation(cCardno.dcop)
......@@ -34,13 +35,6 @@ function cCardno.initial_effect(c)
e4:SetCountLimit(1)
e4:SetOperation(cCardno.crazyop)
c:RegisterEffect(e4)
--summon success
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(cCardno.descon)
e5:SetOperation(cCardno.desop)
--c:RegisterEffect(e5)
end
--crazy
function cCardno.crazyop(e,tp,eg,ep,ev,re,r,rp)
......@@ -54,10 +48,6 @@ function cCardno.crazyop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(atk*2)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(def*2)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(lv*2)
......@@ -68,20 +58,17 @@ function cCardno.dccost(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 cCardno.dcfilter(c,e,tp,lv)
return c:IsSetCard(0x5208) and c:GetLevel() == lv and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
function cCardno.dcfilter(c,e,tp)
return c:IsSetCard(0x5208) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and (c:IsSetCard(0x100) or c:IsCode(74561016,74561034,74561036))
end
function cCardno.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
local lv = e:GetHandler():GetLevel()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE) > -1 and Duel.IsExistingMatchingCard(cCardno.dcfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,lv) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler()) > 0 and Duel.IsExistingMatchingCard(cCardno.dcfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function cCardno.dcop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE) <= 0 then return end
local lv = e:GetHandler():GetPreviousLevelOnField()
--Debug.Message(lv)
if Duel.GetMZoneCount(tp) == 0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cCardno.dcfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,lv)
local g=Duel.SelectMatchingCard(tp,cCardno.dcfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
......@@ -100,29 +87,4 @@ function cCardno.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cCardno.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
e:GetHandler():RegisterFlagEffect(Cardno,0,0,1)
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g2:GetFirst()
while tc do
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)
tc=g2:GetNext()
end
end
--summon success
function cCardno.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(Cardno)>0
end
function cCardno.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,3,REASON_EFFECT)
e:GetHandler():ResetFlagEffect(Cardno)
end
\ No newline at end of file
--本 気 ✿ 灵 梦
require "expansions/script/nef/darksyn"
local Cardno=74561415
local cCardno=c74561415
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
DS.DarkTunerLimit(c)
--本気亲捏造
......@@ -34,13 +34,6 @@ function cCardno.initial_effect(c)
e4:SetCountLimit(1)
e4:SetOperation(cCardno.crazyop)
c:RegisterEffect(e4)
--summon success
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(cCardno.descon)
e5:SetOperation(cCardno.desop)
--c:RegisterEffect(e5)
end
--crazy
function cCardno.crazyop(e,tp,eg,ep,ev,re,r,rp)
......@@ -54,10 +47,6 @@ function cCardno.crazyop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(atk*2)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(def*2)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(lv*2)
......@@ -68,20 +57,17 @@ function cCardno.dccost(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 cCardno.dcfilter(c,e,tp,lv)
return c:IsSetCard(0x5208) and c:GetLevel() == lv and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
function cCardno.dcfilter(c,e,tp)
return c:IsSetCard(0x5208) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and (c:IsSetCard(0x100) or c:IsCode(74561016,74561034,74561036))
end
function cCardno.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
local lv = e:GetHandler():GetLevel()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE) > -1 and Duel.IsExistingMatchingCard(cCardno.dcfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,lv) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler()) > 0 and Duel.IsExistingMatchingCard(cCardno.dcfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function cCardno.dcop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE) <= 0 then return end
local lv = e:GetHandler():GetPreviousLevelOnField()
--Debug.Message(lv)
if Duel.GetMZoneCount(tp) == 0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cCardno.dcfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,lv)
local g=Duel.SelectMatchingCard(tp,cCardno.dcfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
......@@ -100,29 +86,4 @@ function cCardno.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cCardno.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
e:GetHandler():RegisterFlagEffect(Cardno,0,0,1)
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g2:GetFirst()
while tc do
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)
tc=g2:GetNext()
end
end
--summon success
function cCardno.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(Cardno)>0
end
function cCardno.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,3,REASON_EFFECT)
e:GetHandler():ResetFlagEffect(Cardno)
end
\ No newline at end of file
......@@ -26,7 +26,7 @@ function cCardno.initial_effect(c)
e2:SetCondition(cCardno.sscon)
e2:SetTarget(cCardno.sstg)
e2:SetOperation(cCardno.ssop)
c:RegisterEffect(e2)
--c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(Cardno,3))
......
......@@ -3,7 +3,7 @@ local Cardno=74562022
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,12,2,nil,aux.Stringid(Cardno,1),12)
aux.AddXyzProcedureLevelFree(c,cCardno.ffilter,cCardno.gfilter,2,2,nil,aux.Stringid(Cardno,1),nil)
-- xyz
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
......@@ -12,6 +12,7 @@ function cCardno.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(POS_FACEUP,0)
e1:SetCountLimit(1,Cardno)
e1:SetCondition(cCardno.xyzcon)
e1:SetOperation(cCardno.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
......@@ -52,12 +53,23 @@ end
function cCardno.atkval(e,c)
local g=c:GetOverlayGroup()
local sum=g:GetSum(Card.GetLevel)
return sum*150
local sum2=g:GetSum(Card.GetRank)
return sum*150+sum2*100
end
-- xyz
-- xyz1
function cCardno.ffilter(c,xyzc)
return c:IsType(TYPE_XYZ) and c:IsCanBeXyzMaterial(xyzc) and c:IsFaceup()
end
function cCardno.gfilter(g)
local rank=g:GetFirst():GetRank()
local num=g:GetCount()
local sum=g:GetSum(Card.GetRank)
return rank*num==sum
end
-- xyz2
function cCardno.xyzfilter(c,tp,xyzc,lv)
if c:IsType(TYPE_TOKEN) or not c:IsCanBeXyzMaterial(xyzc) then return false end
return c:IsType(TYPE_XYZ) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0
if c:IsType(TYPE_TOKEN) or not c:IsCanBeXyzMaterial(xyzc) or c:IsFacedown() then return false end
return ((c:IsLevel(12) or c:IsRank(12)) and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0) or (c:IsType(TYPE_XYZ) and c:IsControler(1-tp) and Duel.GetLocationCountFromEx(1-tp,tp,c,xyzc)>0)
end
function cCardno.mmfilter(c)
return c:IsDiscardable() and c:IsCode(11010,11011)
......@@ -65,7 +77,6 @@ end
function cCardno.xyzcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetLocationCountFromEx(tp)<0 then return false end
return Duel.IsExistingMatchingCard(cCardno.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) or (Duel.IsExistingMatchingCard(cCardno.xyzfilter,tp,0,LOCATION_MZONE,1,nil,tp,c) and Duel.IsExistingMatchingCard(cCardno.mmfilter,tp,LOCATION_HAND,0,1,nil))
end
function cCardno.xyzop(e,tp,eg,ep,ev,re,r,rp,c)
......@@ -87,9 +98,4 @@ function cCardno.xyzop(e,tp,eg,ep,ev,re,r,rp,c)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0xff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
\ No newline at end of file
--爆仙娘娘✿茨华仙&青娥娘娘
function c74563039.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x710),aux.FilterBoolFunction(Card.IsFusionSetCard,0x240),false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74563039,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c74563039.descost)
e2:SetTarget(c74563039.destg)
e2:SetOperation(c74563039.desop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c74563039.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--send replace
local e31=Effect.CreateEffect(c)
e31:SetDescription(aux.Stringid(74563039,1))
e31:SetCategory(CATEGORY_SPECIAL_SUMMON)
e31:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e31:SetCode(EVENT_TO_GRAVE)
e31:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e31:SetCountLimit(1,74563039)
e31:SetTarget(c74563039.stg)
e31:SetOperation(c74563039.sop)
c:RegisterEffect(e31)
local e32=e31:Clone()
e32:SetCode(EVENT_REMOVE)
c:RegisterEffect(e32)
end
function c74563039.valcheck(e,c)
local mg=c:GetMaterial()
local mg1=mg:Filter(Card.IsLocation,nil,LOCATION_HAND)
local mg2=mg:Filter(Card.IsLocation,nil,LOCATION_ONFIELD)
e:GetLabelObject():SetLabel(#mg1,#mg2)
end
function c74563039.rlfilter(c,tp)
local re=Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)
local val=nil
if re then
val=re:GetValue()
end
return c:IsReleasable() or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_HAND) and (val==nil or val(re,c)~=true))
end
function c74563039.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74563039.rlfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c74563039.rlfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c74563039.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local dr,ct=e:GetLabel()
if chkc then return chkc:IsOnField() end
if chk==0 then return true end
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c74563039.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
function c74563039.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c74563039.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
\ No newline at end of file
--邪术『穿墙之邪道』
function c74563041.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74563041.tg)
e1:SetOperation(c74563041.op)
c:RegisterEffect(e1)
end
function c74563041.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563041.op(e,tp,eg,ep,ev,re,r,rp)
local flag=Duel.SelectField(tp,1,LOCATION_MZONE,0,aux.TRUE)
local seq=math.log(flag<<16,2)-16
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(1000)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,4)
e1:SetLabel(seq)
e1:SetTarget(c74563041.eftg)
Duel.RegisterEffect(e1,tp)
--bounce
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCountLimit(1)
e3:SetLabel(seq)
e3:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,4)
e3:SetCondition(c74563041.atcon)
e3:SetOperation(c74563041.atop)
Duel.RegisterEffect(e3,tp)
end
function c74563041.eftg(e,c)
local seq=e:GetLabel()
local seq1=c:GetSequence()
local tp=e:GetHandlerPlayer()
if seq==1 then
return c:IsSetCard(0x240) and (((math.abs(seq-seq1)==0 or seq1==5) and c:IsControler(tp)) or ((math.abs(seq+seq1)==4 or seq1==6) and c:IsControler(1-tp)))
elseif seq==3 then
return c:IsSetCard(0x240) and (((math.abs(seq-seq1)==0 or seq==6) and c:IsControler(tp)) or ((math.abs(seq+seq1)==4 or seq1==5) and c:IsControler(1-tp)))
else
return c:IsSetCard(0x240) and ((math.abs(seq-seq1)==0 and c:IsControler(tp)) or (math.abs(seq+seq1)==4 and c:IsControler(1-tp)))
end
end
function c74563041.atcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetLabel()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
local seq1=d:GetSequence()
if seq==1 then
return d:GetColumnGroup():IsContains(a) and d:IsControler(1-tp) and (math.abs(seq+seq1)==4 or seq1==6)
elseif seq==3 then
return d:GetColumnGroup():IsContains(a) and d:IsControler(1-tp) and (math.abs(seq+seq1)==4 or seq1==5)
else
return d:GetColumnGroup():IsContains(a) and d:IsControler(1-tp) and math.abs(seq+seq1)==4
end
end
function c74563041.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local d=Duel.GetAttackTarget()
Duel.SendtoGrave(d,REASON_RULE)
end
\ No newline at end of file
--涸绝饥饿·吉鲁涅莉婕
function c74563044.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c74563044.ffilter,10,false)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c74563044.spcon)
e2:SetOperation(c74563044.spop)
c:RegisterEffect(e2)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--Recover
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c74563044.thop)
c:RegisterEffect(e1)
--atk & def
local e21=Effect.CreateEffect(c)
e21:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e21:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e21:SetCode(EVENT_RECOVER)
e21:SetRange(LOCATION_MZONE)
e21:SetCondition(c74563044.adcon)
e21:SetOperation(c74563044.adop)
c:RegisterEffect(e21)
end
function c74563044.ffilter(c)
return c:IsFusionType(TYPE_MONSTER)
end
function c74563044.spfilter(c,fc,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function c74563044.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetTurnCount()>=10
and Duel.IsExistingMatchingCard(c74563044.spfilter,tp,LOCATION_DECK,0,10,nil,tp,c)
end
function c74563044.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c74563044.spfilter,tp,LOCATION_DECK,0,10,10,nil,c)
c:SetMaterial(g)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c74563044.thop(e,tp,eg,ep,ev,re,r,rp)
local mat=e:GetHandler():GetMaterial()
local tc=mat:GetFirst()
local lp=0
if not tc then return end
while tc do
lp=lp+tc:GetAttack()+tc:GetDefense()
tc=mat:GetNext()
end
if lp~=0 then
lp=lp//10
Duel.Recover(tp,lp,REASON_EFFECT)
end
end
function c74563044.adcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c74563044.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ev)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
\ No newline at end of file
--有顶天变✿比那名居天子
function c86379358.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c86379358.matfilter,1)
c:EnableReviveLimit()
--cannot be destroyed
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--damage conversion
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_REVERSE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetValue(c86379358.rev)
c:RegisterEffect(e2)
--weather
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379358,1))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c86379358.xtg)
e3:SetOperation(c86379358.xop)
c:RegisterEffect(e3)
end
--
function c86379358.matfilter(c)
return (c:IsLinkSetCard(0x226) or c:IsLinkSetCard(0x703)) and not c:IsLinkCode(86379358)
end
--
function c86379358.rev(e,re,r,rp,rc)
local c=e:GetHandler()
return bit.band(r,REASON_BATTLE)~=0
and (c==Duel.GetAttacker() or c==Duel.GetAttackTarget())
end
function c86379358.xfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x245,1)
end
function c86379358.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c86379358.xfilter(chkc) and chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(c86379358.xfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c86379358.xfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
function c86379358.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
tc:AddCounter(0x245,1)
end
end
--美丽的绯鱼✿永江衣玖
function c86379360.initial_effect(c)
--pos
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379360,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c86379360.postg)
e1:SetOperation(c86379360.posop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCost(c86379360.poscost)
e2:SetRange(LOCATION_HAND)
c:RegisterEffect(e2)
--grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379360,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_CHANGE_POS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,86379360)
e3:SetCondition(c86379360.condition)
e3:SetTarget(c86379360.target)
e3:SetOperation(c86379360.operation)
c:RegisterEffect(e3)
end
--
function c86379360.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c86379360.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition() end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c86379360.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--
function c86379360.cfilter(c)
local np=c:GetPosition()
local pp=c:GetPreviousPosition()
return ((np<3 and pp>3) or (pp<3 and np>3))
end
function c86379360.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c86379360.cfilter,1,nil) and (Duel.GetTurnCount()~=e:GetHandler():GetTurnID() or e:GetHandler():IsReason(REASON_RETURN))
end
function c86379360.target(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 c86379360.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--关系微妙的上下级✿天子&衣玖
function c86379364.initial_effect(c)
--self 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:SetCountLimit(1,86379364)
e1:SetCondition(c86379364.spcon)
e1:SetOperation(c86379364.spop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379364,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c86379364.condition)
e2:SetTarget(c86379364.target)
e2:SetOperation(c86379364.operation)
c:RegisterEffect(e2)
--add
if not c86379364.global_check then
c86379364.global_check=true
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
ge1:SetCode(EFFECT_ADD_RACE)
ge1:SetTargetRange(0xff,0xff)
ge1:SetTarget(c86379364.gefilter)
ge1:SetValue(RACE_SEASERPENT)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.GlobalEffect()
ge2:SetType(EFFECT_TYPE_FIELD)
ge2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
ge2:SetCode(EFFECT_ADD_ATTRIBUTE)
ge2:SetTargetRange(0xff,0xff)
ge2:SetTarget(c86379364.gefilter)
ge2:SetValue(ATTRIBUTE_LIGHT)
Duel.RegisterEffect(ge2,0)
end
end
--
function c86379364.gefilter(e,c)
return c:GetOriginalCode()==86379364
end
--
function c86379364.rfilter(c,tp)
return c:IsAbleToHandAsCost() and (c:IsSetCard(0x190) or c:IsSetCard(0x226) or c:IsSetCard(0x703)) and ((c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5) or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
end
function c86379364.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c86379364.rfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
end
function c86379364.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c86379364.rfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoHand(g,nil,REASON_COST)
Duel.ConfirmCards(1-tp,g)
end
--
function c86379364.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function c86379364.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsSetCard(0x190) or c:IsSetCard(0x226) or c:IsSetCard(0x703))
end
function c86379364.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379364.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c86379364.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c86379364.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(86379364,1)) then
local lv=Duel.AnnounceLevel(tp,1,6)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
if not tc:IsType(TYPE_TUNER) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(TYPE_TUNER)
tc:RegisterEffect(e2)
end
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetValue(c86379364.val)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3,true)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e4,true)
end
end
end
end
function c86379364.val(e,c)
return not (c:IsSetCard(0x190) or c:IsSetCard(0x226))
end
--有顶天
c86379368.counter_add_list={0x245}
function c86379368.initial_effect(c)
c:EnableCounterPermit(0x245)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(c86379368.ctcon)
e2:SetOperation(c86379368.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
-- to zone
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86379368,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_DECK)
e4:SetCountLimit(1,86379368)
e4:SetCondition(c86379368.thcon)
e4:SetTarget(c86379368.thtg)
e4:SetOperation(c86379368.thop)
c:RegisterEffect(e4)
--to deck
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(86379366,1))
e5:SetCategory(CATEGORY_TOHAND)
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,86379369)
e5:SetCondition(c86379368.gcon)
e5:SetTarget(c86379368.gtg)
e5:SetOperation(c86379368.gop)
c:RegisterEffect(e5)
end
--
function c86379368.ctfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_FAIRY)
end
function c86379368.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c86379368.ctfilter,1,nil)
end
function c86379368.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x245,1)
end
--
function c86379368.filter1(c)
return c:IsFaceup() and c:IsCode(86379366) and c:GetCounter(0x245)>0
end
function c86379368.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c86379368.filter1,tp,LOCATION_ONFIELD,0,1,nil)
end
function c86379368.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c86379368.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 c86379368.cfilter(c)
return c:IsPreviousLocation(LOCATION_FZONE) and not c:IsCode(86379368)
end
function c86379368.gcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c86379368.cfilter,1,nil)
end
function c86379368.thfilter(c)
return c:IsCanHaveCounter(0x245) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToHand()
end
function c86379368.gtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379368.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end
function c86379368.gop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c86379368.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--莹白的有顶天
function c86379370.initial_effect(c)
--cannot be destroyed
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--damage conversion
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_REVERSE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetValue(c86379370.rev)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetOperation(c86379370.effop)
c:RegisterEffect(e3)
end
--
function c86379370.rev(e,re,r,rp,rc)
local c=e:GetHandler()
return bit.band(r,REASON_BATTLE)~=0
and (c==Duel.GetAttacker() or c==Duel.GetAttackTarget())
end
--
function c86379370.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379370,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_LEAVE_FIELD_P)
e1:SetOperation(c86379370.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
rc:RegisterEffect(e1,true)
end
function c86379370.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCounter(tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0x245)
local tg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_DECK,0,nil)
local g=Group.CreateGroup()
if ct>0 then
local b1=tg:Filter(Card.IsSetCard,nil,0x703)
if b1:GetCount()>0 then
g:Merge(b1)
end
end
if ct>2 then
local b2=tg:Filter(Card.IsSetCard,nil,0x226)
if b2:GetCount()>0 then
g:Merge(b2)
end
end
if ct>4 then
local b3=tg:Filter(Card.IsOriginalSetCard,nil,0x700)
if b3:GetCount()>0 then
g:Merge(b3)
end
end
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=g:Select(tp,1,1,nil)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--天与地的连结✿比那名居天子
function c86379374.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c86379374.lcheck)
c:EnableReviveLimit()
--disable field
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c86379374.disval)
c:RegisterEffect(e1)
--zone
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379374,1))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c86379374.cost)
e2:SetTarget(c86379374.target)
e2:SetOperation(c86379374.operation)
c:RegisterEffect(e2)
--link spell
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379374,2))
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(c86379374.gcon)
e3:SetTarget(c86379374.gtg)
e3:SetOperation(c86379374.gop)
c:RegisterEffect(e3)
end
--
function c86379374.lcheck(g)
return g:GetClassCount(Card.GetLinkRace)==g:GetCount()
end
--
function c86379374.disval(e)
local c=e:GetHandler()
return c:GetLinkedZone(0)
end
--
function c86379374.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x245,2,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x245,2,REASON_COST)
end
function c86379374.xfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x245,2)
end
function c86379374.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379374.xfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or not (e:GetHandler():IsLinkMarker(LINK_MARKER_TOP_LEFT) and e:GetHandler():IsLinkMarker(LINK_MARKER_TOP_RIGHT) and not e:GetHandler():IsLinkMarker(LINK_MARKER_TOP+LINK_MARKER_BOTTOM+LINK_MARKER_BOTTOM_LEFT+LINK_MARKER_BOTTOM_RIGHT+LINK_MARKER_LEFT+LINK_MARKER_RIGHT))
end
end
function c86379374.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
if c:IsLinkMarker(LINK_MARKER_TOP_LEFT) and c:IsLinkMarker(LINK_MARKER_TOP_RIGHT) and not c:IsLinkMarker(LINK_MARKER_TOP+LINK_MARKER_BOTTOM+LINK_MARKER_BOTTOM_LEFT+LINK_MARKER_BOTTOM_RIGHT+LINK_MARKER_LEFT+LINK_MARKER_RIGHT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,c86379374.xfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
tc:AddCounter(0x245,2)
end
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_LINK_MARKER_KOISHI)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(LINK_MARKER_TOP_LEFT+LINK_MARKER_TOP_RIGHT)
c:RegisterEffect(e1)
end
end
end
--
function c86379374.gcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetReasonPlayer()==1-tp and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end
function c86379374.gtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c86379374.gop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local Tpe=c:GetOriginalType()
Card.SetCardData(c,4,TYPE_MONSTER+TYPE_EFFECT)
--reset
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_LEAVE_FIELD_P)
e0:SetOperation(c86379374.rsop)
e0:SetLabel(Tpe)
e0:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
c:RegisterEffect(e0,true)
--type
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
--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)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_LINK_SPELL_KOISHI)
e3:SetValue(LINK_MARKER_TOP+LINK_MARKER_BOTTOM)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
c:RegisterEffect(e3)
--zone
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_SZONE)
e4:SetCost(c86379374.cost)
e4:SetTarget(c86379374.target)
e4:SetOperation(c86379374.operation2)
c:RegisterEffect(e4)
end
--
function c86379374.rsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local Tpe=e:GetLabel()
Card.SetCardData(c,4,Tpe)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
function c86379374.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
if c:IsLinkMarker(LINK_MARKER_TOP_LEFT) and c:IsLinkMarker(LINK_MARKER_TOP_RIGHT) and not c:IsLinkMarker(LINK_MARKER_TOP+LINK_MARKER_BOTTOM+LINK_MARKER_BOTTOM_LEFT+LINK_MARKER_BOTTOM_RIGHT+LINK_MARKER_LEFT+LINK_MARKER_RIGHT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,c86379374.xfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
tc:AddCounter(0x245,2)
end
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_LINK_MARKER_KOISHI)
e1:SetRange(LOCATION_SZONE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(LINK_MARKER_TOP_LEFT+LINK_MARKER_TOP_RIGHT)
c:RegisterEffect(e1)
end
end
end
--有顶天『守护的要石』
c86379378.counter_add_list={0x245}
function c86379378.initial_effect(c)
c:SetUniqueOnField(1,0,86379378)
c:EnableCounterPermit(0x245)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c86379378.tg)
e1:SetOperation(c86379378.op)
c:RegisterEffect(e1)
--change damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
e2:SetValue(c86379378.damval)
c:RegisterEffect(e2)
--cannot target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetCondition(c86379378.con)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetRange(LOCATION_SZONE)
e5:SetCondition(c86379378.con)
e5:SetValue(aux.indoval)
c:RegisterEffect(e5)
end
--
function c86379378.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c86379378.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.IsCanRemoveCounter(tp,1,0,0x245,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(86379378,0)) then
local counternum=0
local sg=Duel.GetMatchingGroup(c86379378.tfilter,tp,LOCATION_ONFIELD,0,nil)
local tc=sg:GetFirst()
while tc do
local ct=tc:GetCounter(0x245)
counternum=counternum+ct
tc:RemoveCounter(tp,0x245,ct,REASON_EFFECT)
tc=sg:GetNext()
end
c:AddCounter(0x245,counternum)
end
end
--
function c86379378.damval(e,re,val,r,rp,rc)
local c=e:GetHandler()
local dt=math.ceil(val/1000)
local ct=c:GetCounter(0x245)
if dt<=0 then return 0 end
if ct<=0 then return val end
if ct>dt then ct=dt end
local vt=val-(ct*1000)
if vt<0 then vt=0 end
Duel.Hint(HINT_CARD,0,86379378)
c:AddCounter(0x245,-ct)
return vt
end
--
function c86379378.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x245)>=3
end
--黑海『潜鱼洄游』
function c86379380.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetCountLimit(1,86379380+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c86379380.target)
e1:SetOperation(c86379380.activate)
c:RegisterEffect(e1)
end
function c86379380.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_MONSTER_REBORN,tp,false,false) and c:IsRace(RACE_FISH+RACE_SEASERPENT)
end
function c86379380.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c86379380.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c86379380.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c86379380.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c86379380.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,SUMMON_VALUE_MONSTER_REBORN,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379380,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetOperation(c86379380.op)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3,true)
end
end
end
function c86379380.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,86379380)
local op=Duel.SelectOption(tp,aux.Stringid(86379380,2),aux.Stringid(86379380,3),aux.Stringid(86379380,4),aux.Stringid(86379380,5),aux.Stringid(86379380,6),aux.Stringid(86379380,7))
if op==0 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
if op==1 then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
if op==2 then
Duel.Destroy(c,REASON_EFFECT)
end
if op==3 then
Duel.SendtoGrave(c,REASON_EFFECT)
end
if op==4 then
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
if op==5 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e2)
end
end
--幸运的白兔✿因幡帝
function c86379540.initial_effect(c)
--sync summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x208),1)
c:EnableReviveLimit()
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379540,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetValue(SUMMON_TYPE_SYNCHRO)
e2:SetCondition(c86379540.sprcon2)
e2:SetOperation(c86379540.sprop2)
c:RegisterEffect(e2)
--dice
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_TOSS_DICE_NEGATE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c86379540.dicecon)
e3:SetOperation(c86379540.diceop)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86379540,3))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,86379540)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(c86379540.spcon)
e4:SetTarget(c86379540.sptg)
e4:SetOperation(c86379540.spop)
c:RegisterEffect(e4)
end
--
function c86379540.sprfilter2(c,tp,sync)
return c:IsSetCard(0x3256) and c:IsCanBeSynchroMaterial(sync) and c:IsReleasable() and c:IsLevel(4) and not c:IsCode(86379540)
and Duel.GetLocationCountFromEx(tp,tp,c,sync)>0
end
function c86379540.sprcon2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c86379540.sprfilter2,tp,LOCATION_MZONE,0,1,nil,tp,c)
end
function c86379540.sprop2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c86379540.sprfilter2,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
Duel.Release(g,REASON_COST+REASON_MATERIAL+REASON_SYNCHRO)
end
--
function c86379540.confilter(c,sc)
return c:IsReleasable() and c:GetLevel()>0 and c:IsCanBeSynchroMaterial(sc) and c:IsSetCard(0x3256) and not c:IsCode(86379540)
end
function c86379540.gcheck(g,tp,fc)
return Duel.GetLocationCountFromEx(tp,tp,g,fc)>0 and g:GetSum(Card.GetLevel)==4
end
function c86379540.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c86379540.confilter,tp,LOCATION_MZONE,0,nil,c)
return c86379540.CheckGroup(mg,c86379540.gcheck,nil,1,1,tp,c)
end
function c86379540.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c86379540.confilter,tp,LOCATION_MZONE,0,nil,c)
local g=c86379540.SelectGroup(tp,HINTMSG_RELEASE,mg,c86379540.gcheck,nil,1,1,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_COST+REASON_MATERIAL+REASON_SYNCHRO)
end
--
function c86379540.dicecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(86379540)==0
end
c86379540.idx_table=table.pack(1,2,3,4,5,6,7,8)
function c86379540.diceop(e,tp,eg,ep,ev,re,r,rp)
local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
if aux.dice_chain_id~=cid and Duel.SelectYesNo(tp,aux.Stringid(86379540,1)) then
Duel.Hint(HINT_CARD,0,86379540)
e:GetHandler():RegisterFlagEffect(86379540,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local dc={Duel.GetDiceResult()}
local ac=1
local ct=(ev&0xff)+(ev>>16&0xff)
if ct>1 then
--choose the index of results
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(86379540,2))
local val,idx=Duel.AnnounceNumber(tp,table.unpack(c86379540.idx_table,1,ct))
ac=idx+1
end
dc[ac]=7
Duel.SetDiceResult(table.unpack(dc))
aux.dice_chain_id=cid
end
end
--
function c86379540.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT) and c:IsSetCard(0x256)
end
function c86379540.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c86379540.cfilter,1,nil,tp) and (Duel.GetTurnCount()~=e:GetHandler():GetTurnID() or e:GetHandler():IsReason(REASON_RETURN))
end
function c86379540.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c86379540.spop(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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local a=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if a:GetCount()>0 then
Duel.Destroy(a,REASON_EFFECT)
end
end
end
end
--
------------------------------------------------------------------
function c86379540.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
sg:AddCard(c)
local res=(#sg>=min and #sg<=max and f(sg,table.unpack(ext_params)))
or (#sg<max and g:IsExists(c86379540.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params))
sg:RemoveCard(c)
return res
end
function c86379540.CheckGroup(g,f,cg,min,max,...)
local min=min or 1
local max=max or #g
if min>max then return false end
local ext_params={...}
local sg=Group.CreateGroup()
if cg then sg:Merge(cg) end
if #sg>=min and #sg<=max and f(sg,...) then return true end
return g:IsExists(c86379540.CheckGroupRecursive,1,sg,sg,g,f,min,max,ext_params)
end
function c86379540.SelectGroup(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or #g
local ext_params={...}
local sg=Group.CreateGroup()
local cg=cg or Group.CreateGroup()
sg:Merge(cg)
local ag=g:Filter(c86379540.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while #sg<max and #ag>0 do
local finish=(#sg>=min and #sg<=max and f(sg,...))
local seg=sg-cg
local dmin=#seg
local dmax=math.min(max-#cg,#g)
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tc=ag:SelectUnselect(seg,tp,finish,finish,dmin,dmax)
if not tc then break end
if sg:IsContains(tc) then
sg:RemoveCard(tc)
else
sg:AddCard(tc)
end
ag=g:Filter(c86379540.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
end
return sg
end
function c86379540.SelectGroupWithCancel(tp,desc,g,f,cg,min,max,...)
local min=min or 1
local max=max or #g
local ext_params={...}
local sg=Group.CreateGroup()
local cg=cg or Group.CreateGroup()
sg:Merge(cg)
local ag=g:Filter(c86379540.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while #sg<max and #ag>0 do
local finish=(#sg>=min and #sg<=max and f(sg,...))
local cancel=finish or #sg==0
local seg=sg-cg
local dmin=#seg
local dmax=math.min(max-#cg,#g)
Duel.Hint(HINT_SELECTMSG,tp,desc)
local tc=ag:SelectUnselect(seg,tp,finish,cancel,dmin,dmax)
if not tc then
if not finish then return end
break
end
if sg:IsContains(tc) then
sg:RemoveCard(tc)
else
sg:AddCard(tc)
end
ag=g:Filter(c86379540.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
end
return sg
end
--狡猾的白兔✿因幡帝
function c86379542.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x256),4,2)
c:EnableReviveLimit()
--Negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_TOSS_DICE_NEGATE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c86379542.discon)
e1:SetOperation(c86379542.disop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379542,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,86379542)
e2:SetCost(c86379542.spcost)
e2:SetTarget(c86379542.sptg)
e2:SetOperation(c86379542.spop)
c:RegisterEffect(e2)
end
--
function c86379542.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x256) and c:IsLevel(4)
end
--
function c86379542.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local teg,tep,tev,tre,tr,trp=Duel.GetChainEvent(0)
return c:GetFlagEffect(86379542)==0 and Duel.IsChainDisablable(tev)
end
function c86379542.disop(e,tp,eg,ep,ev,re,r,rp)
local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
local teg,tep,tev,tre,tr,trp=Duel.GetChainEvent(0)
if aux.dice_chain_id~=cid and Duel.SelectYesNo(tp,aux.Stringid(86379542,1)) then
Duel.Hint(HINT_CARD,0,86379542)
e:GetHandler():RegisterFlagEffect(86379542,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(tev) then
if tre:GetHandler():IsRelateToEffect(tre) then
Duel.Destroy(tre:GetHandler(),REASON_EFFECT)
end
end
aux.dice_chain_id=cid
end
end
--
function c86379542.spcost(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 c86379542.spfilter(c,e,tp)
return c:IsSetCard(0x256) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c86379542.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c86379542.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil)
end
local g=Duel.GetMatchingGroup(c86379542.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
end
function c86379542.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,c86379542.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local a=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if a:GetCount()>0 then
Duel.Destroy(a,REASON_EFFECT)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTarget(c86379542.splimit)
Duel.RegisterEffect(e2,tp)
end
end
function c86379542.splimit(e,c)
return not (c:IsSetCard(0x256) or c:IsSetCard(0x161))
end
......@@ -16,6 +16,17 @@ function c86379858.initial_effect(c)
e2:SetCode(EVENT_FLIP)
e2:SetOperation(c86379858.operation)
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)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCondition(c86379858.scon)
e3:SetTarget(c86379858.stg)
e3:SetOperation(c86379858.sop)
c:RegisterEffect(e3)
--
if not c86379858.global_check then
c86379858.global_check=true
......@@ -45,7 +56,7 @@ function c86379858.negop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.NegateEffect(ev)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
local tc=g:GetFirst()
--[[local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(86379858,2))
......@@ -56,7 +67,7 @@ function c86379858.negop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end]]
end
end
end
......@@ -70,3 +81,53 @@ function c86379858.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c:GetDefense()*2)
c:RegisterEffect(e1)
end
--
function c86379858.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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)
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
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)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_FZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetCondition(c86379858.con2)
e2:SetOperation(c86379858.op2)
c:RegisterEffect(e2)
end
end
end
function c86379858.desfilter(c,tp)
return c:IsSetCard(0x190) and c:IsControler(tp) and c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD) and not c:IsLocation(LOCATION_FZONE)
end
function c86379858.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and tg and tg:IsExists(c86379858.desfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c86379858.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,86379858)
Duel.NegateEffect(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
......@@ -114,12 +114,22 @@ function c86379860.sop(e,tp,eg,ep,ev,re,r,rp)
if c:IsLocation(LOCATION_MZONE) then
sm=sm+5
end
table.remove(t,sm)
if sm==6 then
table.remove(t,21)
else
table.remove(t,sm)
end
if Duel.IsExistingMatchingCard(c86379860.filter19,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
table.remove(t)
table.remove(t)
table.remove(t)
table.remove(t)
if sm~=6 then
table.remove(t)
table.remove(t)
table.remove(t)
table.remove(t)
else
table.remove(t)
table.remove(t)
table.remove(t)
end
end
local mytable={}
local mygroup=Group.CreateGroup()
......@@ -261,10 +271,34 @@ function c86379860.sop(e,tp,eg,ep,ev,re,r,rp)
if tseq==50 then
local dc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if dc then Duel.Destroy(dc,REASON_EFFECT) end
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)
end
end
if tseq==51 then
local dc=Duel.GetFieldCard(1-tp,LOCATION_FZONE,0)
if dc then Duel.Destroy(dc,REASON_EFFECT) end
local Tpe=c:GetOriginalType()
Card.SetCardData(c,4,TYPE_FIELD+TYPE_SPELL)
if Duel.MoveToField(c,tp,1-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)
end
end
if tseq==52 then
local dc1=Duel.GetFieldCard(tp,LOCATION_MZONE,5)
......
......@@ -7,6 +7,7 @@ function c86379867.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,86379867)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c86379867.condition)
e1:SetTarget(c86379867.target)
e1:SetOperation(c86379867.operation)
c:RegisterEffect(e1)
......@@ -29,6 +30,12 @@ function c86379867.initial_effect(c)
c:RegisterEffect(e3)
end
--
function c86379867.xfilter(c)
return c:IsFaceup() and c:IsSetCard(0x190) and c:IsType(TYPE_FIELD+TYPE_EQUIP)
end
function c86379867.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c86379867.xfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c86379867.spfilter(c,e,tp)
local hasRoom=false
if c:IsLocation(LOCATION_EXTRA) then
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment