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
4340adc9
Commit
4340adc9
authored
Aug 24, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
6118ae22
dda0bd01
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
35 deletions
+38
-35
card.cpp
card.cpp
+11
-11
effect.cpp
effect.cpp
+11
-12
field.cpp
field.cpp
+8
-4
field.h
field.h
+2
-2
libduel.cpp
libduel.cpp
+1
-1
operations.cpp
operations.cpp
+5
-5
No files found.
card.cpp
View file @
4340adc9
...
@@ -2561,14 +2561,14 @@ int32 card::filter_summon_procedure(uint8 playerid, effect_set* peset, uint8 ign
...
@@ -2561,14 +2561,14 @@ int32 card::filter_summon_procedure(uint8 playerid, effect_set* peset, uint8 ign
peset
->
add_item
(
eset
[
i
]);
peset
->
add_item
(
eset
[
i
]);
}
}
// ordinary summon
// ordinary summon
if
(
!
pduel
->
game_field
->
is_player_can_summon
(
SUMMON_TYPE_NORMAL
,
playerid
,
this
))
if
(
!
pduel
->
game_field
->
is_player_can_summon
(
SUMMON_TYPE_NORMAL
,
playerid
,
this
,
playerid
))
return
FALSE
;
return
FALSE
;
if
(
pduel
->
game_field
->
check_unique_onfield
(
this
,
playerid
,
LOCATION_MZONE
))
if
(
pduel
->
game_field
->
check_unique_onfield
(
this
,
playerid
,
LOCATION_MZONE
))
return
FALSE
;
return
FALSE
;
int32
rcount
=
get_summon_tribute_count
();
int32
rcount
=
get_summon_tribute_count
();
int32
min
=
rcount
&
0xffff
;
int32
min
=
rcount
&
0xffff
;
int32
max
=
(
rcount
>>
16
)
&
0xffff
;
int32
max
=
(
rcount
>>
16
)
&
0xffff
;
if
(
!
pduel
->
game_field
->
is_player_can_summon
(
SUMMON_TYPE_ADVANCE
,
playerid
,
this
))
if
(
!
pduel
->
game_field
->
is_player_can_summon
(
SUMMON_TYPE_ADVANCE
,
playerid
,
this
,
playerid
))
max
=
0
;
max
=
0
;
if
(
min
<
min_tribute
)
if
(
min
<
min_tribute
)
min
=
min_tribute
;
min
=
min_tribute
;
...
@@ -2597,13 +2597,13 @@ int32 card::filter_summon_procedure(uint8 playerid, effect_set* peset, uint8 ign
...
@@ -2597,13 +2597,13 @@ int32 card::filter_summon_procedure(uint8 playerid, effect_set* peset, uint8 ign
int32
card
::
check_summon_procedure
(
effect
*
peffect
,
uint8
playerid
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
)
{
int32
card
::
check_summon_procedure
(
effect
*
peffect
,
uint8
playerid
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
)
{
if
(
!
peffect
->
check_count_limit
(
playerid
))
if
(
!
peffect
->
check_count_limit
(
playerid
))
return
FALSE
;
return
FALSE
;
if
(
!
pduel
->
game_field
->
is_player_can_summon
(
peffect
->
get_value
(
this
),
playerid
,
this
))
return
FALSE
;
uint8
toplayer
=
playerid
;
uint8
toplayer
=
playerid
;
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
if
(
peffect
->
o_range
)
if
(
peffect
->
o_range
)
toplayer
=
1
-
playerid
;
toplayer
=
1
-
playerid
;
}
}
if
(
!
pduel
->
game_field
->
is_player_can_summon
(
peffect
->
get_value
(
this
),
playerid
,
this
,
toplayer
))
return
FALSE
;
if
(
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
,
LOCATION_MZONE
))
if
(
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
,
LOCATION_MZONE
))
return
FALSE
;
return
FALSE
;
// the script will check min_tribute, Duel.CheckTribute()
// the script will check min_tribute, Duel.CheckTribute()
...
@@ -2646,12 +2646,12 @@ int32 card::filter_set_procedure(uint8 playerid, effect_set* peset, uint8 ignore
...
@@ -2646,12 +2646,12 @@ int32 card::filter_set_procedure(uint8 playerid, effect_set* peset, uint8 ignore
if
(
check_set_procedure
(
eset
[
i
],
playerid
,
ignore_count
,
min_tribute
,
zone
))
if
(
check_set_procedure
(
eset
[
i
],
playerid
,
ignore_count
,
min_tribute
,
zone
))
peset
->
add_item
(
eset
[
i
]);
peset
->
add_item
(
eset
[
i
]);
}
}
if
(
!
pduel
->
game_field
->
is_player_can_mset
(
SUMMON_TYPE_NORMAL
,
playerid
,
this
))
if
(
!
pduel
->
game_field
->
is_player_can_mset
(
SUMMON_TYPE_NORMAL
,
playerid
,
this
,
playerid
))
return
FALSE
;
return
FALSE
;
int32
rcount
=
get_set_tribute_count
();
int32
rcount
=
get_set_tribute_count
();
int32
min
=
rcount
&
0xffff
;
int32
min
=
rcount
&
0xffff
;
int32
max
=
(
rcount
>>
16
)
&
0xffff
;
int32
max
=
(
rcount
>>
16
)
&
0xffff
;
if
(
!
pduel
->
game_field
->
is_player_can_mset
(
SUMMON_TYPE_ADVANCE
,
playerid
,
this
))
if
(
!
pduel
->
game_field
->
is_player_can_mset
(
SUMMON_TYPE_ADVANCE
,
playerid
,
this
,
playerid
))
max
=
0
;
max
=
0
;
if
(
min
<
min_tribute
)
if
(
min
<
min_tribute
)
min
=
min_tribute
;
min
=
min_tribute
;
...
@@ -2680,13 +2680,13 @@ int32 card::filter_set_procedure(uint8 playerid, effect_set* peset, uint8 ignore
...
@@ -2680,13 +2680,13 @@ int32 card::filter_set_procedure(uint8 playerid, effect_set* peset, uint8 ignore
int32
card
::
check_set_procedure
(
effect
*
peffect
,
uint8
playerid
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
)
{
int32
card
::
check_set_procedure
(
effect
*
peffect
,
uint8
playerid
,
uint8
ignore_count
,
uint8
min_tribute
,
uint32
zone
)
{
if
(
!
peffect
->
check_count_limit
(
playerid
))
if
(
!
peffect
->
check_count_limit
(
playerid
))
return
FALSE
;
return
FALSE
;
if
(
!
pduel
->
game_field
->
is_player_can_mset
(
peffect
->
get_value
(
this
),
playerid
,
this
))
return
FALSE
;
uint8
toplayer
=
playerid
;
uint8
toplayer
=
playerid
;
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
if
(
peffect
->
is_flag
(
EFFECT_FLAG_SPSUM_PARAM
))
{
if
(
peffect
->
o_range
)
if
(
peffect
->
o_range
)
toplayer
=
1
-
playerid
;
toplayer
=
1
-
playerid
;
}
}
if
(
!
pduel
->
game_field
->
is_player_can_mset
(
peffect
->
get_value
(
this
),
playerid
,
this
,
toplayer
))
return
FALSE
;
if
(
!
ignore_count
&&
!
pduel
->
game_field
->
core
.
extra_summon
[
playerid
]
if
(
!
ignore_count
&&
!
pduel
->
game_field
->
core
.
extra_summon
[
playerid
]
&&
pduel
->
game_field
->
core
.
summon_count
[
playerid
]
>=
pduel
->
game_field
->
get_summon_count_limit
(
playerid
))
{
&&
pduel
->
game_field
->
core
.
summon_count
[
playerid
]
>=
pduel
->
game_field
->
get_summon_count_limit
(
playerid
))
{
effect_set
eset
;
effect_set
eset
;
...
@@ -3060,7 +3060,7 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
...
@@ -3060,7 +3060,7 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
if
(
is_position
(
POS_FACEDOWN
)
if
(
is_position
(
POS_FACEDOWN
)
||
!
is_affected_by_effect
(
EFFECT_DUAL_SUMMONABLE
)
||
!
is_affected_by_effect
(
EFFECT_DUAL_SUMMONABLE
)
||
is_affected_by_effect
(
EFFECT_DUAL_STATUS
)
||
is_affected_by_effect
(
EFFECT_DUAL_STATUS
)
||
!
pduel
->
game_field
->
is_player_can_summon
(
SUMMON_TYPE_DUAL
,
playerid
,
this
)
||
!
pduel
->
game_field
->
is_player_can_summon
(
SUMMON_TYPE_DUAL
,
playerid
,
this
,
playerid
)
||
is_affected_by_effect
(
EFFECT_CANNOT_SUMMON
))
{
||
is_affected_by_effect
(
EFFECT_CANNOT_SUMMON
))
{
pduel
->
game_field
->
restore_lp_cost
();
pduel
->
game_field
->
restore_lp_cost
();
return
FALSE
;
return
FALSE
;
...
@@ -3073,7 +3073,7 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
...
@@ -3073,7 +3073,7 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
effect_set
proc
;
effect_set
proc
;
int32
res
=
filter_summon_procedure
(
playerid
,
&
proc
,
ignore_count
,
min_tribute
,
zone
);
int32
res
=
filter_summon_procedure
(
playerid
,
&
proc
,
ignore_count
,
min_tribute
,
zone
);
if
(
peffect
)
{
if
(
peffect
)
{
if
(
res
<
0
||
!
pduel
->
game_field
->
is_player_can_summon
(
peffect
->
get_value
(),
playerid
,
this
))
{
if
(
res
<
0
||
!
pduel
->
game_field
->
is_player_can_summon
(
peffect
->
get_value
(),
playerid
,
this
,
playerid
))
{
pduel
->
game_field
->
restore_lp_cost
();
pduel
->
game_field
->
restore_lp_cost
();
return
FALSE
;
return
FALSE
;
}
}
...
@@ -3266,7 +3266,7 @@ int32 card::is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect
...
@@ -3266,7 +3266,7 @@ int32 card::is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect
effect_set
eset
;
effect_set
eset
;
int32
res
=
filter_set_procedure
(
playerid
,
&
eset
,
ignore_count
,
min_tribute
,
zone
);
int32
res
=
filter_set_procedure
(
playerid
,
&
eset
,
ignore_count
,
min_tribute
,
zone
);
if
(
peffect
)
{
if
(
peffect
)
{
if
(
res
<
0
||
!
pduel
->
game_field
->
is_player_can_mset
(
peffect
->
get_value
(),
playerid
,
this
))
{
if
(
res
<
0
||
!
pduel
->
game_field
->
is_player_can_mset
(
peffect
->
get_value
(),
playerid
,
this
,
playerid
))
{
pduel
->
game_field
->
restore_lp_cost
();
pduel
->
game_field
->
restore_lp_cost
();
return
FALSE
;
return
FALSE
;
}
}
...
...
effect.cpp
View file @
4340adc9
...
@@ -191,18 +191,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
...
@@ -191,18 +191,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
&&
!
pduel
->
game_field
->
get_cteffect
(
this
,
playerid
,
FALSE
))
&&
!
pduel
->
game_field
->
get_cteffect
(
this
,
playerid
,
FALSE
))
return
FALSE
;
return
FALSE
;
}
}
// additional check for each location
if
(
handler
->
current
.
location
==
LOCATION_SZONE
)
{
if
(
handler
->
current
.
location
==
LOCATION_HAND
)
{
if
(
handler
->
data
.
type
&
TYPE_MONSTER
)
{
if
(
!
(
handler
->
data
.
type
&
TYPE_PENDULUM
))
return
FALSE
;
if
(
!
pduel
->
game_field
->
is_location_useable
(
playerid
,
LOCATION_PZONE
,
0
)
&&
!
pduel
->
game_field
->
is_location_useable
(
playerid
,
LOCATION_PZONE
,
1
))
return
FALSE
;
}
else
if
(
!
(
handler
->
data
.
type
&
TYPE_FIELD
)
&&
pduel
->
game_field
->
get_useable_count
(
handler
,
playerid
,
LOCATION_SZONE
,
playerid
,
LOCATION_REASON_TOFIELD
)
<=
0
)
return
FALSE
;
}
else
if
(
handler
->
current
.
location
==
LOCATION_SZONE
)
{
if
(
handler
->
is_position
(
POS_FACEUP
))
if
(
handler
->
is_position
(
POS_FACEUP
))
return
FALSE
;
return
FALSE
;
if
(
handler
->
equiping_target
)
if
(
handler
->
equiping_target
)
...
@@ -211,6 +200,16 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
...
@@ -211,6 +200,16 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
((
handler
->
data
.
type
&
TYPE_SPELL
)
&&
(
handler
->
data
.
type
&
TYPE_QUICKPLAY
))
if
((
handler
->
data
.
type
&
TYPE_SPELL
)
&&
(
handler
->
data
.
type
&
TYPE_QUICKPLAY
))
return
FALSE
;
return
FALSE
;
}
}
}
else
{
if
(
handler
->
data
.
type
&
TYPE_MONSTER
)
{
if
(
!
(
handler
->
data
.
type
&
TYPE_PENDULUM
))
return
FALSE
;
if
(
!
pduel
->
game_field
->
is_location_useable
(
playerid
,
LOCATION_PZONE
,
0
)
&&
!
pduel
->
game_field
->
is_location_useable
(
playerid
,
LOCATION_PZONE
,
1
))
return
FALSE
;
}
else
if
(
!
(
handler
->
data
.
type
&
TYPE_FIELD
)
&&
pduel
->
game_field
->
get_useable_count
(
handler
,
playerid
,
LOCATION_SZONE
,
playerid
,
LOCATION_REASON_TOFIELD
)
<=
0
)
return
FALSE
;
}
}
// check activate in hand/in set turn
// check activate in hand/in set turn
int32
ecode
=
0
;
int32
ecode
=
0
;
...
...
field.cpp
View file @
4340adc9
...
@@ -2890,7 +2890,7 @@ int32 field::is_player_can_summon(uint8 playerid) {
...
@@ -2890,7 +2890,7 @@ int32 field::is_player_can_summon(uint8 playerid) {
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
)
{
int32
field
::
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
,
uint8
toplayer
)
{
effect_set
eset
;
effect_set
eset
;
sumtype
|=
SUMMON_TYPE_NORMAL
;
sumtype
|=
SUMMON_TYPE_NORMAL
;
filter_player_effect
(
playerid
,
EFFECT_CANNOT_SUMMON
,
&
eset
);
filter_player_effect
(
playerid
,
EFFECT_CANNOT_SUMMON
,
&
eset
);
...
@@ -2901,12 +2901,14 @@ int32 field::is_player_can_summon(uint32 sumtype, uint8 playerid, card * pcard)
...
@@ -2901,12 +2901,14 @@ int32 field::is_player_can_summon(uint32 sumtype, uint8 playerid, card * pcard)
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
sumtype
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
sumtype
,
PARAM_TYPE_INT
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
4
))
pduel
->
lua
->
add_param
(
POS_FACEUP
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
toplayer
,
PARAM_TYPE_INT
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
6
))
return
FALSE
;
return
FALSE
;
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
is_player_can_mset
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
)
{
int32
field
::
is_player_can_mset
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
,
uint8
toplayer
)
{
effect_set
eset
;
effect_set
eset
;
sumtype
|=
SUMMON_TYPE_NORMAL
;
sumtype
|=
SUMMON_TYPE_NORMAL
;
filter_player_effect
(
playerid
,
EFFECT_CANNOT_MSET
,
&
eset
);
filter_player_effect
(
playerid
,
EFFECT_CANNOT_MSET
,
&
eset
);
...
@@ -2917,7 +2919,9 @@ int32 field::is_player_can_mset(uint32 sumtype, uint8 playerid, card * pcard) {
...
@@ -2917,7 +2919,9 @@ int32 field::is_player_can_mset(uint32 sumtype, uint8 playerid, card * pcard) {
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
sumtype
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
sumtype
,
PARAM_TYPE_INT
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
4
))
pduel
->
lua
->
add_param
(
POS_FACEDOWN
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
toplayer
,
PARAM_TYPE_INT
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
6
))
return
FALSE
;
return
FALSE
;
}
}
return
TRUE
;
return
TRUE
;
...
...
field.h
View file @
4340adc9
...
@@ -449,8 +449,8 @@ public:
...
@@ -449,8 +449,8 @@ public:
int32
is_player_can_discard_deck_as_cost
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_deck_as_cost
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_hand
(
uint8
playerid
,
card
*
pcard
,
effect
*
peffect
,
uint32
reason
);
int32
is_player_can_discard_hand
(
uint8
playerid
,
card
*
pcard
,
effect
*
peffect
,
uint32
reason
);
int32
is_player_can_summon
(
uint8
playerid
);
int32
is_player_can_summon
(
uint8
playerid
);
int32
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
,
uint8
toplayer
);
int32
is_player_can_mset
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_mset
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
,
uint8
toplayer
);
int32
is_player_can_sset
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_sset
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_spsummon
(
uint8
playerid
);
int32
is_player_can_spsummon
(
uint8
playerid
);
int32
is_player_can_spsummon
(
effect
*
peffect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
playerid
,
uint8
toplayer
,
card
*
pcard
);
int32
is_player_can_spsummon
(
effect
*
peffect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
playerid
,
uint8
toplayer
,
card
*
pcard
);
...
...
libduel.cpp
View file @
4340adc9
...
@@ -3680,7 +3680,7 @@ int32 scriptlib::duel_is_player_can_summon(lua_State * L) {
...
@@ -3680,7 +3680,7 @@ int32 scriptlib::duel_is_player_can_summon(lua_State * L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
int32
sumtype
=
lua_tointeger
(
L
,
2
);
int32
sumtype
=
lua_tointeger
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
3
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_summon
(
sumtype
,
playerid
,
pcard
));
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_summon
(
sumtype
,
playerid
,
pcard
,
playerid
));
}
}
return
1
;
return
1
;
}
}
...
...
operations.cpp
View file @
4340adc9
...
@@ -1474,7 +1474,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1474,7 +1474,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
return
TRUE
;
return
TRUE
;
if
(
target
->
is_affected_by_effect
(
EFFECT_DUAL_STATUS
))
if
(
target
->
is_affected_by_effect
(
EFFECT_DUAL_STATUS
))
return
TRUE
;
return
TRUE
;
if
(
!
is_player_can_summon
(
SUMMON_TYPE_DUAL
,
sumplayer
,
target
))
if
(
!
is_player_can_summon
(
SUMMON_TYPE_DUAL
,
sumplayer
,
target
,
sumplayer
))
return
TRUE
;
return
TRUE
;
}
else
{
}
else
{
effect_set
eset
;
effect_set
eset
;
...
@@ -1561,7 +1561,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1561,7 +1561,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
int32
rcount
=
target
->
get_summon_tribute_count
();
int32
rcount
=
target
->
get_summon_tribute_count
();
int32
min
=
rcount
&
0xffff
;
int32
min
=
rcount
&
0xffff
;
int32
max
=
(
rcount
>>
16
)
&
0xffff
;
int32
max
=
(
rcount
>>
16
)
&
0xffff
;
if
(
!
is_player_can_summon
(
SUMMON_TYPE_ADVANCE
,
sumplayer
,
target
))
if
(
!
is_player_can_summon
(
SUMMON_TYPE_ADVANCE
,
sumplayer
,
target
,
sumplayer
))
max
=
0
;
max
=
0
;
if
(
min
<
(
int32
)
min_tribute
)
if
(
min
<
(
int32
)
min_tribute
)
min
=
min_tribute
;
min
=
min_tribute
;
...
@@ -1608,7 +1608,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1608,7 +1608,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
if
(
min
<
min_tribute
)
{
if
(
min
<
min_tribute
)
{
min
=
min_tribute
;
min
=
min_tribute
;
}
}
uint32
adv
=
is_player_can_summon
(
SUMMON_TYPE_ADVANCE
,
sumplayer
,
target
);
uint32
adv
=
is_player_can_summon
(
SUMMON_TYPE_ADVANCE
,
sumplayer
,
target
,
sumplayer
);
if
(
max
==
0
||
!
adv
)
{
if
(
max
==
0
||
!
adv
)
{
returns
.
bvalue
[
0
]
=
0
;
returns
.
bvalue
[
0
]
=
0
;
core
.
units
.
begin
()
->
step
=
3
;
core
.
units
.
begin
()
->
step
=
3
;
...
@@ -2094,7 +2094,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
...
@@ -2094,7 +2094,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
int32
rcount
=
target
->
get_set_tribute_count
();
int32
rcount
=
target
->
get_set_tribute_count
();
int32
min
=
rcount
&
0xffff
;
int32
min
=
rcount
&
0xffff
;
int32
max
=
(
rcount
>>
16
)
&
0xffff
;
int32
max
=
(
rcount
>>
16
)
&
0xffff
;
if
(
!
is_player_can_summon
(
SUMMON_TYPE_ADVANCE
,
setplayer
,
target
))
if
(
!
is_player_can_summon
(
SUMMON_TYPE_ADVANCE
,
setplayer
,
target
,
setplayer
))
max
=
0
;
max
=
0
;
if
(
min
<
(
int32
)
min_tribute
)
if
(
min
<
(
int32
)
min_tribute
)
min
=
min_tribute
;
min
=
min_tribute
;
...
@@ -2141,7 +2141,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
...
@@ -2141,7 +2141,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card* target, effect* proc, uint
if
(
min
<
min_tribute
)
{
if
(
min
<
min_tribute
)
{
min
=
min_tribute
;
min
=
min_tribute
;
}
}
uint32
adv
=
is_player_can_mset
(
SUMMON_TYPE_ADVANCE
,
setplayer
,
target
);
uint32
adv
=
is_player_can_mset
(
SUMMON_TYPE_ADVANCE
,
setplayer
,
target
,
setplayer
);
if
(
max
==
0
||
!
adv
)
{
if
(
max
==
0
||
!
adv
)
{
returns
.
bvalue
[
0
]
=
0
;
returns
.
bvalue
[
0
]
=
0
;
core
.
units
.
begin
()
->
step
=
3
;
core
.
units
.
begin
()
->
step
=
3
;
...
...
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