Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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-core
Commits
66d4d060
Commit
66d4d060
authored
Dec 04, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "remove cancelable"
This reverts commit
07a74fc1
.
parent
ddf4428f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
18 deletions
+30
-18
field.cpp
field.cpp
+1
-0
field.h
field.h
+1
-0
libduel.cpp
libduel.cpp
+5
-0
operations.cpp
operations.cpp
+19
-17
processor.cpp
processor.cpp
+4
-1
No files found.
field.cpp
View file @
66d4d060
...
...
@@ -65,6 +65,7 @@ field::field(duel* pduel) {
core
.
opp_mzone
[
i
]
=
0
;
core
.
summoning_card
=
0
;
core
.
summon_depth
=
0
;
core
.
summon_cancelable
=
FALSE
;
core
.
chain_limit
=
0
;
core
.
chain_limit_p
=
0
;
core
.
chain_solving
=
FALSE
;
...
...
field.h
View file @
66d4d060
...
...
@@ -243,6 +243,7 @@ struct processor {
uint8
reason_player
;
card
*
summoning_card
;
uint8
summon_depth
;
uint8
summon_cancelable
;
card
*
attacker
;
card
*
attack_target
;
card
*
limit_tuner
;
...
...
libduel.cpp
View file @
66d4d060
...
...
@@ -228,6 +228,7 @@ int32 scriptlib::duel_summon(lua_State *L) {
if
(
lua_gettop
(
L
)
>
4
)
min_tribute
=
lua_tointeger
(
L
,
5
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
);
return
lua_yield
(
L
,
0
);
}
...
...
@@ -240,6 +241,7 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
0
);
return
lua_yield
(
L
,
0
);
}
...
...
@@ -266,6 +268,7 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
limit_tuner
=
tuner
;
pduel
->
game_field
->
core
.
limit_syn
=
mg
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_SYNCHRO
);
return
lua_yield
(
L
,
0
);
}
...
...
@@ -292,6 +295,7 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
pduel
->
game_field
->
core
.
limit_xyz_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
);
return
lua_yield
(
L
,
0
);
}
...
...
@@ -313,6 +317,7 @@ int32 scriptlib::duel_setm(lua_State *L) {
if
(
lua_gettop
(
L
)
>
4
)
min_tribute
=
lua_tointeger
(
L
,
5
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
add_process
(
PROCESSOR_MSET
,
0
,
peffect
,
(
group
*
)
pcard
,
playerid
+
(
ignore_count
<<
8
)
+
(
min_tribute
<<
16
),
0
);
return
lua_yield
(
L
,
0
);
}
...
...
operations.cpp
View file @
66d4d060
...
...
@@ -1336,6 +1336,8 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
return
TRUE
;
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_SUMMON
))
return
TRUE
;
if
(
core
.
summon_depth
)
core
.
summon_cancelable
=
FALSE
;
core
.
summon_depth
++
;
target
->
material_cards
.
clear
();
if
(
target
->
current
.
location
==
LOCATION_MZONE
)
...
...
@@ -1402,7 +1404,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
min
=
-
fcount
+
1
;
required
=
min
+
(
max
<<
16
);
}
add_process
(
PROCESSOR_SELECT_TRIBUTE
,
0
,
0
,
0
,
sumplayer
,
required
);
add_process
(
PROCESSOR_SELECT_TRIBUTE
,
0
,
0
,
0
,
sumplayer
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
required
);
core
.
units
.
begin
()
->
step
=
3
;
}
}
...
...
@@ -1414,7 +1416,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
returns
.
bvalue
[
0
]
=
0
;
else
{
int32
required
=
1
+
core
.
units
.
begin
()
->
arg2
;
add_process
(
PROCESSOR_SELECT_TRIBUTE
,
0
,
0
,
0
,
sumplayer
,
required
);
add_process
(
PROCESSOR_SELECT_TRIBUTE
,
0
,
0
,
0
,
sumplayer
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
required
);
}
return
FALSE
;
}
...
...
@@ -1900,7 +1902,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
min
=
-
fcount
+
1
;
required
=
min
+
(
max
<<
16
);
}
add_process
(
PROCESSOR_SELECT_TRIBUTE
,
0
,
0
,
0
,
setplayer
,
required
);
add_process
(
PROCESSOR_SELECT_TRIBUTE
,
0
,
0
,
0
,
setplayer
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
required
);
core
.
units
.
begin
()
->
step
=
3
;
}
}
...
...
@@ -1912,7 +1914,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
returns
.
bvalue
[
0
]
=
0
;
else
{
int32
required
=
1
+
core
.
units
.
begin
()
->
arg2
;
add_process
(
PROCESSOR_SELECT_TRIBUTE
,
0
,
0
,
0
,
setplayer
,
required
);
add_process
(
PROCESSOR_SELECT_TRIBUTE
,
0
,
0
,
0
,
setplayer
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
required
);
}
return
FALSE
;
}
...
...
@@ -4345,7 +4347,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
512
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
0x10001
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
0x10001
);
return
FALSE
;
}
}
...
...
@@ -4369,7 +4371,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
512
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
0x10001
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
0x10001
);
return
FALSE
;
}
case
1
:
{
...
...
@@ -4598,7 +4600,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
513
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
min
+
(
max
<<
16
));
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
min
+
(
max
<<
16
));
}
else
core
.
units
.
begin
()
->
step
=
1
;
return
FALSE
;
...
...
@@ -4625,7 +4627,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
513
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
min
+
(
min
<<
16
));
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
min
+
(
min
<<
16
));
return
FALSE
;
}
case
3
:
{
...
...
@@ -4710,7 +4712,7 @@ int32 field::select_release_cards(int16 step, uint8 playerid, uint8 check_field,
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
500
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
(
max
<<
16
)
+
min
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
((
uint32
)
cancelable
<<
16
)
+
playerid
,
(
max
<<
16
)
+
min
);
return
TRUE
;
}
if
(
core
.
release_cards_ex
.
size
()
>=
(
uint32
)
min
)
{
...
...
@@ -4721,7 +4723,7 @@ int32 field::select_release_cards(int16 step, uint8 playerid, uint8 check_field,
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
500
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
(
max
<<
16
)
+
min
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
((
uint32
)
cancelable
<<
16
)
+
playerid
,
(
max
<<
16
)
+
min
);
return
TRUE
;
}
core
.
operated_set
.
clear
();
...
...
@@ -4732,7 +4734,7 @@ int32 field::select_release_cards(int16 step, uint8 playerid, uint8 check_field,
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
500
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
(
core
.
release_cards_ex
.
size
()
<<
16
)
+
core
.
release_cards_ex
.
size
());
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
((
uint32
)
cancelable
<<
16
)
+
playerid
,
(
core
.
release_cards_ex
.
size
()
<<
16
)
+
core
.
release_cards_ex
.
size
());
min
-=
core
.
release_cards_ex
.
size
();
max
-=
core
.
release_cards_ex
.
size
();
core
.
units
.
begin
()
->
arg2
=
(
max
<<
16
)
+
min
;
...
...
@@ -4748,7 +4750,7 @@ int32 field::select_release_cards(int16 step, uint8 playerid, uint8 check_field,
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
500
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
(
max
<<
16
)
+
min
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
((
uint32
)
cancelable
<<
16
)
+
playerid
,
(
max
<<
16
)
+
min
);
return
FALSE
;
}
case
2
:
{
...
...
@@ -4778,7 +4780,7 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable,
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
500
);
add_process
(
PROCESSOR_SELECT_TRIBUTE_P
,
0
,
0
,
0
,
playerid
,
(
max
<<
16
)
+
min
);
add_process
(
PROCESSOR_SELECT_TRIBUTE_P
,
0
,
0
,
0
,
((
uint32
)
cancelable
<<
16
)
+
playerid
,
(
max
<<
16
)
+
min
);
return
TRUE
;
}
if
(
core
.
release_cards_ex
.
size
()
>=
(
uint32
)
max
)
{
...
...
@@ -4789,7 +4791,7 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable,
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
500
);
add_process
(
PROCESSOR_SELECT_TRIBUTE_P
,
0
,
0
,
0
,
playerid
,
(
max
<<
16
)
+
min
);
add_process
(
PROCESSOR_SELECT_TRIBUTE_P
,
0
,
0
,
0
,
((
uint32
)
cancelable
<<
16
)
+
playerid
,
(
max
<<
16
)
+
min
);
return
TRUE
;
}
core
.
operated_set
.
clear
();
...
...
@@ -4826,7 +4828,7 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable,
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
500
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
0x10001
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
((
uint32
)
cancelable
<<
16
)
+
playerid
,
0x10001
);
return
FALSE
;
}
case
2
:
{
...
...
@@ -4846,7 +4848,7 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable,
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
500
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
(
core
.
release_cards_ex
.
size
()
<<
16
)
+
core
.
release_cards_ex
.
size
());
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
((
uint32
)
cancelable
<<
16
)
+
playerid
,
(
core
.
release_cards_ex
.
size
()
<<
16
)
+
core
.
release_cards_ex
.
size
());
return
FALSE
;
}
case
4
:
{
...
...
@@ -4882,7 +4884,7 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable,
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
500
);
add_process
(
PROCESSOR_SELECT_TRIBUTE_P
,
0
,
0
,
0
,
playerid
,
(
max
<<
16
)
+
min
);
add_process
(
PROCESSOR_SELECT_TRIBUTE_P
,
0
,
0
,
0
,
((
uint32
)
cancelable
<<
16
)
+
playerid
,
(
max
<<
16
)
+
min
);
return
FALSE
;
}
case
6
:
{
...
...
processor.cpp
View file @
66d4d060
...
...
@@ -2686,12 +2686,14 @@ int32 field::process_idle_command(uint16 step) {
}
case
5
:
{
card
*
target
=
core
.
summonable_cards
[
returns
.
ivalue
[
0
]
>>
16
];
core
.
summon_cancelable
=
TRUE
;
summon
(
infos
.
turn_player
,
target
,
0
,
FALSE
,
0
);
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
}
case
6
:
{
card
*
target
=
core
.
spsummonable_cards
[
returns
.
ivalue
[
0
]
>>
16
];
core
.
summon_cancelable
=
TRUE
;
special_summon_rule
(
infos
.
turn_player
,
target
,
0
);
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
...
...
@@ -2726,6 +2728,7 @@ int32 field::process_idle_command(uint16 step) {
}
case
8
:
{
card
*
target
=
core
.
msetable_cards
[
returns
.
ivalue
[
0
]
>>
16
];
core
.
summon_cancelable
=
TRUE
;
add_process
(
PROCESSOR_MSET
,
0
,
0
,
(
group
*
)
target
,
target
->
current
.
controler
,
0
);
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
...
...
@@ -3007,7 +3010,7 @@ int32 field::process_battle_command(uint16 step) {
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
infos
.
turn_player
);
pduel
->
write_buffer32
(
549
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
infos
.
turn_player
,
0x10001
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
infos
.
turn_player
+
(
core
.
units
.
begin
()
->
arg1
?
0x20000
:
0
)
,
0x10001
);
}
core
.
units
.
begin
()
->
step
=
5
;
return
FALSE
;
...
...
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