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
80f1ced5
Commit
80f1ced5
authored
Apr 26, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
83696e37
ea542f33
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
16 deletions
+8
-16
effect.cpp
effect.cpp
+1
-1
effect.h
effect.h
+0
-1
operations.cpp
operations.cpp
+7
-14
No files found.
effect.cpp
View file @
80f1ced5
...
...
@@ -447,7 +447,7 @@ int32 effect::is_target(card* pcard) {
if
((
type
&
EFFECT_TYPE_TARGET
)
&&
!
(
type
&
EFFECT_TYPE_FIELD
))
{
return
is_fit_target_function
(
pcard
);
}
if
(
pcard
&&
!
is_flag
(
EFFECT_FLAG_SET_AVAILABLE
)
&&
(
pcard
->
current
.
location
&
LOCATION_ONFIELD
)
if
(
!
is_flag
(
EFFECT_FLAG_SET_AVAILABLE
)
&&
(
pcard
->
current
.
location
&
LOCATION_ONFIELD
)
&&
!
pcard
->
is_position
(
POS_FACEUP
))
return
FALSE
;
if
(
!
is_flag
(
EFFECT_FLAG_IGNORE_RANGE
))
{
...
...
effect.h
View file @
80f1ced5
...
...
@@ -516,7 +516,6 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EVENT_LEVEL_UP 1200
#define EVENT_PAY_LPCOST 1201
#define EVENT_DETACH_MATERIAL 1202
#define EVENT_RETURN_TO_GRAVE 1203
#define EVENT_TURN_END 1210
#define EVENT_PHASE 0x1000
#define EVENT_PHASE_START 0x2000
...
...
operations.cpp
View file @
80f1ced5
...
...
@@ -268,6 +268,8 @@ void field::send_to(card_set* targets, effect* reason_effect, uint32 reason, uin
p
=
reason_player
;
if
(
destination
&
(
LOCATION_GRAVE
|
LOCATION_REMOVED
)
||
p
==
PLAYER_NONE
)
p
=
pcard
->
owner
;
if
(
destination
==
LOCATION_GRAVE
&&
pcard
->
current
.
location
==
LOCATION_REMOVED
)
pcard
->
current
.
reason
|=
REASON_RETURN
;
uint32
pos
=
position
;
if
(
destination
!=
LOCATION_REMOVED
)
pos
=
POS_FACEUP
;
...
...
@@ -3768,7 +3770,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pduel
->
delete_group
(
targets
);
return
TRUE
;
}
card_set
leave_p
,
destroying
;
card_set
leave_p
;
for
(
auto
&
pcard
:
targets
->
container
)
{
if
((
pcard
->
current
.
location
&
LOCATION_ONFIELD
)
&&
!
pcard
->
is_status
(
STATUS_SUMMON_DISABLED
)
&&
!
pcard
->
is_status
(
STATUS_ACTIVATE_DISABLED
))
{
raise_single_event
(
pcard
,
0
,
EVENT_LEAVE_FIELD_P
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
...
...
@@ -3816,8 +3818,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
}
if
(
leave_p
.
size
())
raise_event
(
&
leave_p
,
EVENT_LEAVE_FIELD_P
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
if
(
destroying
.
size
())
raise_event
(
&
destroying
,
EVENT_DESTROY
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
process_single_event
();
process_instant_event
();
return
FALSE
;
...
...
@@ -4128,7 +4128,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
core
.
units
.
begin
()
->
ptarget
=
param
->
targets
;
targets
=
param
->
targets
;
delete
param
;
card_set
tohand
,
todeck
,
tograve
,
remove
,
discard
,
released
,
destroyed
,
retgrave
;
card_set
tohand
,
todeck
,
tograve
,
remove
,
discard
,
released
,
destroyed
;
card_set
equipings
,
overlays
;
for
(
auto
&
pcard
:
targets
->
container
)
{
uint8
nloc
=
pcard
->
current
.
location
;
...
...
@@ -4161,15 +4161,10 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
todeck
.
insert
(
pcard
);
raise_single_event
(
pcard
,
0
,
EVENT_TO_DECK
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
if
(
nloc
==
LOCATION_GRAVE
)
{
if
(
pcard
->
current
.
reason
&
REASON_RETURN
)
{
retgrave
.
insert
(
pcard
);
raise_single_event
(
pcard
,
0
,
EVENT_RETURN_TO_GRAVE
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
else
{
if
(
nloc
==
LOCATION_GRAVE
&&
!
(
pcard
->
current
.
reason
&
REASON_RETURN
))
{
tograve
.
insert
(
pcard
);
raise_single_event
(
pcard
,
0
,
EVENT_TO_GRAVE
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
}
}
if
(
nloc
==
LOCATION_REMOVED
||
((
pcard
->
data
.
type
&
TYPE_TOKEN
)
&&
pcard
->
sendto_param
.
location
==
LOCATION_REMOVED
))
{
remove
.
insert
(
pcard
);
raise_single_event
(
pcard
,
0
,
EVENT_REMOVE
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
...
...
@@ -4207,8 +4202,6 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
raise_event
(
&
released
,
EVENT_RELEASE
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
if
(
destroyed
.
size
())
raise_event
(
&
destroyed
,
EVENT_DESTROYED
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
if
(
retgrave
.
size
())
raise_event
(
&
retgrave
,
EVENT_RETURN_TO_GRAVE
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
raise_event
(
&
targets
->
container
,
EVENT_MOVE
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
process_single_event
();
process_instant_event
();
...
...
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