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
a6d1bf9e
Commit
a6d1bf9e
authored
Sep 16, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_FLAG_LIMIT_ZONE
parent
85af02be
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
4 deletions
+32
-4
effect.cpp
effect.cpp
+16
-1
effect.h
effect.h
+1
-1
field.cpp
field.cpp
+1
-1
processor.cpp
processor.cpp
+14
-1
No files found.
effect.cpp
View file @
a6d1bf9e
...
...
@@ -191,6 +191,19 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
&&
!
pduel
->
game_field
->
get_cteffect
(
this
,
playerid
,
FALSE
))
return
FALSE
;
}
uint32
zone
=
0xff
;
if
(
!
(
handler
->
data
.
type
&
(
TYPE_FIELD
+
TYPE_PENDULUM
))
&&
is_flag
(
EFFECT_FLAG_LIMIT_ZONE
))
{
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
e
.
event_cards
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
e
.
event_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
e
.
event_value
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
e
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
e
.
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
e
.
reason_player
,
PARAM_TYPE_INT
);
zone
=
get_value
(
7
);
if
(
!
zone
)
zone
=
0xff
;
}
if
(
handler
->
current
.
location
==
LOCATION_SZONE
)
{
if
(
handler
->
is_position
(
POS_FACEUP
))
return
FALSE
;
...
...
@@ -200,6 +213,8 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
((
handler
->
data
.
type
&
TYPE_SPELL
)
&&
(
handler
->
data
.
type
&
TYPE_QUICKPLAY
))
return
FALSE
;
}
if
(
!
(
handler
->
data
.
type
&
(
TYPE_FIELD
+
TYPE_PENDULUM
))
&&
is_flag
(
EFFECT_FLAG_LIMIT_ZONE
)
&&
!
(
zone
&
(
1u
<<
handler
->
current
.
sequence
)))
return
FALSE
;
}
else
{
if
(
handler
->
data
.
type
&
TYPE_MONSTER
)
{
if
(
!
(
handler
->
data
.
type
&
TYPE_PENDULUM
))
...
...
@@ -208,7 +223,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
&&
!
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
)
&&
pduel
->
game_field
->
get_useable_count
(
handler
,
playerid
,
LOCATION_SZONE
,
playerid
,
LOCATION_REASON_TOFIELD
,
zone
)
<=
0
)
return
FALSE
;
}
// check activate in hand/in set turn
...
...
effect.h
View file @
a6d1bf9e
...
...
@@ -187,7 +187,7 @@ enum effect_flag : uint32 {
// EFFECT_FLAG_AVAILABLE_BD = 0x2000000,
EFFECT_FLAG_CLIENT_HINT
=
0x4000000
,
// EFFECT_FLAG_CHAIN_UNIQUE = 0x8000000,
// EFFECT_FLAG_NAGA
= 0x10000000,
EFFECT_FLAG_LIMIT_ZONE
=
0x10000000
,
// EFFECT_FLAG_COF = 0x20000000,
// EFFECT_FLAG_CVAL_CHECK = 0x40000000,
EFFECT_FLAG_IMMEDIATELY_APPLY
=
0x80000000
,
...
...
field.cpp
View file @
a6d1bf9e
...
...
@@ -645,7 +645,7 @@ int32 field::get_tofield_count(card* pcard, uint8 playerid, uint8 location, uint
if
(
location
==
LOCATION_MZONE
)
flag
=
(
flag
|
~
zone
)
&
0x1f
;
else
flag
=
(
flag
>>
8
)
&
0x1f
;
flag
=
(
(
flag
>>
8
)
|
~
zone
)
&
0x1f
;
int32
count
=
5
-
field_used_count
[
flag
];
if
(
location
==
LOCATION_MZONE
)
flag
|=
(
1u
<<
5
)
|
(
1u
<<
6
);
...
...
processor.cpp
View file @
a6d1bf9e
...
...
@@ -4229,9 +4229,22 @@ int32 field::add_chain(uint16 step) {
}
}
if
(
phandler
->
current
.
location
==
LOCATION_HAND
)
{
uint32
zone
=
0xff
;
if
(
!
(
phandler
->
data
.
type
&
(
TYPE_FIELD
+
TYPE_PENDULUM
))
&&
peffect
->
is_flag
(
EFFECT_FLAG_LIMIT_ZONE
))
{
pduel
->
lua
->
add_param
(
clit
.
triggering_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
clit
.
evt
.
event_cards
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
clit
.
evt
.
event_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
clit
.
evt
.
event_value
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
clit
.
evt
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
clit
.
evt
.
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
clit
.
evt
.
reason_player
,
PARAM_TYPE_INT
);
zone
=
peffect
->
get_value
(
7
);
if
(
!
zone
)
zone
=
0xff
;
}
phandler
->
enable_field_effect
(
false
);
phandler
->
set_status
(
STATUS_ACT_FROM_HAND
,
TRUE
);
move_to_field
(
phandler
,
phandler
->
current
.
controler
,
phandler
->
current
.
controler
,
LOCATION_SZONE
,
POS_FACEUP
);
move_to_field
(
phandler
,
phandler
->
current
.
controler
,
phandler
->
current
.
controler
,
LOCATION_SZONE
,
POS_FACEUP
,
FALSE
,
0
,
FALSE
,
zone
);
}
else
{
phandler
->
set_status
(
STATUS_ACT_FROM_HAND
,
FALSE
);
change_position
(
phandler
,
0
,
phandler
->
current
.
controler
,
POS_FACEUP
,
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