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
a9880fe0
Commit
a9880fe0
authored
Nov 26, 2023
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Magical Hats monster become spell/trap
parent
88ce3d3f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
card.h
card.h
+6
-0
effect.cpp
effect.cpp
+5
-4
operations.cpp
operations.cpp
+1
-1
No files found.
card.h
View file @
a9880fe0
...
@@ -69,6 +69,12 @@ struct card_state {
...
@@ -69,6 +69,12 @@ struct card_state {
uint8
reason_player
;
uint8
reason_player
;
effect
*
reason_effect
;
effect
*
reason_effect
;
bool
is_location
(
int32
loc
)
const
;
bool
is_location
(
int32
loc
)
const
;
inline
bool
is_main_mzone
()
const
{
return
location
==
LOCATION_MZONE
&&
sequence
>=
0
&&
sequence
<=
4
;
}
inline
bool
is_stzone
()
const
{
return
location
==
LOCATION_SZONE
&&
sequence
>=
0
&&
sequence
<=
4
;
}
void
init_state
();
void
init_state
();
};
};
...
...
effect.cpp
View file @
a9880fe0
...
@@ -302,8 +302,6 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
...
@@ -302,8 +302,6 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
card
*
phandler
=
get_handler
();
card
*
phandler
=
get_handler
();
if
(
!
(
phandler
->
get_type
()
&
TYPE_MONSTER
)
&&
(
get_active_type
()
&
TYPE_MONSTER
))
if
(
!
(
phandler
->
get_type
()
&
TYPE_MONSTER
)
&&
(
get_active_type
()
&
TYPE_MONSTER
))
return
FALSE
;
return
FALSE
;
if
((
phandler
->
get_type
()
&
TYPE_CONTINUOUS
)
&&
(
phandler
->
get_type
()
&
TYPE_EQUIP
))
return
FALSE
;
if
((
type
&
EFFECT_TYPE_QUICK_O
)
&&
is_flag
(
EFFECT_FLAG_DELAY
)
&&
!
in_range
(
phandler
))
if
((
type
&
EFFECT_TYPE_QUICK_O
)
&&
is_flag
(
EFFECT_FLAG_DELAY
)
&&
!
in_range
(
phandler
))
return
FALSE
;
return
FALSE
;
if
(
!
neglect_faceup
&&
(
phandler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
)))
{
if
(
!
neglect_faceup
&&
(
phandler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
)))
{
...
@@ -327,6 +325,8 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
...
@@ -327,6 +325,8 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
((
type
&
EFFECT_TYPE_FIELD
)
&&
!
(
range
&
(
LOCATION_DECK
|
LOCATION_EXTRA
)))
if
((
type
&
EFFECT_TYPE_FIELD
)
&&
!
(
range
&
(
LOCATION_DECK
|
LOCATION_EXTRA
)))
return
FALSE
;
return
FALSE
;
}
}
if
(
phandler
->
current
.
is_stzone
()
&&
(
phandler
->
data
.
type
&
(
TYPE_SPELL
|
TYPE_TRAP
))
&&
phandler
->
is_affected_by_effect
(
EFFECT_CHANGE_TYPE
))
return
FALSE
;
if
((
type
&
EFFECT_TYPE_FIELD
)
&&
(
phandler
->
current
.
controler
!=
playerid
)
&&
!
is_flag
(
EFFECT_FLAG_BOTH_SIDE
|
EFFECT_FLAG_EVENT_PLAYER
))
if
((
type
&
EFFECT_TYPE_FIELD
)
&&
(
phandler
->
current
.
controler
!=
playerid
)
&&
!
is_flag
(
EFFECT_FLAG_BOTH_SIDE
|
EFFECT_FLAG_EVENT_PLAYER
))
return
FALSE
;
return
FALSE
;
if
(
phandler
->
is_status
(
STATUS_FORBIDDEN
))
if
(
phandler
->
is_status
(
STATUS_FORBIDDEN
))
...
@@ -337,8 +337,9 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
...
@@ -337,8 +337,9 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
card
*
phandler
=
get_handler
();
card
*
phandler
=
get_handler
();
if
((
type
&
EFFECT_TYPE_FIELD
)
&&
phandler
->
is_status
(
STATUS_BATTLE_DESTROYED
))
if
((
type
&
EFFECT_TYPE_FIELD
)
&&
phandler
->
is_status
(
STATUS_BATTLE_DESTROYED
))
return
FALSE
;
return
FALSE
;
if
(((
type
&
EFFECT_TYPE_FIELD
)
||
((
type
&
EFFECT_TYPE_SINGLE
)
&&
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
)))
&&
(
phandler
->
current
.
location
&
LOCATION_ONFIELD
)
if
(((
type
&
EFFECT_TYPE_FIELD
)
||
((
type
&
EFFECT_TYPE_SINGLE
)
&&
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
)))
&&
(
!
phandler
->
is_position
(
POS_FACEUP
)
||
!
phandler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
&&
(
phandler
->
current
.
location
&
LOCATION_ONFIELD
)
&&
(
!
phandler
->
is_position
(
POS_FACEUP
)
||
!
phandler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
return
FALSE
;
return
FALSE
;
if
((
type
&
EFFECT_TYPE_SINGLE
)
&&
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
)
&&
!
in_range
(
phandler
))
if
((
type
&
EFFECT_TYPE_SINGLE
)
&&
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
)
&&
!
in_range
(
phandler
))
return
FALSE
;
return
FALSE
;
...
...
operations.cpp
View file @
a9880fe0
...
@@ -1393,7 +1393,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
...
@@ -1393,7 +1393,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
peffect
->
owner
=
equip_card
;
peffect
->
owner
=
equip_card
;
peffect
->
handler
=
equip_card
;
peffect
->
handler
=
equip_card
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
if
(
equip_card
->
get_type
()
&
TYPE_TRAP
)
{
if
(
equip_card
->
get_type
()
==
TYPE_TRAP
)
{
peffect
->
code
=
EFFECT_ADD_TYPE
;
peffect
->
code
=
EFFECT_ADD_TYPE
;
peffect
->
value
=
TYPE_EQUIP
;
peffect
->
value
=
TYPE_EQUIP
;
}
else
if
(
equip_card
->
data
.
type
&
TYPE_UNION
)
{
}
else
if
(
equip_card
->
data
.
type
&
TYPE_UNION
)
{
...
...
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