Commit b8e1459d authored by nanahira's avatar nanahira

fix replace effect

parent 70d367f1
...@@ -1895,11 +1895,13 @@ int32 card::replace_effect(uint32 code, uint32 reset, uint32 count) { ...@@ -1895,11 +1895,13 @@ int32 card::replace_effect(uint32 code, uint32 reset, uint32 count) {
read_card(code, &cdata); read_card(code, &cdata);
if(cdata.type & TYPE_NORMAL) if(cdata.type & TYPE_NORMAL)
return -1; return -1;
if(is_status(STATUS_EFFECT_REPLACED))
set_status(STATUS_EFFECT_REPLACED, FALSE);
for(auto i = indexer.begin(); i != indexer.end();) { for(auto i = indexer.begin(); i != indexer.end();) {
auto rm = i++; auto rm = i++;
effect* peffect = rm->first; effect* peffect = rm->first;
auto it = rm->second; auto it = rm->second;
if(peffect->is_flag(EFFECT_FLAG_INITIAL | EFFECT_FLAG_COPY_INHERIT)) if (peffect->is_flag(EFFECT_FLAG_INITIAL | EFFECT_FLAG_COPY_INHERIT))
remove_effect(peffect, it); remove_effect(peffect, it);
} }
uint32 cr = pduel->game_field->core.copy_reset; uint32 cr = pduel->game_field->core.copy_reset;
......
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