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
987c0e45
Commit
987c0e45
authored
Jul 04, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
db06c9ea
18ad0454
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
field.cpp
field.cpp
+8
-0
operations.cpp
operations.cpp
+12
-4
No files found.
field.cpp
View file @
987c0e45
...
...
@@ -2754,6 +2754,14 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 lv, int32 min,
if
(
ft
<=
0
)
return
FALSE
;
}
int32
mzone_limit
=
get_mzone_limit
(
playerid
,
playerid
,
LOCATION_REASON_TOFIELD
);
if
(
mzone_limit
<=
0
)
{
int32
ft
=
-
mzone_limit
+
1
;
if
(
ft
>
min
)
min
=
ft
;
if
(
min
>
max
)
return
FALSE
;
}
effect_set
eset
;
filter_player_effect
(
playerid
,
EFFECT_MUST_BE_XMATERIAL
,
&
eset
);
card_set
mcset
;
...
...
operations.cpp
View file @
987c0e45
...
...
@@ -5498,6 +5498,14 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
switch(step) {
case 0: {
core.operated_set.clear();
int32 mzone_limit = get_mzone_limit(playerid, playerid, LOCATION_REASON_TOFIELD);
if(mzone_limit <= 0) {
int32 ft = -mzone_limit + 1;
if(ft > min) {
min = ft;
core.units.begin()->arg2 = min + (max << 16);
}
}
effect_set eset;
filter_player_effect(playerid, EFFECT_MUST_BE_XMATERIAL, &eset);
core.select_cards.clear();
...
...
@@ -5543,7 +5551,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
min -= returns.bvalue[0];
if(min < 0)
min = 0;
if(
(int32)core.operated_set.size() < pv
)
if(
pv - (int32)core.operated_set.size() > min
)
min = pv - (int32)core.operated_set.size();
core.units.begin()->arg2 = min + (max << 16);
if(min == 0) {
...
...
@@ -5707,7 +5715,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
}
if(min > 0)
min--;
if(
(int32)core.operated_set.size() < pv
)
if(
pv - (int32)core.operated_set.size() > min
)
min = pv - (int32)core.operated_set.size();
core.units.begin()->arg2 = min + (max << 16);
if(min == 0) {
...
...
@@ -5788,7 +5796,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
return TRUE;
}
min = 0;
if(
(int32)core.operated_set.size() < pv
)
if(
pv - (int32)core.operated_set.size() > min
)
min = pv - (int32)core.operated_set.size();
core.units.begin()->arg2 = min + (max << 16);
if(min == 0) {
...
...
@@ -5895,7 +5903,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
}
if(min > 0)
min--;
if(
(int32)core.operated_set.size() < pv
)
if(
pv - (int32)core.operated_set.size() > min
)
min = pv - (int32)core.operated_set.size();
core.units.begin()->arg2 = min + (max << 16);
core.units.begin()->arg3 = selectable;
...
...
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