Commit 8a91d421 authored by salix5's avatar salix5

Card.RegisterEffect()

Now trigger effects in phase will set count limit automatically.
parent d478c28d
...@@ -978,6 +978,10 @@ int32 scriptlib::card_register_effect(lua_State *L) { ...@@ -978,6 +978,10 @@ int32 scriptlib::card_register_effect(lua_State *L) {
pduel->game_field->core.reseted_effects.insert(peffect); pduel->game_field->core.reseted_effects.insert(peffect);
return 0; return 0;
} }
if((peffect->type & (EFFECT_TYPE_TRIGGER_O | EFFECT_TYPE_TRIGGER_F)) && (peffect->code & EVENT_PHASE)) {
peffect->flag[0] |= EFFECT_FLAG_COUNT_LIMIT;
peffect->reset_count |= ((1 << 12) & 0xf000) | ((1 << 8) & 0xf00);
}
int32 id; int32 id;
if (peffect->handler) if (peffect->handler)
id = -1; id = -1;
......
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