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
d8d6ed6e
Commit
d8d6ed6e
authored
Mar 14, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add duel_rule
parent
cb52dcb1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
field.h
field.h
+1
-0
ocgapi.cpp
ocgapi.cpp
+4
-0
operations.cpp
operations.cpp
+3
-3
processor.cpp
processor.cpp
+4
-4
No files found.
field.h
View file @
d8d6ed6e
...
...
@@ -260,6 +260,7 @@ struct processor {
uint8
extra_summon
[
2
];
int32
spe_effect
[
2
];
int32
duel_options
;
int32
duel_rule
;
uint32
copy_reset
;
uint8
copy_reset_count
;
uint32
last_control_changed_id
;
...
...
ocgapi.cpp
View file @
d8d6ed6e
...
...
@@ -71,6 +71,10 @@ extern "C" DECL_DLLEXPORT ptr create_duel(uint32 seed) {
extern
"C"
DECL_DLLEXPORT
void
start_duel
(
ptr
pduel
,
int
options
)
{
duel
*
pd
=
(
duel
*
)
pduel
;
pd
->
game_field
->
core
.
duel_options
|=
options
;
if
(
options
&
DUEL_OBSOLETE_RULING
)
pd
->
game_field
->
core
.
duel_rule
=
1
;
else
pd
->
game_field
->
core
.
duel_rule
=
3
;
pd
->
game_field
->
core
.
shuffle_hand_check
[
0
]
=
FALSE
;
pd
->
game_field
->
core
.
shuffle_hand_check
[
1
]
=
FALSE
;
pd
->
game_field
->
core
.
shuffle_deck_check
[
0
]
=
FALSE
;
...
...
operations.cpp
View file @
d8d6ed6e
...
...
@@ -3822,10 +3822,10 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret
if
(
!
is_equip
&&
location
==
LOCATION_SZONE
&&
(
target
->
data
.
type
&
TYPE_FIELD
)
&&
(
target
->
data
.
type
&
TYPE_SPELL
))
{
card
*
pcard
=
get_field_card
(
playerid
,
LOCATION_SZONE
,
5
);
if
(
pcard
)
{
if
(
core
.
duel_options
&
DUEL_OBSOLETE_RULING
)
destroy
(
pcard
,
0
,
REASON_RULE
,
pcard
->
current
.
controler
);
else
// new ruling
if
(
core
.
duel_rule
>=
3
)
send_to
(
pcard
,
0
,
REASON_RULE
,
pcard
->
current
.
controler
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
0
);
else
destroy
(
pcard
,
0
,
REASON_RULE
,
pcard
->
current
.
controler
);
adjust_all
();
}
}
else
if
(
!
is_equip
&&
location
==
LOCATION_SZONE
&&
(
target
->
data
.
type
&
TYPE_PENDULUM
))
{
...
...
processor.cpp
View file @
d8d6ed6e
...
...
@@ -1873,7 +1873,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
return
FALSE
;
}
case
8
:
{
if
(
!
(
core
.
duel_options
&
DUEL_OBSOLETE_RULING
)
||
(
infos
.
phase
!=
PHASE_MAIN1
&&
infos
.
phase
!=
PHASE_MAIN2
))
if
(
(
core
.
duel_rule
>=
2
)
||
(
infos
.
phase
!=
PHASE_MAIN1
&&
infos
.
phase
!=
PHASE_MAIN2
))
return
FALSE
;
// Obsolete ignition effect ruling
tevent
e
;
...
...
@@ -4011,7 +4011,7 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
}
case
2
:
{
// Draw, new ruling
if
((
core
.
duel_
options
&
DUEL_OBSOLETE_RULING
)
||
(
infos
.
turn_id
>
1
))
{
if
((
core
.
duel_
rule
>=
3
)
||
(
infos
.
turn_id
>
1
))
{
int32
count
=
get_draw_count
(
infos
.
turn_player
);
if
(
count
>
0
)
{
draw
(
0
,
REASON_RULE
,
turn_player
,
turn_player
,
count
);
...
...
@@ -4588,7 +4588,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
if
((
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
&&
pcard
->
is_has_relation
(
*
cait
))
{
pcard
->
set_status
(
STATUS_ACTIVATED
,
TRUE
);
pcard
->
enable_field_effect
(
true
);
if
(
core
.
duel_
options
&
DUEL_OBSOLETE_RULING
)
{
if
(
core
.
duel_
rule
<=
2
)
{
if
(
pcard
->
data
.
type
&
TYPE_FIELD
)
{
card
*
fscard
=
player
[
1
-
pcard
->
current
.
controler
].
list_szone
[
5
];
if
(
fscard
&&
fscard
->
is_position
(
POS_FACEUP
))
...
...
@@ -4713,7 +4713,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
if
((
pcard
->
data
.
type
&
TYPE_EQUIP
)
&&
(
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
&&
!
pcard
->
equiping_target
&&
pcard
->
is_has_relation
(
*
cait
))
destroy
(
pcard
,
0
,
REASON_RULE
,
PLAYER_NONE
);
if
(
core
.
duel_
options
&
DUEL_OBSOLETE_RULING
)
{
if
(
core
.
duel_
rule
<=
2
)
{
if
((
pcard
->
data
.
type
&
TYPE_FIELD
)
&&
(
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
&&
!
pcard
->
is_status
(
STATUS_LEAVE_CONFIRMED
)
&&
pcard
->
is_has_relation
(
*
cait
))
{
card
*
fscard
=
player
[
1
-
pcard
->
current
.
controler
].
list_szone
[
5
];
...
...
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