Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ai
ygopro-222DIY-cards
Commits
0e7c595e
Commit
0e7c595e
authored
Jun 03, 2022
by
Tachibana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得得得得得
parent
67b25d59
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
287 additions
and
134 deletions
+287
-134
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c13254038.lua
expansions/script/c13254038.lua
+5
-5
expansions/script/c13254042.lua
expansions/script/c13254042.lua
+112
-2
expansions/script/c13254045.lua
expansions/script/c13254045.lua
+5
-2
expansions/script/c13254046.lua
expansions/script/c13254046.lua
+2
-0
expansions/script/c13254048.lua
expansions/script/c13254048.lua
+4
-1
expansions/script/c13254052.lua
expansions/script/c13254052.lua
+6
-3
expansions/script/c13254054.lua
expansions/script/c13254054.lua
+5
-2
expansions/script/c13254057.lua
expansions/script/c13254057.lua
+4
-1
expansions/script/c13254058.lua
expansions/script/c13254058.lua
+7
-4
expansions/script/c13254059.lua
expansions/script/c13254059.lua
+31
-22
expansions/script/c13254061.lua
expansions/script/c13254061.lua
+1
-1
expansions/script/c13254065.lua
expansions/script/c13254065.lua
+1
-0
expansions/script/c13254066.lua
expansions/script/c13254066.lua
+1
-0
expansions/script/c33400303.lua
expansions/script/c33400303.lua
+1
-0
expansions/script/c33400304.lua
expansions/script/c33400304.lua
+1
-0
expansions/script/c33400310.lua
expansions/script/c33400310.lua
+1
-0
expansions/script/c33400311.lua
expansions/script/c33400311.lua
+35
-32
expansions/script/c33400312.lua
expansions/script/c33400312.lua
+30
-27
expansions/script/c33400320.lua
expansions/script/c33400320.lua
+35
-32
No files found.
expansions/222DIY.cdb
View file @
0e7c595e
No preview for this file type
expansions/script/c13254038.lua
View file @
0e7c595e
...
@@ -54,14 +54,14 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -54,14 +54,14 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if
sg1
:
GetCount
()
>
0
then
if
sg1
:
GetCount
()
>
0
then
if
sg1
:
GetSum
(
tama
.
tamas_getElementCount
,
TAMA_ELEMENT_WATER
)
>
0
and
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
3
)
then
if
sg1
:
GetSum
(
tama
.
tamas_getElementCount
,
TAMA_ELEMENT_WATER
)
>
0
and
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
3
)
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_MESSAGE
,
1
,
aux
.
Stringid
(
m
,
1
))
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
))
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
DiscardDeck
(
tp
,
3
,
REASON_EFFECT
)
Duel
.
DiscardDeck
(
tp
,
3
,
REASON_EFFECT
)
sg2
:
Merge
(
Duel
.
GetOperatedGroup
())
sg2
:
Merge
(
Duel
.
GetOperatedGroup
())
end
end
if
sg1
:
GetSum
(
tama
.
tamas_getElementCount
,
TAMA_ELEMENT_WIND
)
>
0
and
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
then
if
sg1
:
GetSum
(
tama
.
tamas_getElementCount
,
TAMA_ELEMENT_WIND
)
>
0
and
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_MESSAGE
,
1
,
aux
.
Stringid
(
m
,
2
))
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
))
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
DiscardHand
(
tp
,
aux
.
TRUE
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
Duel
.
DiscardHand
(
tp
,
aux
.
TRUE
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
...
@@ -86,7 +86,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -86,7 +86,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
10
))
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
10
))
then
local
ct
=
sg3
:
GetCount
()
local
ct
=
sg3
:
GetCount
()
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_MESSAGE
,
1
,
aux
.
Stringid
(
m
,
3
))
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
3
))
Duel
.
SendtoDeck
(
sg3
,
tp
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
sg3
,
tp
,
2
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
DiscardDeck
(
tp
,
ct
,
REASON_EFFECT
)
Duel
.
DiscardDeck
(
tp
,
ct
,
REASON_EFFECT
)
...
@@ -95,7 +95,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -95,7 +95,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
if
sg1
:
GetSum
(
tama
.
tamas_getElementCount
,
TAMA_ELEMENT_MANA
)
>=
3
then
if
sg1
:
GetSum
(
tama
.
tamas_getElementCount
,
TAMA_ELEMENT_MANA
)
>=
3
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_MESSAGE
,
1
,
aux
.
Stringid
(
m
,
4
))
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
4
))
--change damage
--change damage
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
@@ -114,7 +114,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -114,7 +114,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
if
sg1
:
GetSum
(
tama
.
tamas_getElementCount
,
TAMA_ELEMENT_ENERGY
)
>=
2
and
Duel
.
IsExistingTarget
(
cm
.
filter3
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
if
sg1
:
GetSum
(
tama
.
tamas_getElementCount
,
TAMA_ELEMENT_ENERGY
)
>=
2
and
Duel
.
IsExistingTarget
(
cm
.
filter3
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_MESSAGE
,
1
,
aux
.
Stringid
(
m
,
5
))
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
5
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
eg
,
ep
,
ev
,
re
,
r
,
rp
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
eg
,
ep
,
ev
,
re
,
r
,
rp
):
GetFirst
()
local
tep
=
tc
:
GetControler
()
local
tep
=
tc
:
GetControler
()
...
...
expansions/script/c13254042.lua
View file @
0e7c595e
...
@@ -3,6 +3,15 @@ local m=13254042
...
@@ -3,6 +3,15 @@ local m=13254042
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/tama"
)
end
,
function
()
require
(
"script/tama"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/tama"
)
end
,
function
()
require
(
"script/tama"
)
end
)
function
cm
.
initial_effect
(
c
)
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
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--[[
--flame
--flame
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetDescription(aux.Stringid(m,0))
...
@@ -26,17 +35,117 @@ function cm.initial_effect(c)
...
@@ -26,17 +35,117 @@ function cm.initial_effect(c)
--magma
--magma
local e3=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetDescription(aux.Stringid(m,2))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCost(cm.cost2)
e3:SetCost(cm.cost2)
e3:SetOperation(cm.operation2)
e3:SetOperation(cm.operation2)
c:RegisterEffect(e3)
c:RegisterEffect(e3)
]]
elements
=
{{
"tama_elements"
,{{
TAMA_ELEMENT_FIRE
,
1
},{
TAMA_ELEMENT_MANA
,
1
}}}}
elements
=
{{
"tama_elements"
,{{
TAMA_ELEMENT_FIRE
,
1
},{
TAMA_ELEMENT_MANA
,
1
}}}}
cm
[
c
]
=
elements
cm
[
c
]
=
elements
end
end
function
cm
.
cfilter
(
c
)
return
#
(
tama
.
tamas_getElements
(
c
))
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
e
:
GetHandler
())
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
g
:
Select
(
tp
,
1
,
g
:
GetCount
(),
nil
)
Duel
.
SendtoDeck
(
sg
,
tp
,
2
,
REASON_COST
)
local
index
=
tama
.
save
(
tama
.
tamas_sumElements
(
sg
))
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESET_CHAIN
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tama
.
removeObj
(
index
)
end
)
Duel
.
RegisterEffect
(
e1
,
tp
)
e
:
SetLabel
(
index
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
index
=
e
:
GetLabel
()
local
obj
=
{}
if
index
then
obj
=
tama
.
get
(
index
)
end
if
obj
and
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_FIRE
,
2
},{
TAMA_ELEMENT_WIND
,
2
}},
obj
)
then
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
))
e
:
SetCategory
(
bit
.
bor
(
e
:
GetCategory
(),
CATEGORY_DESTROY
))
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
if
obj
and
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_FIRE
,
5
},{
TAMA_ELEMENT_WATER
,
2
}},
obj
)
then
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
))
e
:
SetCategory
(
bit
.
bor
(
e
:
GetCategory
(),
CATEGORY_REMOVE
))
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
filter1
,
tp
,
0
,
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_EXTRA
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
if
obj
and
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_FIRE
,
3
},{
TAMA_ELEMENT_EARTH
,
2
}},
obj
)
then
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
3
))
e
:
SetCategory
(
bit
.
bor
(
e
:
GetCategory
(),
CATEGORY_ATKCHANGE
))
end
if
obj
and
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_ORDER
,
2
}},
obj
)
then
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
4
))
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_INACTIVATE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
end
if
obj
and
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_CHAOS
,
2
}},
obj
)
then
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
5
))
Duel
.
SetChainLimit
(
cm
.
chainlm
)
e
:
SetCategory
(
bit
.
bor
(
e
:
GetCategory
(),
CATEGORY_DAMAGE
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
0
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
index
=
e
:
GetLabel
()
local
obj
=
{}
local
broken
=
false
if
index
then
obj
=
tama
.
get
(
index
)
end
if
obj
and
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_FIRE
,
2
},{
TAMA_ELEMENT_WIND
,
2
}},
obj
)
then
if
broken
then
Duel
.
BreakEffect
()
end
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
ct
=
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
if
ct
>
0
and
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_CHAOS
,
2
}},
obj
)
then
Duel
.
Damage
(
1
-
tp
,
ct
*
300
,
REASON_EFFECT
)
end
broken
=
true
end
if
obj
and
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_FIRE
,
3
},{
TAMA_ELEMENT_WATER
,
2
}},
obj
)
then
if
broken
then
Duel
.
BreakEffect
()
end
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
filter1
,
tp
,
0
,
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_EXTRA
,
nil
)
local
ct
=
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
if
ct
>
0
and
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_CHAOS
,
2
}},
obj
)
then
Duel
.
Damage
(
1
-
tp
,
ct
*
300
,
REASON_EFFECT
)
end
broken
=
true
end
if
obj
and
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_FIRE
,
3
},{
TAMA_ELEMENT_EARTH
,
2
}},
obj
)
then
if
broken
then
Duel
.
BreakEffect
()
end
local
ct
=
2000
if
tama
.
tamas_isAllElementsNotAbove
({{
TAMA_ELEMENT_ORDER
,
2
}},
obj
)
then
ct
=
3000
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
sc
=
g
:
GetFirst
()
while
sc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
ct
)
sc
:
RegisterEffect
(
e1
)
sc
=
g
:
GetNext
()
end
broken
=
true
end
end
function
cm
.
chainlm
(
e
,
rp
,
tp
)
return
tp
==
rp
end
function
cm
.
filter1
(
c
)
return
c
:
IsAbleToDeck
()
and
(
not
c
:
IsLocation
(
LOCATION_EXTRA
)
or
c
:
IsFaceup
())
end
--[[
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local el={{TAMA_ELEMENT_FIRE,2},{TAMA_ELEMENT_WIND,2}}
local el={{TAMA_ELEMENT_FIRE,2},{TAMA_ELEMENT_WIND,2}}
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
local mg=tama.tamas_checkGroupElements(Duel.GetFieldGroup(tp,LOCATION_GRAVE,0),el)
...
@@ -99,3 +208,4 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -99,3 +208,4 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterEffect(e1,tp)
end
end
]]
expansions/script/c13254045.lua
View file @
0e7c595e
...
@@ -13,13 +13,16 @@ function cm.initial_effect(c)
...
@@ -13,13 +13,16 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
remtg
)
e1
:
SetTarget
(
cm
.
remtg
)
e1
:
SetOperation
(
cm
.
remop
)
e1
:
SetOperation
(
cm
.
remop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
elements
=
{{
"tama_elements"
,{{
TAMA_ELEMENT_WIND
,
1
},{
TAMA_ELEMENT_EARTH
,
1
},{
TAMA_ELEMENT_WATER
,
1
},{
TAMA_ELEMENT_FIRE
,
1
},{
TAMA_ELEMENT_ORDER
,
1
},{
TAMA_ELEMENT_CHAOS
,
1
}}}}
elements
=
{{
"tama_elements"
,{{
TAMA_ELEMENT_WIND
,
1
},{
TAMA_ELEMENT_EARTH
,
1
},{
TAMA_ELEMENT_WATER
,
1
},{
TAMA_ELEMENT_FIRE
,
1
},{
TAMA_ELEMENT_ORDER
,
1
},{
TAMA_ELEMENT_CHAOS
,
1
}
,{
TAMA_ELEMENT_MANA
,
1
}
}}}
cm
[
c
]
=
elements
cm
[
c
]
=
elements
end
end
function
cm
.
cfilter
(
c
)
return
#
(
tama
.
tamas_getElements
(
c
))
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
el
=
{{
TAMA_ELEMENT_WIND
,
2
},{
TAMA_ELEMENT_EARTH
,
2
},{
TAMA_ELEMENT_WATER
,
2
},{
TAMA_ELEMENT_FIRE
,
2
},{
TAMA_ELEMENT_ORDER
,
2
},{
TAMA_ELEMENT_CHAOS
,
2
}}
local
el
=
{{
TAMA_ELEMENT_WIND
,
2
},{
TAMA_ELEMENT_EARTH
,
2
},{
TAMA_ELEMENT_WATER
,
2
},{
TAMA_ELEMENT_FIRE
,
2
},{
TAMA_ELEMENT_ORDER
,
2
},{
TAMA_ELEMENT_CHAOS
,
2
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
),
el
)
if
chk
==
0
then
if
chk
==
0
then
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
end
end
...
...
expansions/script/c13254046.lua
View file @
0e7c595e
...
@@ -43,6 +43,8 @@ function cm.initial_effect(c)
...
@@ -43,6 +43,8 @@ function cm.initial_effect(c)
e4
:
SetTarget
(
cm
.
tdtg
)
e4
:
SetTarget
(
cm
.
tdtg
)
e4
:
SetOperation
(
cm
.
tdop
)
e4
:
SetOperation
(
cm
.
tdop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
elements
=
{{
"tama_elements"
,{{
TAMA_ELEMENT_MANA
,
1
}}}}
cm
[
c
]
=
elements
end
end
function
cm
.
cfilter
(
c
)
function
cm
.
cfilter
(
c
)
...
...
expansions/script/c13254048.lua
View file @
0e7c595e
...
@@ -72,9 +72,12 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -72,9 +72,12 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
end
end
function
cm
.
cfilter1
(
c
)
return
#
(
tama
.
tamas_getElements
(
c
))
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
thcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
thcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
el
=
{{
TAMA_ELEMENT_MANA
,
5
}}
local
el
=
{{
TAMA_ELEMENT_MANA
,
5
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
),
el
)
if
chk
==
0
then
if
chk
==
0
then
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
end
end
...
...
expansions/script/c13254052.lua
View file @
0e7c595e
...
@@ -38,16 +38,19 @@ function cm.initial_effect(c)
...
@@ -38,16 +38,19 @@ function cm.initial_effect(c)
cm
[
c
]
=
elements
cm
[
c
]
=
elements
end
end
function
cm
.
cfilter
(
c
)
return
#
(
tama
.
tamas_getElements
(
c
))
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
spcon
(
e
,
c
)
function
cm
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
el
=
{{
TAMA_ELEMENT_FIRE
,
1
},{
TAMA_ELEMENT_ORDER
,
1
}}
local
el
=
{{
TAMA_ELEMENT_FIRE
,
1
},{
TAMA_ELEMENT_ORDER
,
1
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
),
el
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
el
=
{{
TAMA_ELEMENT_FIRE
,
1
},{
TAMA_ELEMENT_ORDER
,
1
}}
local
el
=
{{
TAMA_ELEMENT_FIRE
,
1
},{
TAMA_ELEMENT_ORDER
,
1
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
),
el
)
local
sg
=
tama
.
tamas_selectElementsMaterial
(
mg
,
el
,
tp
)
local
sg
=
tama
.
tamas_selectElementsMaterial
(
mg
,
el
,
tp
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_COST
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_COST
)
end
end
...
@@ -80,7 +83,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -80,7 +83,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function
cm
.
thcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
thcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
el
=
{{
TAMA_ELEMENT_ENERGY
,
4
}}
local
el
=
{{
TAMA_ELEMENT_ENERGY
,
4
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
),
el
)
if
chk
==
0
then
if
chk
==
0
then
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
end
end
...
...
expansions/script/c13254054.lua
View file @
0e7c595e
...
@@ -49,16 +49,19 @@ function cm.initial_effect(c)
...
@@ -49,16 +49,19 @@ function cm.initial_effect(c)
cm
[
c
]
=
elements
cm
[
c
]
=
elements
end
end
function
cm
.
cfilter
(
c
)
return
#
(
tama
.
tamas_getElements
(
c
))
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
spcon
(
e
,
c
)
function
cm
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
el
=
{{
TAMA_ELEMENT_WATER
,
1
},{
TAMA_ELEMENT_EARTH
,
1
}}
local
el
=
{{
TAMA_ELEMENT_WATER
,
1
},{
TAMA_ELEMENT_EARTH
,
1
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
),
el
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
el
=
{{
TAMA_ELEMENT_WATER
,
1
},{
TAMA_ELEMENT_EARTH
,
1
}}
local
el
=
{{
TAMA_ELEMENT_WATER
,
1
},{
TAMA_ELEMENT_EARTH
,
1
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
),
el
)
local
sg
=
tama
.
tamas_selectElementsMaterial
(
mg
,
el
,
tp
)
local
sg
=
tama
.
tamas_selectElementsMaterial
(
mg
,
el
,
tp
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_COST
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_COST
)
end
end
...
...
expansions/script/c13254057.lua
View file @
0e7c595e
...
@@ -17,9 +17,12 @@ function cm.initial_effect(c)
...
@@ -17,9 +17,12 @@ function cm.initial_effect(c)
elements
=
{{
"tama_elements"
,{{
TAMA_ELEMENT_MANA
,
2
},{
TAMA_ELEMENT_LIFE
,
1
}}}}
elements
=
{{
"tama_elements"
,{{
TAMA_ELEMENT_MANA
,
2
},{
TAMA_ELEMENT_LIFE
,
1
}}}}
cm
[
c
]
=
elements
cm
[
c
]
=
elements
end
end
function
cm
.
cfilter
(
c
)
return
#
(
tama
.
tamas_getElements
(
c
))
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
el
=
{{
TAMA_ELEMENT_MANA
,
2
}}
local
el
=
{{
TAMA_ELEMENT_MANA
,
2
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
c
),
el
)
mg
:
RemoveCard
(
e
:
GetHandler
())
mg
:
RemoveCard
(
e
:
GetHandler
())
if
chk
==
0
then
if
chk
==
0
then
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
...
...
expansions/script/c13254058.lua
View file @
0e7c595e
...
@@ -51,9 +51,12 @@ end
...
@@ -51,9 +51,12 @@ end
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
return
se
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
return
se
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
end
end
function
cm
.
cfilter
(
c
)
return
#
(
tama
.
tamas_getElements
(
c
))
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
el
=
{{
TAMA_ELEMENT_CHAOS
,
3
}}
local
el
=
{{
TAMA_ELEMENT_CHAOS
,
3
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
),
el
)
if
chk
==
0
then
if
chk
==
0
then
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
end
end
...
@@ -77,7 +80,7 @@ end
...
@@ -77,7 +80,7 @@ end
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
el
=
{{
TAMA_ELEMENT_CHAOS
,
1
},{
TAMA_ELEMENT_MANA
,
1
}}
local
el
=
{{
TAMA_ELEMENT_CHAOS
,
1
},{
TAMA_ELEMENT_MANA
,
1
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
),
el
)
local
ct
=
tama
.
tamas_getElementCount
(
tama
.
tamas_sumElements
(
mg
),
TAMA_ELEMENT_CHAOS
)
-
1
local
ct
=
tama
.
tamas_getElementCount
(
tama
.
tamas_sumElements
(
mg
),
TAMA_ELEMENT_CHAOS
)
-
1
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
cm
.
tgfilter
(
chkc
,
c
,
ct
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
cm
.
tgfilter
(
chkc
,
c
,
ct
)
end
if
chk
==
0
then
return
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
and
Duel
.
IsExistingTarget
(
cm
.
tgfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
c
,
ct
)
end
if
chk
==
0
then
return
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
and
Duel
.
IsExistingTarget
(
cm
.
tgfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
c
,
ct
)
end
...
@@ -87,7 +90,7 @@ function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -87,7 +90,7 @@ function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local
ct
=
math.ceil
((
atk
-
c
:
GetAttack
())
/
300
)
local
ct
=
math.ceil
((
atk
-
c
:
GetAttack
())
/
300
)
local
el1
=
{{
TAMA_ELEMENT_CHAOS
,
1
},{
TAMA_ELEMENT_MANA
,
1
+
ct
}}
local
el1
=
{{
TAMA_ELEMENT_CHAOS
,
1
},{
TAMA_ELEMENT_MANA
,
1
+
ct
}}
local
sg
=
tama
.
tamas_selectElementsMaterial
(
mg
,
el
,
tp
)
local
sg
=
tama
.
tamas_selectElementsMaterial
(
mg
,
el
1
,
tp
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_COST
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
atk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
atk
)
...
@@ -103,7 +106,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -103,7 +106,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
cm
.
spcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
spcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
el
=
{{
TAMA_ELEMENT_MANA
,
2
},{
TAMA_ELEMENT_LIFE
,
1
}}
local
el
=
{{
TAMA_ELEMENT_MANA
,
2
},{
TAMA_ELEMENT_LIFE
,
1
}}
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
c
),
el
)
mg
:
RemoveCard
(
e
:
GetHandler
())
mg
:
RemoveCard
(
e
:
GetHandler
())
if
chk
==
0
then
if
chk
==
0
then
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
return
mg
:
GetCount
()
>
0
and
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
...
...
expansions/script/c13254059.lua
View file @
0e7c595e
...
@@ -39,36 +39,42 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -39,36 +39,42 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
,
true
)
tc
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetValue
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
cm
.
efilter
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
,
true
)
tc
:
RegisterEffect
(
e2
,
true
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_
FIELD
)
e3
:
SetType
(
EFFECT_TYPE_
SINGLE
)
e3
:
Set
Property
(
EFFECT_FLAG_PLAYER_TARGE
T
)
e3
:
Set
Code
(
EFFECT_IMMUNE_EFFEC
T
)
e3
:
Set
Code
(
EFFECT_CANNOT_ACTIVAT
E
)
e3
:
Set
Property
(
EFFECT_FLAG_SINGLE_RANG
E
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
1
,
1
)
e3
:
SetValue
(
cm
.
efilter
)
e3
:
SetValue
(
cm
.
aclimit
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e3
,
true
)
tc
:
RegisterEffect
(
e3
,
true
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
Set
CountLimit
(
1
)
e4
:
Set
TargetRange
(
1
,
1
)
e4
:
Set
Condition
(
cm
.
phcon
)
e4
:
Set
Value
(
cm
.
aclimit
)
e4
:
Set
Operation
(
cm
.
phop
)
e4
:
Set
Reset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e4
,
true
)
tc
:
RegisterEffect
(
e4
,
true
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCondition
(
cm
.
phcon
)
e5
:
SetOperation
(
cm
.
phop
)
tc
:
RegisterEffect
(
e5
,
true
)
if
not
tc
:
IsType
(
TYPE_EFFECT
)
then
if
not
tc
:
IsType
(
TYPE_EFFECT
)
then
local
e
2
=
Effect
.
CreateEffect
(
c
)
local
e
6
=
Effect
.
CreateEffect
(
c
)
e
2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e
6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e
2
:
SetCode
(
EFFECT_ADD_TYPE
)
e
6
:
SetCode
(
EFFECT_ADD_TYPE
)
e
2
:
SetValue
(
TYPE_EFFECT
)
e
6
:
SetValue
(
TYPE_EFFECT
)
e
2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e
6
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e
2
,
true
)
tc
:
RegisterEffect
(
e
6
,
true
)
end
end
end
end
end
end
...
@@ -81,13 +87,16 @@ end
...
@@ -81,13 +87,16 @@ end
function
cm
.
phcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
phcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
return
Duel
.
GetTurnPlayer
()
==
tp
end
end
function
cm
.
cfilter
(
c
)
return
#
(
tama
.
tamas_getElements
(
c
))
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
phop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
phop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
el
=
tama
.
tamas_increaseElements
(
tama
.
tamas_getElements
(
c
),{{
TAMA_ELEMENT_MANA
,
1
}})
local
el
=
tama
.
tamas_increaseElements
(
tama
.
tamas_getElements
(
c
),{{
TAMA_ELEMENT_MANA
,
1
}})
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
FieldGroup
(
tp
,
LOCATION_GRAVE
,
0
),
el
)
local
mg
=
tama
.
tamas_checkGroupElements
(
Duel
.
Get
MatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
),
el
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
if
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
then
if
tama
.
tamas_isCanSelectElementsForAbove
(
mg
,
el
)
then
local
sg
,
elements
=
tama
.
tamas_selectElementsMaterial
(
mg
,
el
,
tp
)
local
sg
=
tama
.
tamas_selectElementsMaterial
(
mg
,
el
,
tp
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
else
else
Duel
.
Remove
(
c
,
POS_FACEDOWN
,
REASON_RULE
)
Duel
.
Remove
(
c
,
POS_FACEDOWN
,
REASON_RULE
)
...
...
expansions/script/c13254061.lua
View file @
0e7c595e
--飞球造物·
隐飞
球
--飞球造物·
拳石
球
local
m
=
13254061
local
m
=
13254061
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/tama"
)
end
,
function
()
require
(
"script/tama"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/tama"
)
end
,
function
()
require
(
"script/tama"
)
end
)
...
...
expansions/script/c13254065.lua
View file @
0e7c595e
...
@@ -7,6 +7,7 @@ function cm.initial_effect(c)
...
@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCategory
(
CATEGORY_HANDES
+
CATEGORY_DRAW
+
CATEGORY_DESTROY
+
CATEGORY_RECOVER
)
e1
:
SetCategory
(
CATEGORY_HANDES
+
CATEGORY_DRAW
+
CATEGORY_DESTROY
+
CATEGORY_RECOVER
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
cm
.
distg
)
e1
:
SetTarget
(
cm
.
distg
)
e1
:
SetOperation
(
cm
.
disop
)
e1
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
...
expansions/script/c13254066.lua
View file @
0e7c595e
--飞球的延续
--飞球的延续
local
m
=
13254066
local
m
=
13254066
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/tama"
)
end
,
function
()
require
(
"script/tama"
)
end
)
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
...
...
expansions/script/c33400303.lua
View file @
0e7c595e
...
@@ -5,6 +5,7 @@ function c33400303.initial_effect(c)
...
@@ -5,6 +5,7 @@ function c33400303.initial_effect(c)
aux
.
AddLinkProcedure
(
c
,
c33400303
.
matfilter
,
1
,
1
)
aux
.
AddLinkProcedure
(
c
,
c33400303
.
matfilter
,
1
,
1
)
--copy effect
--copy effect
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
33400303
,
5
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
...
...
expansions/script/c33400304.lua
View file @
0e7c595e
...
@@ -18,6 +18,7 @@ function c33400304.initial_effect(c)
...
@@ -18,6 +18,7 @@ function c33400304.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
33400304
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
...
...
expansions/script/c33400310.lua
View file @
0e7c595e
...
@@ -5,6 +5,7 @@ function cm.initial_effect(c)
...
@@ -5,6 +5,7 @@ function cm.initial_effect(c)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--destory
--destory
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
...
...
expansions/script/c33400311.lua
View file @
0e7c595e
--夜刀神天香 蔑视
--夜刀神天香 蔑视
function
c33400311
.
initial_effect
(
c
)
local
m
=
33400311
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--
--
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCountLimit
(
1
,
33400311
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
aux
.
bdcon
)
e1
:
SetCondition
(
aux
.
bdcon
)
e1
:
SetOperation
(
c
33400311
.
desop
)
e1
:
SetOperation
(
c
m
.
desop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
-- IMMUNE
-- IMMUNE
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
33400311
+
10000
)
e2
:
SetCountLimit
(
1
,
m
+
10000
)
e2
:
SetTarget
(
c
33400311
.
imtg
)
e2
:
SetTarget
(
c
m
.
imtg
)
e2
:
SetOperation
(
c
33400311
.
imop
)
e2
:
SetOperation
(
c
m
.
imop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c
33400311
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--cannot set
--cannot set
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
@@ -38,7 +41,7 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -38,7 +41,7 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e3
,
1
-
tp
)
Duel
.
RegisterEffect
(
e3
,
1
-
tp
)
local
e4
=
e1
:
Clone
()
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e4
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e4
:
SetTarget
(
c
33400311
.
sumlimit
)
e4
:
SetTarget
(
c
m
.
sumlimit
)
Duel
.
RegisterEffect
(
e4
,
1
-
tp
)
Duel
.
RegisterEffect
(
e4
,
1
-
tp
)
--cannot trigger
--cannot trigger
local
e5
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e5
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
@@ -46,26 +49,26 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -46,26 +49,26 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
e5
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e5
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e5
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e5
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e5
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e5
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e5
:
SetTarget
(
c
33400311
.
distg
)
e5
:
SetTarget
(
c
m
.
distg
)
e5
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e5
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e5
,
1
-
tp
)
Duel
.
RegisterEffect
(
e5
,
1
-
tp
)
if
Duel
.
IsExistingMatchingCard
(
c
33400311
.
refilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
then
if
Duel
.
IsExistingMatchingCard
(
c
m
.
refilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400311
,
0
))
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
local
tc1
=
Duel
.
SelectMatchingCard
(
tp
,
c
33400311
.
refilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
tc1
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
refilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Remove
(
tc1
,
POS_FACEDOWN
,
REASON_EFFECT
)
Duel
.
Remove
(
tc1
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
end
end
local
k1
=
Duel
.
GetMatchingGroup
(
c
33400311
.
thfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
k1
=
Duel
.
GetMatchingGroup
(
c
m
.
thfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
k2
=
Duel
.
GetMatchingGroup
(
c
33400311
.
thfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
k2
=
Duel
.
GetMatchingGroup
(
c
m
.
thfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
(
k1
or
k2
)
then
if
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
(
k1
or
k2
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400311
,
1
))
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
33400311
,
4
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
4
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
33400311
.
thfilter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
thfilter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
then
local
b1
=
tc
:
IsSSetable
()
local
b1
=
tc
:
IsSSetable
()
local
b2
=
tc
:
IsForbidden
()
local
b2
=
tc
:
IsForbidden
()
if
b1
and
(
b2
or
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
33400311
,
2
),
aux
.
Stringid
(
33400311
,
3
))
==
0
)
then
if
b1
and
(
b2
or
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
==
0
)
then
Duel
.
SSet
(
tp
,
tc
)
Duel
.
SSet
(
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
else
else
...
@@ -75,35 +78,35 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -75,35 +78,35 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
end
function
c
33400311
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
function
c
m
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
return
bit
.
band
(
sumpos
,
POS_FACEDOWN
)
~=
0
return
bit
.
band
(
sumpos
,
POS_FACEDOWN
)
~=
0
end
end
function
c
33400311
.
distg
(
e
,
c
)
function
c
m
.
distg
(
e
,
c
)
return
c
:
IsFacedown
()
return
c
:
IsFacedown
()
end
end
function
c
33400311
.
refilter1
(
c
)
function
c
m
.
refilter1
(
c
)
return
c
:
IsAbleToRemove
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsAbleToRemove
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
function
c
33400311
.
thfilter1
(
c
)
function
c
m
.
thfilter1
(
c
)
return
c
:
IsSetCard
(
0x5341
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
()
return
c
:
IsSetCard
(
0x5341
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
()
end
end
function
c
33400311
.
thfilter2
(
c
)
function
c
m
.
thfilter2
(
c
)
return
c
:
IsSetCard
(
0x5341
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
not
c
:
IsForbidden
()
return
c
:
IsSetCard
(
0x5341
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
not
c
:
IsForbidden
()
end
end
function
c
33400311
.
thfilter3
(
c
)
function
c
m
.
thfilter3
(
c
)
return
c
:
IsSetCard
(
0x5341
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
(
c
:
IsSSetable
()
or
not
c
:
IsForbidden
())
return
c
:
IsSetCard
(
0x5341
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
(
c
:
IsSSetable
()
or
not
c
:
IsForbidden
())
end
end
function
c
33400311
.
imfilter
(
c
)
function
c
m
.
imfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x341
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x341
)
end
end
function
c
33400311
.
imtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c
m
.
imtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
33400311
.
imfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
m
.
imfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
33400311
.
imfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
imfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c
33400311
.
imfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c
m
.
imfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
end
function
c
33400311
.
imop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
imop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
expansions/script/c33400312.lua
View file @
0e7c595e
--夜刀神天香 毁灭
--夜刀神天香 毁灭
function
c33400312
.
initial_effect
(
c
)
local
m
=
33400312
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--activate limit
--activate limit
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCountLimit
(
1
,
33400312
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
aux
.
bdcon
)
e1
:
SetCondition
(
aux
.
bdcon
)
e1
:
SetOperation
(
c
33400312
.
alsop
)
e1
:
SetOperation
(
c
m
.
alsop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
-- Double damage
-- Double damage
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
33400312
+
10000
)
e2
:
SetCountLimit
(
1
,
m
+
10000
)
e2
:
SetTarget
(
c
33400312
.
dbtg
)
e2
:
SetTarget
(
c
m
.
dbtg
)
e2
:
SetOperation
(
c
33400312
.
dbop
)
e2
:
SetOperation
(
c
m
.
dbop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c
33400312
.
tdfilter1
(
c
)
function
c
m
.
tdfilter1
(
c
)
return
c
:
IsAbleToDeck
()
return
c
:
IsAbleToDeck
()
end
end
function
c
33400312
.
aclimit
(
e
,
re
,
tp
)
function
c
m
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetActivateLocation
()
==
LOCATION_GRAVE
+
LOCATION_REMOVED
return
re
:
GetActivateLocation
()
==
LOCATION_GRAVE
+
LOCATION_REMOVED
end
end
function
c
33400312
.
alsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
alsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c
33400312
.
aclimit
)
e1
:
SetValue
(
c
m
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
if
Duel
.
IsExistingMatchingCard
(
c
33400312
.
tdfilter1
,
tp
,
0
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
1
,
nil
)
then
if
Duel
.
IsExistingMatchingCard
(
c
m
.
tdfilter1
,
tp
,
0
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
1
,
nil
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400312
,
0
))
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c
33400312
.
tdfilter1
,
tp
,
0
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
1
,
2
,
nil
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
tdfilter1
,
tp
,
0
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
1
,
2
,
nil
)
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
if
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
IsExistingMatchingCard
(
c
33400312
.
dbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
if
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
IsExistingMatchingCard
(
c
m
.
dbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
33400312
.
dbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
2
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
dbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
2
,
nil
)
while
tc
do
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -57,7 +60,7 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -57,7 +60,7 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
c
33400312
.
efilter
)
e3
:
SetValue
(
c
m
.
efilter
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e3
:
SetOwnerPlayer
(
tp
)
e3
:
SetOwnerPlayer
(
tp
)
tc
:
RegisterEffect
(
e3
)
tc
:
RegisterEffect
(
e3
)
...
@@ -65,33 +68,33 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -65,33 +68,33 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
end
function
c
33400312
.
efilter
(
e
,
re
)
function
c
m
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
end
function
c
33400312
.
dbfilter
(
c
)
function
c
m
.
dbfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x341
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x341
)
end
end
function
c
33400312
.
dbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c
m
.
dbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
33400312
.
dbfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
m
.
dbfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
33400312
.
dbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
dbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c
33400312
.
dbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c
m
.
dbfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
end
function
c
33400312
.
dbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
dbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCondition
(
c
33400312
.
damcon
)
e1
:
SetCondition
(
c
m
.
damcon
)
e1
:
SetOperation
(
c
33400312
.
damop
)
e1
:
SetOperation
(
c
m
.
damop
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
function
c
33400312
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
e
:
GetHandler
():
GetBattleTarget
()
~=
nil
return
ep
~=
tp
and
e
:
GetHandler
():
GetBattleTarget
()
~=
nil
end
end
function
c
33400312
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
1
,
ev
*
2
)
Duel
.
ChangeBattleDamage
(
1
,
ev
*
2
)
end
end
\ No newline at end of file
expansions/script/c33400320.lua
View file @
0e7c595e
--D.A.L-夜刀神十香-ALTER
--D.A.L-夜刀神十香-ALTER
function
c33400320
.
initial_effect
(
c
)
local
m
=
33400320
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--spsummon condition
--spsummon condition
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
...
@@ -16,45 +18,46 @@ function c33400320.initial_effect(c)
...
@@ -16,45 +18,46 @@ function c33400320.initial_effect(c)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e1
:
SetCountLimit
(
1
,
33400320
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
c
33400320
.
atkcon
)
e1
:
SetCondition
(
c
m
.
atkcon
)
e1
:
SetCost
(
c
33400320
.
atkcost1
)
e1
:
SetCost
(
c
m
.
atkcost1
)
e1
:
SetTarget
(
c
33400320
.
atktg
)
e1
:
SetTarget
(
c
m
.
atktg
)
e1
:
SetOperation
(
c
33400320
.
atkop1
)
e1
:
SetOperation
(
c
m
.
atkop1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Equip Okatana
--Equip Okatana
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetOperation
(
c
33400320
.
Eqop1
)
e4
:
SetOperation
(
c
m
.
Eqop1
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--
--
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_REMOVE
)
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_REMOVE
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e5
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e5
:
SetCondition
(
aux
.
bdcon
)
e5
:
SetCondition
(
aux
.
bdcon
)
e5
:
SetOperation
(
c
33400320
.
desop
)
e5
:
SetOperation
(
c
m
.
desop
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c
33400320
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
end
function
c
33400320
.
atkcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
atkcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
end
function
c
33400320
.
atkfilter
(
c
)
function
c
m
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x341
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x341
)
end
end
function
c
33400320
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c
m
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c
33400320
.
atkfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c
m
.
atkfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
33400320
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c
33400320
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c
m
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
end
function
c
33400320
.
atkop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
atkop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
@@ -70,22 +73,22 @@ function c33400320.atkop1(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -70,22 +73,22 @@ function c33400320.atkop1(e,tp,eg,ep,ev,re,r,rp,chk)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
c
33400320
.
efilter4
)
e2
:
SetValue
(
c
m
.
efilter4
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e2
)
end
end
end
end
end
end
function
c
33400320
.
efilter4
(
e
,
te
)
function
c
m
.
efilter4
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
te
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
function
c
33400320
.
Eqop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
Eqop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
c
33400320
.
TojiEquip
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c
m
.
TojiEquip
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
function
c
33400320
.
TojiEquip
(
ec
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
TojiEquip
(
ec
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
token
=
Duel
.
CreateToken
(
tp
,
33400321
)
local
token
=
Duel
.
CreateToken
(
tp
,
33400321
)
Duel
.
MoveToField
(
token
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
Duel
.
MoveToField
(
token
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
token
:
CancelToGrave
()
token
:
CancelToGrave
()
...
@@ -108,7 +111,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
...
@@ -108,7 +111,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
local
e4
=
Effect
.
CreateEffect
(
ec
)
local
e4
=
Effect
.
CreateEffect
(
ec
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e4
:
SetValue
(
c
33400320
.
efilter1
)
e4
:
SetValue
(
c
m
.
efilter1
)
token
:
RegisterEffect
(
e4
)
token
:
RegisterEffect
(
e4
)
--indes
--indes
local
e5
=
Effect
.
CreateEffect
(
ec
)
local
e5
=
Effect
.
CreateEffect
(
ec
)
...
@@ -116,7 +119,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
...
@@ -116,7 +119,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
e5
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e5
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e5
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e5
:
SetValue
(
c
33400320
.
valcon
)
e5
:
SetValue
(
c
m
.
valcon
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCountLimit
(
1
)
token
:
RegisterEffect
(
e5
)
token
:
RegisterEffect
(
e5
)
--atkup
--atkup
...
@@ -127,20 +130,20 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
...
@@ -127,20 +130,20 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCountLimit
(
1
)
e3
:
SetOperation
(
c
33400320
.
atkop
)
e3
:
SetOperation
(
c
m
.
atkop
)
token
:
RegisterEffect
(
e3
)
token
:
RegisterEffect
(
e3
)
return
true
return
true
else
Duel
.
SendtoGrave
(
token
,
REASON_RULE
)
return
false
else
Duel
.
SendtoGrave
(
token
,
REASON_RULE
)
return
false
end
end
end
end
function
c
33400320
.
efilter1
(
e
,
re
)
function
c
m
.
efilter1
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
end
function
c
33400320
.
valcon
(
e
,
re
,
r
,
rp
)
function
c
m
.
valcon
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
return
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
end
end
function
c
33400320
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
ec
=
c
:
GetEquipTarget
()
local
ec
=
c
:
GetEquipTarget
()
if
ec
and
c
:
IsRelateToEffect
(
e
)
then
if
ec
and
c
:
IsRelateToEffect
(
e
)
then
...
@@ -152,10 +155,10 @@ function c33400320.atkop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -152,10 +155,10 @@ function c33400320.atkop(e,tp,eg,ep,ev,re,r,rp)
ec
:
RegisterEffect
(
e1
)
ec
:
RegisterEffect
(
e1
)
end
end
end
end
function
c
33400320
.
refilter
(
c
)
function
c
m
.
refilter
(
c
)
return
c
:
IsAbleToRemove
()
return
c
:
IsAbleToRemove
()
end
end
function
c
33400320
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g1
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
g1
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -167,14 +170,14 @@ local c=e:GetHandler()
...
@@ -167,14 +170,14 @@ local c=e:GetHandler()
if
c
:
IsChainAttackable
()
then
if
c
:
IsChainAttackable
()
then
Duel
.
ChainAttack
()
Duel
.
ChainAttack
()
end
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400320
,
1
))
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
tc
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
if
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c
33400320
.
refilter
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400320
,
2
))
then
if
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c
m
.
refilter
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
local
g3
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
0
,
nil
)
local
g3
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
0
,
nil
)
local
g4
=
Duel
.
GetMatchingGroup
(
c
33400320
.
refilter
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
nil
)
local
g4
=
Duel
.
GetMatchingGroup
(
c
m
.
refilter
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
nil
)
local
t3
=
g3
:
GetCount
()
local
t3
=
g3
:
GetCount
()
local
t4
=
g4
:
GetCount
()
local
t4
=
g4
:
GetCount
()
local
t5
local
t5
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment