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
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
xiaoye
ygopro-core
Commits
f4b13352
Commit
f4b13352
authored
Dec 31, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core
parents
1852d138
a8ffd6db
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
operations.cpp
operations.cpp
+19
-4
processor.cpp
processor.cpp
+6
-4
No files found.
operations.cpp
View file @
f4b13352
...
...
@@ -1425,8 +1425,22 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
returns
.
ivalue
[
0
]
=
FALSE
;
if
(
!
equip_card
->
is_affect_by_effect
(
core
.
reason_effect
))
return
TRUE
;
if
(
equip_card
==
target
||
target
->
current
.
location
!=
LOCATION_MZONE
)
if
(
equip_card
==
target
)
return
TRUE
;
bool
to_grave
=
false
;
if
(
target
->
current
.
location
!=
LOCATION_MZONE
||
(
target
->
current
.
position
&
POS_FACEDOWN
))
to_grave
=
true
;
if
(
equip_card
->
current
.
location
!=
LOCATION_SZONE
)
{
refresh_location_info_instant
();
if
(
get_useable_count
(
equip_card
,
equip_player
,
LOCATION_SZONE
,
equip_player
,
LOCATION_REASON_TOFIELD
)
<=
0
)
to_grave
=
true
;
}
if
(
to_grave
)
{
if
(
equip_card
->
current
.
location
!=
LOCATION_GRAVE
)
send_to
(
equip_card
,
0
,
REASON_RULE
,
PLAYER_NONE
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
core
.
units
.
begin
()
->
step
=
2
;
return
FALSE
;
}
if
(
equip_card
->
equiping_target
)
{
equip_card
->
cancel_card_target
(
equip_card
->
equiping_target
);
equip_card
->
unequip
();
...
...
@@ -1438,9 +1452,6 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
change_position
(
equip_card
,
0
,
equip_player
,
POS_FACEUP
,
0
);
return
FALSE
;
}
refresh_location_info_instant
();
if
(
get_useable_count
(
equip_card
,
equip_player
,
LOCATION_SZONE
,
equip_player
,
LOCATION_REASON_TOFIELD
)
<=
0
)
return
TRUE
;
equip_card
->
enable_field_effect
(
false
);
move_to_field
(
equip_card
,
equip_player
,
equip_player
,
LOCATION_SZONE
,
(
up
||
equip_card
->
is_position
(
POS_FACEUP
))
?
POS_FACEUP
:
POS_FACEDOWN
,
FALSE
,
0
,
TRUE
);
return
FALSE
;
...
...
@@ -1490,6 +1501,10 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
returns
.
ivalue
[
0
]
=
TRUE
;
return
TRUE
;
}
case
3
:
{
returns
.
ivalue
[
0
]
=
FALSE
;
return
TRUE
;
}
}
return
TRUE
;
}
...
...
processor.cpp
View file @
f4b13352
...
...
@@ -3065,8 +3065,10 @@ int32 field::process_battle_command(uint16 step) {
raise_event
((
card
*
)
0
,
EVENT_BATTLED
,
0
,
0
,
PLAYER_NONE
,
0
,
0
);
process_single_event
();
process_instant_event
();
if
(
core
.
effect_damage_step
)
if
(
core
.
effect_damage_step
)
{
core
.
reserved
.
ptr1
=
core
.
units
.
begin
()
->
ptarget
;
return
TRUE
;
}
core
.
units
.
begin
()
->
step
=
32
;
}
// fall through
...
...
@@ -3251,7 +3253,7 @@ int32 field::process_damage_step(uint16 step, uint32 new_attack) {
}
case
2
:
{
core
.
effect_damage_step
=
2
;
add_process
(
PROCESSOR_BATTLE_COMMAND
,
32
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_BATTLE_COMMAND
,
32
,
0
,
(
group
*
)
core
.
units
.
begin
()
->
ptr1
,
0
,
0
);
return
FALSE
;
}
case
3
:
{
...
...
@@ -4385,7 +4387,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_NON
E
);
pcard
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
TRU
E
);
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
))
{
...
...
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