Commit 6d8c6bcf authored by Tachibana's avatar Tachibana

ndyd

parent ad986788
...@@ -55,3 +55,17 @@ ...@@ -55,3 +55,17 @@
33310212 33310212
44001011 44001011
!side !side
37902001
40010048
40010049
40010050
40010052
40010054
40010056
40010058
40010060
40010062
40010064
40010066
40010068
40010070
#created by ... #created by ...
#main #main
35600101 45700004
35600103 45745904
35600105 45745930
35600107 45746001
35600109 45746002
35600111 45746004
35600113 45746005
35600115 45746007
35600117 45746008
35600131 45746009
35600133 45746010
35600135 45746011
35600137 45746012
35600139 45746013
35600141 45746014
35600143 45746031
35600145 45746032
35600147 45746033
35600149 45746034
35600151 45746035
35600153 45746036
35600155 45746037
35600157 45746038
35600159 45746700
35600161 45746801
35600163 45746802
35600165 45746803
35600167 45746804
35600169 45746805
35600171 45746806
37902001 45746818
40010048 45746871
40010049
40010050
40010052
40010054
40010056
40010058
40010060
40010062
40010064
40010066
40010068
40010070
#extra #extra
45700001
45700002
45700003
45745912
45745917
45745929
45745999
45746000
45746003
45746006
45746015
45746016
45746017
45746018
45746019
!side !side
45746020
45746832
45746833
45746836
47550100
#created by ... #created by ...
#main #main
66915001 67200050
66915002 67200052
66915003 67200053
66915004 67200056
66915005 67200057
66915008 67200060
66915009 67200061
66915010 67200064
66915011 67200065
66915012 67200068
66915013 67200069
66915014 67200072
66915015 67200073
66915017 67200076
66915018 67200100
66915023 70700101
66915025 70700102
66915027 70700103
66915028 70700105
66915029 70700106
66915030 70700108
66915032 70700110
66915044 71400018
66915045 71400020
66915046 71400021
66915047 71400033
66915048 72412480
66915049 72412490
66915050 72412500
66915051 72412510
66915052 72412520
66915053 72412540
66915054 72412560
66915055 72412570
66915056 75646454
66915057 75646456
66915058 75646460
66915059 75646462
66915060 75646464
66915061 75646465
66915062 75646466
66915063 75646467
#extra #extra
66915000 67200043
66915006 67200051
66915007 67200054
66915016 67200058
66915019 67200062
66915020 67200066
66915024 67200070
66915026 67200074
66915031 67200077
66915033 67200078
67200079
67200080
67200081
67200082
!side !side
72412530
72412550
72412580
72412590
75646453
75646458
75646461
75646463
#created by ... #created by ...
#main #main
67200050 81011127
67200052 81011128
67200053 81011138
67200056 81011139
67200057 81014022
67200060 81021026
67200061 81021027
67200064 81039001
67200065 81039002
67200068 81039003
67200069 81039005
67200072 81039006
67200073 81039007
67200076 81044012
67200100 81044013
70700101 81046044
70700102 81048041
70700103 81052009
70700105 81058008
70700106 81081996
70700108 85400100
70700110 85400200
71400018 85401830
71400020 85401890
71400021 85402000
71400033 85402020
72412480 85402100
72412490 85402110
72412500 85402120
72412510 86500007
72412520 86580100
72412540 86580101
72412560 86580102
72412570 86580103
75646454 86580104
75646456 86580105
75646460 86580106
75646462 86580107
75646464 86580108
75646465 86580120
75646466 86580121
75646467 86580123
86580122
86580124
#extra #extra
67200043 81006012
67200051 81017090
67200054 81039000
67200058 81039004
67200062 81048040
67200066 81053009
67200070 81058007
67200074 85401800
67200077
67200078
67200079
67200080
67200081
67200082
!side !side
72412530 86580109
72412550 86580110
72412580 86580111
72412590 86580114
75646453 86580115
75646458 86580116
75646461 86580117
75646463 86580118
86580119
#created by ...
#main
81011127
81011128
81011138
81011139
81014022
81021026
81021027
81039001
81039002
81039003
81039005
81039006
81039007
81044012
81044013
81046044
81048041
81052009
81058008
81081996
85400100
85400200
85401830
85401890
85402000
85402020
85402100
85402110
85402120
86500007
86580100
86580101
86580102
86580103
86580104
86580105
86580106
86580107
86580108
86580120
86580121
86580123
86580122
86580124
#extra
81006012
81017090
81039000
81039004
81048040
81053009
81058007
85401800
!side
86580109
86580110
86580111
86580114
86580115
86580116
86580117
86580118
86580119
No preview for this file type
...@@ -59,10 +59,6 @@ ...@@ -59,10 +59,6 @@
01170018 1 --天阁 01170018 1 --天阁
01171001 1 --诺札利亚 辉琉里 01171001 1 --诺札利亚 辉琉里
01171006 0 --诺札利亚 奥尔黛西亚 01171006 0 --诺札利亚 奥尔黛西亚
#36
03606005 0 --失乐第7机关 妲塔林
03606008 0 --久远第4机关 普罗维登斯
03606010 0 --瞬杀星 零式
#42 #42
04200110 0 --安藤麻幌的蛋包饭 04200110 0 --安藤麻幌的蛋包饭
04210018 1 --猫耳天堂-幼猫的约定 04210018 1 --猫耳天堂-幼猫的约定
...@@ -237,7 +233,7 @@ ...@@ -237,7 +233,7 @@
12008023 1 --双色的星祈 12008023 1 --双色的星祈
12008025 2 --极限的螺旋 波恋达斯 12008025 2 --极限的螺旋 波恋达斯
12008031 1 --双色的幼指 12008031 1 --双色的幼指
12009057 0 --三色的玩伴 12009057 1 --三色的玩伴
12009058 1 --宁静之音 蕾恩缇娅 12009058 1 --宁静之音 蕾恩缇娅
12009100 1 --镜外的白神 灵源依儿 12009100 1 --镜外的白神 灵源依儿
12010003 1 --LA Da''ath 理解的亚夫结 12010003 1 --LA Da''ath 理解的亚夫结
...@@ -253,7 +249,7 @@ ...@@ -253,7 +249,7 @@
12029004 1 --纯净的珍珠 依芙 12029004 1 --纯净的珍珠 依芙
12029005 1 --丰收神 依西斯 12029005 1 --丰收神 依西斯
12029007 0 --香蕉舟 无瑕之星 12029007 0 --香蕉舟 无瑕之星
12029008 0 --射星之弓 阿尔忒弥斯 12029008 1 --射星之弓 阿尔忒弥斯
12029010 1 --永远的誓言 纯白女王 12029010 1 --永远的誓言 纯白女王
12029011 1 --王权代行者 纯白女王 12029011 1 --王权代行者 纯白女王
12029014 0 --魅魔后辈 薇薇安 12029014 0 --魅魔后辈 薇薇安
...@@ -603,8 +599,6 @@ ...@@ -603,8 +599,6 @@
21400047 0 --流雾麟 暴雨之鞉 21400047 0 --流雾麟 暴雨之鞉
21400048 0 --流雾麟 冰雹之鼓 21400048 0 --流雾麟 冰雹之鼓
21400049 0 --流雾麟 沙尘之埙 21400049 0 --流雾麟 沙尘之埙
21410100 0 --碧透漫江桃雪霖
21410101 0 --拂袂无情桃雪霖
21410141 0 --合向兹山试乞灵 21410141 0 --合向兹山试乞灵
21410150 0 --听春零 独怜幽草涧边生 21410150 0 --听春零 独怜幽草涧边生
21410155 0 --听春零 湖日落船明 21410155 0 --听春零 湖日落船明
...@@ -1022,7 +1016,7 @@ ...@@ -1022,7 +1016,7 @@
33701361 1 --Power of Anger 33701361 1 --Power of Anger
33701373 0 --面对风暴 33701373 0 --面对风暴
33701348 0 --新世代虚拟YouTuber YUA 33701348 0 --新世代虚拟YouTuber YUA
33701394 1 --虚拟YouTuber 响木 青 · 新章 33701394 0 --虚拟YouTuber 响木 青 · 新章
33701402 0 --Niko ~是松饼!~ 33701402 0 --Niko ~是松饼!~
33701420 0 --VOICEROID 伊达子 33701420 0 --VOICEROID 伊达子
33701435 0 --艹!DIY卡的LUA又写错了! 33701435 0 --艹!DIY卡的LUA又写错了!
...@@ -1046,8 +1040,6 @@ ...@@ -1046,8 +1040,6 @@
35100139 1 --异质绝望 黑白熊幼仔 35100139 1 --异质绝望 黑白熊幼仔
35100141 1 --异质绝望 坏击喷射 35100141 1 --异质绝望 坏击喷射
35100143 1 --异质绝望-摇奖机 35100143 1 --异质绝望-摇奖机
#356
35600163 0 --Flowers 晚秋细雨的虚像实景
#375 #375
37564012 0 --元灵毁灭者·Aya Ayane 37564012 0 --元灵毁灭者·Aya Ayane
37564041 0 --阎-少女之梦·虚无的世界 37564041 0 --阎-少女之梦·虚无的世界
......
...@@ -12,7 +12,7 @@ function cm.initial_effect(c) ...@@ -12,7 +12,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND+LOCATION_DECK) e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon) e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
e1:SetValue(1) e1:SetValue(1)
......
...@@ -34,7 +34,7 @@ function cm.initial_effect(c) ...@@ -34,7 +34,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m+100) e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.sumcon) e2:SetCondition(cm.sumcon)
e2:SetTarget(cm.sumtg) e2:SetTarget(cm.sumtg)
......
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if chk==0 then return g:GetCount()>0 end if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
...@@ -40,7 +40,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT) e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,5) e1:SetTargetRange(0,1)
e1:SetValue(5) e1:SetValue(5)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
...@@ -55,5 +55,5 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,5 +55,5 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.aclimit1(e,re,tp) function cm.aclimit1(e,re,tp)
return Duel.GetActivityCount(1-tp,m)<2 and re:IsActiveType(TYPE_SPELL) or re:IsActiveType(TYPE_TRAP) return Duel.GetActivityCount(1-tp,m)<2 and ( re:IsActiveType(TYPE_SPELL) or re:IsActiveType(TYPE_TRAP) )
end end
\ No newline at end of file
...@@ -95,7 +95,7 @@ function cm.wteffect(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -95,7 +95,7 @@ function cm.wteffect(e,tp,eg,ep,ev,re,r,rp,c)
if op==2 then if op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN) local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN)
local ttc=g:GetFirst() local ttc=tg:GetFirst()
if ttc then if ttc then
Duel.Remove(ttc,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(ttc,POS_FACEDOWN,REASON_EFFECT)
end end
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,7 +10,7 @@ function cm.initial_effect(c) ...@@ -10,7 +10,7 @@ function cm.initial_effect(c)
local e7=rsef.QO(c,nil,{m,0},1,"td",nil,LOCATION_GRAVE,nil,nil,rsop.target(cm.tdfilter,"td",rsloc.gr,0,1,1,c),cm.actop) local e7=rsef.QO(c,nil,{m,0},1,"td",nil,LOCATION_GRAVE,nil,nil,rsop.target(cm.tdfilter,"td",rsloc.gr,0,1,1,c),cm.actop)
end end
function cm.tgfilter(e,c) function cm.tgfilter(e,c)
return c:IsFaceup() and rsch.IsSet1(c) and c~=e:GetHandler() return c:IsFaceup() and c:IsSetCard(0xccd) and c~=e:GetHandler()
end end
function cm.limitval(e,re) function cm.limitval(e,re)
local rc=re:GetHandler() local rc=re:GetHandler()
......
--碧透漫江桃雪霖
local m=21410100
local cm=_G["c"..m]
function c21410100.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc~=c and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(rc,REASON_EFFECT)~=0 and rc:GetBaseAttack()>=0
and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(rc:GetBaseAttack())
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--拂袂无情桃雪霖
local m=21410101
local cm=_G["c"..m]
function c21410101.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.filter(c)
return true
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*500)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
local cnt=Duel.Destroy(sg,REASON_EFFECT)
if cnt~=0 then
Duel.BreakEffect()
Duel.Damage(1-tp,cnt*500,REASON_EFFECT)
end
end
--空山寂寞桃雪霖
local m=21410102
local cm=_G["c"..m]
function c21410102.initial_effect(c)
--send to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(2,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(2,m)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.tgfilter(c)
return c:IsSetCard(0x9c25) and c:IsAbleToGrave()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--虚拟水神泳者 --虚拟水神泳者
if not pcall(function() require("expansions/script/c65010201") end) then require("script/c65010201") end if not pcall(function() require("expansions/script/c65010201") end) then require("script/c65010201") end
local m,cm=rscf.DefineCard(26812003,"VrAqua") local m,cm=rscf.DefineCard(26812013,"VrAqua")
function cm.initial_effect(c) function cm.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--虚拟水神幼女 --虚拟水神幼女
if not pcall(function() require("expansions/script/c65010201") end) then require("script/c65010201") end if not pcall(function() require("expansions/script/c65010201") end) then require("script/c65010201") end
local m,cm=rscf.DefineCard(26812004,"VrAqua") local m,cm=rscf.DefineCard(26812014,"VrAqua")
function cm.initial_effect(c) function cm.initial_effect(c)
--spsummon --spsummon
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
......
--二之宫一夏
local m=28316009
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x11,1550,1050,4,RACE_SPELLCASTER,ATTRIBUTE_FIRE) end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x11,1550,1050,4,RACE_SPELLCASTER,ATTRIBUTE_FIRE) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK)
end
end
--二之宫一夏·冬日
local m=28316010
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.sscon)
e2:SetTarget(cm.sstg)
e2:SetOperation(cm.ssop)
c:RegisterEffect(e2)
end
function cm.lcheck(g)
return g:IsExists(cm.pfilter,1,nil)
end
function cm.pfilter(c)
return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function cm.spfilter(c,e,tp,zone)
return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and cm.spfilter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function cm.ssfilter(c,e,tp)
return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.ssfilter(chkc,e,tp) and chkc~=c end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.ssfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.ssfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -12,6 +12,7 @@ function c33200116.initial_effect(c) ...@@ -12,6 +12,7 @@ function c33200116.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCondition(c33200116.setcon2) e3:SetCondition(c33200116.setcon2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
--Flowers 八代让叶
local m=35600101
local cm=_G["c"..m]
Sy_aria_ers=Sy_aria_ers or {}
function Sy_aria_ers.sumattack(c)
local tc=c
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
tc:RegisterEffect(e0)
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_CONTINUOUS))
e1:SetValue(POS_FACEUP_ATTACK)
tc:RegisterEffect(e1)
return e0,e1
end
function Sy_aria_ers.mtograve(c,code)
local tc=c
--tograve
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_ADJUST)
e5:SetCondition(function(e)
return not Duel.IsExistingMatchingCard(function(c)
return c:IsFaceup() and c:IsCode(table.unpack(code))
end,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end)
e5:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end)
tc:RegisterEffect(e5)
return e5
end
function Sy_aria_ers.main(c,code,id,cat,pro,tg,op,tp)
local tc=c
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(code,id))
if cat~=nil then
e1:SetCategory(cat)
end
if tp~=1 then
e1:SetType(EFFECT_TYPE_IGNITION)
else
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
end
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end)
if pro~=nil then
e1:SetProperty(pro)
end
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,code+id)
e1:SetTarget(tg)
e1:SetOperation(op)
tc:RegisterEffect(e1)
return e1
end
function Sy_aria_ers.batph(c,code,id,cat,pro,tg,op,tep)
local tc=c
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(code,id))
if cat~=nil then
e1:SetCategory(cat)
end
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
if tep==1 and Duel.GetTurnPlayer()==tp then return false end
if tep==0 and Duel.GetTurnPlayer()==1-tp then return false end
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end)
if pro~=nil then
e1:SetProperty(pro)
end
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,code+id)
e1:SetTarget(tg)
e1:SetOperation(op)
tc:RegisterEffect(e1)
return e1
end
function Sy_aria_ers.couspell(c,mcode,code)
local tc=c
---serach
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function(c)
return c:IsCode(code) and c:IsAbleToHand()
end,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,function(c)
return c:IsCode(code) and c:IsAbleToHand()
end,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end)
tc:RegisterEffect(e1)
--tribute summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,4))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,mcode)
e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function(c)
return c:IsSetCard(0x3b41) and c:IsSummonable(true,nil,1)
end,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,function(c)
return c:IsSetCard(0x3b41) and c:IsSummonable(true,nil,1)
end,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
end)
tc:RegisterEffect(e3)
--tgser
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,mcode+1)
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Sy_aria_ers.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Sy_aria_ers.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end)
tc:RegisterEffect(e4)
return e1,e3,e4
end
function Sy_aria_ers.tgfilter(c)
return c:IsSetCard(0x3b41) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function Sy_aria_ers.spell(c,code,id,cat,tg,op,con,lab)
local tc=c
---serach
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(code,id))
if cat~=nil then
e1:SetCategory(cat)
end
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,code+EFFECT_COUNT_CODE_OATH)
if con~=nil then
e1:SetCondition(con)
end
if lab~=nil then
e1:SetLabel(lab)
end
e1:SetTarget(tg)
e1:SetOperation(op)
tc:RegisterEffect(e1)
return e1
end
-------------------------------
if not cm then return end
local code={35600105,35600109}
function cm.initial_effect(c)
aux.AddCodeList(c,table.unpack(code))
local e0,e1=Sy_aria_ers.sumattack(c)
local e2=Sy_aria_ers.mtograve(c,code)
local e3=Sy_aria_ers.main(c,m,0,CATEGORY_DISABLE,EFFECT_FLAG_CARD_TARGET,cm.target,cm.activate,1)
local e4=Sy_aria_ers.main(c,m,1,CATEGORY_TOHAND,nil,cm.tg,cm.op)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
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(cm.efilter)
tc:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.thfilter(c)
return c:IsSetCard(0x3b41) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function cm.filter2(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if Duel.SendtoHand(g1,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_HAND,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
end
\ No newline at end of file
--Flowers 白羽苏芳
local m=35600103
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
local e0,e1=Sy_aria_ers.sumattack(c)
local e2=Sy_aria_ers.main(c,m,0,CATEGORY_TOHAND+CATEGORY_SEARCH,nil,cm.tg,cm.op)
local e6=Sy_aria_ers.batph(c,m,1,CATEGORY_SUMMON,nil,cm.sumtg,cm.sumop,2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
--cannot release
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UNRELEASABLE_SUM)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e5)
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.thfilter(c)
return c:IsSetCard(0x3b41) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if Duel.SendtoHand(g1,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g1)
end
end
function cm.sumfilter(c)
return c:IsSummonable(true,nil,1)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
\ No newline at end of file
--Flowers 小御门奈莉奈
local m=35600105
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code=35600101
function cm.initial_effect(c)
aux.AddCodeList(c,code)
local e0,e1=Sy_aria_ers.sumattack(c)
local e2=Sy_aria_ers.mtograve(c,code)
local e3=Sy_aria_ers.main(c,m,0,CATEGORY_ATKCHANGE,EFFECT_FLAG_CARD_TARGET,cm.target,cm.activate,1)
local e4=Sy_aria_ers.main(c,m,1,CATEGORY_TOHAND,nil,cm.tg,cm.op)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetAttack())
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function cm.thfilter(c)
return c:IsSetCard(0x3b41) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsFaceup()
end
function cm.tg(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,0,0)
end
function cm.filter2(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if Duel.SendtoHand(g1,nil,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_HAND,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
end
\ No newline at end of file
--Flowers 沙沙贵莓
local m=35600107
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code=35600109
function cm.initial_effect(c)
aux.AddCodeList(c,code)
local e0,e1=Sy_aria_ers.sumattack(c)
local e2=Sy_aria_ers.mtograve(c,code)
local e3=Sy_aria_ers.main(c,m,0,CATEGORY_DISABLE,nil,cm.target,cm.activate)
local e4=Sy_aria_ers.batph(c,m,1,CATEGORY_REMOVE,nil,cm.rmtg,cm.rmop,1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,1,nil)
g:Merge(g2)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--Flowers 沙沙贵林檎
local m=35600109
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code={35600107,35600101}
function cm.initial_effect(c)
aux.AddCodeList(c,code)
local e0,e1=Sy_aria_ers.sumattack(c)
local e3=Sy_aria_ers.main(c,m,0,CATEGORY_ATKCHANGE,nil,cm.target,cm.activate)
local e4=Sy_aria_ers.batph(c,m,1,CATEGORY_REMOVE,nil,cm.rmtg,cm.rmop,1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(function(c)
return c:IsFaceup() and c:IsCode(code)
end,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(0)
tc:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e4)
end
end
function cm.filter(c)
return c:IsAbleToRemove() and c:IsAttack(0)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(function(c)
return c:IsFaceup() and c:IsCode(code)
end,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--Flowers 匂坂真由理
local m=35600111
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code={35600131,35600137}
local code1=35600103
local code2=35600113
function cm.initial_effect(c)
aux.AddCodeList(c,code)
local e0,e1=Sy_aria_ers.sumattack(c)
local e2=Sy_aria_ers.mtograve(c,code)
local e3=Sy_aria_ers.main(c,m,0,CATEGORY_TOGRAVE+CATEGORY_DESTROY,nil,cm.target,cm.activate)
local e4=Sy_aria_ers.main(c,m,1,CATEGORY_TODECK+CATEGORY_REMOVE,nil,cm.target2,cm.activate2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_SELF_TOGRAVE)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.tgcon)
c:RegisterEffect(e3)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x3b41) and Duel.IsExistingMatchingCard(function(c)
return c:IsFaceup() and c:IsCode(code1)
end,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,0x3b41)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #sg>0 then
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
function cm.filter(c)
return c:IsAbleToRemove() and c:IsSetCard(0x3b41)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(function(c)
return c:IsFaceup() and c:IsCode(code1)
end,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #sg>0 then
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
function cm.tgcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,35600131)
end
\ No newline at end of file
--Flowers 花菱立花
local m=35600113
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code1=35600103
local code2=35600111
function cm.initial_effect(c)
aux.AddCodeList(c,code1)
local e0,e1=Sy_aria_ers.sumattack(c)
local e2=Sy_aria_ers.mtograve(c,code1)
local e3=Sy_aria_ers.main(c,m,0,CATEGORY_TODECK+CATEGORY_DISABLE,nil,cm.target,cm.activate)
local e4=Sy_aria_ers.main(c,m,1,CATEGORY_TODECK+CATEGORY_POSITION,nil,cm.target2,cm.activate2)
end
function cm.filter(c)
return c:IsAbleToDeck() and c:IsSetCard(0x3b41)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(function(c)
return c:IsFaceup() and c:IsCode(code1)
end,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local sg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=sg:GetFirst()
if tc then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingMatchingCard(function(c)
return c:IsFaceup() and c:IsCode(code1)
end,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=sg:GetFirst()
if tc:IsType(TYPE_MONSTER) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
else
tc:CancelToGrave()
Duel.ChangePosition(tc,POS_FACEDOWN)
end
end
end
\ No newline at end of file
--Flowers 八重垣艾莉卡
local m=35600115
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code={35600103,35600117}
function cm.initial_effect(c)
aux.AddCodeList(c,code)
local e0,e1=Sy_aria_ers.sumattack(c)
local e2=Sy_aria_ers.mtograve(c,code)
local e3=Sy_aria_ers.main(c,m,0,CATEGORY_TOHAND+CATEGORY_SEARCH,nil,cm.tg,cm.op,1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsCode(table.unpack(code)) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if Duel.SendtoHand(g1,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g1)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.tgfilter,1,nil)
end
function cm.tgfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsCode(table.unpack(code))
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)~=0 then
local sg=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
\ No newline at end of file
--Flowers 考崎千鸟
local m=35600117
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code=35600115
function cm.initial_effect(c)
aux.AddCodeList(c,code)
local e0,e1=Sy_aria_ers.sumattack(c)
local e2=Sy_aria_ers.mtograve(c,code)
local e3=Sy_aria_ers.main(c,m,0,CATEGORY_TOHAND+CATEGORY_REMOVE,nil,cm.tg,cm.op,1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x3b41) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,1-tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if Duel.SendtoHand(g1,nil,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,1-tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.tgfilter,1,nil)
end
function cm.tgfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0x3b41) and c:IsType(TYPE_MONSTER)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,1-tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
local sg=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
--Flowers 永恒舞台的四季幕间 春
local m=35600131
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code=35600103
function cm.initial_effect(c)
local e1,e2,e3=Sy_aria_ers.couspell(c,m,code)
end
--Flowers 永恒舞台的四季幕间 夏
local m=35600133
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code=35600115
function cm.initial_effect(c)
local e1,e2,e3=Sy_aria_ers.couspell(c,m,code)
end
--Flowers 永恒舞台的四季幕间 秋
local m=35600135
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code=35600101
function cm.initial_effect(c)
local e1,e2,e3=Sy_aria_ers.couspell(c,m,code)
end
--Flowers 永恒舞台的四季幕间 冬
local m=35600137
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code=35600111
function cm.initial_effect(c)
local e1,e2,e3=Sy_aria_ers.couspell(c,m,code)
end
--Flowers 纯白的均相三角形
local m=35600139
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code={35600103,35600113,35600111}
function cm.initial_effect(c)
aux.AddCodeList(c,code)
local e1=Sy_aria_ers.spell(c,m,0,CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE,cm.thtg,cm.thop,cm.con,0)
local e2=Sy_aria_ers.spell(c,m,1,CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE,cm.thtg,cm.thop,cm.con,1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:FilterCount(Card.IsCode,nil,35600103)==g:GetCount()
end
function cm.thfilter(c)
local code=35600111
if e:GetLabel()~=0 then
code=35600113
end
return c:IsCode(code) and c:IsAbleToHand()
end
function cm.refilter(c)
local code=35600113
if e:GetLabel()~=0 then
code=35600111
end
return c:IsCode(code) and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--Flowers 恋色的莫比乌斯带
local m=35600141
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code={35600115,35600117}
function cm.initial_effect(c)
aux.AddCodeList(c,code)
local e1=Sy_aria_ers.spell(c,m,0,CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON,cm.thtg,cm.thop,cm.con,0)
local e2=Sy_aria_ers.spell(c,m,1,CATEGORY_TOHAND+CATEGORY_TOGRAVE,cm.tgtg,cm.tgop,cm.con,0)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:GetCount()==0 or g:FilterCount(Card.IsSetCard,nil,0x3b41)==g:GetCount()
end
function cm.sumfilter(c)
return c:IsSummonable(true,nil,1)
end
function cm.thfilter(c)
return c:IsCode(35600115) and c:IsAbleToHand()
end
function cm.thfilter1(c)
return c:IsCode(35600117) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_CONTINUOUS+TYPE_MONSTER) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
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_DECK,0,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
g:Merge(g1)
if g:GetCount()==2 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=sg:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
end
end
end
function cm.tgfilter(c)
return c:IsSetCard(0x3b41) and c:IsAbleToHand()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x3b41) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x3b41)
if g:GetCount()>0 then
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=sg:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--Flowers 虹幕的等径同心圆
local m=35600143
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code={35600101,35600135}
function cm.initial_effect(c)
aux.AddCodeList(c,code)
local e1=Sy_aria_ers.spell(c,m,0,nil,cm.thtg,cm.thop,cm.con)
local e2=Sy_aria_ers.spell(c,m,1,nil,cm.thtg,cm.thop,cm.con,1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:FilterCount(Card.IsCode,nil,35600101)>0
end
function cm.thfilter(c,tp)
return c:IsCode(35600135) and c:GetActivateEffect():IsActivatable(tp)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
if e:GetLabel()~=1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.indtg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
Duel.RegisterEffect(e2,tp)
else
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end)
Duel.RegisterEffect(e4,tp)
end
end
end
function cm.indtg(e,c)
return c:IsSetCard(0x3b41) and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
--Flowers 冷调的救赎十字架
local m=35600145
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
local code={35600103,35600111}
function cm.initial_effect(c)
aux.AddCodeList(c,code)
local e1=Sy_aria_ers.spell(c,m,0,CATEGORY_TOHAND+CATEGORY_SUMMON,cm.thtg,cm.thop,cm.con,0)
local e2=Sy_aria_ers.spell(c,m,0,CATEGORY_TOHAND,cm.thtg,cm.thop,cm.con,1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:FilterCount(Card.IsCode,nil,35600103)==g:GetCount()
end
function cm.thfilter(c)
local res=c:IsCode(33500111)
if e:GetLabel()~=0 then
res=c:IsSetCard(0x3b41)
end
return res and c:IsAbleToHand() and c:IsFaceup()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+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_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
if e:GetLabel()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,Card.IsSummonable,tp,LOCATION_HAND,0,1,1,nil,true,nil,1)
local tc=sg:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
end
end
end
end
\ No newline at end of file
--Flowers 黝黑的纯爱气泡
local m=35600147
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
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:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetCountLimit(1,m+1)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.costfilter(c)
return c:IsSetCard(0x3b41) and c:IsAbleToGraveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=2 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.thfilter(c)
return c:IsSetCard(0x3b41) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--Flowers 告解的无果之恋
local m=35600149
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
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:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.descon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
end
function cm.costfilter(c)
return c:IsSetCard(0x3b41) and c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.confilter(c)
return c:IsFaceup() and c:IsCode(35600131)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
local g1=Duel.GetMatchingGroup(nil,1-tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 and #g1>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,nil,1-tp,0,LOCATION_ONFIELD,1,1,nil)
g:Merge(g1)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--Flowers 朔时的永恒思念
local m=35600151
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetCountLimit(1,m+1)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function cm.costfilter(c)
return c:IsSetCard(0x3b41) and c:IsAbleToGraveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(0)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetFirst():IsCode(35600111) then e:SetLabel(1) end
Duel.SendtoGrave(g,REASON_COST)
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:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.filter(c)
return c:IsSetCard(0x3b41) and c:IsAbleToHand() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
if e:GetLabel()==1 then
Duel.SetChainLimit(aux.FALSE)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.thfilter(c)
return c:IsSetCard(0x3b41) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--Flowers 花之扉页
local m=35600153
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=1 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit1)
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit1(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
\ No newline at end of file
--Flowers 情之盛开
local m=35600155
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m-1)
e3:SetCondition(cm.sumcon)
e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop)
c:RegisterEffect(e3)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg2)
e1:SetOperation(cm.thop2)
e1:SetCondition(cm.con)
c:RegisterEffect(e1)
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m,2))
e7:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_TO_GRAVE)
e7:SetCountLimit(1,m+1)
e7:SetCondition(cm.drcon)
e7:SetTarget(cm.drtg)
e7:SetOperation(cm.drop)
c:RegisterEffect(e7)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:FilterCount(Card.IsCode,nil,35600111)>0
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function cm.sumfilter(c)
return c:IsSummonable(true,nil,1)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.f(c)
return c:IsType(TYPE_TRAP) and c:IsAbleToDeck() and c:IsSetCard(0x3b41)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(cm.f,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,0,0)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(cm.f,tp,LOCATION_GRAVE,0,nil)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.Draw(p,d,REASON_EFFECT)
end
end
\ No newline at end of file
--Flowers 夏空之光
local m=35600157
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(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)
Duel.RegisterEffect(e1,tp)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_RELEASE_SUM)
e1:SetTargetRange(0,LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--祈愿之舞台 圣彗星兰
local m=35600159
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,m-1)
e2:SetCondition(cm.actcon)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c)
return c:IsSetCard(0x3b41) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.filter2(c)
return c:IsSetCard(0x3b41) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function cm.hfilter(c)
return c:IsSetCard(0x3b41) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function cm.sumfilter(c)
return c:IsSummonable(true,nil,1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.hfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
if Duel.Destroy(eg,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
end
end
\ No newline at end of file
--Flowers 夜幕镜花的水月替身
local m=35600161
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(cm.handcon)
c:RegisterEffect(e0)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
local c=e:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
if Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
end
end
end
function cm.handcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):Filter(Card.IsFaceup,nil)
return g:FilterCount(Card.IsCode,nil,35600103)>0
end
\ No newline at end of file
--Flowers 晚秋细雨的虚像实景
local m=35600163
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(cm.handcon)
c:RegisterEffect(e0)
--Activate(summon)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON)
e1:SetCondition(cm.condition1)
e1:SetTarget(cm.target1)
e1:SetOperation(cm.activate1)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e3)
end
function cm.handcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):Filter(Card.IsFaceup,nil)
return g:FilterCount(Card.IsCode,nil,35600101)>0
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,eg:GetCount(),0,0)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
if Duel.SendtoHand(eg,nil,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #g>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,1)
Duel.RegisterEffect(e1,tp)
end
end
end
\ No newline at end of file
--Flowers 静水之瀑流
local m=35600165
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.actcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.rmcon)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.descon)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsSetCard(0x3b41)and c:IsFaceup()
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.disable(e,c)
return (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0) and not c:IsSetCard(0x3b41)
end
function cm.cfilter1(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3b41)
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(cm.cfilter1,1,c)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,1-tp,LOCATION_EXTRA)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(1-tp,LOCATION_EXTRA,0)
if g:GetCount()<2 or not c:IsRelateToEffect(e) or not c:IsFaceup() then return end
local rs=g:RandomSelect(1-tp,2)
Duel.Remove(rs,POS_FACEDOWN,REASON_EFFECT)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
\ No newline at end of file
--Flowers 柑橘的五味杂陈
local m=35600167
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.actcon)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m-1)
e3:SetCondition(cm.sumcon)
e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.rmcon)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsCode(35600103) and c:IsFaceup()
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function cm.cfilter1(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3b41)
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(cm.cfilter1,1,c)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not e:GetHandler():IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetTargetRange(0xff, 0xff)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function cm.filter(c)
return c:IsSummonable(true,nil,1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
end
\ No newline at end of file
--Flowers 无翼天使之羽
local m=35600169
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.actcon)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_INACTIVATE)
e4:SetRange(LOCATION_SZONE)
e4:SetValue(cm.effectfilter)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_DISEFFECT)
e5:SetRange(LOCATION_SZONE)
e5:SetValue(cm.effectfilter)
c:RegisterEffect(e5)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cfilter(c)
return c:IsCode(35600103) and c:IsFaceup()
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.effectfilter(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():IsSetCard(0x3b41) and te:GetHandler():IsType(TYPE_MONSTER) and bit.band(loc,LOCATION_ONFIELD)~=0
end
function cm.thfilter(c)
return c:IsSetCard(0x3b41) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,0)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(0,1)
e2:SetTarget(cm.sumlimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_GRAVE)
end
\ No newline at end of file
--Flowers 虹之魔法
local m=35600171
local cm=_G["c"..m]
Duel.LoadScript("c35600101.lua")
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.actcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_HANDES)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(cm.cost)
e2:SetCountLimit(1,m-1)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate1)
c:RegisterEffect(e3)
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m,2))
e7:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_TO_GRAVE)
e7:SetCountLimit(1,m+1)
e7:SetCondition(cm.drcon)
e7:SetTarget(cm.drtg)
e7:SetOperation(cm.drop)
c:RegisterEffect(e7)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:FilterCount(Card.IsCode,nil,35600105)==g:GetCount()
end
function cm.sfilter(c)
return c:IsType(TYPE_MONSTER)and c:IsAbleToGraveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.GetFieldGroupCount(1-tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local g1=Duel.GetFieldGroup(1-tp,0,LOCATION_HAND)
if g:GetCount()>0 and #g1>0 then
local sg=g:RandomSelect(1-tp,1)
sg:Merge(g1:RandomSelect(1-tp,1))
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function cm.filter(c)
return c:IsSummonable(true,nil,1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
end
function cm.f(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToDeck() and c:IsSetCard(0x3b41)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(cm.f,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,0,0)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(cm.f,tp,LOCATION_GRAVE,0,nil)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.Draw(p,d,REASON_EFFECT)
end
end
\ No newline at end of file
--煌武院的外包
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
\ No newline at end of file
--失乐第7机关 妲塔林
if not pcall(function() require("expansions/script/c3601000") end) then require("script/c3601000") end
local m,cm=rscf.DefineCard(3606005)
function cm.initial_effect(c)
local e1 = rsef.QO(c,nil,"tg",nil,"tg",nil,LOCATION_HAND,nil,cm.cost,rsop.target(Card.IsAbleToGrave,"tg",LOCATION_MZONE,LOCATION_MZONE),cm.op)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.CheckLPCost(tp,1000) end
rsop.SelectToGrave(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler(),{REASON_COST})
Duel.PayLPCost(tp,1000)
end
function cm.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cm.op(e,tp)
rsop.SelectToGrave(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,{})
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_LPCOST_CHANGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(cm.lp)
Duel.RegisterEffect(e1,tp)
end
function cm.lp(e,re,rp,val)
local lp = Duel.GetLP(rp)
if re and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) then
return lp <= val * 2 and lp or val * 2
else return val end
end
\ No newline at end of file
--久远第4机关 普罗维登斯
if not pcall(function() require("expansions/script/c3601000") end) then require("script/c3601000") end
local m,cm=rscf.DefineCard(3606008)
function cm.initial_effect(c)
local e1 = rsef.QO(c,nil,nil,nil,"tg",nil,LOCATION_HAND,nil,cm.cost,rsop.target(cm.tgfilter,"tg",0,LOCATION_ONFIELD),cm.act)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk == 0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,c) and Duel.CheckLPCost(tp,1000) end
rsop.SelectToGrave(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,c,{REASON_COST})
Duel.PayLPCost(tp,1000)
end
function cm.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.act(e,tp)
rsop.SelectToGrave(tp,cm.tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil,{})
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_LPCOST_CHANGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(cm.lp)
Duel.RegisterEffect(e1,tp)
end
function cm.lp(e,re,rp,val)
local lp = Duel.GetLP(rp)
if re and re:IsActivated() and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then
return lp <= val * 2 and lp or val * 2
else return val end
end
\ No newline at end of file
--瞬杀星 零式
if not pcall(function() require("expansions/script/c3601000") end) then require("script/c3601000") end
local m,cm=rscf.DefineCard(3606010)
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=rsef.SV_IMMUNE_EFFECT(c,rsval.imoe,cm.imcon)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_START)
e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop)
c:RegisterEffect(e3)
end
function cm.imcon(e)
return e:GetHandler():IsStatus(STATUS_SUMMON_TURN)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
local tc = c:GetBattleTarget()
local atk1 = c:GetAttack()
if chk == 0 then
if not tc or tc:IsControler(tp) or not tc:IsAttackAbove(atk1+1) then return false end
local atk2 = tc:GetAttack()
return Duel.IsPlayerCanDiscardDeck(tp,math.ceil((atk2 - atk1)/100))
end
end
function cm.tgop(e,tp)
local c = e:GetHandler()
local tc = c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() or not tc:IsRelateToBattle() or tc:IsFacedown() then return end
local atk1,atk2 = c:GetAttack(),tc:GetAttack()
if atk1 >= atk2 then return end
local ct = math.ceil((atk2 - atk1)/100)
if not Duel.IsPlayerCanDiscardDeck(tp,ct) then return end
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
local e1 = rscf.QuickBuff(c,"atk+",ct*100)
end
--布里欧纳克
function c47550100.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_WARRIOR),3,3,c47550100.lcheck)
c:EnableReviveLimit()
--shujinkou toujyou
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c47550100.discon)
e1:SetOperation(c47550100.disop)
c:RegisterEffect(e1)
--akashikku kothingu
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_RELEASE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_TO_DECK)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_TO_GRAVE)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_TO_HAND)
c:RegisterEffect(e6)
local e7=e3:Clone()
e7:SetCode(EFFECT_CANNOT_REMOVE)
c:RegisterEffect(e7)
local e8=e3:Clone()
e8:SetCode(EFFECT_CANNOT_DISABLE)
c:RegisterEffect(e8)
--buttobasu
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e9:SetCode(EVENT_BATTLE_END)
e9:SetOperation(c47550100.actop)
c:RegisterEffect(e9)
--jikunndou
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e10:SetCode(EVENT_BATTLE_DESTROYING)
e10:SetOperation(c47550100.atkop)
c:RegisterEffect(e10)
end
function c47550100.lcheck(g)
return g:IsExists(Card.IsLink,1,nil,4) and
end
function c47550100.discon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local c=e:GetHandler()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c47550100.disop(e,tp,eg,ep,ev,re,r,rp)
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_DISABLE)
e0:SetTargetRange(0xff,0xff)
e0:SetReset(RESET_PHASE)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE)
Duel.RegisterEffect(e2,tp)
end
function c47550100.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttackTarget()
if not tc then return end
if tc:IsControler(tp) then tc=Duel.GetAttacker() end
Duel.SendtoHand(tc,nil,REASON_RULE)
end
function c47550100.desfilter(c,e,tp)
return not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end
function c47550100.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c47550100.desfilter,tp,0,OCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then Duel.CalculateDamage(c,tc) end
end
\ No newline at end of file
--告白时刻·皆原阳茉莉
local m=52501001
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
Tenka.FriendToLover(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(Tenka.FriendToLoverCon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.spfilter(c,e,tp)
return c:IsAttack(1550) and c:IsDefense(1050) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c)
return not c:IsAttack(1550)
end
--告白时刻·望月理奈
local m=52501002
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
Tenka.FriendToLover(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(Tenka.FriendToLoverCon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.thfilter(c)
return c:IsAttack(1550) and c:IsDefense(1050) and c:IsAbleToHand()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:GetCount()>0 then
if g:IsExists(cm.thfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,cm.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
Duel.ShuffleDeck(tp)
end
end
--告白时刻·柊柚夕
local m=52501003
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
Tenka.FriendToLover(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(Tenka.FriendToLoverCon)
e1:SetTarget(cm.tdtg)
e1:SetOperation(cm.tdop)
c:RegisterEffect(e1)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--告白时刻·沢渡岬
local m=52501004
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
Tenka.FriendToLover(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(Tenka.FriendToLoverCon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.spfilter(c,e,tp)
return c:IsAttack(1550) and c:IsDefense(1050) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--千恋万花·朝武芳乃
function c64300001.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300001,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,64300001)
e1:SetTarget(c64300001.thtg)
e1:SetOperation(c64300001.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--special summon & disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64300001,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,64300001)
e3:SetCondition(c64300001.spcon)
e3:SetTarget(c64300001.sptg)
e3:SetOperation(c64300001.spop)
c:RegisterEffect(e3)
end
function c64300001.thfilter(c)
return c:IsSetCard(0x643,0x9643) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c64300001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c64300001.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c64300001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c64300001.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c64300001.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and bit.band(c:GetPreviousTypeOnField(),TYPE_FUSION)~=0
and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end
function c64300001.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c64300001.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler())
end
function c64300001.disfilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
end
function c64300001.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c64300001.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c64300001.disfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c64300001.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c64300001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
end
--千恋万花·常陆茉子
function c64300002.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300002,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,64300002)
e1:SetTarget(c64300002.thtg)
e1:SetOperation(c64300002.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--overlay
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64300002,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCountLimit(1,20424879)
e3:SetTarget(c64300002.ovtg)
e3:SetOperation(c64300002.ovop)
c:RegisterEffect(e3)
end
function c64300002.thfilter(c)
return (c:IsSetCard(0x9643) and c:IsType(TYPE_MONSTER) or c:IsSetCard(0x643)) and not c:IsCode(64300002) and c:IsAbleToHand()
end
function c64300002.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64300002.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c64300002.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c64300002.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c64300002.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c64300002.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9643) and c:IsType(TYPE_XYZ)
end
function c64300002.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c64300002.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c64300002.ovfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c64300002.ovfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function c64300002.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--千恋万花·丛雨
function c64300003.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300003,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c64300003.stg)
e1:SetOperation(c64300003.sop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c64300003.sfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsSetCard(0x643) and c:IsAbleToHand()
end
function c64300003.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c64300003.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c64300003.sfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--千恋万花·蕾娜·列支敦瑙尔
function c64300004.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,64300004)
e1:SetCost(c64300004.spcost)
e1:SetTarget(c64300004.sptg)
e1:SetOperation(c64300004.spop)
c:RegisterEffect(e1)
--special summon from grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33420078,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,81344071)
e2:SetCost(c64300004.cost)
e2:SetTarget(c64300004.target)
e2:SetOperation(c64300004.operation)
c:RegisterEffect(e2)
end
function c64300004.cfilter(c,tp)
return c:IsAbleToGraveAsCost() and c:IsSetCard(0x643) and c:GetOriginalType()&TYPE_MONSTER~=0
and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and Duel.GetMZoneCount(tp,c)>0
end
function c64300004.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c64300004.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c64300004.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c64300004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c64300004.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c64300004.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c64300004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c64300004.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c64300004.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c64300004.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x643)
end
--千恋万花·鞍马小春
function c64300005.initial_effect(c)
aux.EnableDualAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,64300005)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(aux.IsDualState)
e1:SetCost(c64300005.spcost)
e1:SetTarget(c64300005.sptg)
e1:SetOperation(c64300005.spop)
c:RegisterEffect(e1)
end
function c64300005.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c64300005.filter(c,e,tp)
return c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c64300005.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64300005.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c64300005.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c64300005.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c64300005.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--千恋万花·马庭芦花
function c64300006.initial_effect(c)
aux.EnableDualAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetDescription(aux.Stringid(64300006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(aux.IsDualState)
e1:SetTarget(c64300006.target)
e1:SetOperation(c64300006.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c64300006.desop)
c:RegisterEffect(e2)
end
function c64300006.filter(c,e,tp)
return c:IsSetCard(0x643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64300006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c64300006.filter,tp,LOCATION_GRAVE+LOCATION_HAND,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c64300006.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c64300006.filter),tp,LOCATION_GRAVE+LOCATION_HAND,LOCATION_GRAVE,1,1,nil,e,tp)
local c=e:GetHandler()
local tc=g:GetFirst()
if tc then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if c:IsFaceup() and c:IsRelateToEffect(e) then c:SetCardTarget(tc) end
end
end
function c64300006.desfilter(c,rc)
return rc:GetCardTarget():IsContains(c) and c:IsSetCard(0x643)
end
function c64300006.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetCardTargetCount()>0 then
local dg=Duel.GetMatchingGroup(c64300006.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
Duel.Destroy(dg,REASON_EFFECT)
end
end
--千恋万花·鞍马廉太郎
function c64300007.initial_effect(c)
aux.AddCodeList(c,24094653)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300007,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c64300007.cost)
e1:SetTarget(c64300007.target)
e1:SetOperation(c64300007.operation)
c:RegisterEffect(e1)
end
function c64300007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c64300007.filter(c)
return c:IsCode(24094653) and c:IsAbleToHand()
end
function c64300007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c64300007.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c64300007.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstMatchingCard(c64300007.filter,tp,LOCATION_DECK,0,nil)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--千恋万花·驹川美津叶
function c64300008.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x9643),4,2)
c:EnableReviveLimit()
--ret&draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300008,1))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCost(c64300008.cost)
e1:SetTarget(c64300008.target1)
e1:SetOperation(c64300008.operation1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64300008,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(c64300008.cost)
e2:SetTarget(c64300008.target2)
e2:SetOperation(c64300008.operation2)
c:RegisterEffect(e2)
end
function c64300008.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c64300008.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c64300008.filter2(c,e,tp)
return not c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64300008.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64300008.filter1(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c64300008.filter1,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c64300008.filter1,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c64300008.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64300008.filter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c64300008.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c64300008.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c64300008.operation1(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 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==3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c64300008.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--千恋万花·朝武安晴
function c64300009.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300009,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,64300009)
e1:SetCondition(c64300009.spcon)
e1:SetTarget(c64300009.sptg)
e1:SetOperation(c64300009.spop)
c:RegisterEffect(e1)
end
function c64300009.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousSetCard(0x643)
and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end
function c64300009.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c64300009.cfilter,1,nil,tp)
end
function c64300009.spfilter(c,e,tp)
return c:IsSetCard(0x643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64300009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c64300009.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c64300009.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c64300009.spfilter),tp,LOCATION_HAND+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 c64300010.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64300010,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c64300010.atkcon)
e2:SetOperation(c64300010.atkop)
c:RegisterEffect(e2)
end
function c64300010.atkcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c64300010.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
--千恋万花·邪祟残体
function c64300011.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300011,0))
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c64300011.target)
e1:SetOperation(c64300011.operation)
c:RegisterEffect(e1)
end
function c64300011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c64300011.rfilter(c,e,tp)
return c:IsReleasableByEffect() and not c:IsImmuneToEffect(e)
end
function c64300011.filter(c,e,tp)
return c:IsSetCard(0x9643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c64300011.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rg=Duel.SelectReleaseGroup(tp,c64300011.rfilter,1,1,aux.ExceptThisCard(e),e,tp)
if Duel.Release(rg,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c64300011.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetOperation(c64300011.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
sg:GetFirst():RegisterEffect(e1)
end
end
end
function c64300011.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
--千恋万花·犬神邪祟
function c64300012.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x9643),2,true)
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PIERCE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9643))
e1:SetValue(DOUBLE_DAMAGE)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCondition(c64300012.descon)
e3:SetTarget(c64300012.destg)
e3:SetOperation(c64300012.desop)
c:RegisterEffect(e3)
end
function c64300012.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c64300012.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c64300012.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--千恋万花·丛云女神
function c64300013.initial_effect(c)
c:EnableReviveLimit()
--connot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(c64300013.sptg)
e1:SetOperation(c64300013.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64300013,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_START)
e2:SetCondition(c64300013.descon)
e2:SetTarget(c64300013.destg)
e2:SetOperation(c64300013.desop)
c:RegisterEffect(e2)
end
function c64300013.cfilter(c)
return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsAbleToRemove()
end
function c64300013.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false)
and Duel.IsExistingTarget(c64300013.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,4,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c64300013.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,4,4,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,4,0,0)
end
function c64300013.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
c:CompleteProcedure()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
function c64300013.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c64300013.dfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function c64300013.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_ATTACK)
local dg=g:Filter(c64300013.dfilter,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dg:GetCount()*1000)
end
function c64300013.damfilter(c)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousTypeOnField()&(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)~=0
end
function c64300013.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,0,LOCATION_MZONE,nil,POS_ATTACK)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
local dg=Duel.GetOperatedGroup()
local dam=dg:FilterCount(c64300013.damfilter,nil)*1000
if dam>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
end
--千恋万花·犬神白狛
function c64300014.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x9643),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetValue(c64300014.actlimit)
e1:SetCondition(c64300014.actcon)
c:RegisterEffect(e1)
--atk limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(c64300014.atklimit)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64300014,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c64300014.destg)
e3:SetOperation(c64300014.desop)
c:RegisterEffect(e3)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetTarget(c64300014.reptg)
e4:SetOperation(c64300014.repop)
c:RegisterEffect(e4)
end
function c64300014.actlimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c64300014.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function c64300014.atklimit(e,c)
return c~=e:GetHandler()
end
function c64300014.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c64300014.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c64300014.repfilter(c,e)
return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function c64300014.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(c64300014.repfilter,tp,LOCATION_ONFIELD,0,1,c,e) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c64300014.repfilter,tp,LOCATION_ONFIELD,0,1,1,c,e)
Duel.SetTargetCard(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
else return false end
end
function c64300014.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE)
end
--千恋万花·有地将臣
function c64300015.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,64300015)
e1:SetTarget(c64300015.sumtg)
e1:SetOperation(c64300015.sumop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c64300015.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x9643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64300015.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c64300015.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c64300015.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c64300015.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
--千恋万花·御神刀-丛雨丸
function c64300016.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c64300016.target)
e1:SetOperation(c64300016.operation)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(c64300016.eqlimit)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(800)
c:RegisterEffect(e3)
--immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(c64300016.efilter)
c:RegisterEffect(e5)
end
function c64300016.filter(c)
return c:IsFaceup() and c:IsSetCard(0x9643)
end
function c64300016.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c64300016.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c64300016.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c64300016.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c64300016.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c64300016.eqlimit(e,c)
return c:IsSetCard(0x9643) and c:GetControler()==e:GetHandler():GetControler()
end
function c64300016.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c64300016.cfilter(c)
return c:IsFaceup() and not c:IsSetCard(0x9643)
end
function c64300016.descon(e)
return Duel.IsExistingMatchingCard(c64300016.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
--千恋万花·被封印的御神刀
function c64300017.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,64300017+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c64300017.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9643))
e2:SetValue(300)
c:RegisterEffect(e2)
end
function c64300017.filter(c)
return c:IsLevelBelow(4) and c:IsSetCard (0x9643) and c:IsAbleToHand()
end
function c64300017.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c64300017.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(64300017,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--千恋万花·建实神社
function c64300018.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64300018,0))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c64300018.reccon)
e2:SetTarget(c64300018.rectg)
e2:SetOperation(c64300018.recop)
c:RegisterEffect(e2)
--atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetCondition(c64300018.atkcon)
e3:SetTarget(c64300018.atktg)
e3:SetValue(-500)
c:RegisterEffect(e3)
end
function c64300018.atkcon(e)
local d=Duel.GetAttackTarget()
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and d and d:IsSetCard(0x9643)
end
function c64300018.atktg(e,c)
return c==Duel.GetAttacker()
end
function c64300018.reccon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return false end
local rc=eg:GetFirst()
return rc:IsControler(tp) and rc:IsSetCard(0x9643)
end
function c64300018.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function c64300018.recop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--千恋万花·秋穗的留影
function c64300019.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--destroy and set
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c64300019.target)
e1:SetOperation(c64300019.operation)
c:RegisterEffect(e1)
end
function c64300019.desfilter(c,tp)
if c:IsFacedown() then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft==0 and c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 then
return Duel.IsExistingMatchingCard(c64300019.filter,tp,LOCATION_DECK,0,1,nil,true)
else
return Duel.IsExistingMatchingCard(c64300019.filter,tp,LOCATION_DECK,0,1,nil,false)
end
end
function c64300019.filter(c,ignore)
return c:IsSetCard(0x643) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(ignore)
end
function c64300019.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c64300019.desfilter(chkc,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c64300019.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c64300019.desfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c64300019.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c64300019.filter,tp,LOCATION_DECK,0,1,1,nil,false)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
end
--千恋万花·不安定的依代欠片
function c64300020.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,64300020)
e1:SetTarget(c64300020.target)
e1:SetOperation(c64300020.activate)
c:RegisterEffect(e1)
--Destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,327052)
e2:SetTarget(c64300020.reptg)
e2:SetValue(c64300020.repval)
c:RegisterEffect(e2)
end
function c64300020.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x9643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64300020.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64300020.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c64300020.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c64300020.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c64300020.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c64300020.repfilter(c,tp)
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5 and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x9643) and c:GetReasonPlayer()==1-tp
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c64300020.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c64300020.repfilter,1,nil,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
return true
else return false end
end
function c64300020.repval(e,c)
return c64300020.repfilter(c,e:GetHandlerPlayer())
end
--千恋万花·月伴孤影
function c64300021.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,64300021+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c64300021.condition)
e1:SetTarget(c64300021.target)
e1:SetOperation(c64300021.activate)
c:RegisterEffect(e1)
end
function c64300021.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c64300021.filter(c,e,tp)
return c:IsSetCard(0x643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c64300021.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c)
end
function c64300021.eqfilter(c,tp,ec)
return c:IsSetCard(0x643) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec)
end
function c64300021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c64300021.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c64300021.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=Duel.SelectTarget(tp,c64300021.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp,g1:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g2,1,0,0)
end
function c64300021.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local ec=tg:GetFirst()
if ec==tc then ec=tg:GetNext() end
if tc:IsRelateToEffect(e) and ec:IsRelateToEffect(e) and ec:CheckUniqueOnField(tp) and ec:CheckEquipTarget(tc)
and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Equip(tp,ec,tc)
end
end
--千恋万花·斩断诅咒的二人
function c64300022.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x643),2,2)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c64300022.atkval)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64300022,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,64300022)
e2:SetCost(c64300022.spcost1)
e2:SetTarget(c64300022.sptg1)
e2:SetOperation(c64300022.spop1)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64300022,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c64300022.spcon2)
e3:SetTarget(c64300022.sptg2)
e3:SetOperation(c64300022.spop2)
c:RegisterEffect(e3)
end
function c64300022.atkfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x9643)
end
function c64300022.atkval(e,c)
return Duel.GetMatchingGroup(c64300022.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)*300
end
function c64300022.cfilter(c,g,tp,zone)
return c:IsSetCard(0x643) and g:IsContains(c)
and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c64300022.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
local zone=e:GetHandler():GetLinkedZone(tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,c64300022.cfilter,1,nil,lg,tp,zone) end
local g=Duel.SelectReleaseGroup(tp,c64300022.cfilter,1,1,nil,lg,tp,zone)
Duel.Release(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function c64300022.spfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64300022.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cc=e:GetLabelObject()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp)
and chkc~=cc and c64300022.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c64300022.spfilter1,tp,LOCATION_GRAVE,0,1,cc,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c64300022.spfilter1,tp,LOCATION_GRAVE,0,1,1,cc,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c64300022.spop1(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and zone&0x1f~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function c64300022.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c64300022.spfilter2(c,e,tp)
return c:IsSetCard(0x643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64300022.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c64300022.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c64300022.spop2(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,c64300022.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--千恋万花·宽释诅咒的二人
function c64300023.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c64300023.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300023,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,64300023)
e1:SetTarget(c64300023.sptg1)
e1:SetOperation(c64300023.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64300023,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,47363933)
e2:SetCondition(c64300023.spcon2)
e2:SetTarget(c64300023.sptg2)
e2:SetOperation(c64300023.spop2)
c:RegisterEffect(e2)
end
function c64300023.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9643)
end
function c64300023.spfilter(c,e,tp)
return c:IsSetCard(0x643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64300023.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64300023.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c64300023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c64300023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g2=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
end
function c64300023.spop1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function c64300023.cfilter(c)
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousSetCard(0x643) and c:IsPreviousPosition(POS_FACEUP)
end
function c64300023.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c64300023.cfilter,1,nil)
end
function c64300023.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c64300023.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c64300023.spop2(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 g1=Duel.SelectMatchingCard(tp,c64300023.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 and Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g2:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(g2)
Duel.Destroy(g2,REASON_EFFECT)
end
end
end
--千恋万花·挣脱诅咒的二人
function c64300024.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x9643),2)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300024,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,64300024)
e1:SetTarget(c64300024.settg)
e1:SetOperation(c64300024.setop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64300024,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,9024199)
e2:SetCondition(c64300024.spcon)
e2:SetTarget(c64300024.sptg)
e2:SetOperation(c64300024.spop)
c:RegisterEffect(e2)
end
function c64300024.setfilter1(c,tp)
return c:IsSetCard(0x643) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
and Duel.IsExistingMatchingCard(c64300024.setfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c64300024.setfilter2(c,code)
return c:IsSetCard(0x643) and not c:IsCode(code) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c64300024.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1)
and Duel.IsExistingMatchingCard(c64300024.setfilter1,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000)
end
function c64300024.setop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c64300024.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) or not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g1=Duel.SelectMatchingCard(tp,c64300024.setfilter1,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc1=g1:GetFirst()
if not tc1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g2=Duel.SelectMatchingCard(tp,c64300024.setfilter2,tp,LOCATION_DECK,0,1,1,nil,tc1:GetCode())
local tc2=g2:GetFirst()
if Duel.MoveToField(tc1,tp,tp,LOCATION_PZONE,POS_FACEUP,false) then
if Duel.MoveToField(tc2,tp,tp,LOCATION_PZONE,POS_FACEUP,false) then
Duel.Damage(tp,1000,REASON_EFFECT)
tc2:SetStatus(STATUS_EFFECT_ENABLED,true)
end
tc1:SetStatus(STATUS_EFFECT_ENABLED,true)
end
end
function c64300024.splimit(e,c)
return not c:IsSetCard(0x643)
end
function c64300024.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousControler(tp) and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE)
and (c:IsReason(REASON_EFFECT) and rp==1-tp or c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))
end
function c64300024.spfilter(c,e,tp)
return c:IsSetCard(0x643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and (c:IsLocation(LOCATION_GRAVE) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function c64300024.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c64300024.spfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
function c64300024.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c64300024.spfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--千恋万花·缘系诅咒的二人
function c64300025.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,c64300025.lcheck)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c64300025.atkval)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c64300025.antg)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64300025,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,64300025)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c64300025.thcon)
e3:SetTarget(c64300025.thtg)
e3:SetOperation(c64300025.thop)
c:RegisterEffect(e3)
end
function c64300025.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9643)
end
function c64300025.atkval(e,c)
local g=e:GetHandler():GetLinkedGroup():Filter(Card.IsFaceup,nil)
return g:GetSum(Card.GetBaseAttack)
end
function c64300025.antg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c64300025.cfilter(c,lg)
return c:IsType(TYPE_EFFECT) and lg:IsContains(c)
end
function c64300025.thcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c64300025.cfilter,1,nil,lg)
end
function c64300025.thfilter(c)
return c:IsSetCard(0x643) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c64300025.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c64300025.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c64300025.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c64300025.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--千恋万花·穗织的四神子
function c64300026.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x9643),3)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c64300026.immval)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64300026,0))
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c64300026.negcon)
e3:SetCost(c64300026.ChainUniqueCost) -- 8/19 eratta: chain unique
e3:SetTarget(c64300026.negtg)
e3:SetOperation(c64300026.negop)
c:RegisterEffect(e3)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(64300026,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c64300026.atkcon)
e4:SetOperation(c64300026.atkop)
c:RegisterEffect(e4)
end
function c64300026.immval(e,te)
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
and te:GetOwner():GetAttack()<=e:GetHandler():GetAttack() and te:IsActivated()
end
function c64300026.negfilter(c,g)
return g:IsContains(c)
end
function c64300026.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if rp==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local lg=e:GetHandler():GetLinkedGroup()
lg:AddCard(c)
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and lg:IsExists(c64300026.negfilter,1,nil,tg) and Duel.IsChainNegatable(ev)
end
function c64300026.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c64300026.ChainUniqueCost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(64300026)==0 end
c:RegisterFlagEffect(64300026,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
end
function c64300026.negop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsFacedown() or c:GetAttack()<500 or not c:IsRelateToEffect(e)
or Duel.GetCurrentChain()~=ev+1 or c:IsStatus(STATUS_BATTLE_DESTROYED) then
return
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
c:RegisterEffect(e1)
if not c:IsImmuneToEffect(e1) and not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then
Duel.NegateActivation(ev)
end
end
function c64300026.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsAttack(c:GetBaseAttack()) and aux.dscon()
end
function c64300026.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
--千恋万花·抽鬼牌的美食聚会
function c64300027.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300027,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,64300027)
e1:SetCost(c64300027.cost)
e1:SetTarget(c64300027.target)
e1:SetOperation(c64300027.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64300027,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,17197111)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c64300027.thtg)
e2:SetOperation(c64300027.thop)
c:RegisterEffect(e2)
end
function c64300027.rfilter(c,tp)
return c:IsSetCard(0x643) and c:IsType(TYPE_MONSTER) and (c:IsControler(tp) or c:IsFaceup())
end
function c64300027.spfilter(c,e,tp)
return c:IsSetCard(0x643) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64300027.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>=g:GetCount() and Duel.CheckReleaseGroup(tp,aux.IsInGroup,#g,nil,g)
end
function c64300027.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
local rg=Duel.GetReleaseGroup(tp):Filter(c64300027.rfilter,nil,tp)
local sg=Duel.GetMatchingGroup(c64300027.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
local ft=Duel.IsPlayerAffectedByEffect(tp,59822133) and 1 or 5
local maxc=math.min(ft,rg:GetCount(),(Duel.GetMZoneCount(tp,rg)),sg:GetClassCount(Card.GetCode))
if chk==0 then return maxc>0 and rg:CheckSubGroup(c64300027.fselect,1,maxc,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=rg:SelectSubGroup(tp,c64300027.fselect,false,1,maxc,tp)
e:SetLabel(g:GetCount())
aux.UseExtraReleaseCount(g,tp)
Duel.Release(g,REASON_COST)
end
function c64300027.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabel()==100 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,e:GetLabel(),tp,LOCATION_DECK)
end
function c64300027.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local ct=e:GetLabel()
if ft<ct or ft<=0 then return end
local g=Duel.GetMatchingGroup(c64300027.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,ct,ct)
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c64300027.thfilter(c)
return c:IsSetCard(0x643) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToHand()
end
function c64300027.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c64300027.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c64300027.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c64300027.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end
function c64300027.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--千恋万花·试探抚弦的二人
function c64300028.initial_effect(c)
c:EnableCounterPermit(0x643)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x9643),2,2)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c64300028.atkval)
c:RegisterEffect(e1)
--avoid damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_NO_BATTLE_DAMAGE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetValue(1)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(64300028,0))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c64300028.ctcon)
e4:SetTarget(c64300028.cttg)
e4:SetOperation(c64300028.ctop)
c:RegisterEffect(e4)
--negate
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(64300028,1))
e5:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,64300028)
e5:SetCondition(c64300028.discon)
e5:SetCost(c64300028.discost)
e5:SetTarget(c64300028.distg)
e5:SetOperation(c64300028.disop)
c:RegisterEffect(e5)
end
function c64300028.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x643) and c:GetLevel()>=0
end
function c64300028.atkval(e,c)
local lg=c:GetLinkedGroup():Filter(c64300028.atkfilter,nil)
return lg:GetSum(Card.GetLevel)*400
end
function c64300028.ctcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x643)
end
function c64300028.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x643)
end
function c64300028.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
c:AddCounter(0x643,1)
end
end
function c64300028.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c64300028.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanRemoveCounter(tp,0x643,1,REASON_COST) end
c:RemoveCounter(tp,0x643,1,REASON_COST)
end
function c64300028.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c64300028.disop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--千恋万花·试探牵手的二人
function c64300029.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x9643),1)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64300029,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x643))
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64300029,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetTarget(c64300029.destg)
e2:SetOperation(c64300029.desop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(64300029,1))
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:SetCondition(c64300029.spcon2)
e3:SetTarget(c64300029.sptg2)
e3:SetOperation(c64300029.spop2)
c:RegisterEffect(e3)
end
function c64300029.matfilter(c)
return c:IsLinkType(TYPE_NORMAL) and not c:IsLinkType(TYPE_TOKEN)
end
function c64300029.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if chk==0 then return bc and c:GetLinkedGroup():IsContains(bc) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function c64300029.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
function c64300029.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c64300029.spfilter2(c,e,tp)
return c:IsSetCard(0x643) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64300029.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c64300029.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c64300029.spop2(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,c64300029.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--千恋万花·破咒诞生的赤子
function c64300030.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,64300024,64300012,true,true)
aux.AddContactFusionProcedure(c,c64300030.cfilter,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--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(c64300030.splimit)
c:RegisterEffect(e1)
--cannot activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetValue(c64300030.aclimit)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(13526430,0))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCondition(c64300030.rmcon)
e4:SetCost(c64300030.rmcost)
e4:SetTarget(c64300030.rmtg)
e4:SetOperation(c64300030.rmop)
c:RegisterEffect(e4)
if not c64300030.global_flag then
c64300030.global_flag=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c64300030.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c64300030.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsCode(64300024) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),13526430,0,0,0)
elseif tc:IsCode(64300012) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),13526430,0,0,0)
end
end
end
function c64300030.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c64300030.cfilter(c,fc)
local tp=fc:GetControler()
return c:IsFusionCode(64300024,64300012) and c:IsAbleToRemoveAsCost() and Duel.GetFlagEffect(tp,13526430)>0 and Duel.GetFlagEffect(tp,13526430)>0
end
function c64300030.acfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c64300030.aclimit(e,re,tp)
return Duel.IsExistingMatchingCard(c64300030.acfilter,e:GetHandlerPlayer(),LOCATION_REMOVED,LOCATION_REMOVED,1,nil,re:GetHandler():GetCode())
end
function c64300030.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c64300030.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c64300030.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c64300030.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
...@@ -42,6 +42,7 @@ function c67200064.recop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,6 +42,7 @@ function c67200064.recop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetValue(c67200064.damval) e1:SetValue(c67200064.damval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c67200064.damval(e,re,val,r,rp,rc) function c67200064.damval(e,re,val,r,rp,rc)
......
--出勤路上·拉蒂
local m=81022022
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:IsRace(RACE_PYRO)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_PYRO)
end
function cm.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_PYRO) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+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
--樱之忆·皆原阳茉莉
local m=81035001
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
Tenka.FriendToLover(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(Tenka.FriendToLoverCon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.thfilter(c)
return c:IsAttack(1550) and c:IsDefense(1050) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--樱之忆·望月理奈
local m=81035002
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
Tenka.FriendToLover(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(Tenka.FriendToLoverCon)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--樱之忆·柊柚夕
local m=81035003
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
Tenka.FriendToLover(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(Tenka.FriendToLoverCon)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--樱之忆·沢渡岬
local m=81035004
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
Tenka.FriendToLover(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(Tenka.FriendToLoverCon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.spfilter(c,e,tp)
return c:IsAttack(1550) and c:IsDefense(1050) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--幼小的天使 糖歌
local m=81050001
local cm=_G["c"..m]
Duel.LoadScript("c26800000.lua")
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.matfilter,1,1)
Amana.AttackBelow(c)
--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.linklimit)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(cm.indcon)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--to defense
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.poscon)
e3:SetOperation(cm.posop)
c:RegisterEffect(e3)
end
function cm.matfilter(c)
return c:IsLevelAbove(5) and c:IsAttackBelow(2000)
end
function cm.indcon(e)
return e:GetHandler():IsAttackBelow(2000)
end
function cm.poscon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
return a:IsPosition(POS_FACEUP_ATTACK) and a:IsRelateToBattle() and a:IsControler(tp)
end
function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
Duel.ChangePosition(a,POS_FACEUP_DEFENSE)
end
--终幕旧约
local m=81050003
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.cost(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 cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(cm.fuslimit)
Duel.RegisterEffect(e3,tp)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
Duel.RegisterEffect(e4,tp)
local e5=e1:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
Duel.RegisterEffect(e5,tp)
local e6=e1:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
Duel.RegisterEffect(e6,tp)
end
function cm.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
--
local m=81054004
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
--race change
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_MZONE)
e0:SetCountLimit(1)
e0:SetTarget(cm.ractg)
e0:SetOperation(cm.racop)
c:RegisterEffect(e0)
--race change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.atttg)
e1:SetOperation(cm.attop)
c:RegisterEffect(e1)
end
function cm.racfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TUNER)
end
function cm.ractg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.racfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.racfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.racfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local rc=Duel.AnnounceRace(tp,1,RACE_ALL-g:GetFirst():GetRace())
e:SetLabel(rc)
end
function cm.racop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(e:GetLabel())
tc:RegisterEffect(e1)
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(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.attfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TUNER)
end
function cm.atttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.attfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.attfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.attfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local da=Duel.AnnounceAttribute(tp,1,0xff-g:GetFirst():GetAttribute())
e:SetLabel(da)
end
function cm.attop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(e:GetLabel())
tc:RegisterEffect(e1)
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(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
...@@ -45,18 +45,16 @@ end ...@@ -45,18 +45,16 @@ end
function c95280006.filter(c,e,tp) function c95280006.filter(c,e,tp)
return c:IsSetCard(0x9528) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x9528) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c95280006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c95280006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_DECK) and chkc:IsControler(tp) and c95280006.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c95280006.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c95280006.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
local g=Duel.SelectTarget(tp,c95280006.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c95280006.spop(e,tp,eg,ep,ev,re,r,rp,chk) function c95280006.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if tc:IsRelateToEffect(e) then local g=Duel.SelectMatchingCard(tp,c95280006.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c95280006.discon(e,tp,eg,ep,ev,re,r,rp) function c95280006.discon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -75,8 +75,6 @@ ...@@ -75,8 +75,6 @@
!counter 0x1111 灵曲指示物 !counter 0x1111 灵曲指示物
!counter 0x1119 妖精萤火指示物 !counter 0x1119 妖精萤火指示物
#煌武院悠阳 - 36
#septluna 495073131 42 0xa20-0xa2f #septluna 495073131 42 0xa20-0xa2f
!setname 0xa20 灵魂决斗同盟 !setname 0xa20 灵魂决斗同盟
!setname 0xa22 决斗同盟 !setname 0xa22 决斗同盟
...@@ -774,9 +772,6 @@ ...@@ -774,9 +772,6 @@
#某白金的意志之拳 3188596831 354 0xae0-0xaef #某白金的意志之拳 3188596831 354 0xae0-0xaef
!setname 0x3ae1 香华 !setname 0x3ae1 香华
#aria 1052984276 356 0xb40-0xb4f
!setname 0x3b41 Flowers
#Nanahira 78877 375 0x770-0x77f(-0x777) global:senya #Nanahira 78877 375 0x770-0x77f(-0x777) global:senya
!setname 0x771 「梦现·柚木梨沙」检测用 !setname 0x771 「梦现·柚木梨沙」检测用
#Senya_name_with_elem 元灵 エレメント #Senya_name_with_elem 元灵 エレメント
...@@ -944,11 +939,6 @@ ...@@ -944,11 +939,6 @@
#baka 1274658599 622 #baka 1274658599 622
#named_with_FragileArticles 玻离之物 #named_with_FragileArticles 玻离之物
#绫波柚子 819733728 643 0x643-0x643f
!setname 0x643 柚子社
!setname 0x9643 千恋万花
!counter 0x643 柚子社指示物
#02 1164477469 648 0x250-0x25f #02 1164477469 648 0x250-0x25f
#setname="RagnaTravellers" 终末旅者 #setname="RagnaTravellers" 终末旅者
#setname="Devildiocese" 魔军教廷 #setname="Devildiocese" 魔军教廷
......
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