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
8ec990d5
Commit
8ec990d5
authored
Nov 22, 2018
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine act hint of continuous trap
parent
689a6848
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
2 deletions
+42
-2
field.cpp
field.cpp
+39
-0
field.h
field.h
+1
-0
processor.cpp
processor.cpp
+2
-2
No files found.
field.cpp
View file @
8ec990d5
...
...
@@ -3242,6 +3242,45 @@ int32 field::get_cteffect_evt(effect* feffect, int32 playerid, const tevent& e,
}
return
TRUE
;
}
int32
field
::
check_cteffect_hint
(
effect
*
peffect
,
uint8
playerid
)
{
card
*
phandler
=
peffect
->
get_handler
();
if
(
phandler
->
data
.
type
!=
(
TYPE_TRAP
|
TYPE_CONTINUOUS
))
return
FALSE
;
if
(
!
(
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
))
return
FALSE
;
if
(
peffect
->
code
!=
EVENT_FREE_CHAIN
)
return
FALSE
;
if
(
peffect
->
cost
||
peffect
->
target
||
peffect
->
operation
)
return
FALSE
;
for
(
auto
&
efit
:
phandler
->
field_effect
)
{
effect
*
feffect
=
efit
.
second
;
if
(
!
(
feffect
->
type
&
(
EFFECT_TYPE_TRIGGER_F
|
EFFECT_TYPE_TRIGGER_O
|
EFFECT_TYPE_QUICK_O
)))
continue
;
if
(
!
feffect
->
in_range
(
phandler
))
continue
;
uint32
code
=
efit
.
first
;
if
(
code
==
EVENT_FREE_CHAIN
||
code
==
EVENT_PHASE
+
infos
.
phase
)
{
nil_event
.
event_code
=
code
;
if
(
get_cteffect_evt
(
feffect
,
playerid
,
nil_event
,
FALSE
)
&&
(
code
!=
EVENT_FREE_CHAIN
||
check_hint_timing
(
feffect
)))
return
TRUE
;
}
else
{
for
(
const
auto
&
ev
:
core
.
point_event
)
{
if
(
code
!=
ev
.
event_code
)
continue
;
if
(
get_cteffect_evt
(
feffect
,
playerid
,
ev
,
FALSE
))
return
TRUE
;
}
for
(
const
auto
&
ev
:
core
.
instant_event
)
{
if
(
code
!=
ev
.
event_code
)
continue
;
if
(
get_cteffect_evt
(
feffect
,
playerid
,
ev
,
FALSE
))
return
TRUE
;
}
}
}
return
FALSE
;
}
int32
field
::
is_able_to_enter_bp
()
{
return
((
core
.
duel_options
&
DUEL_ATTACK_FIRST_TURN
)
||
infos
.
turn_id
!=
1
)
&&
infos
.
phase
<
PHASE_BATTLE_START
...
...
field.h
View file @
8ec990d5
...
...
@@ -468,6 +468,7 @@ public:
chain
*
get_chain
(
uint32
chaincount
);
int32
get_cteffect
(
effect
*
peffect
,
int32
playerid
,
int32
store
);
int32
get_cteffect_evt
(
effect
*
feffect
,
int32
playerid
,
const
tevent
&
e
,
int32
store
);
int32
check_cteffect_hint
(
effect
*
peffect
,
uint8
playerid
);
int32
is_able_to_enter_bp
();
void
add_process
(
uint16
type
,
uint16
step
,
effect
*
peffect
,
group
*
target
,
ptr
arg1
,
ptr
arg2
,
ptr
arg3
=
0
,
ptr
arg4
=
0
,
void
*
ptr1
=
NULL
,
void
*
ptr2
=
NULL
);
...
...
processor.cpp
View file @
8ec990d5
...
...
@@ -1455,7 +1455,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
continue;
peffect->id = infos.field_id++;
newchain.triggering_effect = peffect;
if
(
check_hint_timing
(
peffect
)
||
get_cteffect
(
peffect
,
check_player
,
FALSE
))
if(check_hint_timing(peffect) ||
check_cteffect_hint(peffect, check_player
))
core.spe_effect[check_player]++;
core.select_chains.push_back(newchain);
fc_count++;
...
...
@@ -2153,7 +2153,7 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
newchain.set_triggering_place(phandler);
newchain.triggering_player = priority;
core.select_chains.push_back(newchain);
if
(
check_hint_timing
(
peffect
)
||
get_cteffect
(
peffect
,
priority
,
FALSE
))
if(check_hint_timing(peffect) ||
check_cteffect_hint(peffect, priority
))
core.spe_effect[priority]++;
}
}
...
...
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