Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
6289d85e
Commit
6289d85e
authored
Oct 23, 2012
by
Fluorohydride
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #304 from VanillaSalt/patch33
fix
parents
8d6bd431
70ea32b7
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
67 additions
and
136 deletions
+67
-136
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+1
-4
ocgcore/processor.cpp
ocgcore/processor.cpp
+9
-1
script/c10132124.lua
script/c10132124.lua
+0
-4
script/c13857930.lua
script/c13857930.lua
+5
-4
script/c14677495.lua
script/c14677495.lua
+0
-2
script/c14943837.lua
script/c14943837.lua
+1
-0
script/c15341821.lua
script/c15341821.lua
+1
-1
script/c15854426.lua
script/c15854426.lua
+2
-1
script/c17732278.lua
script/c17732278.lua
+5
-4
script/c19353570.lua
script/c19353570.lua
+0
-2
script/c21051977.lua
script/c21051977.lua
+0
-2
script/c21977828.lua
script/c21977828.lua
+0
-2
script/c25206027.lua
script/c25206027.lua
+0
-2
script/c2732323.lua
script/c2732323.lua
+4
-1
script/c31828916.lua
script/c31828916.lua
+2
-1
script/c32391566.lua
script/c32391566.lua
+0
-2
script/c34471458.lua
script/c34471458.lua
+0
-4
script/c35073065.lua
script/c35073065.lua
+0
-2
script/c36088082.lua
script/c36088082.lua
+2
-8
script/c38107923.lua
script/c38107923.lua
+0
-2
script/c4192696.lua
script/c4192696.lua
+0
-2
script/c42256406.lua
script/c42256406.lua
+1
-1
script/c43509019.lua
script/c43509019.lua
+4
-4
script/c4779091.lua
script/c4779091.lua
+0
-4
script/c49460512.lua
script/c49460512.lua
+0
-2
script/c50613779.lua
script/c50613779.lua
+0
-2
script/c55727845.lua
script/c55727845.lua
+4
-16
script/c62476197.lua
script/c62476197.lua
+0
-2
script/c63211608.lua
script/c63211608.lua
+0
-2
script/c64262809.lua
script/c64262809.lua
+0
-4
script/c67757079.lua
script/c67757079.lua
+0
-4
script/c69937550.lua
script/c69937550.lua
+1
-1
script/c76080032.lua
script/c76080032.lua
+0
-2
script/c77972406.lua
script/c77972406.lua
+3
-3
script/c79473793.lua
script/c79473793.lua
+1
-1
script/c81336148.lua
script/c81336148.lua
+0
-2
script/c87008374.lua
script/c87008374.lua
+0
-2
script/c87997872.lua
script/c87997872.lua
+2
-3
script/c89181369.lua
script/c89181369.lua
+1
-0
script/c89235196.lua
script/c89235196.lua
+0
-2
script/c89258906.lua
script/c89258906.lua
+0
-2
script/c90011152.lua
script/c90011152.lua
+1
-1
script/c90502999.lua
script/c90502999.lua
+0
-1
script/c92377303.lua
script/c92377303.lua
+2
-3
script/c94573223.lua
script/c94573223.lua
+0
-2
script/c94656263.lua
script/c94656263.lua
+0
-2
script/c97940434.lua
script/c97940434.lua
+0
-2
script/utility.lua
script/utility.lua
+15
-15
No files found.
ocgcore/libcard.cpp
View file @
6289d85e
...
...
@@ -24,10 +24,7 @@ int32 scriptlib::card_get_origin_code(lua_State *L) {
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
int32
neglect_alias
=
false
;
if
(
lua_gettop
(
L
)
>=
2
)
neglect_alias
=
lua_toboolean
(
L
,
2
);
if
(
!
neglect_alias
&&
pcard
->
data
.
alias
)
{
if
(
pcard
->
data
.
alias
)
{
int32
dif
=
pcard
->
data
.
code
-
pcard
->
data
.
alias
;
if
(
dif
>
-
10
&&
dif
<
10
)
lua_pushinteger
(
L
,
pcard
->
data
.
alias
);
...
...
ocgcore/processor.cpp
View file @
6289d85e
...
...
@@ -2844,8 +2844,16 @@ int32 field::process_battle_command(uint16 step) {
||
((
core
.
sub_attack_target
!=
(
card
*
)
0xffffffff
)
&&
(
!
core
.
sub_attack_target
||
core
.
sub_attack_target
->
current
.
location
==
LOCATION_MZONE
)))
{
if
(
core
.
sub_attacker
)
core
.
attacker
=
core
.
sub_attacker
;
if
(
core
.
sub_attack_target
!=
(
card
*
)
0xffffffff
)
if
(
core
.
sub_attack_target
!=
(
card
*
)
0xffffffff
)
{
core
.
attack_target
=
core
.
sub_attack_target
;
if
(
core
.
attack_target
)
{
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_BE_BATTLE_TARGET
,
0
,
REASON_REPLACE
,
0
,
1
-
infos
.
turn_player
,
0
);
raise_event
(
core
.
attack_target
,
EVENT_BE_BATTLE_TARGET
,
0
,
REASON_REPLACE
,
0
,
1
-
infos
.
turn_player
,
0
);
process_single_event
();
process_instant_event
();
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0
,
0
);
}
}
core
.
sub_attacker
=
0
;
core
.
sub_attack_target
=
(
card
*
)
0xffffffff
;
core
.
attacker
->
announce_count
++
;
...
...
script/c10132124.lua
View file @
6289d85e
...
...
@@ -23,10 +23,6 @@ end
function
c10132124
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c10132124
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c13857930.lua
View file @
6289d85e
...
...
@@ -11,14 +11,15 @@ function c13857930.initial_effect(c)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
13857930
,
0
))
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetType
(
EFFECT_TYPE_
FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e3
:
SetCondition
(
c13857930
.
condition
)
e3
:
SetTarget
(
c13857930
.
target
)
e3
:
SetOperation
(
c13857930
.
activate
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
c
:
RegisterEffect
(
e4
)
end
function
c13857930
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
()
==
Duel
.
GetAttacker
()
or
e
:
GetHandler
()
==
Duel
.
GetAttackTarget
(
)
end
function
c13857930
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
13857930
)
==
0
end
...
...
script/c14677495.lua
View file @
6289d85e
...
...
@@ -32,8 +32,6 @@ end
function
c14677495
.
sptg1
(
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
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c14677495
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c14943837.lua
View file @
6289d85e
...
...
@@ -47,6 +47,7 @@ function c14943837.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc)
local
c
=
e
:
GetHandler
()
local
lv
=
syncard
:
GetLevel
()
-
c
:
GetLevel
()
local
g
=
Duel
.
GetMatchingGroup
(
c14943837
.
synfilter
,
syncard
:
GetControler
(),
LOCATION_MZONE
,
LOCATION_MZONE
,
c
,
syncard
,
c
,
f
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
sg
=
g
:
SelectWithSumEqual
(
tp
,
Card
.
GetSynchroLevel
,
lv
,
minc
,
maxc
,
syncard
)
Duel
.
SetSynchroMaterial
(
sg
)
end
...
...
script/c15341821.lua
View file @
6289d85e
...
...
@@ -15,7 +15,7 @@ function c15341821.condition(e,tp,eg,ep,ev,re,r,rp)
return
not
e
:
GetHandler
():
IsReason
(
REASON_RETURN
)
end
function
c15341821
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
0
,
0
)
end
...
...
script/c15854426.lua
View file @
6289d85e
...
...
@@ -29,7 +29,8 @@ end
function
c15854426
.
check
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
while
tc
do
if
tc
:
IsControler
(
tp
)
and
tc
:
IsFaceup
()
and
tc
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
tc
:
GetDestination
()
==
LOCATION_HAND
then
if
tc
:
IsControler
(
tp
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsFaceup
()
and
tc
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
tc
:
GetDestination
()
==
LOCATION_HAND
then
tc
:
RegisterFlagEffect
(
15854426
,
RESET_EVENT
+
0x15e0000
,
0
,
1
)
end
tc
=
eg
:
GetNext
()
...
...
script/c17732278.lua
View file @
6289d85e
...
...
@@ -4,14 +4,15 @@ function c17732278.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
17732278
,
0
))
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_
FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCondition
(
c17732278
.
condition
)
e1
:
SetTarget
(
c17732278
.
target
)
e1
:
SetOperation
(
c17732278
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
c
:
RegisterEffect
(
e2
)
end
function
c17732278
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
()
==
Duel
.
GetAttacker
()
or
e
:
GetHandler
()
==
Duel
.
GetAttackTarget
(
)
end
function
c17732278
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
17732278
)
==
0
end
...
...
script/c19353570.lua
View file @
6289d85e
...
...
@@ -25,8 +25,6 @@ end
function
c19353570
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c19353570
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c21051977.lua
View file @
6289d85e
...
...
@@ -15,8 +15,6 @@ function c21051977.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
67445676
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21051977
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c21977828.lua
View file @
6289d85e
...
...
@@ -35,10 +35,8 @@ function c21977828.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c21977828
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c21977828
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c21977828
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
ShuffleHand
(
tp
)
end
function
c21977828
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c25206027.lua
View file @
6289d85e
...
...
@@ -22,8 +22,6 @@ end
function
c25206027
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c25206027
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c2732323.lua
View file @
6289d85e
...
...
@@ -25,6 +25,9 @@ end
function
c2732323
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
Duel
.
ChangeAttackTarget
(
tc
)
local
a
=
Duel
.
GetAttacker
()
if
a
:
IsOnField
()
and
a
:
IsFaceup
()
then
Duel
.
CalculateDamage
(
a
,
tc
)
end
end
end
script/c31828916.lua
View file @
6289d85e
...
...
@@ -26,6 +26,7 @@ function c31828916.initial_effect(c)
c
:
RegisterEffect
(
e3
)
end
function
c31828916
.
check
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
r
~=
REASON_BATTLE
then
return
end
local
pg
=
e
:
GetLabelObject
()
if
pg
then
pg
:
DeleteGroup
()
end
local
dg
=
eg
:
Filter
(
Card
.
IsRace
,
nil
,
RACE_MACHINE
)
...
...
@@ -33,7 +34,7 @@ function c31828916.check(e,tp,eg,ep,ev,re,r,rp)
dg
:
KeepAlive
()
end
function
c31828916
.
cfilter
(
c
,
cg
,
e
,
tp
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
cg
:
IsContains
(
c
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsReason
(
REASON_BATTLE
)
and
c
g
:
IsContains
(
c
)
and
Duel
.
IsExistingMatchingCard
(
c31828916
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
:
GetAttack
(),
c
:
GetAttribute
(),
e
,
tp
)
end
function
c31828916
.
filter
(
c
,
atk
,
att
,
e
,
tp
)
...
...
script/c32391566.lua
View file @
6289d85e
...
...
@@ -21,8 +21,6 @@ end
function
c32391566
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c32391566
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c34471458.lua
View file @
6289d85e
...
...
@@ -61,10 +61,6 @@ end
function
c34471458
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c34471458
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
if
e
:
GetHandler
():
IsLocation
(
LOCATION_DECK
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c34471458
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c35073065.lua
View file @
6289d85e
...
...
@@ -22,8 +22,6 @@ end
function
c35073065
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetTargetCard
(
eg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
...
...
script/c36088082.lua
View file @
6289d85e
...
...
@@ -3,20 +3,14 @@ function c36088082.initial_effect(c)
--level change
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
36088082
,
0
))
e1
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_
FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCondition
(
c36088082
.
regcon
)
e1
:
SetOperation
(
c36088082
.
regop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
36088082
,
0
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e2
:
SetOperation
(
c36088082
.
regop
)
c
:
RegisterEffect
(
e2
)
end
function
c36088082
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttackTarget
()
~=
nil
return
(
e
:
GetHandler
()
==
Duel
.
GetAttacker
()
and
Duel
.
GetAttackTarget
()
~=
nil
)
or
e
:
GetHandler
()
==
Duel
.
GetAttackTarget
()
end
function
c36088082
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c38107923.lua
View file @
6289d85e
...
...
@@ -40,8 +40,6 @@ function c38107923.costfilter(c)
end
function
c38107923
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c38107923
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c38107923
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
...
...
script/c4192696.lua
View file @
6289d85e
...
...
@@ -18,8 +18,6 @@ end
function
c4192696
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
ev
)
end
...
...
script/c42256406.lua
View file @
6289d85e
...
...
@@ -45,7 +45,7 @@ end
function
c42256406
.
cbcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bt
=
eg
:
GetFirst
()
return
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
GetControler
()
==
c
:
GetControler
()
return
r
~=
REASON_REPLACE
and
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
GetControler
()
==
c
:
GetControler
()
end
function
c42256406
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeAttackTarget
(
e
:
GetHandler
())
...
...
script/c43509019.lua
View file @
6289d85e
...
...
@@ -10,7 +10,7 @@ function c43509019.initial_effect(c)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
43509019
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_
BE_BATTLE_TARGET
)
e2
:
SetCode
(
EVENT_
ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetLabel
(
1
)
e2
:
SetCondition
(
c43509019
.
cbcon
)
...
...
@@ -20,14 +20,14 @@ end
function
c43509019
.
cbtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
bt
=
Duel
.
GetAttackTarget
()
if
Duel
.
CheckEvent
(
EVENT_
BE_BATTLE_TARGET
)
and
bt
:
IsFaceup
()
and
bt
:
IsLevelBelow
(
4
)
and
bt
:
IsType
(
TYPE_TOON
)
if
Duel
.
CheckEvent
(
EVENT_
ATTACK_ANNOUNCE
)
and
bt
and
bt
:
IsFaceup
()
and
bt
:
IsLevelBelow
(
4
)
and
bt
:
IsType
(
TYPE_TOON
)
and
bt
:
GetControler
()
==
e
:
GetHandlerPlayer
()
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
43509019
,
1
))
then
e
:
SetLabel
(
1
)
else
e
:
SetLabel
(
0
)
end
end
function
c43509019
.
cbcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bt
=
eg
:
GetFirs
t
()
return
bt
:
IsFaceup
()
and
bt
:
IsLevelBelow
(
4
)
and
bt
:
IsType
(
TYPE_TOON
)
and
bt
:
GetControler
()
==
e
:
GetHandlerPlayer
()
local
bt
=
Duel
.
GetAttackTarge
t
()
return
bt
and
bt
:
IsFaceup
()
and
bt
:
IsLevelBelow
(
4
)
and
bt
:
IsType
(
TYPE_TOON
)
and
bt
:
GetControler
()
==
e
:
GetHandlerPlayer
()
end
function
c43509019
.
cbop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
then
...
...
script/c4779091.lua
View file @
6289d85e
...
...
@@ -87,10 +87,6 @@ end
function
c4779091
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c4779091
.
filter
,
tp
,
0x13
,
0
,
1
,
nil
,
e
,
tp
)
end
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
0x13
)
end
function
c4779091
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c49460512.lua
View file @
6289d85e
...
...
@@ -28,8 +28,6 @@ end
function
c49460512
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c49460512
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c50613779.lua
View file @
6289d85e
...
...
@@ -18,8 +18,6 @@ end
function
c50613779
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
ev
)
end
...
...
script/c55727845.lua
View file @
6289d85e
...
...
@@ -10,32 +10,20 @@ function c55727845.initial_effect(c)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c55727845
.
atkcost
)
e1
:
SetTarget
(
c55727845
.
atktg
1
)
e1
:
SetTarget
(
c55727845
.
atktg
)
e1
:
SetOperation
(
c55727845
.
atkop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
55727845
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c55727845
.
atkcost
)
e2
:
SetTarget
(
c55727845
.
atktg2
)
e2
:
SetOperation
(
c55727845
.
atkop
)
c
:
RegisterEffect
(
e2
)
end
function
c55727845
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c55727845
.
atktg
1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c55727845
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
at
=
Duel
.
GetAttackTarget
()
if
chk
==
0
then
return
at
and
at
:
IsFaceup
()
and
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
end
if
chk
==
0
then
return
((
at
and
at
:
IsFaceup
()
and
Duel
.
GetAttacker
()
==
e
:
GetHandler
())
or
at
==
e
:
GetHandler
())
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
end
Duel
.
SetTargetCard
(
at
)
end
function
c55727845
.
atktg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
end
Duel
.
SetTargetCard
(
Duel
.
GetAttacker
())
end
function
c55727845
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
...
...
script/c62476197.lua
View file @
6289d85e
...
...
@@ -23,8 +23,6 @@ end
function
c62476197
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
400
)
end
...
...
script/c63211608.lua
View file @
6289d85e
...
...
@@ -44,8 +44,6 @@ end
function
c63211608
.
sumtg
(
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
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c63211608
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c64262809.lua
View file @
6289d85e
...
...
@@ -48,10 +48,6 @@ end
function
c64262809
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c64262809
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c67757079.lua
View file @
6289d85e
...
...
@@ -43,10 +43,6 @@ end
function
c67757079
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c67757079
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c69937550.lua
View file @
6289d85e
...
...
@@ -41,7 +41,7 @@ end
function
c69937550
.
cbcondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bt
=
eg
:
GetFirst
()
return
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
IsSetCard
(
0x34
)
and
bt
:
GetControler
()
==
c
:
GetControler
()
return
r
~=
REASON_REPLACE
and
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
IsSetCard
(
0x34
)
and
bt
:
GetControler
()
==
c
:
GetControler
()
end
function
c69937550
.
cboperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeAttackTarget
(
e
:
GetHandler
())
...
...
script/c76080032.lua
View file @
6289d85e
...
...
@@ -50,10 +50,8 @@ function c76080032.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c76080032
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c76080032
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c76080032
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
ShuffleHand
(
tp
)
end
function
c76080032
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c77972406.lua
View file @
6289d85e
...
...
@@ -4,15 +4,15 @@ function c77972406.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_
BE_BATTLE_TARGET
)
e1
:
SetCode
(
EVENT_
ATTACK_ANNOUNCE
)
e1
:
SetCondition
(
c77972406
.
condition
)
e1
:
SetTarget
(
c77972406
.
target
)
e1
:
SetOperation
(
c77972406
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c77972406
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirs
t
()
return
tc
:
IsControler
(
tp
)
and
tc
:
IsFaceup
()
and
tc
:
IsSetCard
(
0x50
)
local
tc
=
Duel
.
GetAttackTarge
t
()
return
tc
and
tc
:
IsControler
(
tp
)
and
tc
:
IsFaceup
()
and
tc
:
IsSetCard
(
0x50
)
end
function
c77972406
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tg
=
Duel
.
GetAttacker
()
...
...
script/c79473793.lua
View file @
6289d85e
...
...
@@ -45,7 +45,7 @@ end
function
c79473793
.
cbcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bt
=
eg
:
GetFirst
()
return
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
GetControler
()
==
c
:
GetControler
()
return
r
~=
REASON_REPLACE
and
c
~=
bt
and
bt
:
IsFaceup
()
and
bt
:
GetControler
()
==
c
:
GetControler
()
end
function
c79473793
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToGraveAsCost
()
...
...
script/c81336148.lua
View file @
6289d85e
...
...
@@ -25,8 +25,6 @@ end
function
c81336148
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c81336148
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c87008374.lua
View file @
6289d85e
...
...
@@ -52,10 +52,8 @@ function c87008374.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c87008374
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c87008374
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c87008374
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
ShuffleHand
(
tp
)
end
function
c87008374
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c87997872.lua
View file @
6289d85e
...
...
@@ -44,9 +44,8 @@ end
function
c87997872
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ShuffleHand
(
tp
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_DECK
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
...
...
script/c89181369.lua
View file @
6289d85e
...
...
@@ -43,6 +43,7 @@ function c89181369.activate(e,tp,eg,ep,ev,re,r,rp)
local
rg
=
Duel
.
GetMatchingGroup
(
c89181369
.
rmfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
rg
:
RemoveCard
(
tc
)
if
rg
:
CheckWithSumEqual
(
Card
.
GetLevel
,
tc
:
GetLevel
(),
1
,
99
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
rm
=
rg
:
SelectWithSumEqual
(
tp
,
Card
.
GetLevel
,
tc
:
GetLevel
(),
1
,
99
)
Duel
.
Remove
(
rm
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
...
...
script/c89235196.lua
View file @
6289d85e
...
...
@@ -16,11 +16,9 @@ function c89235196.cfilter(c)
end
function
c89235196
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c89235196
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c89235196
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
ShuffleHand
(
tp
)
end
function
c89235196
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
...
script/c89258906.lua
View file @
6289d85e
...
...
@@ -29,8 +29,6 @@ end
function
c89258906
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c89258906
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c90011152.lua
View file @
6289d85e
...
...
@@ -33,7 +33,7 @@ function c90011152.atcon(e)
return
Duel
.
IsExistingMatchingCard
(
c90011152
.
cfilter
,
e
:
GetHandler
():
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c90011152
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0xf
)
and
c
:
IsAbleToGrave
()
return
c
:
IsSetCard
(
0xf
)
and
c
:
IsAbleToGrave
AsCost
()
end
function
c90011152
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c90011152
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
...
...
script/c90502999.lua
View file @
6289d85e
...
...
@@ -18,7 +18,6 @@ end
function
c90502999
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
+
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
>
1
end
local
dis
=
Duel
.
SelectDisableField
(
tp
,
2
,
LOCATION_MZONE
,
LOCATION_MZONE
,
0
)
Debug
.
Message
(
dis
)
e
:
SetLabel
(
dis
)
end
function
c90502999
.
disop
(
e
,
tp
)
...
...
script/c92377303.lua
View file @
6289d85e
...
...
@@ -37,9 +37,8 @@ end
function
c92377303
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ShuffleHand
(
tp
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_DECK
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
...
...
script/c94573223.lua
View file @
6289d85e
...
...
@@ -35,10 +35,8 @@ function c94573223.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c94573223
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c94573223
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c94573223
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
ShuffleHand
(
tp
)
end
function
c94573223
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
script/c94656263.lua
View file @
6289d85e
...
...
@@ -27,8 +27,6 @@ end
function
c94656263
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c94656263
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c97940434.lua
View file @
6289d85e
...
...
@@ -29,8 +29,6 @@ function c97940434.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function
c97940434
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
ConfirmCards
(
1
-
tp
,
e
:
GetHandler
())
Duel
.
ShuffleHand
(
tp
)
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
,
e
:
GetHandler
())
end
function
c97940434
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
script/utility.lua
View file @
6289d85e
...
...
@@ -159,7 +159,7 @@ function Auxiliary.AddSynchroProcedure2(c,f1,f2)
end
function
Auxiliary
.
AddXyzProcedure
(
c
,
f
,
ct
,
alterf
,
desc
,
maxct
)
if
c
.
xyz_filter
==
nil
then
local
code
=
c
:
GetOriginalCode
(
true
)
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
mt
.
xyz_filter
=
f
mt
.
xyz_count
=
ct
...
...
@@ -257,7 +257,7 @@ function Auxiliary.FConditionCheckF(c,chkf)
end
function
Auxiliary
.
AddFusionProcCode2
(
c
,
code1
,
code2
,
sub
,
insf
)
if
c
.
material_count
==
nil
then
local
code
=
c
:
GetOriginalCode
(
true
)
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
mt
.
material_count
=
2
mt
.
material
=
{
code1
,
code2
}
...
...
@@ -329,10 +329,10 @@ function Auxiliary.FOperationCode2(code1,code2,sub,insf)
end
function
Auxiliary
.
AddFusionProcCode3
(
c
,
code1
,
code2
,
code3
,
sub
,
insf
)
if
c
.
material_count
==
nil
then
local
code
=
c
:
GetOriginalCode
(
true
)
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
mt
.
material_count
=
3
mt
.
material
=
{
code1
,
code2
,
code
2
}
mt
.
material
=
{
code1
,
code2
,
code
3
}
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -424,7 +424,7 @@ function Auxiliary.FOperationCode3(code1,code2,code3,sub,insf)
end
function
Auxiliary
.
AddFusionProcCode4
(
c
,
code1
,
code2
,
code3
,
code4
,
sub
,
insf
)
if
c
.
material_count
==
nil
then
local
code
=
c
:
GetOriginalCode
(
true
)
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
mt
.
material_count
=
4
mt
.
material
=
{
code1
,
code2
,
code3
,
code4
}
...
...
@@ -530,19 +530,19 @@ function Auxiliary.FOperationCode4(code1,code2,code3,code4,sub,insf)
Duel
.
SetFusionMaterial
(
g1
)
end
end
function
Auxiliary
.
AddFusionProcCodeFun
(
c
,
code
,
f
,
cc
,
sub
,
insf
)
function
Auxiliary
.
AddFusionProcCodeFun
(
c
,
code
1
,
f
,
cc
,
sub
,
insf
)
if
c
.
material_count
==
nil
then
local
code
=
c
:
GetOriginalCode
(
true
)
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
mt
.
material_count
=
1
mt
.
material
=
{
code
}
mt
.
material
=
{
code
1
}
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e1
:
SetCondition
(
Auxiliary
.
FConditionCodeFun
(
code
,
f
,
cc
,
sub
,
insf
))
e1
:
SetOperation
(
Auxiliary
.
FOperationCodeFun
(
code
,
f
,
cc
,
sub
,
insf
))
e1
:
SetCondition
(
Auxiliary
.
FConditionCodeFun
(
code
1
,
f
,
cc
,
sub
,
insf
))
e1
:
SetOperation
(
Auxiliary
.
FOperationCodeFun
(
code
1
,
f
,
cc
,
sub
,
insf
))
c
:
RegisterEffect
(
e1
)
end
function
Auxiliary
.
FConditionFilterCF
(
c
,
g2
,
cc
)
...
...
@@ -685,19 +685,19 @@ function Auxiliary.FOperationFun2(f1,f2,insf)
Duel
.
SetFusionMaterial
(
g1
)
end
end
function
Auxiliary
.
AddFusionProcCodeRep
(
c
,
code
,
cc
,
sub
,
insf
)
function
Auxiliary
.
AddFusionProcCodeRep
(
c
,
code
1
,
cc
,
sub
,
insf
)
if
c
.
material_count
==
nil
then
local
code
=
c
:
GetOriginalCode
(
true
)
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
mt
.
material_count
=
1
mt
.
material
=
{
code
}
mt
.
material
=
{
code
1
}
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e1
:
SetCondition
(
Auxiliary
.
FConditionCodeRep
(
code
,
cc
,
sub
,
insf
))
e1
:
SetOperation
(
Auxiliary
.
FOperationCodeRep
(
code
,
cc
,
sub
,
insf
))
e1
:
SetCondition
(
Auxiliary
.
FConditionCodeRep
(
code
1
,
cc
,
sub
,
insf
))
e1
:
SetOperation
(
Auxiliary
.
FOperationCodeRep
(
code
1
,
cc
,
sub
,
insf
))
c
:
RegisterEffect
(
e1
)
end
function
Auxiliary
.
FConditionFilterCR
(
c
,
code
,
sub
)
...
...
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