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
998ee3c3
Commit
998ee3c3
authored
Dec 21, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d48e60cb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
10 deletions
+52
-10
card.cpp
card.cpp
+14
-6
field.cpp
field.cpp
+3
-1
field.h
field.h
+3
-1
libcard.cpp
libcard.cpp
+8
-0
libduel.cpp
libduel.cpp
+8
-0
operations.cpp
operations.cpp
+16
-2
No files found.
card.cpp
View file @
998ee3c3
...
...
@@ -1715,11 +1715,11 @@ void card::filter_spsummon_procedure(uint8 playerid, effect_set* peset, uint32 s
topos
=
POS_FACEUP
;
toplayer
=
playerid
;
}
effect
*
sumeffect
=
pduel
->
game_field
->
core
.
reason_effect
;
if
(
!
sumeffect
)
sumeffect
=
peffect
;
if
(
peffect
->
is_available
()
&&
peffect
->
check_count_limit
(
playerid
)
&&
is_summonable
(
sumeffect
)
if
(
peffect
->
is_available
()
&&
peffect
->
check_count_limit
(
playerid
)
&&
is_summonable
(
peffect
)
&&
!
pduel
->
game_field
->
check_unique_onfield
(
this
,
toplayer
))
{
effect
*
sumeffect
=
pduel
->
game_field
->
core
.
reason_effect
;
if
(
!
sumeffect
)
sumeffect
=
peffect
;
uint32
sumtype
=
peffect
->
get_value
(
this
);
if
((
!
summon_type
||
summon_type
==
sumtype
)
&&
pduel
->
game_field
->
is_player_can_spsummon
(
sumeffect
,
sumtype
,
topos
,
playerid
,
toplayer
,
this
))
...
...
@@ -1876,7 +1876,13 @@ int32 card::is_summonable(effect* peffect) {
result
=
TRUE
;
}
else
if
(
pduel
->
game_field
->
core
.
limit_xyz
)
{
pduel
->
lua
->
add_param
(
pduel
->
game_field
->
core
.
limit_xyz
,
PARAM_TYPE_GROUP
);
if
(
pduel
->
lua
->
check_condition
(
peffect
->
condition
,
3
))
uint32
param_count
=
3
;
if
(
pduel
->
game_field
->
core
.
limit_xyz_minc
)
{
pduel
->
lua
->
add_param
(
pduel
->
game_field
->
core
.
limit_xyz_minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
pduel
->
game_field
->
core
.
limit_xyz_maxc
,
PARAM_TYPE_INT
);
param_count
=
5
;
}
if
(
pduel
->
lua
->
check_condition
(
peffect
->
condition
,
param_count
))
result
=
TRUE
;
}
else
{
if
(
pduel
->
lua
->
check_condition
(
peffect
->
condition
,
2
))
...
...
@@ -2068,8 +2074,10 @@ int32 card::is_special_summonable(uint8 playerid, uint32 summon_type) {
eset
.
clear
();
filter_spsummon_procedure
(
playerid
,
&
eset
,
summon_type
);
pduel
->
game_field
->
core
.
limit_tuner
=
0
;
pduel
->
game_field
->
core
.
limit_xyz
=
0
;
pduel
->
game_field
->
core
.
limit_syn
=
0
;
pduel
->
game_field
->
core
.
limit_xyz
=
0
;
pduel
->
game_field
->
core
.
limit_xyz_minc
=
0
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
0
;
pduel
->
game_field
->
restore_lp_cost
();
return
eset
.
size
();
}
...
...
field.cpp
View file @
998ee3c3
...
...
@@ -79,8 +79,10 @@ field::field(duel* pduel) {
core
.
overdraw
[
1
]
=
FALSE
;
core
.
check_level
=
0
;
core
.
limit_tuner
=
0
;
core
.
limit_xyz
=
0
;
core
.
limit_syn
=
0
;
core
.
limit_xyz
=
0
;
core
.
limit_xyz_minc
=
0
;
core
.
limit_xyz_maxc
=
0
;
core
.
duel_options
=
0
;
core
.
attacker
=
0
;
core
.
attack_target
=
0
;
...
...
field.h
View file @
998ee3c3
...
...
@@ -244,8 +244,10 @@ struct processor {
card
*
attack_target
;
card
*
sub_attack_target
;
card
*
limit_tuner
;
group
*
limit_xyz
;
group
*
limit_syn
;
group
*
limit_xyz
;
int32
limit_xyz_minc
;
int32
limit_xyz_maxc
;
uint8
attack_cancelable
;
uint8
attack_rollback
;
uint8
effect_damage_step
;
...
...
libcard.cpp
View file @
998ee3c3
...
...
@@ -1304,8 +1304,16 @@ int32 scriptlib::card_is_xyz_summonable(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
);
materials
=
*
(
group
**
)
lua_touserdata
(
L
,
2
);
}
int32
minc
=
0
;
if
(
lua_gettop
(
L
)
>=
3
)
minc
=
lua_tointeger
(
L
,
3
);
int32
maxc
=
0
;
if
(
lua_gettop
(
L
)
>=
4
)
maxc
=
lua_tointeger
(
L
,
4
);
uint32
p
=
pcard
->
pduel
->
game_field
->
core
.
reason_player
;
pcard
->
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
pcard
->
pduel
->
game_field
->
core
.
limit_xyz_minc
=
minc
;
pcard
->
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
lua_pushboolean
(
L
,
pcard
->
is_special_summonable
(
p
,
SUMMON_TYPE_XYZ
));
return
1
;
}
...
...
libduel.cpp
View file @
998ee3c3
...
...
@@ -278,8 +278,16 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_GROUP
,
3
);
materials
=
*
(
group
**
)
lua_touserdata
(
L
,
3
);
}
int32
minc
=
0
;
if
(
lua_gettop
(
L
)
>=
4
)
minc
=
lua_tointeger
(
L
,
4
);
int32
maxc
=
0
;
if
(
lua_gettop
(
L
)
>=
5
)
maxc
=
lua_tointeger
(
L
,
5
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
pduel
->
game_field
->
core
.
limit_xyz_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
);
return
lua_yield
(
L
,
0
);
...
...
operations.cpp
View file @
998ee3c3
...
...
@@ -2045,13 +2045,17 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
case
0
:
{
effect_set
eset
;
card
*
tuner
=
core
.
limit_tuner
;
group
*
materials
=
core
.
limit_xyz
;
group
*
syn
=
core
.
limit_syn
;
group
*
materials
=
core
.
limit_xyz
;
int32
minc
=
core
.
limit_xyz_minc
;
int32
maxc
=
core
.
limit_xyz_maxc
;
target
->
filter_spsummon_procedure
(
sumplayer
,
&
eset
,
summon_type
);
target
->
filter_spsummon_procedure_g
(
sumplayer
,
&
eset
);
core
.
limit_tuner
=
tuner
;
core
.
limit_xyz
=
materials
;
core
.
limit_syn
=
syn
;
core
.
limit_xyz
=
materials
;
core
.
limit_xyz_minc
=
minc
;
core
.
limit_xyz_maxc
=
maxc
;
if
(
!
eset
.
size
())
return
TRUE
;
core
.
select_effects
.
clear
();
...
...
@@ -2081,6 +2085,10 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
pduel
->
lua
->
add_param
(
core
.
limit_syn
,
PARAM_TYPE_GROUP
);
}
else
if
(
core
.
limit_xyz
)
{
pduel
->
lua
->
add_param
(
core
.
limit_xyz
,
PARAM_TYPE_GROUP
);
if
(
core
.
limit_xyz_minc
)
{
pduel
->
lua
->
add_param
(
core
.
limit_xyz_minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_xyz_maxc
,
PARAM_TYPE_INT
);
}
}
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_TARGET
,
0
,
peffect
,
0
,
sumplayer
,
0
);
...
...
@@ -2115,6 +2123,12 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
if
(
core
.
limit_xyz
)
{
pduel
->
lua
->
add_param
(
core
.
limit_xyz
,
PARAM_TYPE_GROUP
);
core
.
limit_xyz
=
0
;
if
(
core
.
limit_xyz_minc
)
{
pduel
->
lua
->
add_param
(
core
.
limit_xyz_minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_xyz_maxc
,
PARAM_TYPE_INT
);
core
.
limit_xyz_minc
=
0
;
core
.
limit_xyz_maxc
=
0
;
}
}
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
peffect
,
0
,
sumplayer
,
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