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
41a08a03
Commit
41a08a03
authored
Apr 30, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_OVERLAY_REMOVE_COST_CHANGE_KOISHI
parent
6866f7cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
4 deletions
+46
-4
effect.h
effect.h
+1
-0
field.cpp
field.cpp
+21
-2
interpreter.cpp
interpreter.cpp
+2
-0
operations.cpp
operations.cpp
+22
-2
No files found.
effect.h
View file @
41a08a03
...
@@ -114,6 +114,7 @@ public:
...
@@ -114,6 +114,7 @@ public:
#define EFFECT_REMOVE_LINK_MARKER_KOISHI 37564152
#define EFFECT_REMOVE_LINK_MARKER_KOISHI 37564152
#define EFFECT_CANNOT_LOSE_KOISHI 37564153
#define EFFECT_CANNOT_LOSE_KOISHI 37564153
#define EFFECT_EXTRA_TOMAIN_KOISHI 37564154
#define EFFECT_EXTRA_TOMAIN_KOISHI 37564154
#define EFFECT_OVERLAY_REMOVE_COST_CHANGE_KOISHI 37564155
//status
//status
#define EFFECT_STATUS_AVAILABLE 0x0001
#define EFFECT_STATUS_AVAILABLE 0x0001
...
...
field.cpp
View file @
41a08a03
...
@@ -3234,13 +3234,32 @@ int32 field::is_player_can_remove_counter(uint8 playerid, card * pcard, uint8 s,
...
@@ -3234,13 +3234,32 @@ int32 field::is_player_can_remove_counter(uint8 playerid, card * pcard, uint8 s,
return
FALSE
;
return
FALSE
;
}
}
int32
field
::
is_player_can_remove_overlay_card
(
uint8
playerid
,
card
*
pcard
,
uint8
s
,
uint8
o
,
uint16
min
,
uint32
reason
)
{
int32
field
::
is_player_can_remove_overlay_card
(
uint8
playerid
,
card
*
pcard
,
uint8
s
,
uint8
o
,
uint16
min
,
uint32
reason
)
{
if
((
pcard
&&
pcard
->
xyz_materials
.
size
()
>=
min
)
||
(
!
pcard
&&
get_overlay_count
(
playerid
,
s
,
o
)
>=
min
))
int32
minc
=
min
;
effect_set
eset
;
filter_player_effect
(
playerid
,
EFFECT_OVERLAY_REMOVE_COST_CHANGE_KOISHI
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
core
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
reason
,
PARAM_TYPE_INT
);
int32
param_count
;
if
(
pcard
)
{
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
param_count
=
5
;
}
else
{
pduel
->
lua
->
add_param
(
s
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
o
,
PARAM_TYPE_INT
);
param_count
=
6
;
}
minc
=
eset
[
i
]
->
get_value
(
param_count
);
}
if
((
pcard
&&
pcard
->
xyz_materials
.
size
()
>=
minc
)
||
(
!
pcard
&&
get_overlay_count
(
playerid
,
s
,
o
)
>=
minc
))
return
TRUE
;
return
TRUE
;
auto
pr
=
effects
.
continuous_effect
.
equal_range
(
EFFECT_OVERLAY_REMOVE_REPLACE
);
auto
pr
=
effects
.
continuous_effect
.
equal_range
(
EFFECT_OVERLAY_REMOVE_REPLACE
);
tevent
e
;
tevent
e
;
e
.
event_cards
=
0
;
e
.
event_cards
=
0
;
e
.
event_player
=
playerid
;
e
.
event_player
=
playerid
;
e
.
event_value
=
min
;
e
.
event_value
=
min
c
;
e
.
reason
=
reason
;
e
.
reason
=
reason
;
e
.
reason_effect
=
core
.
reason_effect
;
e
.
reason_effect
=
core
.
reason_effect
;
e
.
reason_player
=
playerid
;
e
.
reason_player
=
playerid
;
...
...
interpreter.cpp
View file @
41a08a03
...
@@ -698,6 +698,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
...
@@ -698,6 +698,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setglobal
(
lua_state
,
"EFFECT_CANNOT_LOSE_KOISHI"
);
lua_setglobal
(
lua_state
,
"EFFECT_CANNOT_LOSE_KOISHI"
);
lua_pushinteger
(
lua_state
,
EFFECT_EXTRA_TOMAIN_KOISHI
);
lua_pushinteger
(
lua_state
,
EFFECT_EXTRA_TOMAIN_KOISHI
);
lua_setglobal
(
lua_state
,
"EFFECT_EXTRA_TOMAIN_KOISHI"
);
lua_setglobal
(
lua_state
,
"EFFECT_EXTRA_TOMAIN_KOISHI"
);
lua_pushinteger
(
lua_state
,
EFFECT_OVERLAY_REMOVE_COST_CHANGE_KOISHI
);
lua_setglobal
(
lua_state
,
"EFFECT_OVERLAY_REMOVE_COST_CHANGE_KOISHI"
);
//music hints
//music hints
lua_pushinteger
(
lua_state
,
HINT_MUSIC
);
lua_pushinteger
(
lua_state
,
HINT_MUSIC
);
lua_setglobal
(
lua_state
,
"HINT_MUSIC"
);
lua_setglobal
(
lua_state
,
"HINT_MUSIC"
);
...
...
operations.cpp
View file @
41a08a03
...
@@ -758,7 +758,27 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
...
@@ -758,7 +758,27 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
case
0
:
{
case
0
:
{
core
.
select_options
.
clear
();
core
.
select_options
.
clear
();
core
.
select_effects
.
clear
();
core
.
select_effects
.
clear
();
if
((
pcard
&&
pcard
->
xyz_materials
.
size
()
>=
min
)
||
(
!
pcard
&&
get_overlay_count
(
rplayer
,
s
,
o
)
>=
min
))
{
int32
minc
=
min
;
effect_set
eset
;
filter_player_effect
(
rplayer
,
EFFECT_OVERLAY_REMOVE_COST_CHANGE_KOISHI
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
core
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
rplayer
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
reason
,
PARAM_TYPE_INT
);
int32
param_count
;
if
(
pcard
)
{
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
param_count
=
5
;
}
else
{
pduel
->
lua
->
add_param
(
s
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
o
,
PARAM_TYPE_INT
);
param_count
=
6
;
}
minc
=
eset
[
i
]
->
get_value
(
param_count
);
}
core
.
units
.
begin
()
->
arg2
=
(
max
<<
16
)
+
minc
;
if
((
pcard
&&
pcard
->
xyz_materials
.
size
()
>=
minc
)
||
(
!
pcard
&&
get_overlay_count
(
rplayer
,
s
,
o
)
>=
minc
))
{
core
.
select_options
.
push_back
(
12
);
core
.
select_options
.
push_back
(
12
);
core
.
select_effects
.
push_back
(
0
);
core
.
select_effects
.
push_back
(
0
);
}
}
...
@@ -766,7 +786,7 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
...
@@ -766,7 +786,7 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
tevent
e
;
tevent
e
;
e
.
event_cards
=
0
;
e
.
event_cards
=
0
;
e
.
event_player
=
rplayer
;
e
.
event_player
=
rplayer
;
e
.
event_value
=
min
;
e
.
event_value
=
min
c
;
e
.
reason
=
reason
;
e
.
reason
=
reason
;
e
.
reason_effect
=
core
.
reason_effect
;
e
.
reason_effect
=
core
.
reason_effect
;
e
.
reason_player
=
rplayer
;
e
.
reason_player
=
rplayer
;
...
...
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