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
f31844fd
Commit
f31844fd
authored
Feb 28, 2016
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert, field::process_point_event()
simplify the condtion of had trigger
parent
399f4166
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
effect.cpp
effect.cpp
+6
-4
processor.cpp
processor.cpp
+4
-8
No files found.
effect.cpp
View file @
f31844fd
...
...
@@ -58,7 +58,8 @@ int32 effect::is_disable_related() {
return
FALSE
;
}
// check if a single/field/equip effect is available
// check range, EFFECT_FLAG_OWNER_RELATE, STATUS_BATTLE_DESTROYED, STATUS_EFFECT_ENABLED
// check properties: range, EFFECT_FLAG_OWNER_RELATE, STATUS_BATTLE_DESTROYED, STATUS_EFFECT_ENABLED
// check fucntions: condition
int32
effect
::
is_available
()
{
if
(
type
&
EFFECT_TYPE_ACTIONS
)
return
FALSE
;
...
...
@@ -237,7 +238,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
(((
type
&
EFFECT_TYPE_FIELD
)
||
((
type
&
EFFECT_TYPE_SINGLE
)
&&
(
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))))
&&
(
handler
->
current
.
location
&
LOCATION_ONFIELD
)
&&
(
!
handler
->
is_position
(
POS_FACEUP
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
return
FALSE
;
if
((
type
&
EFFECT_TYPE_SINGLE
)
&&
(
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
)
)
&&
!
in_range
(
handler
->
current
.
location
,
handler
->
current
.
sequence
))
if
((
type
&
EFFECT_TYPE_SINGLE
)
&&
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
)
&&
!
in_range
(
handler
->
current
.
location
,
handler
->
current
.
sequence
))
return
FALSE
;
if
((
is_flag
(
EFFECT_FLAG_OWNER_RELATE
))
&&
!
(
is_flag
(
EFFECT_FLAG_CANNOT_DISABLE
))
&&
owner
->
is_status
(
STATUS_DISABLED
))
return
FALSE
;
...
...
@@ -263,7 +264,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,
EFFECT_ACTIVATE_COST
// check
functions: value of EFFECT_CANNOT_ACTIVATE, target, cost of
EFFECT_ACTIVATE_COST
int32
effect
::
is_action_check
(
uint8
playerid
)
{
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
playerid
,
EFFECT_CANNOT_ACTIVATE
,
&
eset
);
...
...
@@ -289,7 +290,7 @@ int32 effect::is_action_check(uint8 playerid) {
}
return
TRUE
;
}
// check condition, cost(chk=0), target(chk=0)
// check
functions:
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
);
...
...
@@ -334,6 +335,7 @@ int32 effect::is_activate_ready(uint8 playerid, const tevent& e, int32 neglect_c
}
return
TRUE
;
}
// check functions: condition
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
))
return
FALSE
;
...
...
processor.cpp
View file @
f31844fd
...
...
@@ -1730,9 +1730,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
if
(
peffect
->
is_chainable
(
tp
)
&&
peffect
->
is_activateable
(
tp
,
clit
->
evt
,
TRUE
)
&&
(
peffect
->
code
==
EVENT_FLIP
&&
infos
.
phase
==
PHASE_DAMAGE
||
(
clit
->
triggering_location
&
0x43
)
||
!
(
peffect
->
handler
->
current
.
location
&
0x43
)
||
peffect
->
handler
->
is_position
(
POS_FACEUP
)))
{
if
(
!
(
peffect
->
is_flag
(
EFFECT_FLAG_FIELD_ONLY
))
&&
clit
->
triggering_location
==
LOCATION_HAND
&&
(((
peffect
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
(
peffect
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
&&
peffect
->
handler
->
is_has_relation
(
*
clit
))
||
(
peffect
->
range
&
LOCATION_HAND
)))
{
if
(
!
(
peffect
->
is_flag
(
EFFECT_FLAG_FIELD_ONLY
))
&&
clit
->
triggering_location
==
LOCATION_HAND
&&
(
peffect
->
range
&
LOCATION_HAND
))
{
core
.
new_ochain_h
.
push_back
(
*
clit
);
act
=
false
;
}
else
if
((
peffect
->
is_flag
(
EFFECT_FLAG_FIELD_ONLY
))
||
!
(
peffect
->
type
&
EFFECT_TYPE_FIELD
)
...
...
@@ -1791,9 +1789,7 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
if
(
peffect
->
is_chainable
(
tp
)
&&
peffect
->
is_activateable
(
tp
,
clit
->
evt
,
TRUE
)
&&
(
peffect
->
code
==
EVENT_FLIP
&&
infos
.
phase
==
PHASE_DAMAGE
||
(
clit
->
triggering_location
&
0x43
)
||
!
(
peffect
->
handler
->
current
.
location
&
0x43
)
||
peffect
->
handler
->
is_position
(
POS_FACEUP
)))
{
if
(
!
(
peffect
->
is_flag
(
EFFECT_FLAG_FIELD_ONLY
))
&&
clit
->
triggering_location
==
LOCATION_HAND
&&
(((
peffect
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
(
peffect
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
&&
peffect
->
handler
->
is_has_relation
(
*
clit
))
||
(
peffect
->
range
&
LOCATION_HAND
)))
{
if
(
!
(
peffect
->
is_flag
(
EFFECT_FLAG_FIELD_ONLY
))
&&
clit
->
triggering_location
==
LOCATION_HAND
&&
(
peffect
->
range
&
LOCATION_HAND
))
{
continue
;
}
else
if
((
peffect
->
is_flag
(
EFFECT_FLAG_FIELD_ONLY
))
||
!
(
peffect
->
type
&
EFFECT_TYPE_FIELD
)
||
peffect
->
in_range
(
clit
->
triggering_location
,
clit
->
triggering_sequence
))
{
...
...
@@ -2078,7 +2074,7 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
act
=
false
;
break
;
}
if
(
(
peffect
->
is_flag
(
EFFECT_FLAG_CHAIN_UNIQUE
))
&&
(
cait
->
triggering_effect
->
handler
->
data
.
code
==
peffect
->
handler
->
data
.
code
)
)
{
if
(
cait
->
triggering_effect
->
handler
->
data
.
code
==
peffect
->
handler
->
data
.
code
)
{
act
=
false
;
break
;
}
...
...
@@ -4745,7 +4741,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
core
.
chain_limit_p
=
0
;
}
reset_chain
();
if
(
core
.
summoning_card
)
if
(
core
.
summoning_card
||
core
.
effect_damage_step
==
1
)
core
.
subunits
.
push_back
(
core
.
reserved
);
return
FALSE
;
}
...
...
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