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
6dae5c4d
Commit
6dae5c4d
authored
Jul 09, 2019
by
DailyShana
Committed by
nekrozar
Jul 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update EFFECT_OVERLAY_REMOVE_REPLACE (#229)
fix Fluorohydride/ygopro#2220
parent
511f2f9f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
12 deletions
+23
-12
libcard.cpp
libcard.cpp
+1
-1
libduel.cpp
libduel.cpp
+1
-1
operations.cpp
operations.cpp
+21
-10
No files found.
libcard.cpp
View file @
6dae5c4d
...
...
@@ -1347,7 +1347,7 @@ int32 scriptlib::card_remove_overlay_card(lua_State *L) {
pduel
->
game_field
->
remove_overlay_card
(
reason
,
pcard
,
playerid
,
0
,
0
,
min
,
max
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
duel
*
pduel
=
(
duel
*
)
ctx
;
lua_push
boolean
(
L
,
pduel
->
game_field
->
returns
.
ivalue
[
0
]);
lua_push
integer
(
L
,
pduel
->
game_field
->
returns
.
ivalue
[
0
]);
return
1
;
});
}
...
...
libduel.cpp
View file @
6dae5c4d
...
...
@@ -3314,7 +3314,7 @@ int32 scriptlib::duel_remove_overlay_card(lua_State *L) {
pduel
->
game_field
->
remove_overlay_card
(
reason
,
0
,
playerid
,
s
,
o
,
min
,
max
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
duel
*
pduel
=
(
duel
*
)
ctx
;
lua_push
boolean
(
L
,
pduel
->
game_field
->
returns
.
ivalue
[
0
]);
lua_push
integer
(
L
,
pduel
->
game_field
->
returns
.
ivalue
[
0
]);
return
1
;
});
}
...
...
operations.cpp
View file @
6dae5c4d
...
...
@@ -765,8 +765,7 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
return
FALSE
;
}
case
1
:
{
effect
*
peffect
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
if
(
peffect
)
{
if
(
effect
*
peffect
=
core
.
select_effects
[
returns
.
ivalue
[
0
]])
{
tevent
e
;
e
.
event_cards
=
0
;
e
.
event_player
=
rplayer
;
...
...
@@ -775,9 +774,24 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
e
.
reason_effect
=
core
.
reason_effect
;
e
.
reason_player
=
rplayer
;
solve_continuous
(
rplayer
,
peffect
,
e
);
core
.
units
.
begin
()
->
step
=
3
;
core
.
units
.
begin
()
->
peffect
=
peffect
;
}
return
FALSE
;
}
case
2
:
{
uint16
cancelable
=
FALSE
;
if
(
core
.
units
.
begin
()
->
peffect
)
{
int32
replace_count
=
returns
.
ivalue
[
0
];
if
(
replace_count
>=
max
)
return
TRUE
;
min
-=
replace_count
;
max
-=
replace_count
;
if
(
min
<=
0
)
{
cancelable
=
TRUE
;
min
=
0
;
}
core
.
units
.
begin
()
->
arg4
=
replace_count
;
}
core
.
select_cards
.
clear
();
if
(
pcard
)
{
for
(
auto
&
mcard
:
pcard
->
xyz_materials
)
...
...
@@ -792,21 +806,18 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
rplayer
);
pduel
->
write_buffer32
(
519
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
rplayer
,
min
+
(
max
<<
16
));
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
rplayer
+
(
cancelable
<<
16
)
,
min
+
(
max
<<
16
));
return
FALSE
;
}
case
2
:
{
case
3
:
{
card_set
cset
;
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
cset
.
insert
(
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]]);
send_to
(
&
cset
,
core
.
reason_effect
,
reason
,
rplayer
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
return
FALSE
;
}
case
3
:
{
return
FALSE
;
}
case
4
:
{
returns
.
ivalue
[
0
]
=
1
;
returns
.
ivalue
[
0
]
+=
core
.
units
.
begin
()
->
arg4
;
return
TRUE
;
}
}
...
...
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