diff --git a/card.cpp b/card.cpp index fadfc5cf..ecc866dd 100644 --- a/card.cpp +++ b/card.cpp @@ -2851,7 +2851,7 @@ void card::filter_spsummon_procedure(uint8_t playerid, effect_set* peset, uint32 continue; if(summon_type != 0 && summon_type != sumtype) continue; - if(!pduel->game_field->is_player_can_spsummon(sumeffect, sumtype, topos, playerid, toplayer, this)) + if(!pduel->game_field->is_player_can_spsummon(sumeffect, sumtype, topos, playerid, toplayer, this, peffect)) continue; peset->push_back(peffect); } diff --git a/field.cpp b/field.cpp index 87958412..6205b03e 100644 --- a/field.cpp +++ b/field.cpp @@ -2726,7 +2726,7 @@ int32_t field::is_player_can_spsummon(uint8_t playerid) { } return is_player_can_spsummon_count(playerid, 1); } -int32_t field::is_player_can_spsummon(effect* peffect, uint32_t sumtype, uint8_t sumpos, uint8_t playerid, uint8_t toplayer, card* pcard) { +int32_t field::is_player_can_spsummon(effect* peffect, uint32_t sumtype, uint8_t sumpos, uint8_t playerid, uint8_t toplayer, card* pcard, effect* proc_effect) { if(pcard->is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON)) return FALSE; if(pcard->is_status(STATUS_FORBIDDEN)) @@ -2758,7 +2758,8 @@ int32_t field::is_player_can_spsummon(effect* peffect, uint32_t sumtype, uint8_t pduel->lua->add_param(sumpos); pduel->lua->add_param(toplayer); pduel->lua->add_param(peffect); - if(pduel->lua->check_condition(eff->target, 7)) + pduel->lua->add_param(proc_effect); + if(pduel->lua->check_condition(eff->target, 8)) return FALSE; } eset.clear(); diff --git a/field.h b/field.h index 6a62d7c9..34f09614 100644 --- a/field.h +++ b/field.h @@ -533,7 +533,7 @@ class field { int32_t is_player_can_mset(uint32_t sumtype, uint8_t playerid, card* pcard, uint8_t toplayer); int32_t is_player_can_sset(uint8_t playerid, card* pcard); int32_t is_player_can_spsummon(uint8_t playerid); - int32_t is_player_can_spsummon(effect* peffect, uint32_t sumtype, uint8_t sumpos, uint8_t playerid, uint8_t toplayer, card* pcard); + int32_t is_player_can_spsummon(effect* peffect, uint32_t sumtype, uint8_t sumpos, uint8_t playerid, uint8_t toplayer, card* pcard, effect* proc_effect = nullptr); int32_t is_player_can_flipsummon(uint8_t playerid, card* pcard); int32_t is_player_can_spsummon_monster(uint8_t playerid, uint8_t toplayer, uint8_t sumpos, uint32_t sumtype, card_data* pdata); int32_t is_player_can_spsummon_count(uint8_t playerid, uint32_t count);