Commit aada13bd authored by DailyShana's avatar DailyShana

refresh STATUS_FORBIDDEN in deck

parent c65d1874
......@@ -2227,7 +2227,7 @@ int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffe
if(!ignore_count && (pduel->game_field->core.extra_summon[playerid] || !is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT))
&& pduel->game_field->core.summon_count[playerid] >= pduel->game_field->get_summon_count_limit(playerid))
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
pduel->game_field->save_lp_cost();
effect_set eset;
......@@ -2338,7 +2338,7 @@ int32 card::is_can_be_flip_summoned(uint8 playerid) {
return FALSE;
if(!pduel->game_field->is_player_can_flipsummon(playerid, this))
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
if(is_affected_by_effect(EFFECT_CANNOT_FLIP_SUMMON))
return FALSE;
......@@ -2366,7 +2366,7 @@ int32 card::is_special_summonable(uint8 playerid, uint32 summon_type) {
return FALSE;
if(is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON))
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
pduel->game_field->save_lp_cost();
effect_set eset;
......@@ -2412,7 +2412,7 @@ int32 card::is_can_be_special_summoned(effect * reason_effect, uint32 sumtype, u
return FALSE;
if(is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON))
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
pduel->game_field->save_lp_cost();
effect_set eset;
......@@ -2455,7 +2455,7 @@ int32 card::is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect
return FALSE;
if(current.location != LOCATION_HAND)
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
if(is_affected_by_effect(EFFECT_CANNOT_MSET))
return FALSE;
......@@ -2498,7 +2498,7 @@ int32 card::is_setable_szone(uint8 playerid, uint8 ignore_fd) {
return FALSE;
if(data.type & TYPE_MONSTER && !is_affected_by_effect(EFFECT_MONSTER_SSET))
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
if(is_affected_by_effect(EFFECT_CANNOT_SSET))
return FALSE;
......@@ -2753,7 +2753,7 @@ int32 card::is_capable_cost_to_extra(uint8 playerid) {
int32 card::is_capable_attack() {
if(!is_position(POS_FACEUP_ATTACK) && !(is_position(POS_FACEUP_DEFENSE) && is_affected_by_effect(EFFECT_DEFENSE_ATTACK)))
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
if(is_affected_by_effect(EFFECT_CANNOT_ATTACK))
return FALSE;
......@@ -2789,7 +2789,7 @@ int32 card::is_capable_change_position(uint8 playerid) {
return FALSE;
if(announce_count > 0)
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
if(is_affected_by_effect(EFFECT_CANNOT_CHANGE_POSITION))
return FALSE;
......@@ -2857,7 +2857,7 @@ int32 card::is_capable_be_effect_target(effect* peffect, uint8 playerid) {
int32 card::is_can_be_fusion_material(card* fcard, uint8 ignore_mon) {
if(!ignore_mon && !(get_type() & TYPE_MONSTER))
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
effect_set eset;
filter_effect(EFFECT_CANNOT_BE_FUSION_MATERIAL, &eset);
......@@ -2873,7 +2873,7 @@ int32 card::is_can_be_synchro_material(card* scard, card* tuner) {
return FALSE;
if(scard && current.location == LOCATION_MZONE && current.controler != scard->current.controler && !is_affected_by_effect(EFFECT_SYNCHRO_MATERIAL))
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
//special fix for scrap chimera, not perfect yet
if(tuner && (pduel->game_field->core.global_flag & GLOBALFLAG_SCRAP_CHIMERA)) {
......@@ -2905,7 +2905,7 @@ int32 card::is_can_be_xyz_material(card* scard) {
return FALSE;
if(!(get_type() & TYPE_MONSTER))
return FALSE;
if(is_affected_by_effect(EFFECT_FORBIDDEN))
if(is_status(STATUS_FORBIDDEN))
return FALSE;
effect_set eset;
filter_effect(EFFECT_CANNOT_BE_XYZ_MATERIAL, &eset);
......
......@@ -227,7 +227,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if(!available)
return FALSE;
}
if(handler->is_affected_by_effect(EFFECT_FORBIDDEN))
if(handler->is_status(STATUS_FORBIDDEN))
return FALSE;
if(handler->is_affected_by_effect(EFFECT_CANNOT_TRIGGER))
return FALSE;
......@@ -253,7 +253,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
return FALSE;
if((type & EFFECT_TYPE_FIELD) && (handler->current.controler != playerid) && !is_flag(EFFECT_FLAG_BOTH_SIDE))
return FALSE;
if(handler->is_affected_by_effect(EFFECT_FORBIDDEN))
if(handler->is_status(STATUS_FORBIDDEN))
return FALSE;
if(handler->is_affected_by_effect(EFFECT_CANNOT_TRIGGER))
return FALSE;
......
......@@ -907,6 +907,20 @@ void field::filter_affected_cards(effect* peffect, card_set* cset) {
cset->insert(pcard);
}
}
if(range & LOCATION_DECK) {
for(auto it = player[self].list_main.begin(); it != player[self].list_main.end(); ++it) {
card* pcard = *it;
if(peffect->is_target(pcard))
cset->insert(pcard);
}
}
if(range & LOCATION_EXTRA) {
for(auto it = player[self].list_extra.begin(); it != player[self].list_extra.end(); ++it) {
card* pcard = *it;
if(peffect->is_target(pcard))
cset->insert(pcard);
}
}
range = peffect->o_range;
self = 1 - self;
}
......@@ -2141,7 +2155,7 @@ int32 field::is_player_can_spsummon(effect * peffect, uint32 sumtype, uint8 sump
effect_set eset;
if(pcard->is_affected_by_effect(EFFECT_CANNOT_SPECIAL_SUMMON))
return FALSE;
if(pcard->is_affected_by_effect(EFFECT_FORBIDDEN))
if(pcard->is_status(STATUS_FORBIDDEN))
return FALSE;
sumtype |= SUMMON_TYPE_SPECIAL;
if(sumpos & POS_FACEDOWN && is_player_affected_by_effect(playerid, EFFECT_DEVINE_LIGHT))
......
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