Make it possible for stairways to be triggered when in combat and in other circumstances where they were previously disallowed

(Inspired by Windows code, but this version doesn't need a compatibility flag as it allows the designer to choose whether it's allowed)
This commit is contained in:
2014-12-14 17:20:31 -05:00
parent 179cce0819
commit c5b1e9bdb3

View File

@@ -3503,14 +3503,14 @@ void townmode_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
*next_spec = spec.ex1b;
break;
case eSpecType::TOWN_GENERIC_STAIR:
if (is_combat()) {
if(spec.ex2c != 1 && spec.ex2c != 2 && is_combat()) {
ASB("Can't change level in combat.");
if(which_mode == eSpecCtx::OUT_MOVE || which_mode == eSpecCtx::TOWN_MOVE || which_mode == eSpecCtx::COMBAT_MOVE)
*a = 1;
*next_spec = -1;
check_mess = false;
}
else if (which_mode != eSpecCtx::TOWN_MOVE) {
else if (spec.ex2c != 2 && spec.ex2c != 3 && which_mode != eSpecCtx::TOWN_MOVE) {
ASB("Can't change level now.");
if(which_mode == eSpecCtx::OUT_MOVE || which_mode == eSpecCtx::TOWN_MOVE || which_mode == eSpecCtx::COMBAT_MOVE)
*a = 1;
@@ -3591,14 +3591,14 @@ void townmode_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
check_mess = false;
if ((spec.m1 < 0) && (spec.ex2b != 1))
break;
if (is_combat()) {
if(spec.ex2c != 1 && spec.ex2c != 2 && is_combat()) {
ASB("Can't change level in combat.");
if(which_mode == eSpecCtx::OUT_MOVE || which_mode == eSpecCtx::TOWN_MOVE || which_mode == eSpecCtx::COMBAT_MOVE)
*a = 1;
*next_spec = -1;
check_mess = false;
}
else if(which_mode != eSpecCtx::TOWN_MOVE) {
else if(spec.ex2c != 2 && spec.ex2c != 3 && which_mode != eSpecCtx::TOWN_MOVE) {
ASB("Can't change level now.");
if(which_mode == eSpecCtx::OUT_MOVE || which_mode == eSpecCtx::TOWN_MOVE || which_mode == eSpecCtx::COMBAT_MOVE)
*a = 1;