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
1d36640e
Commit
1d36640e
authored
Feb 03, 2022
by
Chrono-Genex
Committed by
GitHub
Feb 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update for 肆世壊の継承 (#430)
parent
d06fda91
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
8 deletions
+43
-8
card.cpp
card.cpp
+30
-0
card.h
card.h
+1
-0
field.cpp
field.cpp
+5
-4
operations.cpp
operations.cpp
+7
-4
No files found.
card.cpp
View file @
1d36640e
...
@@ -3275,6 +3275,36 @@ int32 card::is_can_be_special_summoned(effect* reason_effect, uint32 sumtype, ui
...
@@ -3275,6 +3275,36 @@ int32 card::is_can_be_special_summoned(effect* reason_effect, uint32 sumtype, ui
pduel
->
game_field
->
restore_lp_cost
();
pduel
->
game_field
->
restore_lp_cost
();
return
TRUE
;
return
TRUE
;
}
}
uint8
card
::
get_spsummonable_position
(
effect
*
reason_effect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
sumplayer
,
uint8
toplayer
)
{
uint8
position
=
0
;
uint8
positions
[
4
]
=
{
POS_FACEUP_ATTACK
,
POS_FACEDOWN_ATTACK
,
POS_FACEUP_DEFENSE
,
POS_FACEDOWN_DEFENSE
};
effect_set
eset
;
for
(
int32
p
=
0
;
p
<
4
;
++
p
)
{
bool
poscheck
=
true
;
if
(
!
(
positions
[
p
]
&
sumpos
))
continue
;
if
((
data
.
type
&
(
TYPE_TOKEN
|
TYPE_LINK
))
&&
(
positions
[
p
]
&
POS_FACEDOWN
))
continue
;
pduel
->
game_field
->
filter_player_effect
(
sumplayer
,
EFFECT_CANNOT_SPECIAL_SUMMON
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
target
)
continue
;
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
sumplayer
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
sumtype
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
positions
[
p
],
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
toplayer
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
reason_effect
,
PARAM_TYPE_EFFECT
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
7
))
poscheck
=
false
;
}
eset
.
clear
();
if
(
poscheck
)
position
|=
positions
[
p
];
}
return
position
;
}
int32
card
::
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
)
{
int32
card
::
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
)
{
if
(
!
is_summonable_card
())
if
(
!
is_summonable_card
())
return
FALSE
;
return
FALSE
;
...
...
card.h
View file @
1d36640e
...
@@ -346,6 +346,7 @@ public:
...
@@ -346,6 +346,7 @@ public:
int32
is_can_be_flip_summoned
(
uint8
playerid
);
int32
is_can_be_flip_summoned
(
uint8
playerid
);
int32
is_special_summonable
(
uint8
playerid
,
uint32
summon_type
,
material_info
info
=
null_info
);
int32
is_special_summonable
(
uint8
playerid
,
uint32
summon_type
,
material_info
info
=
null_info
);
int32
is_can_be_special_summoned
(
effect
*
reason_effect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
sumplayer
,
uint8
toplayer
,
uint8
nocheck
,
uint8
nolimit
,
uint32
zone
);
int32
is_can_be_special_summoned
(
effect
*
reason_effect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
sumplayer
,
uint8
toplayer
,
uint8
nocheck
,
uint8
nolimit
,
uint32
zone
);
uint8
get_spsummonable_position
(
effect
*
reason_effect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
sumplayer
,
uint8
toplayer
);
int32
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
=
0x1f
);
int32
is_setable_mzone
(
uint8
playerid
,
uint8
ignore_count
,
effect
*
peffect
,
uint8
min_tribute
,
uint32
zone
=
0x1f
);
int32
is_setable_szone
(
uint8
playerid
,
uint8
ignore_fd
=
0
);
int32
is_setable_szone
(
uint8
playerid
,
uint8
ignore_fd
=
0
);
int32
is_affect_by_effect
(
effect
*
reason_effect
);
int32
is_affect_by_effect
(
effect
*
reason_effect
);
...
...
field.cpp
View file @
1d36640e
...
@@ -3069,7 +3069,8 @@ int32 field::is_player_can_spsummon(effect* reason_effect, uint32 sumtype, uint8
...
@@ -3069,7 +3069,8 @@ int32 field::is_player_can_spsummon(effect* reason_effect, uint32 sumtype, uint8
return
FALSE
;
return
FALSE
;
if
(
pcard
->
data
.
type
&
TYPE_LINK
)
if
(
pcard
->
data
.
type
&
TYPE_LINK
)
sumpos
&=
POS_FACEUP_ATTACK
;
sumpos
&=
POS_FACEUP_ATTACK
;
if
(
sumpos
==
0
)
uint8
position
=
pcard
->
get_spsummonable_position
(
reason_effect
,
sumtype
,
sumpos
,
playerid
,
toplayer
);
if
(
position
==
0
)
return
FALSE
;
return
FALSE
;
sumtype
|=
SUMMON_TYPE_SPECIAL
;
sumtype
|=
SUMMON_TYPE_SPECIAL
;
save_lp_cost
();
save_lp_cost
();
...
@@ -3078,8 +3079,8 @@ int32 field::is_player_can_spsummon(effect* reason_effect, uint32 sumtype, uint8
...
@@ -3078,8 +3079,8 @@ int32 field::is_player_can_spsummon(effect* reason_effect, uint32 sumtype, uint8
return
FALSE
;
return
FALSE
;
}
}
restore_lp_cost
();
restore_lp_cost
();
if
(
sumpos
&
POS_FACEDOWN
&&
is_player_affected_by_effect
(
playerid
,
EFFECT_DIVINE_LIGHT
))
if
(
position
&
POS_FACEDOWN
&&
is_player_affected_by_effect
(
playerid
,
EFFECT_DIVINE_LIGHT
))
sumpos
=
(
sumpos
&
POS_FACEUP
)
|
((
sumpos
&
POS_FACEDOWN
)
>>
1
);
position
=
(
position
&
POS_FACEUP
)
|
((
position
&
POS_FACEDOWN
)
>>
1
);
effect_set
eset
;
effect_set
eset
;
filter_player_effect
(
playerid
,
EFFECT_CANNOT_SPECIAL_SUMMON
,
&
eset
);
filter_player_effect
(
playerid
,
EFFECT_CANNOT_SPECIAL_SUMMON
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
...
@@ -3089,7 +3090,7 @@ int32 field::is_player_can_spsummon(effect* reason_effect, uint32 sumtype, uint8
...
@@ -3089,7 +3090,7 @@ int32 field::is_player_can_spsummon(effect* reason_effect, uint32 sumtype, uint8
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
);
pduel
->
lua
->
add_param
(
sumpos
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
position
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
toplayer
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
toplayer
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
reason_effect
,
PARAM_TYPE_EFFECT
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
7
))
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
7
))
...
...
operations.cpp
View file @
1d36640e
...
@@ -2747,11 +2747,12 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2747,11 +2747,12 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
else
else
targetplayer
=
1
-
sumplayer
;
targetplayer
=
1
-
sumplayer
;
}
}
if
(
positions
==
0
)
positions
=
POS_FACEUP_ATTACK
;
std
::
vector
<
int32
>
retval
;
std
::
vector
<
int32
>
retval
;
peffect
->
get_value
(
target
,
0
,
&
retval
);
peffect
->
get_value
(
target
,
0
,
&
retval
);
uint32
summon_info
=
retval
.
size
()
>
0
?
retval
[
0
]
:
0
;
uint32
summon_info
=
retval
.
size
()
>
0
?
retval
[
0
]
:
0
;
positions
=
target
->
get_spsummonable_position
(
peffect
,
((
summon_info
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
),
positions
,
sumplayer
,
targetplayer
);
if
(
positions
==
0
)
positions
=
POS_FACEUP_ATTACK
;
uint32
zone
=
retval
.
size
()
>
1
?
retval
[
1
]
:
0xff
;
uint32
zone
=
retval
.
size
()
>
1
?
retval
[
1
]
:
0xff
;
target
->
summon_info
=
(
summon_info
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
);
target
->
summon_info
=
(
summon_info
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
);
target
->
enable_field_effect
(
false
);
target
->
enable_field_effect
(
false
);
...
@@ -2958,7 +2959,8 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2958,7 +2959,8 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
if
(
ct1
==
0
)
if
(
ct1
==
0
)
zone
=
flag1
;
zone
=
flag1
;
}
}
move_to_field
(
pcard
,
sumplayer
,
sumplayer
,
LOCATION_MZONE
,
POS_FACEUP
,
FALSE
,
0
,
FALSE
,
zone
);
uint8
positions
=
pcard
->
get_spsummonable_position
(
peffect
,
((
peffect
->
get_value
(
pcard
)
&
0xff00ffff
)
|
SUMMON_TYPE_SPECIAL
),
POS_FACEUP
,
sumplayer
,
sumplayer
);
move_to_field
(
pcard
,
sumplayer
,
sumplayer
,
LOCATION_MZONE
,
positions
,
FALSE
,
0
,
FALSE
,
zone
);
return
FALSE
;
return
FALSE
;
}
}
case
24
:
{
case
24
:
{
...
@@ -3154,7 +3156,8 @@ int32 field::special_summon_step(uint16 step, group* targets, card* target, uint
...
@@ -3154,7 +3156,8 @@ int32 field::special_summon_step(uint16 step, group* targets, card* target, uint
zone
&=
flag1
;
zone
&=
flag1
;
}
}
}
}
move_to_field
(
target
,
target
->
summon_player
,
playerid
,
LOCATION_MZONE
,
positions
,
FALSE
,
0
,
FALSE
,
zone
);
uint8
sumpositions
=
target
->
get_spsummonable_position
(
core
.
reason_effect
,
(
target
->
summon_info
&
0xff00ffff
),
positions
,
target
->
summon_player
,
playerid
);
move_to_field
(
target
,
target
->
summon_player
,
playerid
,
LOCATION_MZONE
,
sumpositions
,
FALSE
,
0
,
FALSE
,
zone
);
return
FALSE
;
return
FALSE
;
}
}
case
2
:
{
case
2
:
{
...
...
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