Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
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
Nemo Ma
no81cards
Commits
625f2ec1
Commit
625f2ec1
authored
Dec 28, 2022
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
6fda3e94
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
217 additions
and
48 deletions
+217
-48
expansions/script/c10100000.lua
expansions/script/c10100000.lua
+29
-10
expansions/script/c10199990.lua
expansions/script/c10199990.lua
+2
-2
expansions/script/c11451011.lua
expansions/script/c11451011.lua
+2
-2
expansions/script/c11451012.lua
expansions/script/c11451012.lua
+1
-1
expansions/script/c11451013.lua
expansions/script/c11451013.lua
+1
-1
expansions/script/c11451014.lua
expansions/script/c11451014.lua
+1
-1
expansions/script/c11451807.lua
expansions/script/c11451807.lua
+19
-11
expansions/script/c53796077.lua
expansions/script/c53796077.lua
+69
-20
expansions/script/c90700046.lua
expansions/script/c90700046.lua
+93
-0
No files found.
expansions/script/c10100000.lua
View file @
625f2ec1
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
--the old library (c10199990.lua and c10199991.lua) has gone out of service, becuase it has become a SHIT MOUNTAIN, hard for reading.
--the old library (c10199990.lua and c10199991.lua) has gone out of service, becuase it has become a SHIT MOUNTAIN, hard for reading.
--any problems, you can call me: QQ/VX 852415212, PLZ note sth. about YGO while you add me, otherwise I will reject your friend request.
--any problems, you can call me: QQ/VX 852415212, PLZ note sth. about YGO while you add me, otherwise I will reject your friend request.
local
Version_Number
=
"2022.1
1.02
"
local
Version_Number
=
"2022.1
2.28
"
--<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Constant <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Constant <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
...
@@ -13,7 +13,10 @@ if Scl_Library_Switch then
...
@@ -13,7 +13,10 @@ if Scl_Library_Switch then
return
return
end
end
Scl_Library_Switch
=
true
Scl_Library_Switch
=
true
--Print version number
Debug
.
Message
(
"You are using Scl's library, Version: "
..
Version_Number
..
"."
)
Debug
.
Message
(
"If you find any script errors, call Scl to fix them."
)
Debug
.
Message
(
"His QQ/VX: 852415212, Email: 15161685390@163.com."
)
--this table's contents can be used in anywhere, commonly be used for create effects, or be used in effect's condtions/costs/targets/operations.
--this table's contents can be used in anywhere, commonly be used for create effects, or be used in effect's condtions/costs/targets/operations.
Scl
=
{
}
Scl
=
{
}
--this table's contents can be used in anywhere, commonly be used for registering effect's condtions/costs/targets/operations/values.
--this table's contents can be used in anywhere, commonly be used for registering effect's condtions/costs/targets/operations/values.
...
@@ -441,7 +444,7 @@ function s.extra_reason(exr)
...
@@ -441,7 +444,7 @@ function s.extra_reason(exr)
Scl
.
Reason_List
[
f
]
=
true
Scl
.
Reason_List
[
f
]
=
true
return
f
return
f
end
end
function
s
.
create_category_list
()
function
s
.
create_category_list
()
local
sg
=
"solve_parama"
local
sg
=
"solve_parama"
local
tp
=
"activate_player"
local
tp
=
"activate_player"
local
r
=
"reason"
local
r
=
"reason"
...
@@ -680,7 +683,8 @@ function s.create_buff_list()
...
@@ -680,7 +683,8 @@ function s.create_buff_list()
[
"EquipLimit"
]
=
{
EFFECT_EQUIP_LIMIT
,
false
,
1
,
nil
,
EFFECT_FLAG_CANNOT_DISABLE
},
[
"EquipLimit"
]
=
{
EFFECT_EQUIP_LIMIT
,
false
,
1
,
nil
,
EFFECT_FLAG_CANNOT_DISABLE
},
[
"Reveal"
]
=
{
EFFECT_PUBLIC
,
false
,
1
,
nil
,
EFFECT_FLAG_CANNOT_DISABLE
},
[
"Reveal"
]
=
{
EFFECT_PUBLIC
,
false
,
1
,
nil
,
EFFECT_FLAG_CANNOT_DISABLE
},
[
"SetMaterial"
]
=
{
EFFECT_SET_MATERIAL_SCL
},
[
"SetMaterial"
]
=
{
EFFECT_SET_MATERIAL_SCL
},
[
"CompleteProcedure"
]
=
{
EFFECT_COMPLETE_SUMMON_PROC_SCL
}
[
"CompleteProcedure"
]
=
{
EFFECT_COMPLETE_SUMMON_PROC_SCL
},
[
"ActivateCardFromAnyZone"
]
=
{
EFFECT_ACTIVATE_SPELL_AND_TRAP_FROM_ANY_ZONE_SCL
}
}
}
...
@@ -711,7 +715,6 @@ function s.create_buff_list()
...
@@ -711,7 +715,6 @@ function s.create_buff_list()
[
"OpponentTakeDamageInstead"
]
=
{
EFFECT_REFLECT_DAMAGE
},
[
"OpponentTakeDamageInstead"
]
=
{
EFFECT_REFLECT_DAMAGE
},
[
"OpponentTakeBattleDamageInstead"
]
=
{
EFFECT_REFLECT_BATTLE_DAMAGE
},
[
"OpponentTakeBattleDamageInstead"
]
=
{
EFFECT_REFLECT_BATTLE_DAMAGE
},
[
"GainLPInsteadOfTakingDamage"
]
=
{
EFFECT_REVERSE_DAMAGE
},
[
"GainLPInsteadOfTakingDamage"
]
=
{
EFFECT_REVERSE_DAMAGE
},
[
"ActivateCardFromAnyZone"
]
=
{
EFFECT_ACTIVATE_SPELL_AND_TRAP_FROM_ANY_ZONE_SCL
},
[
"AddAdditionalEffect"
]
=
{
EFFECT_ADDITIONAL_EFFECT_SCL
}
[
"AddAdditionalEffect"
]
=
{
EFFECT_ADDITIONAL_EFFECT_SCL
}
}
}
...
@@ -771,8 +774,9 @@ function s.activate_from_any_zone_costchk(e, te_or_c, tp)
...
@@ -771,8 +774,9 @@ function s.activate_from_any_zone_costchk(e, te_or_c, tp)
local
se_arr
=
{
c
:
IsHasEffect
(
EFFECT_ACTIVATE_SPELL_AND_TRAP_FROM_ANY_ZONE_SCL
,
tp
)
}
local
se_arr
=
{
c
:
IsHasEffect
(
EFFECT_ACTIVATE_SPELL_AND_TRAP_FROM_ANY_ZONE_SCL
,
tp
)
}
if
#
se_arr
==
0
then
return
false
end
if
#
se_arr
==
0
then
return
false
end
for
_
,
se
in
pairs
(
se_arr
)
do
for
_
,
se
in
pairs
(
se_arr
)
do
local
act_zone
=
se
:
GetValue
()
local
cost
=
se
:
GetCost
()
or
aux
.
TRUE
local
cost
=
se
:
GetCost
()
or
aux
.
TRUE
if
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
if
Scl
.
IsInZone
(
c
,
act_zone
)
and
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
return
true
return
true
end
end
end
end
...
@@ -2646,7 +2650,7 @@ function Scl.CreateFieldTriggerContinousEffect_PhaseOpearte(reg_obj, op_obj, tim
...
@@ -2646,7 +2650,7 @@ function Scl.CreateFieldTriggerContinousEffect_PhaseOpearte(reg_obj, op_obj, tim
tc
:
RegisterFlagEffect
(
FLAG_PHASE_OPERATE_SCL
,
RESETS_SCL
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
fid
,
desc
)
tc
:
RegisterFlagEffect
(
FLAG_PHASE_OPERATE_SCL
,
RESETS_SCL
,
EFFECT_FLAG_CLIENT_HINT
,
0
,
fid
,
desc
)
end
end
sg
:
KeepAlive
()
sg
:
KeepAlive
()
local
e1
=
Scl
.
CreateFieldTriggerContinousEffect
(
reg_obj
,
EVENT_PHASE
+
phase
,
DESC_PHASE_OPERATION_SCL
,
1
,
"Ignore
Immune
"
,
nil
,
s
.
phase_opearte_con
(
phase
,
atct
,
whos
,
fid
,
times
,
ex_con
),
s
.
phase_opearte_op
(
fun_obj
,
fid
))
local
e1
=
Scl
.
CreateFieldTriggerContinousEffect
(
reg_obj
,
EVENT_PHASE
+
phase
,
DESC_PHASE_OPERATION_SCL
,
1
,
"Ignore
Unaffected
"
,
nil
,
s
.
phase_opearte_con
(
phase
,
atct
,
whos
,
fid
,
times
,
ex_con
),
s
.
phase_opearte_op
(
fun_obj
,
fid
))
Scl
.
Operation_Info
[
e1
]
=
{
sg
,
0
,
0
}
Scl
.
Operation_Info
[
e1
]
=
{
sg
,
0
,
0
}
return
e1
return
e1
end
end
...
@@ -6823,10 +6827,25 @@ Scl.RaiseGlobalSetEvent()
...
@@ -6823,10 +6827,25 @@ Scl.RaiseGlobalSetEvent()
--<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--[[
--[[
10100000 -- Scl's library QQ852415212
10100000 -- Scl's library QQ852415212
60152900 -- LaiBill's library QQ529508379
60152900 -- LaiBill's library QQ529508379
B2Sayaka -- "Miki Sayaka"
B2Sayaka -- "Miki Sayaka"
]]
--
]]
--
--<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
\ No newline at end of file
--<<<<<<<<<<<<<<<<<<<<<<<<<<<< Update Log <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--[[
2022.12.25 fix Scl.CreateFieldTriggerContinousEffect_PhaseOpearte
Turn the wrong flag string "IgnoreImmune" to the right string "IgnoreUnaffected".
2022.12.28 fix EFFECT_ACTIVATE_SPELL_AND_TRAP_FROM_ANY_ZONE_SCL
Add an zone check (current zone == activate zone) before cost check. (due to 130006007 "决斗者的最后之日" can activate in any zone.)
--]]
\ No newline at end of file
expansions/script/c10199990.lua
View file @
625f2ec1
...
@@ -1640,7 +1640,7 @@ end
...
@@ -1640,7 +1640,7 @@ end
--Single Val Effect: Activate Trap / Quick Spell immediately
--Single Val Effect: Activate Trap / Quick Spell immediately
function
rsef
.
SV_ACTIVATE_IMMEDIATELY
(
reg_list
,
act_list
,
con
,
reset_list
,
flag
,
desc_list
)
function
rsef
.
SV_ACTIVATE_IMMEDIATELY
(
reg_list
,
act_list
,
con
,
reset_list
,
flag
,
desc_list
)
local
act_list2
local
act_list2
local
reg_owner
,
reg_handler
=
rsef
.
GetRegisterCard
(
reg_list
)
local
reg_owner
,
reg_handler
=
Scl
.
GetRegisterInfo
(
reg_list
)
if
reg_handler
:
IsComplexType
(
TYPE_QUICKPLAY
+
TYPE_SPELL
)
then
if
reg_handler
:
IsComplexType
(
TYPE_QUICKPLAY
+
TYPE_SPELL
)
then
act_list2
=
string.gsub
(
act_list
,
"hand"
,
"qah"
)
act_list2
=
string.gsub
(
act_list
,
"hand"
,
"qah"
)
act_list2
=
string.gsub
(
act_list2
,
"set"
,
"qas"
)
act_list2
=
string.gsub
(
act_list2
,
"set"
,
"qas"
)
...
@@ -1648,7 +1648,7 @@ function rsef.SV_ACTIVATE_IMMEDIATELY(reg_list, act_list, con, reset_list, flag,
...
@@ -1648,7 +1648,7 @@ function rsef.SV_ACTIVATE_IMMEDIATELY(reg_list, act_list, con, reset_list, flag,
act_list2
=
string.gsub
(
act_list
,
"hand"
,
"tah"
)
act_list2
=
string.gsub
(
act_list
,
"hand"
,
"tah"
)
act_list2
=
string.gsub
(
act_list2
,
"set"
,
"tas"
)
act_list2
=
string.gsub
(
act_list2
,
"set"
,
"tas"
)
end
end
return
rsef
.
SV_Card
(
reg_list
,
act_list2
,
flag
,
nil
,
con
,
reset_list
,
desc_list
)
return
rsef
.
SV_Card
(
reg_list
,
act_list2
,
1
,
flag
,
0xff
,
con
,
reset_list
,
desc_list
)
end
end
--cost: tribute self
--cost: tribute self
function
rscost
.
releaseself
(
check_mzone
,
check_exzone
)
function
rscost
.
releaseself
(
check_mzone
,
check_exzone
)
...
...
expansions/script/c11451011.lua
View file @
625f2ec1
...
@@ -82,7 +82,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -82,7 +82,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
ngfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
c
:
GetFlagEffect
(
m
)
==
0
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
ngfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
c
:
GetFlagEffect
(
m
)
==
0
end
local
fid
=
c
:
GetFieldID
()
local
fid
=
c
:
GetFieldID
()
local
e1
=
Card
.
RegisterFlagEffect
(
c
,
m
,
RESET_EVENT
+
0x
4
3e0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
fid
,
aux
.
Stringid
(
m
,
2
))
local
e1
=
Card
.
RegisterFlagEffect
(
c
,
m
,
RESET_EVENT
+
0x
c
3e0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
fid
,
aux
.
Stringid
(
m
,
2
))
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_DECK
)
e2
:
SetCode
(
EVENT_TO_DECK
)
...
@@ -168,7 +168,7 @@ function cm.distg(e,c)
...
@@ -168,7 +168,7 @@ function cm.distg(e,c)
end
end
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
if
loc
&
LOCATION_SZONE
~=
0
and
seq
<=
4
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
((
rp
==
tp
and
seq
==
aux
.
GetColumn
(
e
:
GetHandler
(),
tp
))
or
(
rp
==
1
-
tp
and
seq
==
4
-
tseq
)
)
then
if
loc
&
LOCATION_SZONE
~=
0
and
seq
<=
4
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
seq
==
aux
.
GetColumn
(
e
:
GetHandler
(),
rp
)
then
Duel
.
NegateEffect
(
ev
)
Duel
.
NegateEffect
(
ev
)
end
end
end
end
...
...
expansions/script/c11451012.lua
View file @
625f2ec1
...
@@ -88,7 +88,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -88,7 +88,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
and
c
:
GetFlagEffect
(
m
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
and
c
:
GetFlagEffect
(
m
)
==
0
end
local
fid
=
c
:
GetFieldID
()
local
fid
=
c
:
GetFieldID
()
local
e1
=
Card
.
RegisterFlagEffect
(
c
,
m
,
RESET_EVENT
+
0x
4
3e0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
fid
,
aux
.
Stringid
(
m
,
2
))
local
e1
=
Card
.
RegisterFlagEffect
(
c
,
m
,
RESET_EVENT
+
0x
c
3e0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
fid
,
aux
.
Stringid
(
m
,
2
))
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_DECK
)
e2
:
SetCode
(
EVENT_TO_DECK
)
...
...
expansions/script/c11451013.lua
View file @
625f2ec1
...
@@ -78,7 +78,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -78,7 +78,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAttackPos
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
and
c
:
GetFlagEffect
(
m
)
==
0
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAttackPos
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
and
c
:
GetFlagEffect
(
m
)
==
0
end
local
fid
=
c
:
GetFieldID
()
local
fid
=
c
:
GetFieldID
()
local
e1
=
Card
.
RegisterFlagEffect
(
c
,
m
,
RESET_EVENT
+
0x
4
3e0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
fid
,
aux
.
Stringid
(
m
,
2
))
local
e1
=
Card
.
RegisterFlagEffect
(
c
,
m
,
RESET_EVENT
+
0x
c
3e0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
fid
,
aux
.
Stringid
(
m
,
2
))
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_DECK
)
e2
:
SetCode
(
EVENT_TO_DECK
)
...
...
expansions/script/c11451014.lua
View file @
625f2ec1
...
@@ -84,7 +84,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -84,7 +84,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
,
e
,
tp
)
and
c
:
GetFlagEffect
(
m
)
==
0
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
,
e
,
tp
)
and
c
:
GetFlagEffect
(
m
)
==
0
end
local
fid
=
c
:
GetFieldID
()
local
fid
=
c
:
GetFieldID
()
local
e1
=
Card
.
RegisterFlagEffect
(
c
,
m
,
RESET_EVENT
+
0x
4
3e0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
fid
,
aux
.
Stringid
(
m
,
2
))
local
e1
=
Card
.
RegisterFlagEffect
(
c
,
m
,
RESET_EVENT
+
0x
c
3e0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
fid
,
aux
.
Stringid
(
m
,
2
))
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_DECK
)
e2
:
SetCode
(
EVENT_TO_DECK
)
...
...
expansions/script/c11451807.lua
View file @
625f2ec1
...
@@ -33,20 +33,28 @@ end
...
@@ -33,20 +33,28 @@ end
function
cm
.
immval
(
e
,
te
)
function
cm
.
immval
(
e
,
te
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
eset
=
{
c
:
IsHasEffect
(
0x10000000
+
m
)}
local
res
=
(
te
:
GetOwner
()
~=
c
)
local
res
=
(
te
:
GetOwner
()
~=
c
)
if
res
then
local
ctns
=
false
local
flag
=
c
:
GetFlagEffectLabel
(
m
)
if
not
te
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
then
if
flag
then
for
_
,
se
in
pairs
(
eset
)
do
c
:
SetFlagEffectLabel
(
m
,
flag
+
1
)
if
se
:
GetLabelObject
()
==
te
then
ctns
=
true
end
else
c
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
1
)
end
end
end
if
res
and
not
ctns
then
local
flag
=
c
:
GetFlagEffect
(
m
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
0x10000000
+
m
)
e1
:
SetLabelObject
(
te
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
,
true
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_ADJUST
)
e4
:
SetCode
(
EVENT_ADJUST
)
e4
:
SetOperation
(
cm
.
imcop
)
e4
:
SetOperation
(
cm
.
imcop
)
Duel
.
RegisterEffect
(
e4
,
tp
)
Duel
.
RegisterEffect
(
e4
,
tp
)
Duel
.
Readjust
()
end
end
return
res
return
res
end
end
...
@@ -57,15 +65,15 @@ end
...
@@ -57,15 +65,15 @@ end
function
cm
.
fliptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
fliptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
flag
=
c
:
GetFlagEffectLabel
(
m
)
local
eset
=
{
c
:
IsHasEffect
(
0x10000000
+
m
)}
if
flag
then
if
#
eset
>
0
then
if
rp
>=
2
then
if
rp
>=
2
then
if
tp
==
0
then
rp
=
1
end
if
tp
==
0
then
rp
=
1
end
if
tp
==
1
then
rp
=
0
end
if
tp
==
1
then
rp
=
0
end
end
end
Duel
.
SetTargetPlayer
(
rp
)
Duel
.
SetTargetPlayer
(
rp
)
Duel
.
SetTargetParam
(
flag
)
Duel
.
SetTargetParam
(
#
eset
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
rp
,
flag
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
rp
,
#
eset
)
end
end
end
end
function
cm
.
flipop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
flipop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c53796077.lua
View file @
625f2ec1
...
@@ -109,42 +109,80 @@ function cm.adjustop1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -109,42 +109,80 @@ function cm.adjustop1(e,tp,eg,ep,ev,re,r,rp)
local
bool2
=
c
:
IsHasEffect
(
EFFECT_SPSUMMON_COST
)
local
bool2
=
c
:
IsHasEffect
(
EFFECT_SPSUMMON_COST
)
local
bool3
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_SPECIAL_SUMMON
)
local
bool3
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_SPECIAL_SUMMON
)
local
bool4
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_LIMIT_SPECIAL_SUMMON_POSITION
)
local
bool4
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_LIMIT_SPECIAL_SUMMON_POSITION
)
if
not
(
bool1
or
bool2
or
bool3
or
bool4
)
then
return
end
local
bool5
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_SPSUMMON_COUNT_LIMIT
)
if
not
(
bool1
or
bool2
or
bool3
or
bool4
or
bool5
)
then
return
end
local
re1
=
{
c
:
IsHasEffect
(
EFFECT_CANNOT_SPECIAL_SUMMON
)}
local
re1
=
{
c
:
IsHasEffect
(
EFFECT_CANNOT_SPECIAL_SUMMON
)}
local
re2
=
{
c
:
IsHasEffect
(
EFFECT_SPSUMMON_COST
)}
local
re2
=
{
c
:
IsHasEffect
(
EFFECT_SPSUMMON_COST
)}
local
re3
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_SPECIAL_SUMMON
)}
local
re5
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_SPSUMMON_COUNT_LIMIT
)}
local
re4
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_LIMIT_SPECIAL_SUMMON_POSITION
)}
for
_
,
te1
in
pairs
(
re1
)
do
for
_
,
te1
in
pairs
(
re1
)
do
local
con
=
te1
:
GetCondition
()
local
con
=
te1
:
GetCondition
()
if
not
con
then
con
=
aux
.
TRUE
end
if
not
con
then
con
=
aux
.
TRUE
end
g
:
AddCard
(
te1
:
GetOwner
())
g
:
AddCard
(
te1
:
GetOwner
())
te1
:
SetCondition
(
cm
.
chcon
(
con
))
te1
:
SetCondition
(
cm
.
chcon
(
con
,
0
))
end
end
for
_
,
te2
in
pairs
(
re2
)
do
for
_
,
te2
in
pairs
(
re2
)
do
if
te2
:
GetType
()
==
EFFECT_TYPE_SINGLE
then
if
te2
:
GetType
()
==
EFFECT_TYPE_SINGLE
then
local
con
=
te2
:
GetCondition
()
local
con
=
te2
:
GetCondition
()
if
not
con
then
con
=
aux
.
TRUE
end
if
not
con
then
con
=
aux
.
TRUE
end
g
:
AddCard
(
te2
:
GetOwner
())
g
:
AddCard
(
te2
:
GetOwner
())
te2
:
SetCondition
(
cm
.
chcon
(
con
))
te2
:
SetCondition
(
cm
.
chcon
(
con
,
0
))
end
end
if
te2
:
GetType
()
==
EFFECT_TYPE_FIELD
then
if
te2
:
GetType
()
==
EFFECT_TYPE_FIELD
then
local
tg
=
te2
:
GetTarget
()
local
tg
=
te2
:
GetTarget
()
local
o
,
h
=
te2
:
GetOwner
(),
te2
:
GetHandler
()
local
o
,
h
=
te2
:
GetOwner
(),
te2
:
GetHandler
()
if
not
tg
then
if
not
tg
then
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
te2
:
SetTarget
(
cm
.
chtg
(
aux
.
TRUE
))
te2
:
SetTarget
(
cm
.
chtg
(
aux
.
TRUE
,
0
))
elseif
tg
(
te2
,
c
,
tp
)
==
true
then
elseif
tg
(
te2
,
c
,
tp
)
==
true
then
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
te2
:
SetTarget
(
cm
.
chtg
(
tg
))
te2
:
SetTarget
(
cm
.
chtg
(
tg
,
0
))
end
end
end
for
_
,
te5
in
pairs
(
re5
)
do
local
val
=
te5
:
GetValue
()
local
_
,
a
=
te5
:
GetLabel
()
if
a
==
0
then
te5
:
SetLabel
(
0
,
val
)
end
local
x
,
o
,
h
=
nil
,
te5
:
GetOwner
(),
te5
:
GetHandler
()
if
h
then
x
=
h
else
x
=
o
end
local
sp
=
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SPSUMMON
)
local
_
,
b
=
te5
:
GetLabel
()
if
sp
==
0
then
te5
:
SetLabel
(
1
,
b
)
te5
:
SetValue
(
b
)
end
val
=
te5
:
GetValue
()
local
l
,
_
=
te5
:
GetLabel
()
if
l
==
0
then
te5
:
SetLabel
(
sp
+
1
,
b
)
else
local
n
=
sp
-
l
+
1
if
n
==
val
then
te5
:
SetValue
(
val
+
1
)
local
e1
=
te5
:
Clone
()
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
local
loc
=
te5
:
GetRange
()
if
loc
~=
0
then
e1
:
SetLabelObject
(
te5
)
h
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ADJUST
)
e2
:
SetLabel
(
loc
,
b
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetOperation
(
cm
.
reset1
)
Duel
.
RegisterEffect
(
e2
,
tp
)
else
Duel
.
RegisterEffect
(
e1
,
te5
:
GetOwnerPlayer
())
end
end
end
end
end
end
end
local
re3
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_SPECIAL_SUMMON
)}
local
re4
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_LIMIT_SPECIAL_SUMMON_POSITION
)}
for
_
,
te3
in
pairs
(
re3
)
do
for
_
,
te3
in
pairs
(
re3
)
do
local
tg
=
te3
:
GetTarget
()
local
tg
=
te3
:
GetTarget
()
local
o
,
h
=
te3
:
GetOwner
(),
te3
:
GetHandler
()
local
o
,
h
=
te3
:
GetOwner
(),
te3
:
GetHandler
()
if
not
tg
then
if
not
tg
then
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
te3
:
SetTarget
(
cm
.
chtg
(
aux
.
TRUE
))
te3
:
SetTarget
(
cm
.
chtg
3
(
aux
.
TRUE
,
0
))
elseif
tg
(
te3
,
c
,
tp
,
SUMMON_TYPE_SPECIAL
,
POS_FACEUP
,
tp
,
e
)
==
true
then
elseif
tg
(
te3
,
c
,
tp
,
SUMMON_TYPE_SPECIAL
,
POS_FACEUP
,
tp
,
e
)
==
true
then
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
te3
:
SetTarget
(
cm
.
chtg3
(
tg
))
te3
:
SetTarget
(
cm
.
chtg3
(
tg
))
...
@@ -155,7 +193,7 @@ function cm.adjustop1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -155,7 +193,7 @@ function cm.adjustop1(e,tp,eg,ep,ev,re,r,rp)
local
o
,
h
=
te4
:
GetOwner
(),
te4
:
GetHandler
()
local
o
,
h
=
te4
:
GetOwner
(),
te4
:
GetHandler
()
if
tg
(
te4
,
c
,
tp
,
tp
,
POS_FACEUP
)
==
true
then
if
tg
(
te4
,
c
,
tp
,
tp
,
POS_FACEUP
)
==
true
then
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
te4
:
SetTarget
(
cm
.
chtg
(
tg
))
te4
:
SetTarget
(
cm
.
chtg
3
(
tg
))
end
end
end
end
c
:
ResetFlagEffect
(
m
)
c
:
ResetFlagEffect
(
m
)
...
@@ -164,7 +202,7 @@ function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -164,7 +202,7 @@ function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
e
:
GetLabelObject
()
local
g
=
e
:
GetLabelObject
()
g
:
Clear
()
g
:
Clear
()
c
:
RegisterFlagEffect
(
m
,
0
,
0
,
0
)
c
:
RegisterFlagEffect
(
m
+
500
,
0
,
0
,
0
)
local
bool1
=
c
:
IsHasEffect
(
EFFECT_CANNOT_TRIGGER
)
local
bool1
=
c
:
IsHasEffect
(
EFFECT_CANNOT_TRIGGER
)
local
bool2
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_ACTIVATE
)
local
bool2
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_ACTIVATE
)
local
bool3
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_ACTIVATE_COST
)
local
bool3
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_ACTIVATE_COST
)
...
@@ -177,7 +215,7 @@ function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -177,7 +215,7 @@ function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
local
con
=
te1
:
GetCondition
()
local
con
=
te1
:
GetCondition
()
if
not
con
then
con
=
aux
.
TRUE
end
if
not
con
then
con
=
aux
.
TRUE
end
g
:
AddCard
(
te1
:
GetOwner
())
g
:
AddCard
(
te1
:
GetOwner
())
te1
:
SetCondition
(
cm
.
chcon
(
con
))
te1
:
SetCondition
(
cm
.
chcon
(
con
,
500
))
end
end
if
te1
:
GetType
()
==
EFFECT_TYPE_EQUIP
then
if
te1
:
GetType
()
==
EFFECT_TYPE_EQUIP
then
local
con
=
te1
:
GetCondition
()
local
con
=
te1
:
GetCondition
()
...
@@ -190,10 +228,10 @@ function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -190,10 +228,10 @@ function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
local
o
,
h
=
te1
:
GetOwner
(),
te1
:
GetHandler
()
local
o
,
h
=
te1
:
GetOwner
(),
te1
:
GetHandler
()
if
not
tg
then
if
not
tg
then
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
te1
:
SetTarget
(
cm
.
chtg
(
aux
.
TRUE
))
te1
:
SetTarget
(
cm
.
chtg
(
aux
.
TRUE
,
500
))
elseif
tg
(
te1
,
c
)
==
true
then
elseif
tg
(
te1
,
c
)
==
true
then
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
if
h
then
g
:
AddCard
(
h
)
else
g
:
AddCard
(
o
)
end
te1
:
SetTarget
(
cm
.
chtg
(
tg
))
te1
:
SetTarget
(
cm
.
chtg
(
tg
,
500
))
end
end
end
end
end
end
...
@@ -217,32 +255,43 @@ function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -217,32 +255,43 @@ function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
te3
:
SetTarget
(
cm
.
chtg2
(
tg
))
te3
:
SetTarget
(
cm
.
chtg2
(
tg
))
end
end
end
end
c
:
ResetFlagEffect
(
m
)
c
:
ResetFlagEffect
(
m
+
500
)
end
end
function
cm
.
chcon
(
_con
)
function
cm
.
chcon
(
_con
,
t
)
return
function
(
e
,
...
)
return
function
(
e
,
...
)
local
x
=
e
:
GetHandler
()
local
x
=
e
:
GetHandler
()
if
x
:
IsHasEffect
(
m
)
and
x
:
GetFlagEffect
(
m
)
<
1
then
return
false
end
if
x
:
IsHasEffect
(
m
)
and
x
:
GetFlagEffect
(
m
+
t
)
<
1
then
return
false
end
return
_con
(
e
,
...
)
return
_con
(
e
,
...
)
end
end
end
end
function
cm
.
chcon2
(
_con
)
function
cm
.
chcon2
(
_con
)
return
function
(
e
,
...
)
return
function
(
e
,
...
)
local
x
=
e
:
GetHandler
():
GetEquipTarget
()
local
x
=
e
:
GetHandler
():
GetEquipTarget
()
if
x
:
IsHasEffect
(
m
)
and
x
:
GetFlagEffect
(
m
)
<
1
then
return
false
end
if
x
:
IsHasEffect
(
m
)
and
x
:
GetFlagEffect
(
m
+
500
)
<
1
then
return
false
end
return
_con
(
e
,
...
)
return
_con
(
e
,
...
)
end
end
end
end
function
cm
.
chtg
(
_tg
)
function
cm
.
reset1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
x
=
e
:
GetLabelObject
():
GetHandler
()
local
te
=
e
:
GetLabelObject
():
GetLabelObject
()
local
loc
,
v
=
e
:
GetLabel
()
if
x
:
GetLocation
()
&
loc
==
0
then
te
:
SetLabel
(
0
,
v
)
te
:
SetValue
(
v
)
e
:
GetLabelObject
():
Reset
()
e
:
Reset
()
end
end
function
cm
.
chtg
(
_tg
,
t
)
return
function
(
e
,
c
,
...
)
return
function
(
e
,
c
,
...
)
if
c
:
IsHasEffect
(
m
)
and
c
:
GetFlagEffect
(
m
)
<
1
then
return
false
end
if
c
:
IsHasEffect
(
m
)
and
c
:
GetFlagEffect
(
m
+
t
)
<
1
then
return
false
end
return
_tg
(
e
,
c
,
...
)
return
_tg
(
e
,
c
,
...
)
end
end
end
end
function
cm
.
chtg2
(
_tg
)
function
cm
.
chtg2
(
_tg
)
return
function
(
e
,
te
,
...
)
return
function
(
e
,
te
,
...
)
local
x
=
te
:
GetHandler
()
local
x
=
te
:
GetHandler
()
if
x
:
IsHasEffect
(
m
)
and
x
:
GetFlagEffect
(
m
)
<
1
then
return
false
end
if
x
:
IsHasEffect
(
m
)
and
x
:
GetFlagEffect
(
m
+
500
)
<
1
then
return
false
end
return
_tg
(
e
,
te
,
...
)
return
_tg
(
e
,
te
,
...
)
end
end
end
end
...
...
expansions/script/c90700046.lua
0 → 100644
View file @
625f2ec1
local
m
=
90700046
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"超我龙-苦龙"
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetOperation
(
cm
.
tgop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCost
(
cm
.
hspcost
)
e2
:
SetTarget
(
cm
.
hsptg
)
e2
:
SetOperation
(
cm
.
hspop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_INACTIVATE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCountLimit
(
1
,
m
)
e3
:
SetCost
(
cm
.
discost
)
e3
:
SetTarget
(
cm
.
distg
)
e3
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
tgcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
tgfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x6312
)
and
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetCondition
(
cm
.
tgcon
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
e
:
GetHandlerPlayer
())
end
function
cm
.
rfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_PENDULUM
+
TYPE_RITUAL
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
cm
.
hspcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
rfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
2
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
rfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
2
,
2
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
cm
.
hsptg
(
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
cm
.
hspop
(
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
cm
.
dfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsDiscardable
()
end
function
cm
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
dfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
dfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
disfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x6312
)
and
c
:
IsAbleToHand
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
c
)
end
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x6312
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
disfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
+
CATEGORY_SEARCH
,
nil
,
2
,
tp
,
LOCATION_DECK
)
end
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsExistingMatchingCard
(
cm
.
disfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
disfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
g
:
Merge
(
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
g
:
GetFirst
()))
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
\ No newline at end of file
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