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
0113e0ce
Commit
0113e0ce
authored
Jan 25, 2016
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MSG_ADD_COUNTER, MSG_REMOVE_COUNTER
number of counter should be uint16
parent
254984eb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
card.cpp
card.cpp
+5
-5
field.cpp
field.cpp
+1
-1
field.h
field.h
+1
-1
libcard.cpp
libcard.cpp
+1
-1
operations.cpp
operations.cpp
+4
-4
No files found.
card.cpp
View file @
0113e0ce
...
@@ -1192,7 +1192,7 @@ void card::remove_effect(effect* peffect, effect_container::iterator it) {
...
@@ -1192,7 +1192,7 @@ void card::remove_effect(effect* peffect, effect_container::iterator it) {
pduel
->
write_buffer8
(
current
.
controler
);
pduel
->
write_buffer8
(
current
.
controler
);
pduel
->
write_buffer8
(
current
.
location
);
pduel
->
write_buffer8
(
current
.
location
);
pduel
->
write_buffer8
(
current
.
sequence
);
pduel
->
write_buffer8
(
current
.
sequence
);
pduel
->
write_buffer
8
(
cmit
->
second
[
0
]
+
cmit
->
second
[
1
]);
pduel
->
write_buffer
16
(
cmit
->
second
[
0
]
+
cmit
->
second
[
1
]);
counters
.
erase
(
cmit
);
counters
.
erase
(
cmit
);
}
}
}
}
...
@@ -1351,7 +1351,7 @@ void card::reset(uint32 id, uint32 reset_type) {
...
@@ -1351,7 +1351,7 @@ void card::reset(uint32 id, uint32 reset_type) {
pduel
->
write_buffer8
(
current
.
controler
);
pduel
->
write_buffer8
(
current
.
controler
);
pduel
->
write_buffer8
(
current
.
location
);
pduel
->
write_buffer8
(
current
.
location
);
pduel
->
write_buffer8
(
current
.
sequence
);
pduel
->
write_buffer8
(
current
.
sequence
);
pduel
->
write_buffer
8
(
rm
->
second
[
1
]);
pduel
->
write_buffer
16
(
rm
->
second
[
1
]);
rm
->
second
[
1
]
=
0
;
rm
->
second
[
1
]
=
0
;
if
(
rm
->
second
[
0
]
==
0
)
if
(
rm
->
second
[
0
]
==
0
)
counters
.
erase
(
rm
);
counters
.
erase
(
rm
);
...
@@ -1535,7 +1535,7 @@ int32 card::add_counter(uint8 playerid, uint16 countertype, uint16 count) {
...
@@ -1535,7 +1535,7 @@ int32 card::add_counter(uint8 playerid, uint16 countertype, uint16 count) {
pduel
->
write_buffer8
(
current
.
controler
);
pduel
->
write_buffer8
(
current
.
controler
);
pduel
->
write_buffer8
(
current
.
location
);
pduel
->
write_buffer8
(
current
.
location
);
pduel
->
write_buffer8
(
current
.
sequence
);
pduel
->
write_buffer8
(
current
.
sequence
);
pduel
->
write_buffer
8
(
count
);
pduel
->
write_buffer
16
(
count
);
return
TRUE
;
return
TRUE
;
}
}
int32
card
::
remove_counter
(
uint16
countertype
,
uint16
count
)
{
int32
card
::
remove_counter
(
uint16
countertype
,
uint16
count
)
{
...
@@ -1557,7 +1557,7 @@ int32 card::remove_counter(uint16 countertype, uint16 count) {
...
@@ -1557,7 +1557,7 @@ int32 card::remove_counter(uint16 countertype, uint16 count) {
pduel
->
write_buffer8
(
current
.
controler
);
pduel
->
write_buffer8
(
current
.
controler
);
pduel
->
write_buffer8
(
current
.
location
);
pduel
->
write_buffer8
(
current
.
location
);
pduel
->
write_buffer8
(
current
.
sequence
);
pduel
->
write_buffer8
(
current
.
sequence
);
pduel
->
write_buffer
8
(
count
);
pduel
->
write_buffer
16
(
count
);
return
TRUE
;
return
TRUE
;
}
}
int32
card
::
is_can_add_counter
(
uint8
playerid
,
uint16
countertype
,
uint16
count
)
{
int32
card
::
is_can_add_counter
(
uint8
playerid
,
uint16
countertype
,
uint16
count
)
{
...
@@ -1799,7 +1799,7 @@ void card::filter_spsummon_procedure(uint8 playerid, effect_set* peset, uint32 s
...
@@ -1799,7 +1799,7 @@ void card::filter_spsummon_procedure(uint8 playerid, effect_set* peset, uint32 s
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
peffect
=
pr
.
first
->
second
;
peffect
=
pr
.
first
->
second
;
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
topos
=
peffect
->
s_range
;
topos
=
(
uint8
)
peffect
->
s_range
;
if
(
peffect
->
o_range
==
0
)
if
(
peffect
->
o_range
==
0
)
toplayer
=
playerid
;
toplayer
=
playerid
;
else
else
...
...
field.cpp
View file @
0113e0ce
...
@@ -1699,7 +1699,7 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack)
...
@@ -1699,7 +1699,7 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack)
continue
;
continue
;
auto
it
=
pcard
->
announced_cards
.
find
(
atarget
->
fieldid_r
);
auto
it
=
pcard
->
announced_cards
.
find
(
atarget
->
fieldid_r
);
if
(
it
!=
pcard
->
announced_cards
.
end
())
{
if
(
it
!=
pcard
->
announced_cards
.
end
())
{
if
(
it
->
second
.
second
>=
peffect
->
get_value
(
atarget
))
if
(
it
->
second
.
second
>=
(
uint32
)
peffect
->
get_value
(
atarget
))
continue
;
continue
;
}
}
if
(
atarget
->
is_affected_by_effect
(
EFFECT_IGNORE_BATTLE_TARGET
))
if
(
atarget
->
is_affected_by_effect
(
EFFECT_IGNORE_BATTLE_TARGET
))
...
...
field.h
View file @
0113e0ce
...
@@ -812,7 +812,7 @@ public:
...
@@ -812,7 +812,7 @@ public:
#define MSG_ANNOUNCE_NUMBER 143
#define MSG_ANNOUNCE_NUMBER 143
#define MSG_CARD_HINT 160
#define MSG_CARD_HINT 160
#define MSG_TAG_SWAP 161
#define MSG_TAG_SWAP 161
#define MSG_RELOAD_FIELD 162
#define MSG_RELOAD_FIELD 162
// Debug.ReloadFieldEnd()
#define MSG_AI_NAME 163
#define MSG_AI_NAME 163
#define MSG_SHOW_HINT 164
#define MSG_SHOW_HINT 164
#define MSG_MATCH_KILL 170
#define MSG_MATCH_KILL 170
...
...
libcard.cpp
View file @
0113e0ce
...
@@ -1858,7 +1858,7 @@ int32 scriptlib::card_remove_counter(lua_State *L) {
...
@@ -1858,7 +1858,7 @@ int32 scriptlib::card_remove_counter(lua_State *L) {
pcard
->
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pcard
->
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pcard
->
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pcard
->
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pcard
->
pduel
->
write_buffer8
(
pcard
->
current
.
sequence
);
pcard
->
pduel
->
write_buffer8
(
pcard
->
current
.
sequence
);
pcard
->
pduel
->
write_buffer
8
(
cmit
->
second
[
0
]
+
cmit
->
second
[
1
]);
pcard
->
pduel
->
write_buffer
16
(
cmit
->
second
[
0
]
+
cmit
->
second
[
1
]);
}
}
pcard
->
counters
.
clear
();
pcard
->
counters
.
clear
();
return
0
;
return
0
;
...
...
operations.cpp
View file @
0113e0ce
...
@@ -950,7 +950,7 @@ int32 field::control_adjust(uint16 step) {
...
@@ -950,7 +950,7 @@ int32 field::control_adjust(uint16 step) {
return
FALSE
;
return
FALSE
;
}
}
case
1
:
{
case
1
:
{
uint8
adjp
=
core
.
temp_var
[
0
];
uint8
adjp
=
(
uint8
)
core
.
temp_var
[
0
];
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
core
.
destroy_set
.
insert
(
pcard
);
core
.
destroy_set
.
insert
(
pcard
);
...
@@ -1433,7 +1433,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
...
@@ -1433,7 +1433,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc,
if
(
is_player_affected_by_effect
(
sumplayer
,
EFFECT_DEVINE_LIGHT
))
if
(
is_player_affected_by_effect
(
sumplayer
,
EFFECT_DEVINE_LIGHT
))
positions
=
POS_FACEUP
;
positions
=
POS_FACEUP
;
if
(
proc
&&
(
proc
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
)))
{
if
(
proc
&&
(
proc
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
)))
{
positions
=
proc
->
s_range
;
positions
=
(
uint8
)
proc
->
s_range
;
if
(
proc
->
o_range
)
if
(
proc
->
o_range
)
targetplayer
=
1
-
sumplayer
;
targetplayer
=
1
-
sumplayer
;
}
}
...
@@ -1875,7 +1875,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
...
@@ -1875,7 +1875,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
uint8
targetplayer
=
setplayer
;
uint8
targetplayer
=
setplayer
;
uint8
positions
=
POS_FACEDOWN_DEFENCE
;
uint8
positions
=
POS_FACEDOWN_DEFENCE
;
if
(
proc
&&
(
proc
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
)))
{
if
(
proc
&&
(
proc
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
)))
{
positions
=
proc
->
s_range
;
positions
=
(
uint8
)
proc
->
s_range
;
if
(
proc
->
o_range
)
if
(
proc
->
o_range
)
targetplayer
=
1
-
setplayer
;
targetplayer
=
1
-
setplayer
;
}
}
...
@@ -2138,7 +2138,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
...
@@ -2138,7 +2138,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
uint8
targetplayer
=
sumplayer
;
uint8
targetplayer
=
sumplayer
;
uint8
positions
=
POS_FACEUP
;
uint8
positions
=
POS_FACEUP
;
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
positions
=
peffect
->
s_range
;
positions
=
(
uint8
)
peffect
->
s_range
;
if
(
peffect
->
o_range
==
0
)
if
(
peffect
->
o_range
==
0
)
targetplayer
=
sumplayer
;
targetplayer
=
sumplayer
;
else
else
...
...
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