Commit cf73af57 authored by DailyShana's avatar DailyShana

fix EFFECT_STATUS_ACTIVATED

parent 37aa2592
......@@ -1287,9 +1287,6 @@ int32 card::add_effect(effect* peffect) {
}
indexer.insert(std::make_pair(peffect, eit));
peffect->handler = this;
if((peffect->type & 0x7e0)
|| (pduel->game_field->core.reason_effect && (pduel->game_field->core.reason_effect->status & EFFECT_STATUS_ACTIVATED)))
peffect->status |= EFFECT_STATUS_ACTIVATED;
if (peffect->in_range(current.location, current.sequence) && (peffect->type & EFFECT_TYPE_FIELD))
pduel->game_field->add_effect(peffect);
if (current.controler != PLAYER_NONE && check_target) {
......
......@@ -723,9 +723,6 @@ void field::add_effect(effect* peffect, uint8 owner_player) {
peffect->effect_owner = owner_player;
peffect->id = infos.field_id++;
}
if((peffect->type & 0x7e0)
|| (core.reason_effect && (core.reason_effect->status & EFFECT_STATUS_ACTIVATED)))
peffect->status |= EFFECT_STATUS_ACTIVATED;
peffect->card_type = peffect->owner->data.type;
effect_container::iterator it;
if (!(peffect->type & EFFECT_TYPE_ACTIONS)) {
......
......@@ -985,6 +985,9 @@ int32 scriptlib::card_register_effect(lua_State *L) {
pduel->game_field->core.reseted_effects.insert(peffect);
return 0;
}
if((peffect->type & 0x7e0)
|| (pduel->game_field->core.reason_effect && (pduel->game_field->core.reason_effect->status & EFFECT_STATUS_ACTIVATED)))
peffect->status |= EFFECT_STATUS_ACTIVATED;
int32 id;
if (peffect->handler)
id = -1;
......
......@@ -71,6 +71,9 @@ int32 scriptlib::duel_register_effect(lua_State *L) {
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = peffect->pduel;
if((peffect->type & 0x7e0)
|| (pduel->game_field->core.reason_effect && (pduel->game_field->core.reason_effect->status & EFFECT_STATUS_ACTIVATED)))
peffect->status |= EFFECT_STATUS_ACTIVATED;
pduel->game_field->add_effect(peffect, playerid);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment