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
0bdc4ead
Commit
0bdc4ead
authored
Nov 01, 2018
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix hand trigger
parent
2f2ea08f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
processor.cpp
processor.cpp
+14
-8
No files found.
processor.cpp
View file @
0bdc4ead
...
@@ -1740,8 +1740,9 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
...
@@ -1740,8 +1740,9 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
clit->set_triggering_place(phandler);
clit->set_triggering_place(phandler);
if(!peffect->is_flag(EFFECT_FLAG_FIELD_ONLY) && (peffect->type & EFFECT_TYPE_FIELD)
if(!peffect->is_flag(EFFECT_FLAG_FIELD_ONLY) && (peffect->type & EFFECT_TYPE_FIELD)
&& (peffect->range & LOCATION_HAND) && phandler->current.location == LOCATION_HAND) {
&& (peffect->range & LOCATION_HAND) && phandler->current.location == LOCATION_HAND) {
if(!phandler->is_has_relation(*clit))
if(!phandler->is_has_relation(*clit)
&& peffect->is_condition_check(phandler->current.controler, clit->evt)
)
phandler->create_relation(*clit);
phandler->create_relation(*clit);
peffect->set_activate_location();
clit->triggering_player = phandler->current.controler;
clit->triggering_player = phandler->current.controler;
clit->set_triggering_place(phandler);
clit->set_triggering_place(phandler);
}
}
...
@@ -2075,8 +2076,9 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
...
@@ -2075,8 +2076,9 @@ int32 field::process_quick_effect(int16 step, int32 skip_freechain, uint8 priori
card* phandler = peffect->get_handler();
card* phandler = peffect->get_handler();
if(!peffect->is_flag(EFFECT_FLAG_FIELD_ONLY) && (peffect->type & EFFECT_TYPE_FIELD)
if(!peffect->is_flag(EFFECT_FLAG_FIELD_ONLY) && (peffect->type & EFFECT_TYPE_FIELD)
&& (peffect->range & LOCATION_HAND) && phandler->current.location == LOCATION_HAND) {
&& (peffect->range & LOCATION_HAND) && phandler->current.location == LOCATION_HAND) {
if(!phandler->is_has_relation(ch))
if(!phandler->is_has_relation(ch)
&& peffect->is_condition_check(phandler->current.controler, ch.evt)
)
phandler->create_relation(ch);
phandler->create_relation(ch);
peffect->set_activate_location();
ch.triggering_player = phandler->current.controler;
ch.triggering_player = phandler->current.controler;
ch.set_triggering_place(phandler);
ch.set_triggering_place(phandler);
}
}
...
@@ -2263,7 +2265,8 @@ int32 field::process_instant_event() {
...
@@ -2263,7 +2265,8 @@ int32 field::process_instant_event() {
newchain.set_triggering_place(phandler);
newchain.set_triggering_place(phandler);
if(peffect->is_flag(EFFECT_FLAG_EVENT_PLAYER) && (ev.event_player == 0 || ev.event_player == 1))
if(peffect->is_flag(EFFECT_FLAG_EVENT_PLAYER) && (ev.event_player == 0 || ev.event_player == 1))
newchain.triggering_player = ev.event_player;
newchain.triggering_player = ev.event_player;
else newchain.triggering_player = phandler->current.controler;
else
newchain.triggering_player = phandler->current.controler;
core.new_fchain.push_back(newchain);
core.new_fchain.push_back(newchain);
phandler->create_relation(newchain);
phandler->create_relation(newchain);
}
}
...
@@ -2272,7 +2275,8 @@ int32 field::process_instant_event() {
...
@@ -2272,7 +2275,8 @@ int32 field::process_instant_event() {
effect* peffect = eit->second;
effect* peffect = eit->second;
++eit;
++eit;
card* phandler = peffect->get_handler();
card* phandler = peffect->get_handler();
if(!phandler->is_status(STATUS_EFFECT_ENABLED) || !peffect->is_condition_check(phandler->current.controler, ev))
bool act = phandler->is_status(STATUS_EFFECT_ENABLED) && peffect->is_condition_check(phandler->current.controler, ev);
if(!act && !(peffect->range & LOCATION_HAND))
continue;
continue;
peffect->set_activate_location();
peffect->set_activate_location();
newchain.flag = 0;
newchain.flag = 0;
...
@@ -2282,11 +2286,12 @@ int32 field::process_instant_event() {
...
@@ -2282,11 +2286,12 @@ int32 field::process_instant_event() {
newchain.set_triggering_place(phandler);
newchain.set_triggering_place(phandler);
if(peffect->is_flag(EFFECT_FLAG_EVENT_PLAYER) && (ev.event_player == 0 || ev.event_player == 1))
if(peffect->is_flag(EFFECT_FLAG_EVENT_PLAYER) && (ev.event_player == 0 || ev.event_player == 1))
newchain.triggering_player = ev.event_player;
newchain.triggering_player = ev.event_player;
else newchain.triggering_player = phandler->current.controler;
else
newchain.triggering_player = phandler->current.controler;
core.new_ochain.push_back(newchain);
core.new_ochain.push_back(newchain);
if(peffect->is_flag(EFFECT_FLAG_FIELD_ONLY)
if(peffect->is_flag(EFFECT_FLAG_FIELD_ONLY)
|| ((peffect->type & EFFECT_TYPE_SINGLE) && !peffect->is_flag(EFFECT_FLAG_SINGLE_RANGE)
)
|| !(peffect->range & LOCATION_HAND
)
|| !(peffect->range & LOCATION_HAND) || (peffect->range & phandler->current.location)
)
|| (peffect->range & phandler->current.location) && act
)
phandler->create_relation(newchain);
phandler->create_relation(newchain);
}
}
//instant_f
//instant_f
...
@@ -2304,7 +2309,8 @@ int32 field::process_instant_event() {
...
@@ -2304,7 +2309,8 @@ int32 field::process_instant_event() {
newchain.set_triggering_place(phandler);
newchain.set_triggering_place(phandler);
if(peffect->is_flag(EFFECT_FLAG_EVENT_PLAYER) && (ev.event_player == 0 || ev.event_player == 1))
if(peffect->is_flag(EFFECT_FLAG_EVENT_PLAYER) && (ev.event_player == 0 || ev.event_player == 1))
newchain.triggering_player = ev.event_player;
newchain.triggering_player = ev.event_player;
else newchain.triggering_player = phandler->current.controler;
else
newchain.triggering_player = phandler->current.controler;
core.quick_f_chain[peffect] = newchain;
core.quick_f_chain[peffect] = newchain;
phandler->create_relation(newchain);
phandler->create_relation(newchain);
}
}
...
...
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