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
37aa2592
Commit
37aa2592
authored
Sep 17, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update union
parent
886141f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
card.cpp
card.cpp
+9
-2
card.h
card.h
+1
-0
effect.h
effect.h
+2
-0
libcard.cpp
libcard.cpp
+4
-2
No files found.
card.cpp
View file @
37aa2592
...
@@ -1063,7 +1063,15 @@ void card::unequip() {
...
@@ -1063,7 +1063,15 @@ void card::unequip() {
int32
card
::
get_union_count
()
{
int32
card
::
get_union_count
()
{
int32
count
=
0
;
int32
count
=
0
;
for
(
auto
cit
=
equiping_cards
.
begin
();
cit
!=
equiping_cards
.
end
();
++
cit
)
{
for
(
auto
cit
=
equiping_cards
.
begin
();
cit
!=
equiping_cards
.
end
();
++
cit
)
{
if
(((
*
cit
)
->
data
.
type
&
TYPE_UNION
)
&&
(
*
cit
)
->
is_status
(
STATUS_UNION
))
if
(((
*
cit
)
->
data
.
type
&
TYPE_UNION
)
&&
(
*
cit
)
->
is_affected_by_effect
(
EFFECT_UNION_STATUS
))
count
++
;
}
return
count
;
}
int32
card
::
get_old_union_count
()
{
int32
count
=
0
;
for
(
auto
cit
=
equiping_cards
.
begin
();
cit
!=
equiping_cards
.
end
();
++
cit
)
{
if
(((
*
cit
)
->
data
.
type
&
TYPE_UNION
)
&&
(
*
cit
)
->
is_affected_by_effect
(
EFFECT_OLDUNION_STATUS
))
count
++
;
count
++
;
}
}
return
count
;
return
count
;
...
@@ -1495,7 +1503,6 @@ void card::reset(uint32 id, uint32 reset_type) {
...
@@ -1495,7 +1503,6 @@ void card::reset(uint32 id, uint32 reset_type) {
auto
pr
=
field_effect
.
equal_range
(
EFFECT_DISABLE_FIELD
);
auto
pr
=
field_effect
.
equal_range
(
EFFECT_DISABLE_FIELD
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
pr
.
first
->
second
->
value
=
0
;
pr
.
first
->
second
->
value
=
0
;
set_status
(
STATUS_UNION
,
FALSE
);
}
}
if
(
id
&
0xd7e0000
)
{
if
(
id
&
0xd7e0000
)
{
counters
.
clear
();
counters
.
clear
();
...
...
card.h
View file @
37aa2592
...
@@ -183,6 +183,7 @@ public:
...
@@ -183,6 +183,7 @@ public:
void
equip
(
card
*
target
,
uint32
send_msg
=
TRUE
);
void
equip
(
card
*
target
,
uint32
send_msg
=
TRUE
);
void
unequip
();
void
unequip
();
int32
get_union_count
();
int32
get_union_count
();
int32
get_old_union_count
();
void
xyz_overlay
(
card_set
*
materials
);
void
xyz_overlay
(
card_set
*
materials
);
void
xyz_add
(
card
*
mat
,
card_set
*
des
);
void
xyz_add
(
card
*
mat
,
card_set
*
des
);
void
xyz_remove
(
card
*
mat
);
void
xyz_remove
(
card
*
mat
);
...
...
effect.h
View file @
37aa2592
...
@@ -403,6 +403,8 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
...
@@ -403,6 +403,8 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_MUST_ATTACK_MONSTER 344
#define EFFECT_MUST_ATTACK_MONSTER 344
#define EFFECT_PATRICIAN_OF_DARKNESS 345
#define EFFECT_PATRICIAN_OF_DARKNESS 345
#define EFFECT_EXTRA_ATTACK_MONSTER 346
#define EFFECT_EXTRA_ATTACK_MONSTER 346
#define EFFECT_UNION_STATUS 347
#define EFFECT_OLDUNION_STATUS 348
#define EVENT_STARTUP 1000
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
#define EVENT_FLIP 1001
...
...
libcard.cpp
View file @
37aa2592
...
@@ -734,7 +734,8 @@ int32 scriptlib::card_check_equip_target(lua_State *L) {
...
@@ -734,7 +734,8 @@ int32 scriptlib::card_check_equip_target(lua_State *L) {
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
target
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
target
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
if
(
pcard
->
is_affected_by_effect
(
EFFECT_EQUIP_LIMIT
,
target
)
if
(
pcard
->
is_affected_by_effect
(
EFFECT_EQUIP_LIMIT
,
target
)
&&
(
!
pcard
->
is_status
(
STATUS_UNION
)
||
target
->
get_union_count
()
==
0
))
&&
((
!
pcard
->
is_affected_by_effect
(
EFFECT_OLDUNION_STATUS
)
||
target
->
get_union_count
()
==
0
)
&&
(
!
pcard
->
is_affected_by_effect
(
EFFECT_UNION_STATUS
)
||
target
->
get_old_union_count
()
==
0
)))
lua_pushboolean
(
L
,
1
);
lua_pushboolean
(
L
,
1
);
else
else
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
...
@@ -745,7 +746,8 @@ int32 scriptlib::card_get_union_count(lua_State *L) {
...
@@ -745,7 +746,8 @@ int32 scriptlib::card_get_union_count(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
pcard
->
get_union_count
());
lua_pushinteger
(
L
,
pcard
->
get_union_count
());
return
1
;
lua_pushinteger
(
L
,
pcard
->
get_old_union_count
());
return
2
;
}
}
int32
scriptlib
::
card_get_overlay_group
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_overlay_group
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
...
...
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