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
YGOPRO-520DIY
ygopro
Commits
0471c223
Commit
0471c223
authored
Jan 11, 2014
by
Fluorohydride
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix GetActivatingLocation()
parent
f3469874
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
ocgcore/libeffect.cpp
ocgcore/libeffect.cpp
+1
-4
ocgcore/processor.cpp
ocgcore/processor.cpp
+20
-0
No files found.
ocgcore/libeffect.cpp
View file @
0471c223
...
@@ -508,9 +508,6 @@ int32 scriptlib::effect_get_activate_location(lua_State *L) {
...
@@ -508,9 +508,6 @@ int32 scriptlib::effect_get_activate_location(lua_State *L) {
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
check_param
(
L
,
PARAM_TYPE_EFFECT
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
effect
*
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
1
);
if
(
peffect
->
type
&
(
EFFECT_TYPE_ACTIVATE
|
EFFECT_TYPE_IGNITION
|
EFFECT_TYPE_QUICK_O
|
EFFECT_TYPE_QUICK_F
))
lua_pushinteger
(
L
,
peffect
->
handler
->
current
.
location
);
else
lua_pushinteger
(
L
,
peffect
->
s_range
);
lua_pushinteger
(
L
,
peffect
->
s_range
);
return
1
;
return
1
;
}
}
\ No newline at end of file
ocgcore/processor.cpp
View file @
0471c223
...
@@ -1964,6 +1964,8 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -1964,6 +1964,8 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
pr = effects.activate_effect.equal_range(evit->event_code);
pr = effects.activate_effect.equal_range(evit->event_code);
for(; pr.first != pr.second; ++pr.first) {
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(peffect->is_chainable(priority) && peffect->is_activateable(priority, *evit)) {
if(peffect->is_chainable(priority) && peffect->is_activateable(priority, *evit)) {
newchain.flag = 0;
newchain.flag = 0;
newchain.chain_id = infos.field_id++;
newchain.chain_id = infos.field_id++;
...
@@ -1981,6 +1983,8 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -1981,6 +1983,8 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
pr = effects.quick_o_effect.equal_range(evit->event_code);
pr = effects.quick_o_effect.equal_range(evit->event_code);
for(; pr.first != pr.second; ++pr.first) {
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(peffect->is_chainable(priority) && peffect->is_activateable(priority, *evit)) {
if(peffect->is_chainable(priority) && peffect->is_activateable(priority, *evit)) {
newchain.flag = 0;
newchain.flag = 0;
newchain.chain_id = infos.field_id++;
newchain.chain_id = infos.field_id++;
...
@@ -2028,6 +2032,8 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -2028,6 +2032,8 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
if(core.global_flag & GLOBALFLAG_DELAYED_QUICKEFFECT) {
if(core.global_flag & GLOBALFLAG_DELAYED_QUICKEFFECT) {
for(auto eit = core.delayed_quick.begin(); eit != core.delayed_quick.end(); ++eit) {
for(auto eit = core.delayed_quick.begin(); eit != core.delayed_quick.end(); ++eit) {
peffect = eit->first;
peffect = eit->first;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
const tevent& evt = eit->second;
const tevent& evt = eit->second;
if(peffect->is_chainable(priority) && peffect->is_activateable(priority, evt, TRUE, FALSE, FALSE)) {
if(peffect->is_chainable(priority) && peffect->is_activateable(priority, evt, TRUE, FALSE, FALSE)) {
newchain.flag = 0;
newchain.flag = 0;
...
@@ -2048,6 +2054,8 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -2048,6 +2054,8 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN);
pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN);
for(; pr.first != pr.second; ++pr.first) {
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(peffect->is_chainable(priority) && peffect->is_activateable(priority, nil_event)) {
if(peffect->is_chainable(priority) && peffect->is_activateable(priority, nil_event)) {
newchain.flag = 0;
newchain.flag = 0;
newchain.chain_id = infos.field_id++;
newchain.chain_id = infos.field_id++;
...
@@ -2065,6 +2073,8 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -2065,6 +2073,8 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN);
pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN);
for(; pr.first != pr.second; ++pr.first) {
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(peffect->is_chainable(priority) && peffect->is_activateable(priority, nil_event)) {
if(peffect->is_chainable(priority) && peffect->is_activateable(priority, nil_event)) {
newchain.flag = 0;
newchain.flag = 0;
newchain.chain_id = infos.field_id++;
newchain.chain_id = infos.field_id++;
...
@@ -2392,6 +2402,8 @@ int32 field::process_idle_command(uint16 step) {
...
@@ -2392,6 +2402,8 @@ int32 field::process_idle_command(uint16 step) {
pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN);
pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN);
for(; pr.first != pr.second; ++pr.first) {
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
newchain.triggering_effect = peffect;
newchain.triggering_effect = peffect;
if(peffect->is_activateable(infos.turn_player, nil_event))
if(peffect->is_activateable(infos.turn_player, nil_event))
core.select_chains.push_back(newchain);
core.select_chains.push_back(newchain);
...
@@ -2399,12 +2411,16 @@ int32 field::process_idle_command(uint16 step) {
...
@@ -2399,12 +2411,16 @@ int32 field::process_idle_command(uint16 step) {
pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN);
pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN);
for(; pr.first != pr.second; ++pr.first) {
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
newchain.triggering_effect = peffect;
newchain.triggering_effect = peffect;
if(peffect->is_activateable(infos.turn_player, nil_event))
if(peffect->is_activateable(infos.turn_player, nil_event))
core.select_chains.push_back(newchain);
core.select_chains.push_back(newchain);
}
}
for(eit = effects.ignition_effect.begin(); eit != effects.ignition_effect.end(); ++eit) {
for(eit = effects.ignition_effect.begin(); eit != effects.ignition_effect.end(); ++eit) {
peffect = eit->second;
peffect = eit->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
newchain.triggering_effect = peffect;
newchain.triggering_effect = peffect;
if(peffect->is_activateable(infos.turn_player, nil_event))
if(peffect->is_activateable(infos.turn_player, nil_event))
core.select_chains.push_back(newchain);
core.select_chains.push_back(newchain);
...
@@ -2619,6 +2635,8 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2619,6 +2635,8 @@ int32 field::process_battle_command(uint16 step) {
pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN);
pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN);
for(; pr.first != pr.second; ++pr.first) {
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
newchain.triggering_effect = peffect;
newchain.triggering_effect = peffect;
if(peffect->is_activateable(infos.turn_player, nil_event) && peffect->get_speed() > 1)
if(peffect->is_activateable(infos.turn_player, nil_event) && peffect->get_speed() > 1)
core.select_chains.push_back(newchain);
core.select_chains.push_back(newchain);
...
@@ -2626,6 +2644,8 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2626,6 +2644,8 @@ int32 field::process_battle_command(uint16 step) {
pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN);
pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN);
for(; pr.first != pr.second; ++pr.first) {
for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second;
peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
newchain.triggering_effect = peffect;
newchain.triggering_effect = peffect;
if(peffect->is_activateable(infos.turn_player, nil_event))
if(peffect->is_activateable(infos.turn_player, nil_event))
core.select_chains.push_back(newchain);
core.select_chains.push_back(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