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
nanahira
ygopro-core
Commits
96a2ee26
Commit
96a2ee26
authored
Mar 06, 2024
by
Chen Bill
Committed by
GitHub
Mar 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix EVENT_DESTROYED (#565)
parent
2a7e3dfe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
field.h
field.h
+2
-0
playerop.cpp
playerop.cpp
+1
-1
processor.cpp
processor.cpp
+10
-6
No files found.
field.h
View file @
96a2ee26
...
...
@@ -279,6 +279,8 @@ struct processor {
uint8
summon_cancelable
{
FALSE
};
card
*
attacker
{
nullptr
};
card
*
attack_target
{
nullptr
};
uint8
attacker_player
{
PLAYER_NONE
};
uint8
attack_target_player
{
PLAYER_NONE
};
uint32
limit_extra_summon_zone
{
0
};
uint32
limit_extra_summon_releasable
{
0
};
card
*
limit_tuner
{
nullptr
};
...
...
playerop.cpp
View file @
96a2ee26
...
...
@@ -972,7 +972,7 @@ static int32 is_declarable(card_data const& cd, const std::vector<uint32>& opcod
if
(
stack
.
size
()
!=
1
||
stack
.
top
()
==
0
)
return
FALSE
;
return
cd
.
code
==
CARD_MARINE_DOLPHIN
||
cd
.
code
==
CARD_TWINKLE_MOSS
||
(
!
cd
.
alias
&&
(
cd
.
type
&
(
TYPE_MONSTER
+
TYPE_TOKEN
))
!=
(
TYPE_MONSTER
+
TYPE_TOKEN
));
||
(
!
cd
.
alias
&&
(
cd
.
type
&
(
TYPE_MONSTER
|
TYPE_TOKEN
))
!=
(
TYPE_MONSTER
|
TYPE_TOKEN
));
}
int32
field
::
announce_card
(
int16
step
,
uint8
playerid
)
{
if
(
step
==
0
)
{
...
...
processor.cpp
View file @
96a2ee26
...
...
@@ -2928,6 +2928,8 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
->
set_status
(
STATUS_OPPO_BATTLE
,
TRUE
);
core
.
attack_target
->
set_status
(
STATUS_OPPO_BATTLE
,
TRUE
);
}
core
.
attacker_player
=
pa
;
core
.
attack_target_player
=
pd
;
}
effect
*
damchange
=
nullptr
;
card
*
reason_card
=
nullptr
;
...
...
@@ -3164,16 +3166,16 @@ int32 field::process_battle_command(uint16 step) {
card_set
ing
;
card_set
ed
;
if
(
core
.
attacker
->
is_status
(
STATUS_BATTLE_DESTROYED
)
&&
(
core
.
attacker
->
current
.
reason
&
REASON_BATTLE
))
{
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_BATTLE_DESTROYING
,
0
,
core
.
attacker
->
current
.
reason
,
core
.
attack_target
->
current
.
control
er
,
0
,
1
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_DESTROYED
,
0
,
core
.
attacker
->
current
.
reason
,
core
.
attack_target
->
current
.
control
er
,
0
,
0
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_DESTROYED
,
0
,
core
.
attacker
->
current
.
reason
,
core
.
attack_target
->
current
.
control
er
,
0
,
0
);
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_BATTLE_DESTROYING
,
0
,
core
.
attacker
->
current
.
reason
,
core
.
attack_target
_play
er
,
0
,
1
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_DESTROYED
,
0
,
core
.
attacker
->
current
.
reason
,
core
.
attack_target
_play
er
,
0
,
0
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_DESTROYED
,
0
,
core
.
attacker
->
current
.
reason
,
core
.
attack_target
_play
er
,
0
,
0
);
ing
.
insert
(
core
.
attack_target
);
ed
.
insert
(
core
.
attacker
);
}
if
(
core
.
attack_target
&&
core
.
attack_target
->
is_status
(
STATUS_BATTLE_DESTROYED
)
&&
(
core
.
attack_target
->
current
.
reason
&
REASON_BATTLE
))
{
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_DESTROYING
,
0
,
core
.
attack_target
->
current
.
reason
,
core
.
attacker
->
current
.
control
er
,
0
,
0
);
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_BATTLE_DESTROYED
,
0
,
core
.
attack_target
->
current
.
reason
,
core
.
attacker
->
current
.
control
er
,
0
,
1
);
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_DESTROYED
,
0
,
core
.
attack_target
->
current
.
reason
,
core
.
attacker
->
current
.
control
er
,
0
,
1
);
raise_single_event
(
core
.
attacker
,
0
,
EVENT_BATTLE_DESTROYING
,
0
,
core
.
attack_target
->
current
.
reason
,
core
.
attacker
_play
er
,
0
,
0
);
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_BATTLE_DESTROYED
,
0
,
core
.
attack_target
->
current
.
reason
,
core
.
attacker
_play
er
,
0
,
1
);
raise_single_event
(
core
.
attack_target
,
0
,
EVENT_DESTROYED
,
0
,
core
.
attack_target
->
current
.
reason
,
core
.
attacker
_play
er
,
0
,
1
);
ing
.
insert
(
core
.
attacker
);
ed
.
insert
(
core
.
attack_target
);
}
...
...
@@ -3212,6 +3214,8 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
->
set_status
(
STATUS_OPPO_BATTLE
,
FALSE
);
if
(
core
.
attack_target
)
core
.
attack_target
->
set_status
(
STATUS_OPPO_BATTLE
,
FALSE
);
core
.
attacker_player
=
PLAYER_NONE
;
core
.
attack_target_player
=
PLAYER_NONE
;
core
.
units
.
begin
()
->
step
=
-
1
;
infos
.
phase
=
PHASE_BATTLE_STEP
;
pduel
->
write_buffer8
(
MSG_DAMAGE_STEP_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