Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
REIKAI
ygopro
Commits
35099ba1
Commit
35099ba1
authored
Aug 10, 2015
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
field::process_point_event()
parent
b8ca2d52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
ocgcore/effect.cpp
ocgcore/effect.cpp
+3
-1
ocgcore/processor.cpp
ocgcore/processor.cpp
+4
-3
No files found.
ocgcore/effect.cpp
View file @
35099ba1
...
...
@@ -250,6 +250,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
pduel
->
game_field
->
restore_lp_cost
();
return
result
;
}
// check EFFECT_CANNOT_ACTIVATE
int32
effect
::
is_action_check
(
uint8
playerid
)
{
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
EFFECT_CANNOT_ACTIVATE
,
&
eset
);
...
...
@@ -275,6 +276,7 @@ int32 effect::is_action_check(uint8 playerid) {
}
return
TRUE
;
}
// check condition, cost(chk=0), target(chk=0)
int32
effect
::
is_activate_ready
(
uint8
playerid
,
const
tevent
&
e
,
int32
neglect_cond
,
int32
neglect_cost
,
int32
neglect_target
)
{
if
(
!
neglect_cond
&&
condition
)
{
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_EFFECT
);
...
...
@@ -320,7 +322,7 @@ int32 effect::is_activate_ready(uint8 playerid, const tevent& e, int32 neglect_c
return
TRUE
;
}
int32
effect
::
is_condition_check
(
uint8
playerid
,
const
tevent
&
e
)
{
if
(
!
(
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
handler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
))
&&
(
!
handler
->
is_position
(
POS_FACEUP
)
))
if
(
!
(
type
&
EFFECT_TYPE_ACTIVATE
)
&&
(
handler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
))
&&
!
handler
->
is_position
(
POS_FACEUP
))
return
FALSE
;
if
(
!
condition
)
return
TRUE
;
...
...
ocgcore/processor.cpp
View file @
35099ba1
...
...
@@ -1750,7 +1750,8 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
uint8
tp
=
clit
->
triggering_player
;
bool
act
=
true
;
if
(
peffect
->
is_chainable
(
tp
)
&&
peffect
->
is_activateable
(
tp
,
clit
->
evt
,
TRUE
)
&&
((
peffect
->
code
==
EVENT_FLIP
)
||
(
clit
->
triggering_location
&
0x3
)
||
!
(
peffect
->
handler
->
current
.
location
&
0x3
)
||
peffect
->
handler
->
is_status
(
STATUS_IS_PUBLIC
)))
{
&&
(
peffect
->
code
==
EVENT_FLIP
&&
infos
.
phase
==
PHASE_DAMAGE
||
(
clit
->
triggering_location
&
0x3
)
||
!
(
peffect
->
handler
->
current
.
location
&
0x3
)
||
peffect
->
handler
->
is_status
(
STATUS_IS_PUBLIC
)))
{
if
(
peffect
->
flag
&
EFFECT_FLAG_CHAIN_UNIQUE
)
{
if
(
tp
==
infos
.
turn_player
)
{
for
(
auto
tpit
=
core
.
tpchain
.
begin
();
tpit
!=
core
.
tpchain
.
end
();
++
tpit
)
{
...
...
@@ -1852,7 +1853,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
uint8
tp
=
clit
->
triggering_player
;
bool
act
=
true
;
if
(
peffect
->
is_chainable
(
tp
)
&&
peffect
->
is_activateable
(
tp
,
clit
->
evt
,
TRUE
)
&&
(
(
peffect
->
code
==
EVENT_FLIP
)
||
(
clit
->
triggering_location
&
0x3
)
&&
(
peffect
->
code
==
EVENT_FLIP
&&
infos
.
phase
==
PHASE_DAMAGE
||
(
clit
->
triggering_location
&
0x3
)
||
!
(
peffect
->
handler
->
current
.
location
&
0x3
)
||
peffect
->
handler
->
is_status
(
STATUS_IS_PUBLIC
)))
{
if
(
!
(
peffect
->
flag
&
EFFECT_FLAG_FIELD_ONLY
)
&&
clit
->
triggering_location
==
LOCATION_HAND
&&
(((
peffect
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
(
peffect
->
flag
&
EFFECT_FLAG_SINGLE_RANGE
)
&&
peffect
->
handler
->
is_has_relation
(
peffect
))
...
...
@@ -1913,7 +1914,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
continue
;
bool
act
=
true
;
if
(
peffect
->
is_chainable
(
tp
)
&&
peffect
->
is_activateable
(
tp
,
clit
->
evt
,
TRUE
)
&&
(
(
peffect
->
code
==
EVENT_FLIP
)
||
(
clit
->
triggering_location
&
0x3
)
&&
(
peffect
->
code
==
EVENT_FLIP
&&
infos
.
phase
==
PHASE_DAMAGE
||
(
clit
->
triggering_location
&
0x3
)
||
!
(
peffect
->
handler
->
current
.
location
&
0x3
)
||
peffect
->
handler
->
is_status
(
STATUS_IS_PUBLIC
)))
{
if
(
!
(
peffect
->
flag
&
EFFECT_FLAG_FIELD_ONLY
)
&&
clit
->
triggering_location
==
LOCATION_HAND
&&
(((
peffect
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
(
peffect
->
flag
&
EFFECT_FLAG_SINGLE_RANGE
)
&&
peffect
->
handler
->
is_has_relation
(
peffect
))
...
...
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