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
0af344a3
Commit
0af344a3
authored
Jul 29, 2020
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update comment
parent
cc6a9a5a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
field.cpp
field.cpp
+5
-3
No files found.
field.cpp
View file @
0af344a3
...
@@ -633,9 +633,6 @@ int32 field::is_location_useable(uint32 playerid, uint32 location, uint32 sequen
...
@@ -633,9 +633,6 @@ int32 field::is_location_useable(uint32 playerid, uint32 location, uint32 sequen
}
}
return TRUE;
return TRUE;
}
}
// uplayer: request player, PLAYER_NONE means ignoring EFFECT_MAX_MZONE, EFFECT_MAX_SZONE
// list: store local flag in list
// return: usable count of LOCATION_MZONE or real LOCATION_SZONE of playerid requested by uplayer (may be negative)
int32 field::get_useable_count(card* pcard, uint8 playerid, uint8 location, uint8 uplayer, uint32 reason, uint32 zone, uint32* list) {
int32 field::get_useable_count(card* pcard, uint8 playerid, uint8 location, uint8 uplayer, uint32 reason, uint32 zone, uint32* list) {
if(location == LOCATION_MZONE && pcard && pcard->current.location == LOCATION_EXTRA)
if(location == LOCATION_MZONE && pcard && pcard->current.location == LOCATION_EXTRA)
return get_useable_count_fromex(pcard, playerid, uplayer, zone, list);
return get_useable_count_fromex(pcard, playerid, uplayer, zone, list);
...
@@ -680,6 +677,7 @@ int32 field::get_spsummonable_count_fromex(card* pcard, uint8 playerid, uint8 up
...
@@ -680,6 +677,7 @@ int32 field::get_spsummonable_count_fromex(card* pcard, uint8 playerid, uint8 up
pcard->current.location = 0;
pcard->current.location = 0;
return spsummonable_count;
return spsummonable_count;
}
}
// return: usable count of main mzone or szone(0~4) of playerid requested by uplayer (may be negative)
int32 field::get_useable_count_other(card* pcard, uint8 playerid, uint8 location, uint8 uplayer, uint32 reason, uint32 zone, uint32* list) {
int32 field::get_useable_count_other(card* pcard, uint8 playerid, uint8 location, uint8 uplayer, uint32 reason, uint32 zone, uint32* list) {
int32 count = get_tofield_count(pcard, playerid, location, uplayer, reason, zone, list);
int32 count = get_tofield_count(pcard, playerid, location, uplayer, reason, zone, list);
int32 limit;
int32 limit;
...
@@ -691,6 +689,10 @@ int32 field::get_useable_count_other(card* pcard, uint8 playerid, uint8 location
...
@@ -691,6 +689,10 @@ int32 field::get_useable_count_other(card* pcard, uint8 playerid, uint8 location
count = limit;
count = limit;
return count;
return count;
}
}
// uplayer: request player, PLAYER_NONE means ignoring EFFECT_MUST_USE_MZONE, EFFECT_MAX_MZONE, EFFECT_MAX_SZONE
// list: store unavailable flag in list
// for LOCATION_MZONE, return the available count of zone in main mzone (not used, not disabled, satisfying EFFECT_MUST_USE_MZONE)
// for LOCATION_SZONE, return the available count of zone in szone(0~4) (not used, not disabled)
int32 field::get_tofield_count(card* pcard, uint8 playerid, uint8 location, uint32 uplayer, uint32 reason, uint32 zone, uint32* list) {
int32 field::get_tofield_count(card* pcard, uint8 playerid, uint8 location, uint32 uplayer, uint32 reason, uint32 zone, uint32* list) {
if (location != LOCATION_MZONE && location != LOCATION_SZONE)
if (location != LOCATION_MZONE && location != LOCATION_SZONE)
return 0;
return 0;
...
...
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