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
6a44f18c
Commit
6a44f18c
authored
Sep 26, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix extra pendulum count for tag
parent
d0924379
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
7 deletions
+14
-7
effect.h
effect.h
+0
-1
field.cpp
field.cpp
+9
-0
field.h
field.h
+1
-0
libdebug.cpp
libdebug.cpp
+1
-2
libduel.cpp
libduel.cpp
+1
-2
ocgapi.cpp
ocgapi.cpp
+1
-0
processor.cpp
processor.cpp
+1
-2
No files found.
effect.h
View file @
6a44f18c
...
@@ -381,7 +381,6 @@ public:
...
@@ -381,7 +381,6 @@ public:
#define EFFECT_ADD_SETCODE 334
#define EFFECT_ADD_SETCODE 334
#define EFFECT_NO_EFFECT_DAMAGE 335
#define EFFECT_NO_EFFECT_DAMAGE 335
#define EFFECT_UNSUMMONABLE_CARD 336
#define EFFECT_UNSUMMONABLE_CARD 336
#define EFFECT_DISABLE_CHAIN_FIELD 337
#define EVENT_STARTUP 1000
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
#define EVENT_FLIP 1001
...
...
field.cpp
View file @
6a44f18c
...
@@ -42,6 +42,7 @@ field::field(duel* pduel) {
...
@@ -42,6 +42,7 @@ field::field(duel* pduel) {
player
[
i
].
disabled_location
=
0
;
player
[
i
].
disabled_location
=
0
;
player
[
i
].
used_location
=
0
;
player
[
i
].
used_location
=
0
;
player
[
i
].
extra_p_count
=
0
;
player
[
i
].
extra_p_count
=
0
;
player
[
i
].
tag_extra_p_count
=
0
;
player
[
i
].
list_mzone
.
reserve
(
5
);
player
[
i
].
list_mzone
.
reserve
(
5
);
player
[
i
].
list_szone
.
reserve
(
8
);
player
[
i
].
list_szone
.
reserve
(
8
);
player
[
i
].
list_main
.
reserve
(
45
);
player
[
i
].
list_main
.
reserve
(
45
);
...
@@ -197,6 +198,8 @@ void field::add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence
...
@@ -197,6 +198,8 @@ void field::add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence
case
LOCATION_EXTRA
:
case
LOCATION_EXTRA
:
player
[
playerid
].
list_extra
.
push_back
(
pcard
);
player
[
playerid
].
list_extra
.
push_back
(
pcard
);
pcard
->
current
.
sequence
=
player
[
playerid
].
list_extra
.
size
()
-
1
;
pcard
->
current
.
sequence
=
player
[
playerid
].
list_extra
.
size
()
-
1
;
if
((
pcard
->
operation_param
>>
24
)
&
POS_FACEUP
)
++
player
[
playerid
].
extra_p_count
;
break
;
break
;
}
}
pcard
->
apply_field_effect
();
pcard
->
apply_field_effect
();
...
@@ -240,6 +243,8 @@ void field::remove_card(card* pcard) {
...
@@ -240,6 +243,8 @@ void field::remove_card(card* pcard) {
case
LOCATION_EXTRA
:
case
LOCATION_EXTRA
:
player
[
playerid
].
list_extra
.
erase
(
player
[
playerid
].
list_extra
.
begin
()
+
pcard
->
current
.
sequence
);
player
[
playerid
].
list_extra
.
erase
(
player
[
playerid
].
list_extra
.
begin
()
+
pcard
->
current
.
sequence
);
reset_sequence
(
playerid
,
LOCATION_EXTRA
);
reset_sequence
(
playerid
,
LOCATION_EXTRA
);
if
(
pcard
->
current
.
position
&
POS_FACEUP
)
--
player
[
playerid
].
extra_p_count
;
break
;
break
;
}
}
pcard
->
cancel_field_effect
();
pcard
->
cancel_field_effect
();
...
@@ -679,6 +684,7 @@ void field::tag_swap(uint8 playerid) {
...
@@ -679,6 +684,7 @@ void field::tag_swap(uint8 playerid) {
(
*
clit
)
->
cancel_field_effect
();
(
*
clit
)
->
cancel_field_effect
();
}
}
std
::
swap
(
player
[
playerid
].
list_extra
,
player
[
playerid
].
tag_list_extra
);
std
::
swap
(
player
[
playerid
].
list_extra
,
player
[
playerid
].
tag_list_extra
);
std
::
swap
(
player
[
playerid
].
extra_p_count
,
player
[
playerid
].
tag_extra_p_count
);
for
(
clit
=
player
[
playerid
].
list_extra
.
begin
();
clit
!=
player
[
playerid
].
list_extra
.
end
();
++
clit
)
{
for
(
clit
=
player
[
playerid
].
list_extra
.
begin
();
clit
!=
player
[
playerid
].
list_extra
.
end
();
++
clit
)
{
(
*
clit
)
->
apply_field_effect
();
(
*
clit
)
->
apply_field_effect
();
(
*
clit
)
->
enable_field_effect
(
true
);
(
*
clit
)
->
enable_field_effect
(
true
);
...
@@ -687,6 +693,7 @@ void field::tag_swap(uint8 playerid) {
...
@@ -687,6 +693,7 @@ void field::tag_swap(uint8 playerid) {
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
player
[
playerid
].
list_main
.
size
());
pduel
->
write_buffer8
(
player
[
playerid
].
list_main
.
size
());
pduel
->
write_buffer8
(
player
[
playerid
].
list_extra
.
size
());
pduel
->
write_buffer8
(
player
[
playerid
].
list_extra
.
size
());
pduel
->
write_buffer8
(
player
[
playerid
].
extra_p_count
);
pduel
->
write_buffer8
(
player
[
playerid
].
list_hand
.
size
());
pduel
->
write_buffer8
(
player
[
playerid
].
list_hand
.
size
());
if
(
core
.
deck_reversed
&&
player
[
playerid
].
list_main
.
size
())
if
(
core
.
deck_reversed
&&
player
[
playerid
].
list_main
.
size
())
pduel
->
write_buffer32
(
player
[
playerid
].
list_main
.
back
()
->
data
.
code
);
pduel
->
write_buffer32
(
player
[
playerid
].
list_main
.
back
()
->
data
.
code
);
...
@@ -694,6 +701,8 @@ void field::tag_swap(uint8 playerid) {
...
@@ -694,6 +701,8 @@ void field::tag_swap(uint8 playerid) {
pduel
->
write_buffer32
(
0
);
pduel
->
write_buffer32
(
0
);
for
(
auto
cit
=
player
[
playerid
].
list_hand
.
begin
();
cit
!=
player
[
playerid
].
list_hand
.
end
();
++
cit
)
for
(
auto
cit
=
player
[
playerid
].
list_hand
.
begin
();
cit
!=
player
[
playerid
].
list_hand
.
end
();
++
cit
)
pduel
->
write_buffer32
((
*
cit
)
->
data
.
code
|
((
*
cit
)
->
is_status
(
STATUS_IS_PUBLIC
)
?
0x80000000
:
0
));
pduel
->
write_buffer32
((
*
cit
)
->
data
.
code
|
((
*
cit
)
->
is_status
(
STATUS_IS_PUBLIC
)
?
0x80000000
:
0
));
for
(
auto
cit
=
player
[
playerid
].
list_extra
.
begin
();
cit
!=
player
[
playerid
].
list_extra
.
end
();
++
cit
)
pduel
->
write_buffer32
((
*
cit
)
->
data
.
code
|
((
*
cit
)
->
is_position
(
POS_FACEUP
)
?
0x80000000
:
0
));
}
}
void
field
::
add_effect
(
effect
*
peffect
,
uint8
owner_player
)
{
void
field
::
add_effect
(
effect
*
peffect
,
uint8
owner_player
)
{
if
(
!
peffect
->
handler
)
{
if
(
!
peffect
->
handler
)
{
...
...
field.h
View file @
6a44f18c
...
@@ -72,6 +72,7 @@ struct player_info {
...
@@ -72,6 +72,7 @@ struct player_info {
uint32
used_location
;
uint32
used_location
;
uint32
disabled_location
;
uint32
disabled_location
;
uint32
extra_p_count
;
uint32
extra_p_count
;
uint32
tag_extra_p_count
;
card_vector
list_mzone
;
card_vector
list_mzone
;
card_vector
list_szone
;
card_vector
list_szone
;
card_vector
list_main
;
card_vector
list_main
;
...
...
libdebug.cpp
View file @
6a44f18c
...
@@ -39,14 +39,13 @@ int32 scriptlib::debug_add_card(lua_State *L) {
...
@@ -39,14 +39,13 @@ int32 scriptlib::debug_add_card(lua_State *L) {
if
(
pduel
->
game_field
->
is_location_useable
(
playerid
,
location
,
sequence
))
{
if
(
pduel
->
game_field
->
is_location_useable
(
playerid
,
location
,
sequence
))
{
card
*
pcard
=
pduel
->
new_card
(
code
);
card
*
pcard
=
pduel
->
new_card
(
code
);
pcard
->
owner
=
owner
;
pcard
->
owner
=
owner
;
pcard
->
operation_param
=
position
<<
24
;
pduel
->
game_field
->
add_card
(
playerid
,
pcard
,
location
,
sequence
);
pduel
->
game_field
->
add_card
(
playerid
,
pcard
,
location
,
sequence
);
pcard
->
current
.
position
=
position
;
pcard
->
current
.
position
=
position
;
if
(
!
(
location
&
LOCATION_ONFIELD
)
||
(
position
&
POS_FACEUP
))
{
if
(
!
(
location
&
LOCATION_ONFIELD
)
||
(
position
&
POS_FACEUP
))
{
pcard
->
enable_field_effect
(
TRUE
);
pcard
->
enable_field_effect
(
TRUE
);
pduel
->
game_field
->
adjust_instant
();
pduel
->
game_field
->
adjust_instant
();
}
}
if
((
pcard
->
data
.
type
&
TYPE_PENDULUM
)
&&
(
location
==
LOCATION_EXTRA
)
&&
(
position
&
POS_FACEUP
))
pduel
->
game_field
->
player
[
playerid
].
extra_p_count
+=
1
;
if
(
proc
)
if
(
proc
)
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
TRUE
);
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
TRUE
);
interpreter
::
card2value
(
L
,
pcard
);
interpreter
::
card2value
(
L
,
pcard
);
...
...
libduel.cpp
View file @
6a44f18c
...
@@ -1256,7 +1256,6 @@ int32 scriptlib::duel_negate_effect(lua_State *L) {
...
@@ -1256,7 +1256,6 @@ int32 scriptlib::duel_negate_effect(lua_State *L) {
lua_pushboolean
(
L
,
pduel
->
game_field
->
disable_chain
(
c
));
lua_pushboolean
(
L
,
pduel
->
game_field
->
disable_chain
(
c
));
return
1
;
return
1
;
}
}
// negate the effects activated on field
int32
scriptlib
::
duel_negate_related_chain
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_negate_related_chain
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
@@ -1270,7 +1269,7 @@ int32 scriptlib::duel_negate_related_chain(lua_State *L) {
...
@@ -1270,7 +1269,7 @@ int32 scriptlib::duel_negate_related_chain(lua_State *L) {
effect
*
negeff
=
pduel
->
new_effect
();
effect
*
negeff
=
pduel
->
new_effect
();
negeff
->
owner
=
pduel
->
game_field
->
core
.
reason_effect
->
handler
;
negeff
->
owner
=
pduel
->
game_field
->
core
.
reason_effect
->
handler
;
negeff
->
type
=
EFFECT_TYPE_SINGLE
;
negeff
->
type
=
EFFECT_TYPE_SINGLE
;
negeff
->
code
=
EFFECT_DISABLE_CHAIN
_FIELD
;
negeff
->
code
=
EFFECT_DISABLE_CHAIN
;
negeff
->
reset_flag
=
RESET_CHAIN
|
RESET_EVENT
|
reset_flag
;
negeff
->
reset_flag
=
RESET_CHAIN
|
RESET_EVENT
|
reset_flag
;
pcard
->
add_effect
(
negeff
);
pcard
->
add_effect
(
negeff
);
return
0
;
return
0
;
...
...
ocgapi.cpp
View file @
6a44f18c
...
@@ -315,6 +315,7 @@ extern "C" DECL_DLLEXPORT int32 query_field_info(ptr pduel, byte* buf) {
...
@@ -315,6 +315,7 @@ extern "C" DECL_DLLEXPORT int32 query_field_info(ptr pduel, byte* buf) {
*
buf
++
=
ptduel
->
game_field
->
player
[
playerid
].
list_grave
.
size
();
*
buf
++
=
ptduel
->
game_field
->
player
[
playerid
].
list_grave
.
size
();
*
buf
++
=
ptduel
->
game_field
->
player
[
playerid
].
list_remove
.
size
();
*
buf
++
=
ptduel
->
game_field
->
player
[
playerid
].
list_remove
.
size
();
*
buf
++
=
ptduel
->
game_field
->
player
[
playerid
].
list_extra
.
size
();
*
buf
++
=
ptduel
->
game_field
->
player
[
playerid
].
list_extra
.
size
();
*
buf
++
=
ptduel
->
game_field
->
player
[
playerid
].
extra_p_count
;
}
}
*
buf
++
=
ptduel
->
game_field
->
core
.
current_chain
.
size
();
*
buf
++
=
ptduel
->
game_field
->
core
.
current_chain
.
size
();
for
(
auto
chit
=
ptduel
->
game_field
->
core
.
current_chain
.
begin
();
chit
!=
ptduel
->
game_field
->
core
.
current_chain
.
end
();
++
chit
)
{
for
(
auto
chit
=
ptduel
->
game_field
->
core
.
current_chain
.
begin
();
chit
!=
ptduel
->
game_field
->
core
.
current_chain
.
end
();
++
chit
)
{
...
...
processor.cpp
View file @
6a44f18c
...
@@ -4564,8 +4564,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
...
@@ -4564,8 +4564,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
card
*
pcard
=
cait
->
triggering_effect
->
handler
;
card
*
pcard
=
cait
->
triggering_effect
->
handler
;
if
(
is_chain_disablable
(
cait
->
chain_count
))
{
if
(
is_chain_disablable
(
cait
->
chain_count
))
{
if
((
cait
->
flag
&
CHAIN_DISABLE_EFFECT
)
||
pcard
->
is_affected_by_effect
(
EFFECT_DISABLE_CHAIN
)
if
((
cait
->
flag
&
CHAIN_DISABLE_EFFECT
)
||
pcard
->
is_affected_by_effect
(
EFFECT_DISABLE_CHAIN
)
||
((
cait
->
triggering_location
&
LOCATION_ONFIELD
)
&&
pcard
->
is_affected_by_effect
(
EFFECT_DISABLE_CHAIN_FIELD
))
||
(
pcard
->
is_status
(
STATUS_DISABLED
)
&&
pcard
->
is_has_relation
(
cait
->
triggering_effect
)))
{
||
(
pcard
->
is_status
(
STATUS_DISABLED
)
&&
pcard
->
is_has_relation
(
cait
->
triggering_effect
)))
{
if
(
!
(
cait
->
flag
&
CHAIN_DISABLE_EFFECT
))
{
if
(
!
(
cait
->
flag
&
CHAIN_DISABLE_EFFECT
))
{
pduel
->
write_buffer8
(
MSG_CHAIN_DISABLED
);
pduel
->
write_buffer8
(
MSG_CHAIN_DISABLED
);
pduel
->
write_buffer8
(
cait
->
chain_count
);
pduel
->
write_buffer8
(
cait
->
chain_count
);
...
...
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