Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
REIKAI
ygopro
Commits
1fca74fe
Commit
1fca74fe
authored
Sep 26, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
53576ec9
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
126 additions
and
23 deletions
+126
-23
ocgcore/field.h
ocgcore/field.h
+2
-0
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+1
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+20
-4
ocgcore/operations.cpp
ocgcore/operations.cpp
+75
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+9
-1
script/c12014404.lua
script/c12014404.lua
+1
-0
script/c15341821.lua
script/c15341821.lua
+1
-1
script/c28120197.lua
script/c28120197.lua
+1
-1
script/c31812496.lua
script/c31812496.lua
+1
-1
script/c32933942.lua
script/c32933942.lua
+1
-1
script/c34487429.lua
script/c34487429.lua
+1
-1
script/c37083210.lua
script/c37083210.lua
+1
-1
script/c37104630.lua
script/c37104630.lua
+1
-1
script/c40473581.lua
script/c40473581.lua
+1
-1
script/c41753322.lua
script/c41753322.lua
+1
-1
script/c49551909.lua
script/c49551909.lua
+1
-1
script/c50823978.lua
script/c50823978.lua
+1
-1
script/c52977572.lua
script/c52977572.lua
+1
-1
script/c64145892.lua
script/c64145892.lua
+1
-1
script/c67630339.lua
script/c67630339.lua
+1
-1
script/c706925.lua
script/c706925.lua
+1
-1
script/c74311226.lua
script/c74311226.lua
+1
-1
script/c9603356.lua
script/c9603356.lua
+1
-1
script/c99861526.lua
script/c99861526.lua
+1
-1
No files found.
ocgcore/field.h
View file @
1fca74fe
...
@@ -439,6 +439,7 @@ public:
...
@@ -439,6 +439,7 @@ public:
int32
flip_summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
);
int32
flip_summon
(
uint16
step
,
uint8
sumplayer
,
card
*
target
);
int32
mset
(
uint16
step
,
uint8
setplayer
,
card
*
ptarget
,
effect
*
proc
,
uint8
ignore_count
);
int32
mset
(
uint16
step
,
uint8
setplayer
,
card
*
ptarget
,
effect
*
proc
,
uint8
ignore_count
);
int32
sset
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
card
*
ptarget
);
int32
sset
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
card
*
ptarget
);
int32
sset_g
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
group
*
ptarget
);
int32
special_summon_rule
(
uint16
step
,
uint8
sumplayer
,
card
*
target
);
int32
special_summon_rule
(
uint16
step
,
uint8
sumplayer
,
card
*
target
);
int32
special_summon_step
(
uint16
step
,
group
*
targets
,
card
*
target
);
int32
special_summon_step
(
uint16
step
,
group
*
targets
,
card
*
target
);
int32
special_summon
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets
);
int32
special_summon
(
uint16
step
,
effect
*
reason_effect
,
uint8
reason_player
,
group
*
targets
);
...
@@ -584,6 +585,7 @@ public:
...
@@ -584,6 +585,7 @@ public:
#define PROCESSOR_MSET 64
#define PROCESSOR_MSET 64
#define PROCESSOR_SSET 65
#define PROCESSOR_SSET 65
#define PROCESSOR_SPSUMMON_STEP 66
#define PROCESSOR_SPSUMMON_STEP 66
#define PROCESSOR_SSET_G 67
#define PROCESSOR_DRAW 70
#define PROCESSOR_DRAW 70
#define PROCESSOR_DAMAGE 71
#define PROCESSOR_DAMAGE 71
#define PROCESSOR_RECOVER 72
#define PROCESSOR_RECOVER 72
...
...
ocgcore/libcard.cpp
View file @
1fca74fe
...
@@ -1270,6 +1270,7 @@ int32 scriptlib::card_is_chain_attackable(lua_State *L) {
...
@@ -1270,6 +1270,7 @@ int32 scriptlib::card_is_chain_attackable(lua_State *L) {
card
*
attacker
=
pduel
->
game_field
->
core
.
attacker
;
card
*
attacker
=
pduel
->
game_field
->
core
.
attacker
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
if
(
pduel
->
game_field
->
core
.
effect_damage_step
||
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
||
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
||
attacker
->
current
.
controler
!=
pduel
->
game_field
->
infos
.
turn_player
||
attacker
->
fieldid_r
!=
pduel
->
game_field
->
core
.
pre_field
[
0
]
||
attacker
->
fieldid_r
!=
pduel
->
game_field
->
core
.
pre_field
[
0
]
||
!
attacker
->
is_capable_attack_announce
(
pduel
->
game_field
->
infos
.
turn_player
)
||
!
attacker
->
is_capable_attack_announce
(
pduel
->
game_field
->
infos
.
turn_player
)
||
attacker
->
announce_count
>=
ac
)
{
||
attacker
->
announce_count
>=
ac
)
{
...
...
ocgcore/libduel.cpp
View file @
1fca74fe
...
@@ -288,7 +288,6 @@ int32 scriptlib::duel_setm(lua_State *L) {
...
@@ -288,7 +288,6 @@ int32 scriptlib::duel_setm(lua_State *L) {
int32
scriptlib
::
duel_sets
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_sets
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_action_permission
(
L
);
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
uint32
playerid
=
lua_tointeger
(
L
,
1
);
uint32
playerid
=
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
return
0
;
...
@@ -297,9 +296,21 @@ int32 scriptlib::duel_sets(lua_State *L) {
...
@@ -297,9 +296,21 @@ int32 scriptlib::duel_sets(lua_State *L) {
toplayer
=
lua_tointeger
(
L
,
3
);
toplayer
=
lua_tointeger
(
L
,
3
);
if
(
toplayer
!=
0
&&
toplayer
!=
1
)
if
(
toplayer
!=
0
&&
toplayer
!=
1
)
toplayer
=
playerid
;
toplayer
=
playerid
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
pcard
=
0
;
duel
*
pduel
=
pcard
->
pduel
;
group
*
pgroup
=
0
;
pduel
->
game_field
->
add_process
(
PROCESSOR_SSET
,
0
,
0
,
(
group
*
)
pcard
,
playerid
,
toplayer
);
duel
*
pduel
=
0
;
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
2
,
TRUE
))
{
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
pduel
=
pcard
->
pduel
;
}
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
,
TRUE
))
{
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
2
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
if
(
pcard
)
pduel
->
game_field
->
add_process
(
PROCESSOR_SSET
,
0
,
0
,
(
group
*
)
pcard
,
playerid
,
toplayer
);
else
pduel
->
game_field
->
add_process
(
PROCESSOR_SSET_G
,
0
,
0
,
pgroup
,
playerid
,
toplayer
);
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_create_token
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_create_token
(
lua_State
*
L
)
{
...
@@ -1128,6 +1139,11 @@ int32 scriptlib::duel_change_battle_damage(lua_State *L) {
...
@@ -1128,6 +1139,11 @@ int32 scriptlib::duel_change_battle_damage(lua_State *L) {
int32
dam
=
lua_tointeger
(
L
,
2
);
int32
dam
=
lua_tointeger
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
return
0
;
int32
check
=
TRUE
;
if
(
lua_gettop
(
L
)
>=
3
)
check
=
lua_toboolean
(
L
,
3
);
if
(
check
&&
dam
==
0
)
return
0
;
pduel
->
game_field
->
core
.
battle_damage
[
playerid
]
=
dam
;
pduel
->
game_field
->
core
.
battle_damage
[
playerid
]
=
dam
;
return
0
;
return
0
;
}
}
...
...
ocgcore/operations.cpp
View file @
1fca74fe
...
@@ -800,6 +800,7 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe
...
@@ -800,6 +800,7 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe
return
TRUE
;
return
TRUE
;
pcard
->
filter_disable_related_cards
();
pcard
->
filter_disable_related_cards
();
move_to_field
(
pcard
,
playerid
,
playerid
,
LOCATION_MZONE
,
pcard
->
current
.
position
);
move_to_field
(
pcard
,
playerid
,
playerid
,
LOCATION_MZONE
,
pcard
->
current
.
position
);
pcard
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
return
FALSE
;
return
FALSE
;
}
}
case
1
:
{
case
1
:
{
...
@@ -852,6 +853,8 @@ int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_play
...
@@ -852,6 +853,8 @@ int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_play
pcard2
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
pcard2
->
reset
(
RESET_CONTROL
,
RESET_EVENT
);
pcard1
->
filter_disable_related_cards
();
pcard1
->
filter_disable_related_cards
();
pcard2
->
filter_disable_related_cards
();
pcard2
->
filter_disable_related_cards
();
pcard1
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
pcard2
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
adjust_instant
();
adjust_instant
();
return
FALSE
;
return
FALSE
;
}
}
...
@@ -1728,6 +1731,78 @@ int32 field::sset(uint16 step, uint8 setplayer, uint8 toplayer, card * target) {
...
@@ -1728,6 +1731,78 @@ int32 field::sset(uint16 step, uint8 setplayer, uint8 toplayer, card * target) {
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
sset_g
(
uint16
step
,
uint8
setplayer
,
uint8
toplayer
,
group
*
ptarget
)
{
switch
(
step
)
{
case
0
:
{
card_set
*
set_cards
=
new
card_set
;
core
.
operated_set
.
clear
();
for
(
auto
cit
=
ptarget
->
container
.
begin
();
cit
!=
ptarget
->
container
.
end
();
++
cit
)
{
card
*
target
=
*
cit
;
if
((
!
(
target
->
data
.
type
&
TYPE_FIELD
)
&&
get_useable_count
(
toplayer
,
LOCATION_SZONE
,
setplayer
,
LOCATION_REASON_TOFIELD
)
<=
0
)
||
(
target
->
data
.
type
&
TYPE_MONSTER
&&
!
target
->
is_affected_by_effect
(
EFFECT_MONSTER_SSET
))
||
(
target
->
current
.
location
==
LOCATION_SZONE
)
||
(
!
is_player_can_sset
(
setplayer
,
target
))
||
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_SSET
)))
{
continue
;
}
set_cards
->
insert
(
target
);
}
if
(
set_cards
->
empty
())
{
delete
set_cards
;
returns
.
ivalue
[
0
]
=
0
;
return
TRUE
;
}
core
.
phase_action
=
TRUE
;
core
.
units
.
begin
()
->
ptarget
=
(
group
*
)
set_cards
;
return
FALSE
;
}
case
1
:
{
card_set
*
set_cards
=
(
card_set
*
)
ptarget
;
card
*
target
=
*
set_cards
->
begin
();
target
->
enable_field_effect
(
FALSE
);
move_to_field
(
target
,
setplayer
,
toplayer
,
LOCATION_SZONE
,
POS_FACEDOWN
,
FALSE
);
return
FALSE
;
}
case
2
:
{
card_set
*
set_cards
=
(
card_set
*
)
ptarget
;
card
*
target
=
*
set_cards
->
begin
();
target
->
set_status
(
STATUS_SET_TURN
,
TRUE
);
if
(
target
->
data
.
type
&
TYPE_MONSTER
)
{
effect
*
peffect
=
target
->
is_affected_by_effect
(
EFFECT_MONSTER_SSET
);
int32
type_val
=
peffect
->
get_value
();
peffect
=
pduel
->
new_effect
();
peffect
->
owner
=
target
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
code
=
EFFECT_CHANGE_TYPE
;
peffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
peffect
->
value
=
type_val
;
target
->
add_effect
(
peffect
);
}
pduel
->
write_buffer8
(
MSG_SET
);
pduel
->
write_buffer32
(
target
->
data
.
code
);
pduel
->
write_buffer8
(
target
->
current
.
controler
);
pduel
->
write_buffer8
(
target
->
current
.
location
);
pduel
->
write_buffer8
(
target
->
current
.
sequence
);
pduel
->
write_buffer8
(
target
->
current
.
position
);
core
.
operated_set
.
insert
(
target
);
set_cards
->
erase
(
target
);
if
(
!
set_cards
->
empty
())
core
.
units
.
begin
()
->
step
=
0
;
else
delete
set_cards
;
return
FALSE
;
}
case
3
:
{
returns
.
ivalue
[
0
]
=
core
.
operated_set
.
size
();
adjust_instant
();
raise_event
(
&
core
.
operated_set
,
EVENT_SSET
,
0
,
0
,
setplayer
,
setplayer
,
0
);
process_instant_event
();
adjust_all
();
return
TRUE
;
}
}
return
TRUE
;
}
int32
field
::
special_summon_rule
(
uint16
step
,
uint8
sumplayer
,
card
*
target
)
{
int32
field
::
special_summon_rule
(
uint16
step
,
uint8
sumplayer
,
card
*
target
)
{
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
...
...
ocgcore/processor.cpp
View file @
1fca74fe
...
@@ -395,6 +395,14 @@ int32 field::process() {
...
@@ -395,6 +395,14 @@ int32 field::process() {
core
.
units
.
begin
()
->
step
++
;
core
.
units
.
begin
()
->
step
++
;
return
pduel
->
bufferlen
;
return
pduel
->
bufferlen
;
}
}
case
PROCESSOR_SSET_G
:
{
if
(
sset_g
(
it
->
step
,
it
->
arg1
,
it
->
arg2
,
it
->
ptarget
))
{
pduel
->
lua
->
add_param
(
returns
.
ivalue
[
0
],
PARAM_TYPE_INT
);
core
.
units
.
pop_front
();
}
else
core
.
units
.
begin
()
->
step
++
;
return
pduel
->
bufferlen
;
}
case
PROCESSOR_DRAW
:
{
case
PROCESSOR_DRAW
:
{
if
(
draw
(
it
->
step
,
it
->
peffect
,
it
->
arg1
,
(
it
->
arg2
>>
28
)
&
0xf
,
(
it
->
arg2
>>
24
)
&
0xf
,
it
->
arg2
&
0xffffff
))
if
(
draw
(
it
->
step
,
it
->
peffect
,
it
->
arg1
,
(
it
->
arg2
>>
28
)
&
0xf
,
(
it
->
arg2
>>
24
)
&
0xf
,
it
->
arg2
&
0xffffff
))
core
.
units
.
pop_front
();
core
.
units
.
pop_front
();
...
@@ -3497,7 +3505,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3497,7 +3505,7 @@ int32 field::process_battle_command(uint16 step) {
return
TRUE
;
return
TRUE
;
if
(
core
.
chain_attack
)
{
if
(
core
.
chain_attack
)
{
if
(
core
.
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
if
(
core
.
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
||
!
core
.
attacker
->
is_capable_attack_announce
(
infos
.
turn_player
))
||
(
core
.
attacker
->
current
.
controler
!=
infos
.
turn_player
)
||
!
core
.
attacker
->
is_capable_attack_announce
(
infos
.
turn_player
))
return
FALSE
;
return
FALSE
;
if
(
core
.
chain_attack_target
)
{
if
(
core
.
chain_attack_target
)
{
if
(
!
core
.
chain_attack_target
->
is_capable_be_battle_target
(
core
.
attacker
)
if
(
!
core
.
chain_attack_target
->
is_capable_be_battle_target
(
core
.
attacker
)
...
...
script/c12014404.lua
View file @
1fca74fe
...
@@ -33,6 +33,7 @@ function c12014404.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -33,6 +33,7 @@ function c12014404.operation(e,tp,eg,ep,ev,re,r,rp)
elseif
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
then
elseif
c
:
IsPosition
(
POS_FACEUP_ATTACK
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EVENT_BATTLE_START
)
e1
:
SetCode
(
EVENT_BATTLE_START
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
c12014404
.
atkop
)
e1
:
SetOperation
(
c12014404
.
atkop
)
...
...
script/c15341821.lua
View file @
1fca74fe
...
@@ -15,7 +15,7 @@ function c15341821.condition(e,tp,eg,ep,ev,re,r,rp)
...
@@ -15,7 +15,7 @@ function c15341821.condition(e,tp,eg,ep,ev,re,r,rp)
return
not
e
:
GetHandler
():
IsReason
(
REASON_RETURN
)
return
not
e
:
GetHandler
():
IsReason
(
REASON_RETURN
)
end
end
function
c15341821
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c15341821
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
0
,
0
)
end
end
...
...
script/c28120197.lua
View file @
1fca74fe
...
@@ -18,5 +18,5 @@ function c28120197.dcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -18,5 +18,5 @@ function c28120197.dcon(e,tp,eg,ep,ev,re,r,rp)
return
eg
:
GetFirst
():
IsDefencePos
()
and
eg
:
GetFirst
():
IsRace
(
RACE_ROCK
)
return
eg
:
GetFirst
():
IsDefencePos
()
and
eg
:
GetFirst
():
IsRace
(
RACE_ROCK
)
end
end
function
c28120197
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c28120197
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
Duel
.
GetBattleDamage
(
ep
)
*
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
*
2
)
end
end
script/c31812496.lua
View file @
1fca74fe
...
@@ -14,5 +14,5 @@ function c31812496.dcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -14,5 +14,5 @@ function c31812496.dcon(e,tp,eg,ep,ev,re,r,rp)
return
ep
~=
tp
and
Duel
.
GetAttackTarget
()
==
c
return
ep
~=
tp
and
Duel
.
GetAttackTarget
()
==
c
end
end
function
c31812496
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c31812496
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
Duel
.
GetBattleDamage
(
ep
)
*
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
*
2
)
end
end
script/c32933942.lua
View file @
1fca74fe
...
@@ -48,5 +48,5 @@ function c32933942.rdcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -48,5 +48,5 @@ function c32933942.rdcon(e,tp,eg,ep,ev,re,r,rp)
and
c
:
GetEffectCount
(
EFFECT_DIRECT_ATTACK
)
<
2
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
and
c
:
GetEffectCount
(
EFFECT_DIRECT_ATTACK
)
<
2
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
end
end
function
c32933942
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c32933942
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
Duel
.
GetBattleDamage
(
ep
)
/
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
/
2
)
end
end
\ No newline at end of file
script/c34487429.lua
View file @
1fca74fe
...
@@ -134,7 +134,7 @@ function c34487429.rdcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -134,7 +134,7 @@ function c34487429.rdcon(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c34487429
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c34487429
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
())
then
if
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
())
then
Duel
.
ChangeBattleDamage
(
tp
,
Duel
.
GetBattleDamage
(
tp
)
/
2
)
Duel
.
ChangeBattleDamage
(
tp
,
ev
/
2
)
e
:
GetHandler
():
RegisterFlagEffect
(
34487429
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
34487429
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
end
script/c37083210.lua
View file @
1fca74fe
...
@@ -40,7 +40,7 @@ function c37083210.dcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -40,7 +40,7 @@ function c37083210.dcon(e,tp,eg,ep,ev,re,r,rp)
return
ep
~=
tp
and
Duel
.
GetAttackTarget
()
==
c
return
ep
~=
tp
and
Duel
.
GetAttackTarget
()
==
c
end
end
function
c37083210
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c37083210
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
Duel
.
GetBattleDamage
(
ep
)
*
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
*
2
)
end
end
function
c37083210
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c37083210
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetAttacker
():
IsRelateToBattle
()
then
if
Duel
.
GetAttacker
():
IsRelateToBattle
()
then
...
...
script/c37104630.lua
View file @
1fca74fe
...
@@ -32,7 +32,7 @@ function c37104630.desfilter(c)
...
@@ -32,7 +32,7 @@ function c37104630.desfilter(c)
end
end
function
c37104630
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c37104630
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
c37104630
.
desfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
c37104630
.
desfilter
(
chkc
)
end
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c37104630
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c37104630
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
...
...
script/c40473581.lua
View file @
1fca74fe
...
@@ -31,7 +31,7 @@ function c40473581.dcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -31,7 +31,7 @@ function c40473581.dcon(e,tp,eg,ep,ev,re,r,rp)
return
ep
~=
tp
and
(
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
())
return
ep
~=
tp
and
(
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
())
end
end
function
c40473581
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40473581
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
Duel
.
GetBattleDamage
(
ep
)
/
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
/
2
)
end
end
function
c40473581
.
retreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40473581
.
retreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
script/c41753322.lua
View file @
1fca74fe
...
@@ -83,5 +83,5 @@ function c41753322.dcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -83,5 +83,5 @@ function c41753322.dcon(e,tp,eg,ep,ev,re,r,rp)
return
ep
~=
tp
and
Duel
.
GetAttackTarget
()
==
c
return
ep
~=
tp
and
Duel
.
GetAttackTarget
()
==
c
end
end
function
c41753322
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c41753322
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
Duel
.
GetBattleDamage
(
ep
)
*
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
*
2
)
end
end
script/c49551909.lua
View file @
1fca74fe
...
@@ -82,5 +82,5 @@ function c49551909.damcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -82,5 +82,5 @@ function c49551909.damcon(e,tp,eg,ep,ev,re,r,rp)
return
ec
and
ep
==
tp
and
(
Duel
.
GetAttacker
()
==
ec
or
Duel
.
GetAttackTarget
()
==
ec
)
return
ec
and
ep
==
tp
and
(
Duel
.
GetAttacker
()
==
ec
or
Duel
.
GetAttackTarget
()
==
ec
)
end
end
function
c49551909
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49551909
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
1
-
tp
,
ev
)
Duel
.
ChangeBattleDamage
(
1
-
tp
,
ev
,
false
)
end
end
script/c50823978.lua
View file @
1fca74fe
...
@@ -14,5 +14,5 @@ function c50823978.dcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -14,5 +14,5 @@ function c50823978.dcon(e,tp,eg,ep,ev,re,r,rp)
return
ep
~=
tp
and
c
==
Duel
.
GetAttacker
()
and
Duel
.
GetAttackTarget
()
==
nil
return
ep
~=
tp
and
c
==
Duel
.
GetAttacker
()
and
Duel
.
GetAttackTarget
()
==
nil
end
end
function
c50823978
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c50823978
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
Duel
.
GetBattleDamage
(
ep
)
*
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
*
2
)
end
end
script/c52977572.lua
View file @
1fca74fe
...
@@ -62,5 +62,5 @@ function c52977572.rdcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -62,5 +62,5 @@ function c52977572.rdcon(e,tp,eg,ep,ev,re,r,rp)
and
c
:
GetEffectCount
(
EFFECT_DIRECT_ATTACK
)
<
2
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
and
c
:
GetEffectCount
(
EFFECT_DIRECT_ATTACK
)
<
2
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
end
end
function
c52977572
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c52977572
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
Duel
.
GetBattleDamage
(
ep
)
/
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
/
2
)
end
end
script/c64145892.lua
View file @
1fca74fe
...
@@ -13,5 +13,5 @@ function c64145892.rdcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -13,5 +13,5 @@ function c64145892.rdcon(e,tp,eg,ep,ev,re,r,rp)
return
ep
==
tp
and
(
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
())
return
ep
==
tp
and
(
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
())
end
end
function
c64145892
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64145892
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
Duel
.
GetBattleDamage
(
ep
)
/
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
/
2
)
end
end
script/c67630339.lua
View file @
1fca74fe
...
@@ -50,7 +50,7 @@ function c67630339.clear(e,tp,eg,ep,ev,re,r,rp)
...
@@ -50,7 +50,7 @@ function c67630339.clear(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c67630339
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c67630339
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetAttackTarget
()
==
nil
and
c67630339
[
tp
]
==
2
return
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetAttackTarget
()
==
nil
and
c67630339
[
tp
]
==
2
and
c67630339
[
2
]:
GetFlagEffect
(
67630339
)
~=
0
and
c67630339
[
2
]:
GetFlagEffect
(
67630339
)
~=
0
and
Duel
.
GetAttacker
()
~=
c67630339
[
2
]
end
end
function
c67630339
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c67630339
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
a
=
Duel
.
GetAttacker
()
...
...
script/c706925.lua
View file @
1fca74fe
...
@@ -51,7 +51,7 @@ function c706925.desfilter(c)
...
@@ -51,7 +51,7 @@ function c706925.desfilter(c)
end
end
function
c706925
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c706925
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
c706925
.
desfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
c706925
.
desfilter
(
chkc
)
end
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c706925
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c706925
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
...
...
script/c74311226.lua
View file @
1fca74fe
...
@@ -30,7 +30,7 @@ function c74311226.thfilter(c)
...
@@ -30,7 +30,7 @@ function c74311226.thfilter(c)
return
not
c
:
IsCode
(
74311226
)
and
c
:
IsRace
(
RACE_SEASERPENT
)
and
c
:
IsAbleToHand
()
return
not
c
:
IsCode
(
74311226
)
and
c
:
IsRace
(
RACE_SEASERPENT
)
and
c
:
IsAbleToHand
()
end
end
function
c74311226
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c74311226
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c74311226
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c74311226
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
...
...
script/c9603356.lua
View file @
1fca74fe
...
@@ -50,5 +50,5 @@ function c9603356.rdcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -50,5 +50,5 @@ function c9603356.rdcon(e,tp,eg,ep,ev,re,r,rp)
return
ep
~=
tp
and
e
:
GetHandler
()
==
Duel
.
GetAttacker
()
return
ep
~=
tp
and
e
:
GetHandler
()
==
Duel
.
GetAttacker
()
end
end
function
c9603356
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c9603356
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
Duel
.
GetBattleDamage
(
ep
)
/
2
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
/
2
)
end
end
script/c99861526.lua
View file @
1fca74fe
...
@@ -39,4 +39,4 @@ function c99861526.posop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -39,4 +39,4 @@ function c99861526.posop(e,tp,eg,ep,ev,re,r,rp)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
ChangePosition
(
e
:
GetHandler
(),
POS_FACEUP_DEFENCE
)
Duel
.
ChangePosition
(
e
:
GetHandler
(),
POS_FACEUP_DEFENCE
)
end
end
end
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