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
30674f14
Commit
30674f14
authored
Aug 21, 2018
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add attack_announce_count for scripts
parent
5a280b99
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
1 deletion
+7
-1
card.cpp
card.cpp
+1
-0
card.h
card.h
+1
-0
libcard.cpp
libcard.cpp
+1
-1
libduel.cpp
libduel.cpp
+1
-0
processor.cpp
processor.cpp
+3
-0
No files found.
card.cpp
View file @
30674f14
...
...
@@ -1965,6 +1965,7 @@ void card::reset(uint32 id, uint32 reset_type) {
indestructable_effects
.
clear
();
announced_cards
.
clear
();
attacked_cards
.
clear
();
attack_announce_count
=
0
;
announce_count
=
0
;
attacked_count
=
0
;
attack_all_target
=
TRUE
;
...
...
card.h
View file @
30674f14
...
...
@@ -142,6 +142,7 @@ public:
uint32
position_param
;
uint32
spsummon_param
;
uint32
to_field_param
;
uint8
attack_announce_count
;
uint8
direct_attackable
;
uint8
announce_count
;
uint8
attacked_count
;
...
...
libcard.cpp
View file @
30674f14
...
...
@@ -1318,7 +1318,7 @@ int32 scriptlib::card_get_attack_announced_count(lua_State *L) {
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
pcard
->
announce_count
);
lua_pushinteger
(
L
,
pcard
->
a
ttack_a
nnounce_count
);
return
1
;
}
int32
scriptlib
::
card_is_direct_attacked
(
lua_State
*
L
)
{
...
...
libduel.cpp
View file @
30674f14
...
...
@@ -1422,6 +1422,7 @@ int32 scriptlib::duel_change_attacker(lua_State *L) {
attacker
->
attack_controler
=
attacker
->
current
.
controler
;
pduel
->
game_field
->
core
.
pre_field
[
0
]
=
attacker
->
fieldid_r
;
if
(
!
ignore_count
)
{
attacker
->
attack_announce_count
++
;
if
(
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE
)
{
attacker
->
attacked_count
++
;
attacker
->
attacked_cards
.
addcard
(
attack_target
);
...
...
processor.cpp
View file @
30674f14
...
...
@@ -3057,6 +3057,7 @@ int32 field::process_battle_command(uint16 step) {
}
core
.
attack_state_count
[
infos
.
turn_player
]
++
;
check_card_counter
(
core
.
attacker
,
5
,
infos
.
turn_player
);
core
.
attacker
->
attack_announce_count
++
;
}
if
(
core
.
units
.
begin
()
->
arg3
)
{
core
.
attacker
->
announce_count
++
;
...
...
@@ -3913,6 +3914,7 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
pcard
->
set_status
(
STATUS_SET_TURN
,
FALSE
);
pcard
->
set_status
(
STATUS_FORM_CHANGED
,
FALSE
);
pcard
->
indestructable_effects
.
clear
();
pcard
->
attack_announce_count
=
0
;
pcard
->
announce_count
=
0
;
pcard
->
attacked_count
=
0
;
pcard
->
announced_cards
.
clear
();
...
...
@@ -4123,6 +4125,7 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
card
*
pcard
=
*
cit
;
if
(
!
pcard
)
continue
;
pcard
->
attack_announce_count
=
0
;
pcard
->
announce_count
=
0
;
pcard
->
attacked_count
=
0
;
pcard
->
announced_cards
.
clear
();
...
...
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