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
219162ca
Commit
219162ca
authored
Mar 16, 2021
by
salix5
Committed by
GitHub
Mar 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove COUNTER_NEED_ENABLE (#366)
parent
b75bb919
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
card.cpp
card.cpp
+3
-5
card.h
card.h
+1
-1
libdebug.cpp
libdebug.cpp
+2
-2
No files found.
card.cpp
View file @
219162ca
...
@@ -2125,7 +2125,7 @@ int32 card::destination_redirect(uint8 destination, uint32 reason) {
...
@@ -2125,7 +2125,7 @@ int32 card::destination_redirect(uint8 destination, uint32 reason) {
int32
card
::
add_counter
(
uint8
playerid
,
uint16
countertype
,
uint16
count
,
uint8
singly
)
{
int32
card
::
add_counter
(
uint8
playerid
,
uint16
countertype
,
uint16
count
,
uint8
singly
)
{
if
(
!
is_can_add_counter
(
playerid
,
countertype
,
count
,
singly
,
0
))
if
(
!
is_can_add_counter
(
playerid
,
countertype
,
count
,
singly
,
0
))
return
FALSE
;
return
FALSE
;
uint16
cttype
=
countertype
&
~
COUNTER_NEED_ENABLE
;
uint16
cttype
=
countertype
;
auto
pr
=
counters
.
emplace
(
cttype
,
counter_map
::
mapped_type
());
auto
pr
=
counters
.
emplace
(
cttype
,
counter_map
::
mapped_type
());
auto
cmit
=
pr
.
first
;
auto
cmit
=
pr
.
first
;
if
(
pr
.
second
)
{
if
(
pr
.
second
)
{
...
@@ -2145,7 +2145,7 @@ int32 card::add_counter(uint8 playerid, uint16 countertype, uint16 count, uint8
...
@@ -2145,7 +2145,7 @@ int32 card::add_counter(uint8 playerid, uint16 countertype, uint16 count, uint8
pcount
=
mcount
;
pcount
=
mcount
;
}
}
}
}
if
(
(
countertype
&
COUNTER_WITHOUT_PERMIT
)
&&
!
(
countertype
&
COUNTER_NEED_ENABLE
)
)
if
(
countertype
&
COUNTER_WITHOUT_PERMIT
)
cmit
->
second
[
0
]
+=
pcount
;
cmit
->
second
[
0
]
+=
pcount
;
else
else
cmit
->
second
[
1
]
+=
pcount
;
cmit
->
second
[
1
]
+=
pcount
;
...
@@ -2188,8 +2188,6 @@ int32 card::is_can_add_counter(uint8 playerid, uint16 countertype, uint16 count,
...
@@ -2188,8 +2188,6 @@ int32 card::is_can_add_counter(uint8 playerid, uint16 countertype, uint16 count,
return
FALSE
;
return
FALSE
;
if
(
!
loc
&&
(
!
(
current
.
location
&
LOCATION_ONFIELD
)
||
!
is_position
(
POS_FACEUP
)))
if
(
!
loc
&&
(
!
(
current
.
location
&
LOCATION_ONFIELD
)
||
!
is_position
(
POS_FACEUP
)))
return
FALSE
;
return
FALSE
;
if
((
countertype
&
COUNTER_NEED_ENABLE
)
&&
is_status
(
STATUS_DISABLED
))
return
FALSE
;
}
}
uint32
check
=
countertype
&
COUNTER_WITHOUT_PERMIT
;
uint32
check
=
countertype
&
COUNTER_WITHOUT_PERMIT
;
if
(
!
check
)
{
if
(
!
check
)
{
...
@@ -2215,7 +2213,7 @@ int32 card::is_can_add_counter(uint8 playerid, uint16 countertype, uint16 count,
...
@@ -2215,7 +2213,7 @@ int32 card::is_can_add_counter(uint8 playerid, uint16 countertype, uint16 count,
}
}
if
(
!
check
)
if
(
!
check
)
return
FALSE
;
return
FALSE
;
uint16
cttype
=
countertype
&
~
COUNTER_NEED_ENABLE
;
uint16
cttype
=
countertype
;
int32
limit
=
-
1
;
int32
limit
=
-
1
;
int32
cur
=
0
;
int32
cur
=
0
;
auto
cmit
=
counters
.
find
(
cttype
);
auto
cmit
=
counters
.
find
(
cttype
);
...
...
card.h
View file @
219162ca
...
@@ -366,7 +366,7 @@ public:
...
@@ -366,7 +366,7 @@ public:
#define SUMMON_TYPE_LINK 0x4c000000
#define SUMMON_TYPE_LINK 0x4c000000
//Counter
//Counter
#define COUNTER_WITHOUT_PERMIT 0x1000
#define COUNTER_WITHOUT_PERMIT 0x1000
#define COUNTER_NEED_ENABLE 0x2000
//
#define COUNTER_NEED_ENABLE 0x2000
#define ASSUME_CODE 1
#define ASSUME_CODE 1
#define ASSUME_TYPE 2
#define ASSUME_TYPE 2
...
...
libdebug.cpp
View file @
219162ca
...
@@ -127,14 +127,14 @@ int32 scriptlib::debug_pre_add_counter(lua_State *L) {
...
@@ -127,14 +127,14 @@ int32 scriptlib::debug_pre_add_counter(lua_State *L) {
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
countertype
=
(
uint32
)
lua_tointeger
(
L
,
2
);
uint32
countertype
=
(
uint32
)
lua_tointeger
(
L
,
2
);
uint32
count
=
(
uint32
)
lua_tointeger
(
L
,
3
);
uint32
count
=
(
uint32
)
lua_tointeger
(
L
,
3
);
uint16
cttype
=
countertype
&
~
COUNTER_NEED_ENABLE
;
uint16
cttype
=
countertype
;
auto
pr
=
pcard
->
counters
.
emplace
(
cttype
,
card
::
counter_map
::
mapped_type
());
auto
pr
=
pcard
->
counters
.
emplace
(
cttype
,
card
::
counter_map
::
mapped_type
());
auto
cmit
=
pr
.
first
;
auto
cmit
=
pr
.
first
;
if
(
pr
.
second
)
{
if
(
pr
.
second
)
{
cmit
->
second
[
0
]
=
0
;
cmit
->
second
[
0
]
=
0
;
cmit
->
second
[
1
]
=
0
;
cmit
->
second
[
1
]
=
0
;
}
}
if
(
(
countertype
&
COUNTER_WITHOUT_PERMIT
)
&&
!
(
countertype
&
COUNTER_NEED_ENABLE
)
)
if
(
countertype
&
COUNTER_WITHOUT_PERMIT
)
cmit
->
second
[
0
]
+=
count
;
cmit
->
second
[
0
]
+=
count
;
else
else
cmit
->
second
[
1
]
+=
count
;
cmit
->
second
[
1
]
+=
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