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
df798aed
You need to sign in or sign up before continuing.
Commit
df798aed
authored
Jul 24, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update & fix
parent
b1190ba0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
24 deletions
+21
-24
card.cpp
card.cpp
+17
-14
card.h
card.h
+2
-2
libcard.cpp
libcard.cpp
+2
-8
No files found.
card.cpp
View file @
df798aed
...
...
@@ -1309,8 +1309,8 @@ void card::get_mutual_linked_cards(card_set* cset) {
return
;
int32
p
=
current
.
controler
;
uint32
mutual_linked_zone
=
get_mutual_linked_zone
();
pduel
->
game_field
->
get_cards_in_zone
(
cset
,
mutual_linked_zone
,
p
);
pduel
->
game_field
->
get_cards_in_zone
(
cset
,
mutual_linked_zone
>>
16
,
1
-
p
);
pduel
->
game_field
->
get_cards_in_zone
(
cset
,
mutual_linked_zone
,
p
,
LOCATION_MZONE
);
pduel
->
game_field
->
get_cards_in_zone
(
cset
,
mutual_linked_zone
>>
16
,
1
-
p
,
LOCATION_MZONE
);
}
int32
card
::
is_link_state
()
{
if
(
current
.
location
!=
LOCATION_MZONE
)
...
...
@@ -1344,7 +1344,7 @@ int32 card::is_status(uint32 status) {
return
TRUE
;
return
FALSE
;
}
uint32
card
::
get_column_zone
(
int32
loc1
,
int32
left
,
int32
right
,
uint32
excheck
)
{
uint32
card
::
get_column_zone
(
int32
loc1
,
int32
left
,
int32
right
)
{
int32
zones
=
0
;
int32
loc2
=
current
.
location
;
int32
s
=
current
.
sequence
;
...
...
@@ -1354,9 +1354,9 @@ uint32 card::get_column_zone(int32 loc1, int32 left, int32 right, uint32 excheck
if
(
loc1
!=
loc2
)
zones
|=
1u
<<
s
;
zones
|=
1u
<<
(
16
+
(
4
-
s
));
if
(
s
==
1
&&
excheck
)
if
(
s
==
1
)
zones
|=
(
1u
<<
5
)
|
(
1u
<<
(
16
+
6
));
if
(
s
==
3
&&
excheck
)
if
(
s
==
3
)
zones
|=
(
1u
<<
6
)
|
(
1u
<<
(
16
+
5
));
}
if
(
s
==
5
)
...
...
@@ -1368,9 +1368,9 @@ uint32 card::get_column_zone(int32 loc1, int32 left, int32 right, uint32 excheck
if
(
seq
>=
0
)
{
if
(
seq
<=
4
)
{
zones
|=
1u
<<
seq
|
1u
<<
(
16
+
(
4
-
seq
));
if
(
seq
==
1
&&
excheck
)
if
(
seq
==
1
)
zones
|=
(
1u
<<
5
)
|
(
1u
<<
(
16
+
6
));
if
(
seq
==
3
&&
excheck
)
if
(
seq
==
3
)
zones
|=
(
1u
<<
6
)
|
(
1u
<<
(
16
+
5
));
}
if
(
seq
==
5
)
...
...
@@ -1384,9 +1384,9 @@ uint32 card::get_column_zone(int32 loc1, int32 left, int32 right, uint32 excheck
if
(
seq
<=
6
)
{
if
(
seq
<=
4
)
{
zones
|=
1u
<<
seq
|
1u
<<
(
16
+
(
4
-
seq
));
if
(
seq
==
1
&&
excheck
)
if
(
seq
==
1
)
zones
|=
(
1u
<<
5
)
|
(
1u
<<
(
16
+
6
));
if
(
seq
==
3
&&
excheck
)
if
(
seq
==
3
)
zones
|=
(
1u
<<
6
)
|
(
1u
<<
(
16
+
5
));
}
if
(
seq
==
5
)
...
...
@@ -1397,13 +1397,13 @@ uint32 card::get_column_zone(int32 loc1, int32 left, int32 right, uint32 excheck
}
return
zones
;
}
void
card
::
get_column_cards
(
card_set
*
cset
,
int32
left
,
int32
right
,
uint32
excheck
)
{
void
card
::
get_column_cards
(
card_set
*
cset
,
int32
left
,
int32
right
)
{
cset
->
clear
();
if
(
!
(
current
.
location
&
LOCATION_ONFIELD
))
return
;
int32
p
=
current
.
controler
;
uint32
column_mzone
=
get_column_zone
(
LOCATION_MZONE
,
left
,
right
,
excheck
);
uint32
column_szone
=
get_column_zone
(
LOCATION_SZONE
,
left
,
right
,
false
);
uint32
column_mzone
=
get_column_zone
(
LOCATION_MZONE
,
left
,
right
);
uint32
column_szone
=
get_column_zone
(
LOCATION_SZONE
,
left
,
right
);
pduel
->
game_field
->
get_cards_in_zone
(
cset
,
column_mzone
,
p
,
LOCATION_MZONE
);
pduel
->
game_field
->
get_cards_in_zone
(
cset
,
column_mzone
>>
16
,
1
-
p
,
LOCATION_MZONE
);
pduel
->
game_field
->
get_cards_in_zone
(
cset
,
column_szone
,
p
,
LOCATION_SZONE
);
...
...
@@ -1413,8 +1413,11 @@ int32 card::is_all_column() {
if
(
!
(
current
.
location
&
LOCATION_ONFIELD
))
return
FALSE
;
card_set
cset
;
get_column_cards
(
&
cset
,
0
,
0
,
true
);
if
((
cset
.
size
()
==
3
&&
pduel
->
game_field
->
core
.
duel_rule
<
4
)
||
(
cset
.
size
()
==
4
&&
pduel
->
game_field
->
core
.
duel_rule
>=
4
))
get_column_cards
(
&
cset
,
0
,
0
);
int32
full
=
3
;
if
(
pduel
->
game_field
->
core
.
duel_rule
>=
4
&&
(
current
.
sequence
==
1
||
current
.
sequence
==
3
))
full
++
;
if
(
cset
.
size
()
==
full
)
return
TRUE
;
return
FALSE
;
}
...
...
card.h
View file @
df798aed
...
...
@@ -208,8 +208,8 @@ public:
void
set_status
(
uint32
status
,
int32
enabled
);
int32
get_status
(
uint32
status
);
int32
is_status
(
uint32
status
);
uint32
get_column_zone
(
int32
loc1
,
int32
left
,
int32
right
,
uint32
excheck
);
void
get_column_cards
(
card_set
*
cset
,
int32
left
,
int32
right
,
uint32
excheck
);
uint32
get_column_zone
(
int32
loc1
,
int32
left
,
int32
right
);
void
get_column_cards
(
card_set
*
cset
,
int32
left
,
int32
right
);
int32
is_all_column
();
void
equip
(
card
*
target
,
uint32
send_msg
=
TRUE
);
...
...
libcard.cpp
View file @
df798aed
...
...
@@ -350,15 +350,12 @@ int32 scriptlib::card_get_column_group(lua_State *L) {
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
int32
left
=
0
;
int32
right
=
0
;
uint32
excheck
=
TRUE
;
if
(
lua_gettop
(
L
)
>=
2
)
left
=
lua_tointeger
(
L
,
2
);
if
(
lua_gettop
(
L
)
>=
3
)
right
=
lua_tointeger
(
L
,
3
);
if
(
lua_gettop
(
L
)
>=
4
)
excheck
=
lua_toboolean
(
L
,
4
);
card
::
card_set
cset
;
pcard
->
get_column_cards
(
&
cset
,
left
,
right
,
excheck
);
pcard
->
get_column_cards
(
&
cset
,
left
,
right
);
group
*
pgroup
=
pcard
->
pduel
->
new_group
(
cset
);
interpreter
::
group2value
(
L
,
pgroup
);
return
1
;
...
...
@@ -369,15 +366,12 @@ int32 scriptlib::card_get_column_group_count(lua_State *L) {
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
int32
left
=
0
;
int32
right
=
0
;
uint32
excheck
=
TRUE
;
if
(
lua_gettop
(
L
)
>=
2
)
left
=
lua_tointeger
(
L
,
2
);
if
(
lua_gettop
(
L
)
>=
3
)
right
=
lua_tointeger
(
L
,
3
);
if
(
lua_gettop
(
L
)
>=
4
)
excheck
=
lua_toboolean
(
L
,
4
);
card
::
card_set
cset
;
pcard
->
get_column_cards
(
&
cset
,
left
,
right
,
excheck
);
pcard
->
get_column_cards
(
&
cset
,
left
,
right
);
lua_pushinteger
(
L
,
cset
.
size
());
return
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