Commit 34904f4e authored by Chen Bill's avatar Chen Bill Committed by GitHub

fix card::is_affect_by_effect (#661)

parent c79ee42f
......@@ -3636,7 +3636,7 @@ int32 card::is_setable_szone(uint8 playerid, uint8 ignore_fd) {
}
int32 card::is_affect_by_effect(effect* reason_effect) {
if (is_status(STATUS_SUMMONING))
return reason_effect && (reason_effect->code == EFFECT_CANNOT_DISABLE_SUMMON || reason_effect->code == EFFECT_CANNOT_DISABLE_SPSUMMON);
return reason_effect && affect_summoning_effect.find(reason_effect->code) != affect_summoning_effect.end();
if(!reason_effect || reason_effect->is_flag(EFFECT_FLAG_IGNORE_IMMUNE))
return TRUE;
if(reason_effect->is_immuned(this))
......
......@@ -578,4 +578,10 @@ const std::unordered_set<uint32> continuous_event{
};
bool is_continuous_event(uint32 code);
const std::unordered_set<uint32> affect_summoning_effect{
EFFECT_CANNOT_DISABLE_SUMMON,
EFFECT_CANNOT_DISABLE_SPSUMMON,
EVENT_BE_PRE_MATERIAL,
};
#endif /* EFFECT_H_ */
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