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
1a165388
Commit
1a165388
authored
Mar 16, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
79dc2d3b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
38 deletions
+82
-38
ocgcore/card.cpp
ocgcore/card.cpp
+4
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+33
-32
script/c11596936.lua
script/c11596936.lua
+1
-1
script/c14785765.lua
script/c14785765.lua
+16
-4
script/c41639001.lua
script/c41639001.lua
+1
-1
script/c51047350.lua
script/c51047350.lua
+27
-0
No files found.
ocgcore/card.cpp
View file @
1a165388
...
@@ -481,6 +481,8 @@ uint32 card::get_ritual_level(card* pcard) {
...
@@ -481,6 +481,8 @@ uint32 card::get_ritual_level(card* pcard) {
uint32
card
::
get_attribute
()
{
uint32
card
::
get_attribute
()
{
if
(
!
(
current
.
location
&
(
LOCATION_MZONE
+
LOCATION_GRAVE
)))
if
(
!
(
current
.
location
&
(
LOCATION_MZONE
+
LOCATION_GRAVE
)))
return
data
.
attribute
;
return
data
.
attribute
;
if
((
current
.
location
==
LOCATION_GRAVE
)
&&
(
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
)))
return
data
.
attribute
;
if
(
temp
.
attribute
!=
0xffffffff
)
if
(
temp
.
attribute
!=
0xffffffff
)
return
temp
.
attribute
;
return
temp
.
attribute
;
effect_set
effects
;
effect_set
effects
;
...
@@ -504,6 +506,8 @@ uint32 card::get_attribute() {
...
@@ -504,6 +506,8 @@ uint32 card::get_attribute() {
uint32
card
::
get_race
()
{
uint32
card
::
get_race
()
{
if
(
!
(
current
.
location
&
(
LOCATION_MZONE
+
LOCATION_GRAVE
)))
if
(
!
(
current
.
location
&
(
LOCATION_MZONE
+
LOCATION_GRAVE
)))
return
data
.
race
;
return
data
.
race
;
if
((
current
.
location
==
LOCATION_GRAVE
)
&&
(
data
.
type
&
(
TYPE_SPELL
+
TYPE_TRAP
)))
return
data
.
race
;
if
(
temp
.
race
!=
0xffffffff
)
if
(
temp
.
race
!=
0xffffffff
)
return
temp
.
race
;
return
temp
.
race
;
effect_set
effects
;
effect_set
effects
;
...
...
ocgcore/processor.cpp
View file @
1a165388
...
@@ -2588,7 +2588,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2588,7 +2588,7 @@ int32 field::process_battle_command(uint16 step) {
}
}
for
(
uint32
i
=
0
;
i
<
5
;
++
i
)
{
for
(
uint32
i
=
0
;
i
<
5
;
++
i
)
{
if
(
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
])
if
(
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
])
core
.
pre_field
[
i
]
=
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
]
->
fieldid
;
core
.
pre_field
[
i
]
=
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
]
->
fieldid
_r
;
else
else
core
.
pre_field
[
i
]
=
0
;
core
.
pre_field
[
i
]
=
0
;
}
}
...
@@ -2597,7 +2597,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2597,7 +2597,7 @@ int32 field::process_battle_command(uint16 step) {
raise_single_event
(
core
.
attacker
,
0
,
EVENT_ATTACK_ANNOUNCE
,
0
,
0
,
0
,
infos
.
turn_player
,
0
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_ATTACK_ANNOUNCE
,
0
,
0
,
0
,
infos
.
turn_player
,
0
);
raise_event
(
core
.
attacker
,
EVENT_ATTACK_ANNOUNCE
,
0
,
0
,
0
,
infos
.
turn_player
,
0
);
raise_event
(
core
.
attacker
,
EVENT_ATTACK_ANNOUNCE
,
0
,
0
,
0
,
infos
.
turn_player
,
0
);
}
}
core
.
units
.
begin
()
->
arg2
=
(
core
.
attacker
->
current
.
controler
<<
16
)
+
core
.
attacker
->
fieldid
;
core
.
units
.
begin
()
->
arg2
=
(
core
.
attacker
->
current
.
controler
<<
16
)
+
core
.
attacker
->
fieldid
_r
;
process_single_event
();
process_single_event
();
process_instant_event
();
process_instant_event
();
core
.
hint_timing
[
infos
.
turn_player
]
=
TIMING_ATTACK
;
core
.
hint_timing
[
infos
.
turn_player
]
=
TIMING_ATTACK
;
...
@@ -2637,10 +2637,10 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2637,10 +2637,10 @@ int32 field::process_battle_command(uint16 step) {
effect
*
peffect
;
effect
*
peffect
;
if
(
peffect
=
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_BP
))
{
if
(
peffect
=
is_player_affected_by_effect
(
infos
.
turn_player
,
EFFECT_SKIP_BP
))
{
reset_phase
(
PHASE_DAMAGE
);
reset_phase
(
PHASE_DAMAGE
);
if
(
core
.
attacker
->
fieldid
==
afid
)
{
if
(
core
.
attacker
->
fieldid
_r
==
afid
)
{
if
(
!
atk_disabled
)
{
if
(
!
atk_disabled
)
{
if
(
core
.
attack_target
)
if
(
core
.
attack_target
)
core
.
attacker
->
attacked_cards
[
core
.
attack_target
->
fieldid
]
=
core
.
attack_target
;
core
.
attacker
->
attacked_cards
[
core
.
attack_target
->
fieldid
_r
]
=
core
.
attack_target
;
else
else
core
.
attacker
->
attacked_cards
[
0
]
=
0
;
core
.
attacker
->
attacked_cards
[
0
]
=
0
;
}
}
...
@@ -2659,16 +2659,16 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2659,16 +2659,16 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
return
FALSE
;
}
}
if
(
atk_disabled
||
!
core
.
attacker
->
is_capable_attack
()
||
core
.
attacker
->
is_status
(
STATUS_ATTACK_CANCELED
)
if
(
atk_disabled
||
!
core
.
attacker
->
is_capable_attack
()
||
core
.
attacker
->
is_status
(
STATUS_ATTACK_CANCELED
)
||
core
.
attacker
->
current
.
controler
!=
acon
||
core
.
attacker
->
fieldid
!=
afid
)
{
||
core
.
attacker
->
current
.
controler
!=
acon
||
core
.
attacker
->
fieldid
_r
!=
afid
)
{
if
(
core
.
attacker
->
fieldid
==
afid
)
{
if
(
core
.
attacker
->
fieldid
_r
==
afid
)
{
if
(
core
.
attack_target
)
if
(
core
.
attack_target
)
core
.
attacker
->
announced_cards
[
core
.
attack_target
->
fieldid
]
=
core
.
attack_target
;
core
.
attacker
->
announced_cards
[
core
.
attack_target
->
fieldid
_r
]
=
core
.
attack_target
;
else
else
core
.
attacker
->
announced_cards
[
0
]
=
0
;
core
.
attacker
->
announced_cards
[
0
]
=
0
;
core
.
attacker
->
announce_count
++
;
core
.
attacker
->
announce_count
++
;
if
(
!
atk_disabled
)
{
if
(
!
atk_disabled
)
{
if
(
core
.
attack_target
)
if
(
core
.
attack_target
)
core
.
attacker
->
attacked_cards
[
core
.
attack_target
->
fieldid
]
=
core
.
attack_target
;
core
.
attacker
->
attacked_cards
[
core
.
attack_target
->
fieldid
_r
]
=
core
.
attack_target
;
else
else
core
.
attacker
->
attacked_cards
[
0
]
=
0
;
core
.
attacker
->
attacked_cards
[
0
]
=
0
;
core
.
attacker
->
attacked_count
++
;
core
.
attacker
->
attacked_count
++
;
...
@@ -2684,8 +2684,8 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2684,8 +2684,8 @@ int32 field::process_battle_command(uint16 step) {
pduel
->
write_buffer8
(
MSG_ATTACK
);
pduel
->
write_buffer8
(
MSG_ATTACK
);
pduel
->
write_buffer32
(
core
.
attacker
->
get_info_location
());
pduel
->
write_buffer32
(
core
.
attacker
->
get_info_location
());
if
(
core
.
sub_attack_target
)
{
if
(
core
.
sub_attack_target
)
{
core
.
attacker
->
announced_cards
[
core
.
sub_attack_target
->
fieldid
]
=
core
.
sub_attack_target
;
core
.
attacker
->
announced_cards
[
core
.
sub_attack_target
->
fieldid
_r
]
=
core
.
sub_attack_target
;
core
.
attacker
->
attacked_cards
[
core
.
sub_attack_target
->
fieldid
]
=
core
.
sub_attack_target
;
core
.
attacker
->
attacked_cards
[
core
.
sub_attack_target
->
fieldid
_r
]
=
core
.
sub_attack_target
;
pduel
->
write_buffer32
(
core
.
sub_attack_target
->
get_info_location
());
pduel
->
write_buffer32
(
core
.
sub_attack_target
->
get_info_location
());
}
else
{
}
else
{
core
.
attacker
->
announced_cards
[
0
]
=
0
;
core
.
attacker
->
announced_cards
[
0
]
=
0
;
...
@@ -2703,7 +2703,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2703,7 +2703,7 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
return
FALSE
;
}
}
uint8
seq
=
core
.
chain_attack_target
->
current
.
sequence
;
uint8
seq
=
core
.
chain_attack_target
->
current
.
sequence
;
if
(
core
.
pre_field
[
seq
]
!=
core
.
chain_attack_target
->
fieldid
)
{
if
(
core
.
pre_field
[
seq
]
!=
core
.
chain_attack_target
->
fieldid
_r
)
{
core
.
units
.
begin
()
->
step
=
-
1
;
core
.
units
.
begin
()
->
step
=
-
1
;
reset_phase
(
PHASE_DAMAGE
);
reset_phase
(
PHASE_DAMAGE
);
return
FALSE
;
return
FALSE
;
...
@@ -2715,7 +2715,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2715,7 +2715,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
units
.
begin
()
->
arg2
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
core
.
units
.
begin
()
->
arg2
=
get_attack_target
(
core
.
attacker
,
&
core
.
select_cards
,
core
.
chain_attack
);
for
(
uint32
i
=
0
;
i
<
5
;
++
i
)
{
for
(
uint32
i
=
0
;
i
<
5
;
++
i
)
{
if
(
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
])
{
if
(
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
])
{
if
(
!
core
.
pre_field
[
i
]
||
core
.
pre_field
[
i
]
!=
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
]
->
fieldid
)
{
if
(
!
core
.
pre_field
[
i
]
||
core
.
pre_field
[
i
]
!=
player
[
1
-
infos
.
turn_player
].
list_mzone
[
i
]
->
fieldid
_r
)
{
rollback
=
true
;
rollback
=
true
;
break
;
break
;
}
}
...
@@ -2732,8 +2732,8 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2732,8 +2732,8 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
->
announce_count
++
;
core
.
attacker
->
announce_count
++
;
core
.
attacker
->
attacked_count
++
;
core
.
attacker
->
attacked_count
++
;
if
(
core
.
attack_target
)
{
if
(
core
.
attack_target
)
{
core
.
attacker
->
announced_cards
[
core
.
attack_target
->
fieldid
]
=
core
.
attack_target
;
core
.
attacker
->
announced_cards
[
core
.
attack_target
->
fieldid
_r
]
=
core
.
attack_target
;
core
.
attacker
->
attacked_cards
[
core
.
attack_target
->
fieldid
]
=
core
.
attack_target
;
core
.
attacker
->
attacked_cards
[
core
.
attack_target
->
fieldid
_r
]
=
core
.
attack_target
;
}
else
{
}
else
{
core
.
attacker
->
announced_cards
[
0
]
=
0
;
core
.
attacker
->
announced_cards
[
0
]
=
0
;
core
.
attacker
->
attacked_cards
[
0
]
=
0
;
core
.
attacker
->
attacked_cards
[
0
]
=
0
;
...
@@ -2761,13 +2761,14 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2761,13 +2761,14 @@ int32 field::process_battle_command(uint16 step) {
}
}
case
11
:
{
case
11
:
{
if
(
returns
.
ivalue
[
0
])
{
if
(
returns
.
ivalue
[
0
])
{
core
.
attack_cancelable
=
FALSE
;
core
.
units
.
begin
()
->
arg1
=
TRUE
;
core
.
units
.
begin
()
->
arg1
=
TRUE
;
core
.
units
.
begin
()
->
step
=
3
;
core
.
units
.
begin
()
->
step
=
3
;
return
FALSE
;
return
FALSE
;
}
}
core
.
attacker
->
announce_count
++
;
core
.
attacker
->
announce_count
++
;
if
(
core
.
attack_target
)
if
(
core
.
attack_target
)
core
.
attacker
->
announced_cards
[
core
.
attack_target
->
fieldid
]
=
core
.
attack_target
;
core
.
attacker
->
announced_cards
[
core
.
attack_target
->
fieldid
_r
]
=
core
.
attack_target
;
else
else
core
.
attacker
->
announced_cards
[
0
]
=
0
;
core
.
attacker
->
announced_cards
[
0
]
=
0
;
core
.
units
.
begin
()
->
step
=
-
1
;
core
.
units
.
begin
()
->
step
=
-
1
;
...
@@ -2788,9 +2789,9 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2788,9 +2789,9 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
=
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
;
core
.
attack_target
=
core
.
sub_attack_target
;
core
.
pre_field
[
0
]
=
core
.
attacker
->
fieldid
;
core
.
pre_field
[
0
]
=
core
.
attacker
->
fieldid
_r
;
if
(
core
.
attack_target
)
if
(
core
.
attack_target
)
core
.
pre_field
[
1
]
=
core
.
attack_target
->
fieldid
;
core
.
pre_field
[
1
]
=
core
.
attack_target
->
fieldid
_r
;
else
else
core
.
pre_field
[
1
]
=
0
;
core
.
pre_field
[
1
]
=
0
;
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_START
,
0
,
0
,
0
,
0
,
0
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_START
,
0
,
0
,
0
,
0
,
0
);
...
@@ -2807,8 +2808,8 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2807,8 +2808,8 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
return
FALSE
;
}
}
case
21
:
{
case
21
:
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid
!=
core
.
pre_field
[
0
]
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid
_r
!=
core
.
pre_field
[
0
]
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
!=
core
.
pre_field
[
1
])))
{
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
_r
!=
core
.
pre_field
[
1
])))
{
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
damage_calculated
=
TRUE
;
core
.
damage_calculated
=
TRUE
;
core
.
units
.
begin
()
->
step
=
30
;
core
.
units
.
begin
()
->
step
=
30
;
...
@@ -2844,7 +2845,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2844,7 +2845,7 @@ int32 field::process_battle_command(uint16 step) {
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_CONFIRM
,
0
,
0
,
0
,
0
,
0
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_CONFIRM
,
0
,
0
,
0
,
0
,
0
);
if
(
core
.
attack_target
)
{
if
(
core
.
attack_target
)
{
if
(
core
.
attack_target
->
temp
.
position
&
POS_FACEDOWN
)
if
(
core
.
attack_target
->
temp
.
position
&
POS_FACEDOWN
)
core
.
pre_field
[
1
]
=
core
.
attack_target
->
fieldid
;
core
.
pre_field
[
1
]
=
core
.
attack_target
->
fieldid
_r
;
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_BATTLE_CONFIRM
,
0
,
0
,
0
,
0
,
1
);
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_BATTLE_CONFIRM
,
0
,
0
,
0
,
0
,
1
);
}
}
raise_event
((
card
*
)
0
,
EVENT_BATTLE_CONFIRM
,
0
,
0
,
0
,
0
,
0
);
raise_event
((
card
*
)
0
,
EVENT_BATTLE_CONFIRM
,
0
,
0
,
0
,
0
,
0
);
...
@@ -2874,15 +2875,15 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2874,15 +2875,15 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
=
core
.
sub_attacker
;
core
.
attacker
=
core
.
sub_attacker
;
core
.
attack_target
=
core
.
sub_attack_target
;
core
.
attack_target
=
core
.
sub_attack_target
;
core
.
units
.
begin
()
->
step
=
20
;
core
.
units
.
begin
()
->
step
=
20
;
core
.
pre_field
[
0
]
=
core
.
attacker
->
fieldid
;
core
.
pre_field
[
0
]
=
core
.
attacker
->
fieldid
_r
;
if
(
core
.
attack_target
)
if
(
core
.
attack_target
)
core
.
pre_field
[
1
]
=
core
.
attack_target
->
fieldid
;
core
.
pre_field
[
1
]
=
core
.
attack_target
->
fieldid
_r
;
else
else
core
.
pre_field
[
1
]
=
0
;
core
.
pre_field
[
1
]
=
0
;
return
FALSE
;
return
FALSE
;
}
}
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid
!=
core
.
pre_field
[
0
]
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid
_r
!=
core
.
pre_field
[
0
]
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
!=
core
.
pre_field
[
1
])))
{
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
_r
!=
core
.
pre_field
[
1
])))
{
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
damage_calculated
=
TRUE
;
core
.
damage_calculated
=
TRUE
;
core
.
units
.
begin
()
->
step
=
30
;
core
.
units
.
begin
()
->
step
=
30
;
...
@@ -2911,8 +2912,8 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2911,8 +2912,8 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
return
FALSE
;
}
}
case
25
:
{
case
25
:
{
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid
!=
core
.
pre_field
[
0
]
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid
_r
!=
core
.
pre_field
[
0
]
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
!=
core
.
pre_field
[
1
])))
{
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
fieldid
_r
!=
core
.
pre_field
[
1
])))
{
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
units
.
begin
()
->
arg1
=
0
;
core
.
damage_calculated
=
TRUE
;
core
.
damage_calculated
=
TRUE
;
core
.
units
.
begin
()
->
step
=
30
;
core
.
units
.
begin
()
->
step
=
30
;
...
@@ -3105,8 +3106,8 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3105,8 +3106,8 @@ int32 field::process_battle_command(uint16 step) {
core
.
hint_timing
[
infos
.
turn_player
]
=
0
;
core
.
hint_timing
[
infos
.
turn_player
]
=
0
;
core
.
chain_attack
=
FALSE
;
core
.
chain_attack
=
FALSE
;
if
(
core
.
attack_target
)
{
if
(
core
.
attack_target
)
{
core
.
attacker
->
battled_cards
[
core
.
attack_target
->
fieldid
]
=
core
.
attack_target
;
core
.
attacker
->
battled_cards
[
core
.
attack_target
->
fieldid
_r
]
=
core
.
attack_target
;
core
.
attack_target
->
battled_cards
[
core
.
attacker
->
fieldid
]
=
core
.
attacker
;
core
.
attack_target
->
battled_cards
[
core
.
attacker
->
fieldid
_r
]
=
core
.
attacker
;
}
else
}
else
core
.
attacker
->
battled_cards
[
0
]
=
0
;
core
.
attacker
->
battled_cards
[
0
]
=
0
;
uint8
reason_player
=
core
.
temp_var
[
0
];
uint8
reason_player
=
core
.
temp_var
[
0
];
...
@@ -3142,7 +3143,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3142,7 +3143,7 @@ int32 field::process_battle_command(uint16 step) {
effect
*
peffect
;
effect
*
peffect
;
uint32
dest
,
seq
;
uint32
dest
,
seq
;
if
(
core
.
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
if
(
core
.
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
&&
core
.
attacker
->
current
.
location
==
LOCATION_MZONE
&&
core
.
attacker
->
fieldid
==
core
.
pre_field
[
0
])
{
&&
core
.
attacker
->
current
.
location
==
LOCATION_MZONE
&&
core
.
attacker
->
fieldid
_r
==
core
.
pre_field
[
0
])
{
des
.
insert
(
core
.
attacker
);
des
.
insert
(
core
.
attacker
);
core
.
attacker
->
temp
.
reason
=
core
.
attacker
->
current
.
reason
;
core
.
attacker
->
temp
.
reason
=
core
.
attacker
->
current
.
reason
;
core
.
attacker
->
temp
.
reason_card
=
core
.
attacker
->
current
.
reason_card
;
core
.
attacker
->
temp
.
reason_card
=
core
.
attacker
->
current
.
reason_card
;
...
@@ -3162,7 +3163,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3162,7 +3163,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
->
operation_param
=
(
POS_FACEUP
<<
24
)
+
(((
uint32
)
core
.
attacker
->
owner
)
<<
16
)
+
(
dest
<<
8
)
+
seq
;
core
.
attacker
->
operation_param
=
(
POS_FACEUP
<<
24
)
+
(((
uint32
)
core
.
attacker
->
owner
)
<<
16
)
+
(
dest
<<
8
)
+
seq
;
}
}
if
(
core
.
attack_target
&&
core
.
attack_target
->
is_status
(
STATUS_BATTLE_DESTROYED
)
if
(
core
.
attack_target
&&
core
.
attack_target
->
is_status
(
STATUS_BATTLE_DESTROYED
)
&&
core
.
attack_target
->
current
.
location
==
LOCATION_MZONE
&&
core
.
attack_target
->
fieldid
==
core
.
pre_field
[
1
])
{
&&
core
.
attack_target
->
current
.
location
==
LOCATION_MZONE
&&
core
.
attack_target
->
fieldid
_r
==
core
.
pre_field
[
1
])
{
des
.
insert
(
core
.
attack_target
);
des
.
insert
(
core
.
attack_target
);
core
.
attack_target
->
temp
.
reason
=
core
.
attack_target
->
current
.
reason
;
core
.
attack_target
->
temp
.
reason
=
core
.
attack_target
->
current
.
reason
;
core
.
attack_target
->
temp
.
reason_card
=
core
.
attack_target
->
current
.
reason_card
;
core
.
attack_target
->
temp
.
reason_card
=
core
.
attack_target
->
current
.
reason_card
;
...
@@ -3247,7 +3248,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3247,7 +3248,7 @@ int32 field::process_battle_command(uint16 step) {
card_set
::
iterator
cit
,
rm
;
card_set
::
iterator
cit
,
rm
;
for
(
cit
=
des
->
container
.
begin
();
cit
!=
des
->
container
.
end
();)
{
for
(
cit
=
des
->
container
.
begin
();
cit
!=
des
->
container
.
end
();)
{
rm
=
cit
++
;
rm
=
cit
++
;
if
((
*
rm
)
->
current
.
location
!=
LOCATION_MZONE
||
((
*
rm
)
->
fieldid
!=
core
.
pre_field
[
0
]
&&
(
*
rm
)
->
fieldid
!=
core
.
pre_field
[
1
]))
if
((
*
rm
)
->
current
.
location
!=
LOCATION_MZONE
||
((
*
rm
)
->
fieldid
_r
!=
core
.
pre_field
[
0
]
&&
(
*
rm
)
->
fieldid_r
!=
core
.
pre_field
[
1
]))
des
->
container
.
erase
(
rm
);
des
->
container
.
erase
(
rm
);
}
}
add_process
(
PROCESSOR_DESTROY
,
2
,
0
,
des
,
REASON_BATTLE
,
PLAYER_NONE
);
add_process
(
PROCESSOR_DESTROY
,
2
,
0
,
des
,
REASON_BATTLE
,
PLAYER_NONE
);
...
@@ -3294,7 +3295,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3294,7 +3295,7 @@ int32 field::process_battle_command(uint16 step) {
reset_phase
(
PHASE_DAMAGE
);
reset_phase
(
PHASE_DAMAGE
);
adjust_all
();
adjust_all
();
if
(
core
.
chain_attack
)
{
if
(
core
.
chain_attack
)
{
if
(
core
.
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
||
core
.
attacker
->
fieldid
!=
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
->
is_capable_attack_announce
(
infos
.
turn_player
))
return
FALSE
;
return
FALSE
;
if
(
core
.
chain_attack_target
)
{
if
(
core
.
chain_attack_target
)
{
...
...
script/c11596936.lua
View file @
1a165388
...
@@ -21,7 +21,7 @@ function c11596936.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -21,7 +21,7 @@ function c11596936.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
end
end
function
c11596936
.
filter
(
c
)
function
c11596936
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDestructable
()
return
c
:
Is
Facedown
()
and
c
:
Is
Type
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDestructable
()
end
end
function
c11596936
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c11596936
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c11596936
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c11596936
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
...
...
script/c14785765.lua
View file @
1a165388
...
@@ -17,14 +17,26 @@ function c14785765.costfilter(c)
...
@@ -17,14 +17,26 @@ function c14785765.costfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsAbleToHandAsCost
()
return
c
:
IsFaceup
()
and
c
:
IsAbleToHandAsCost
()
end
end
function
c14785765
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14785765
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
c14785765
[
tp
]
and
Duel
.
IsExistingMatchingCard
(
c14785765
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
if
chk
==
0
then
if
not
c14785765
[
tp
]
then
return
false
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c14785765
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
else
return
Duel
.
IsExistingMatchingCard
(
c14785765
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c14785765
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
else
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c14785765
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c14785765
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
end
c14785765
[
tp
]
=
false
c14785765
[
tp
]
=
false
end
end
function
c14785765
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14785765
.
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
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
400
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
400
)
end
end
...
...
script/c41639001.lua
View file @
1a165388
...
@@ -3,7 +3,7 @@ function c41639001.initial_effect(c)
...
@@ -3,7 +3,7 @@ function c41639001.initial_effect(c)
--spsummon
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
41639001
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
41639001
,
0
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_
F
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_
O
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCode
(
EVENT_BECOME_TARGET
)
e1
:
SetCode
(
EVENT_BECOME_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
...
...
script/c51047350.lua
0 → 100644
View file @
1a165388
--`ɡ֥쥤`
function
c51047350
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
0
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c51047350
.
spcon
)
e1
:
SetOperation
(
c51047350
.
spop
)
c
:
RegisterEffect
(
e1
)
end
function
c51047350
.
filter
(
c
)
return
c
:
GetSequence
()
~=
5
and
c
:
IsAbleToGraveAsCost
()
end
function
c51047350
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c51047350
.
filter
,
c
:
GetControler
(),
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
c51047350
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c51047350
.
filter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
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