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
937c0070
Commit
937c0070
authored
Sep 16, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fh'
parents
f9454100
72da9d3a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
5 deletions
+36
-5
effect.cpp
effect.cpp
+16
-1
effect.h
effect.h
+1
-1
field.cpp
field.cpp
+1
-1
libduel.cpp
libduel.cpp
+4
-1
processor.cpp
processor.cpp
+14
-1
No files found.
effect.cpp
View file @
937c0070
...
...
@@ -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 @
937c0070
...
...
@@ -202,7 +202,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 @
937c0070
...
...
@@ -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
);
...
...
libduel.cpp
View file @
937c0070
...
...
@@ -876,10 +876,13 @@ int32 scriptlib::duel_move_to_field(lua_State *L) {
uint32
destination
=
lua_tointeger
(
L
,
4
);
uint32
positions
=
lua_tointeger
(
L
,
5
);
uint32
enable
=
lua_toboolean
(
L
,
6
);
uint32
zone
=
0xff
;
if
(
lua_gettop
(
L
)
>
6
)
zone
=
lua_tointeger
(
L
,
7
);
duel
*
pduel
=
pcard
->
pduel
;
pcard
->
enable_field_effect
(
false
);
pduel
->
game_field
->
adjust_instant
();
pduel
->
game_field
->
move_to_field
(
pcard
,
move_player
,
playerid
,
destination
,
positions
,
enable
);
pduel
->
game_field
->
move_to_field
(
pcard
,
move_player
,
playerid
,
destination
,
positions
,
enable
,
0
,
FALSE
,
zone
);
pduel
->
game_field
->
core
.
subunits
.
back
().
type
=
PROCESSOR_MOVETOFIELD_S
;
return
lua_yield
(
L
,
0
);
}
...
...
processor.cpp
View file @
937c0070
...
...
@@ -4246,9 +4246,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