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
49225a65
Commit
49225a65
authored
Mar 27, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d919474e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
13 deletions
+29
-13
card.cpp
card.cpp
+1
-1
field.cpp
field.cpp
+8
-4
libcard.cpp
libcard.cpp
+7
-7
operations.cpp
operations.cpp
+13
-1
No files found.
card.cpp
View file @
49225a65
...
...
@@ -3129,7 +3129,7 @@ int32 card::is_capable_change_position(uint8 playerid) {
return
TRUE
;
}
int32
card
::
is_capable_turn_set
(
uint8
playerid
)
{
if
(
data
.
type
&
TYPE_TOKEN
)
if
(
data
.
type
&
(
TYPE_LINK
|
TYPE_TOKEN
)
)
return
FALSE
;
if
(
is_position
(
POS_FACEDOWN
))
return
FALSE
;
...
...
field.cpp
View file @
49225a65
...
...
@@ -150,7 +150,7 @@ void field::add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence
return
;
if
(
!
is_location_useable
(
playerid
,
location
,
sequence
))
return
;
if
((
pcard
->
data
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
))
&&
(
location
&
(
LOCATION_HAND
|
LOCATION_DECK
)))
{
if
((
pcard
->
data
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
&&
(
location
&
(
LOCATION_HAND
|
LOCATION_DECK
)))
{
location
=
LOCATION_EXTRA
;
pcard
->
operation_param
=
(
pcard
->
operation_param
&
0x00ffffff
)
|
(
POS_FACEDOWN_DEFENSE
<<
24
);
}
...
...
@@ -280,7 +280,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
return
;
uint8
preplayer
=
pcard
->
current
.
controler
;
uint8
presequence
=
pcard
->
current
.
sequence
;
if
((
pcard
->
data
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
))
&&
(
location
&
(
LOCATION_HAND
|
LOCATION_DECK
)))
{
if
((
pcard
->
data
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
&&
(
location
&
(
LOCATION_HAND
|
LOCATION_DECK
)))
{
location
=
LOCATION_EXTRA
;
pcard
->
operation_param
=
(
pcard
->
operation_param
&
0x00ffffff
)
|
(
POS_FACEDOWN_DEFENSE
<<
24
);
}
...
...
@@ -706,7 +706,7 @@ void field::swap_deck_and_grave(uint8 playerid) {
player
[
playerid
].
list_grave
.
swap
(
player
[
playerid
].
list_main
);
card_vector
ex
;
for
(
auto
clit
=
player
[
playerid
].
list_main
.
begin
();
clit
!=
player
[
playerid
].
list_main
.
end
();
)
{
if
((
*
clit
)
->
data
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
))
{
if
((
*
clit
)
->
data
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
{
ex
.
push_back
(
*
clit
);
clit
=
player
[
playerid
].
list_main
.
erase
(
clit
);
}
else
...
...
@@ -2552,11 +2552,15 @@ int32 field::is_player_can_spsummon(uint8 playerid) {
}
return
is_player_can_spsummon_count
(
playerid
,
1
);
}
int32
field
::
is_player_can_spsummon
(
effect
*
peffect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
playerid
,
uint8
toplayer
,
card
*
pcard
)
{
int32
field
::
is_player_can_spsummon
(
effect
*
peffect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
playerid
,
uint8
toplayer
,
card
*
pcard
)
{
if
(
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_SPECIAL_SUMMON
))
return
FALSE
;
if
(
pcard
->
is_status
(
STATUS_FORBIDDEN
))
return
FALSE
;
if
(
pcard
->
data
.
type
&
TYPE_LINK
)
sumpos
&=
POS_FACEUP_ATTACK
;
if
(
sumpos
==
0
)
return
FALSE
;
sumtype
|=
SUMMON_TYPE_SPECIAL
;
save_lp_cost
();
effect_set
eset
;
...
...
libcard.cpp
View file @
49225a65
...
...
@@ -283,6 +283,13 @@ int32 scriptlib::card_get_linked_group_count(lua_State *L) {
lua_pushinteger
(
L
,
cset
.
size
());
return
1
;
}
int32
scriptlib
::
card_get_linked_zone
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
pcard
->
get_linked_zone
());
return
1
;
}
int32
scriptlib
::
card_get_attribute
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
@@ -1114,13 +1121,6 @@ int32 scriptlib::card_get_effect_count(lua_State *L) {
lua_pushinteger
(
L
,
eset
.
size
());
return
1
;
}
int32
scriptlib
::
card_get_linked_zone
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushinteger
(
L
,
pcard
->
get_linked_zone
());
return
1
;
}
int32
scriptlib
::
card_register_flag_effect
(
lua_State
*
L
)
{
check_param_count
(
L
,
5
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
operations.cpp
View file @
49225a65
...
...
@@ -2711,7 +2711,15 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
raise_single_event
(
*
cit
,
0
,
EVENT_SPSUMMON_SUCCESS
,
(
*
cit
)
->
current
.
reason_effect
,
0
,
(
*
cit
)
->
current
.
reason_player
,
(
*
cit
)
->
summon_player
,
0
);
int32
summontype
=
(
*
cit
)
->
summon_info
&
0xff000000
;
if
(
summontype
&&
(
*
cit
)
->
material_cards
.
size
())
{
int32
matreason
=
(
summontype
==
SUMMON_TYPE_FUSION
)
?
REASON_FUSION
:
(
summontype
==
SUMMON_TYPE_RITUAL
)
?
REASON_RITUAL
:
(
summontype
==
SUMMON_TYPE_XYZ
)
?
REASON_XYZ
:
0
;
int32
matreason
=
0
;
if
(
summontype
==
SUMMON_TYPE_FUSION
)
matreason
=
REASON_FUSION
;
else
if
(
summontype
==
SUMMON_TYPE_RITUAL
)
matreason
=
REASON_RITUAL
;
else
if
(
summontype
==
SUMMON_TYPE_XYZ
)
matreason
=
REASON_XYZ
;
else
if
(
summontype
==
SUMMON_TYPE_LINK
)
matreason
=
REASON_LINK
;
for
(
auto
mit
=
(
*
cit
)
->
material_cards
.
begin
();
mit
!=
(
*
cit
)
->
material_cards
.
end
();
++
mit
)
raise_single_event
(
*
mit
,
&
targets
->
container
,
EVENT_BE_MATERIAL
,
(
*
cit
)
->
current
.
reason_effect
,
matreason
,
(
*
cit
)
->
current
.
reason_player
,
(
*
cit
)
->
summon_player
,
0
);
raise_event
(
&
((
*
cit
)
->
material_cards
),
EVENT_BE_MATERIAL
,
reason_effect
,
matreason
,
reason_player
,
(
*
cit
)
->
summon_player
,
0
);
...
...
@@ -3936,6 +3944,10 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
returns
.
ivalue
[
0
]
=
positions
;
return
FALSE
;
}
if
(
target
->
data
.
type
&
TYPE_LINK
)
{
returns
.
ivalue
[
0
]
=
POS_FACEUP_ATTACK
;
return
FALSE
;
}
add_process
(
PROCESSOR_SELECT_POSITION
,
0
,
0
,
0
,
(
positions
<<
16
)
+
move_player
,
target
->
data
.
code
);
return
FALSE
;
}
...
...
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