diff options
-rw-r--r-- | crawl-ref/source/abl-show.cc | 21 | ||||
-rw-r--r-- | crawl-ref/source/acr.cc | 17 | ||||
-rw-r--r-- | crawl-ref/source/command.cc | 90 | ||||
-rw-r--r-- | crawl-ref/source/dat/mini.des | 2 | ||||
-rw-r--r-- | crawl-ref/source/fight.cc | 40 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 30 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 27 | ||||
-rw-r--r-- | crawl-ref/source/player.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 35 | ||||
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 24 | ||||
-rw-r--r-- | crawl-ref/source/stuff.cc | 9 |
14 files changed, 221 insertions, 90 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index 69c9ea6bd3..1f745ed30e 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -806,7 +806,7 @@ std::vector<const char*> get_ability_names() { std::vector<talent> talents = your_talents(false); std::vector<const char*> result; - for ( unsigned int i = 0; i < talents.size(); ++i ) + for (unsigned int i = 0; i < talents.size(); ++i) result.push_back(get_ability_def(talents[i].which).name); return result; } @@ -930,7 +930,7 @@ static bool _activate_talent(const talent& tal) return (false); } - // some abilities don't need a hunger check + // Some abilities don't need a hunger check. bool hungerCheck = true; switch (tal.which) { @@ -957,7 +957,7 @@ static bool _activate_talent(const talent& tal) const ability_def& abil = get_ability_def(tal.which); - // check that we can afford to pay the costs + // Check that we can afford to pay the costs. if (!enough_mp( abil.mp_cost, false )) { crawl_state.zero_turns_taken(); @@ -977,8 +977,8 @@ static bool _activate_talent(const talent& tal) return (false); } - // don't insta-starve the player - // (happens at 100, losing consciousness possible from 500 downward) + // Don't insta-starve the player. + // (Happens at 100, losing consciousness possible from 500 downward.) if (hungerCheck && you.species != SP_VAMPIRE) { const int expected_hunger = you.hunger - abil.food_cost * 2; @@ -987,7 +987,7 @@ static bool _activate_talent(const talent& tal) "hunger: %d, max. food_cost: %d, expected hunger: %d", you.hunger, abil.food_cost * 2, expected_hunger); #endif - // safety margin for natural hunger, mutations etc. + // Safety margin for natural hunger, mutations etc. if (expected_hunger <= 150) { mpr("You're too hungry."); @@ -996,7 +996,14 @@ static bool _activate_talent(const talent& tal) } } - // no turning back now... {dlb} + if ((tal.which == ABIL_EVOKE_BERSERK || tal.which == ABIL_TROG_BERSERK) + && !berserk_check_wielded_weapon()) + { + crawl_state.zero_turns_taken(); + return (false); + } + + // No turning back now... {dlb} if (random2avg(100, 3) < tal.fail) { mpr("You fail to use your ability."); diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 7f640c8d34..d7384a03d0 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -1952,6 +1952,19 @@ void process_command( command_type cmd ) case CMD_TOGGLE_FRIENDLY_PICKUP: { + if (you.religion != GOD_SHINING_ONE && you.religion != GOD_BEOGH) + { + mpr("I'm sorry, your allies won't ever be able to pick up items."); + if (Options.tutorial_left) + { + mpr("Only intelligent permanent allies may equip themselves, " + "and these two restrictions are only met by allies of the " + "followers of two gods in the pantheon: the Shining One " + "and Beogh.", MSGCH_TUTORIAL); + } + break; + } + // Toggle pickup mode for friendlies. _print_friendly_pickup_setting(false); mpr("Change to (d)efault, (n)othing, (f)riend-dropped, or (a)ll? ", @@ -4047,7 +4060,9 @@ static bool _initialise(void) if (newc) // start a new game { - you.friendly_pickup = Options.default_friendly_pickup; + you.friendly_pickup = FRIENDLY_PICKUP_NONE; + if (you.religion == GOD_BEOGH || you.religion == GOD_SHINING_ONE) + you.friendly_pickup = Options.default_friendly_pickup; // Mark items in inventory as of unknown origin. origin_set_inventory(origin_set_unknown); diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 8f086eebea..34df390d2b 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -1921,59 +1921,73 @@ static void _list_wizard_commands() cols.set_pagesize(get_number_of_lines()); cols.add_formatted(0, - "<w>a</w> : acquirement\n" + "<yellow>Player stats</yellow>\n" "<w>A</w> : set all skills to level\n" - "<w>Ctrl-A</w> : generate new Abyss area\n" - "<w>b</w> : controlled blink\n" - "<w>B</w> : banish yourself to the Abyss\n" - "<w>c</w> : card effect\n" - "<w>C</w> : (un)curse item\n" "<w>g</w> : add a skill\n" - "<w>G</w> : banish all monsters\n" + "<w>r</w> : change character's species\n" + "<w>s</w> : gain 20000 skill points\n" + "<w>S</w> : set skill to level\n" + "<w>x</w> : gain an experience level\n" + "<w>Ctrl-X</w> : change experience level\n" + "<w>$</w> : get 1000 gold\n" + "<w>]</w> : get a mutation\n" + "<w>[</w> : get a demonspawn mutation\n" + "<w>^</w> : gain piety\n" + "<w>_</w> : gain religion\n" + "<w>@</w> : set Str Int Dex\n" + "\n" + "<yellow>Other player related effects</yellow>\n" + "<w>c</w> : card effect\n" "<w>Ctrl-G</w> : save ghost (bones file)\n" - "<w>f</w> : player combat damage stats\n" - "<w>F</w> : combat stats with fsim_kit\n" - "<w>Ctrl-F</w> : combat stats (monster vs PC)\n" "<w>h</w>/<w>H</w> : heal yourself (super-Heal)\n" + "<w>X</w> : make Xom do something now\n" + "<w>z</w>/<w>Z</w> : cast spell by number/name\n" + "\n" + "<yellow>Item related commands</yellow>\n" + "<w>a</w> : acquirement\n" + "<w>C</w> : (un)curse item\n" "<w>i</w>/<w>I</w> : identify/unidentify inventory\n" - "<w>Ctrl-I</w> : item generation stats\n" - "<w>l</w> : make entrance to labyrinth\n" - "<w>L</w> : place a vault by name\n" - "<w>m</w>/<w>M</w> : create monster by number/name\n" "<w>o</w>/<w>%</w> : create an object\n" - "<w>p</w> : make entrance to pandemonium\n" - "<w>P</w> : make a portal (i.e., bazaars)\n" - "<w>r</w> : change character's species\n" - "<w>s</w> : gain 20000 skill points\n" - "<w>S</w> : set skill to level\n", + "<w>t</w> : tweak object properties\n" + "<w>v</w> : show gold value of an item\n" + "<w>|</w> : create all unrand/fixed artefacts\n" + "<w>+</w> : make randart from item\n" + "<w>'</w> : list items\n", true, true); cols.add_formatted(1, - "<w>t</w> : tweak object properties\n" + "<yellow>Monster related commands</yellow>\n" + "<w>G</w> : banish all monsters\n" + "<w>m</w>/<w>M</w> : create monster by number/name\n" + "<w>\"</w> : list monsters\n" + "\n" + "<yellow>Create level features</yellow>\n" + "<w>l</w> : make entrance to labyrinth\n" + "<w>L</w> : place a vault by name\n" + "<w>p</w> : make entrance to pandemonium\n" + "<w>P</w> : make a portal (i.e., bazaars)\n" "<w>T</w> : make a trap\n" - "<w>v</w> : show gold value of an item\n" - "<w>x</w> : gain an experience level\n" - "<w>Ctrl-X</w> : change experience level\n" - "<w>X</w> : make Xom do something now\n" - "<w>z</w>/<w>Z</w> : cast spell by number/name\n" - "<w>$</w> : get 1000 gold\n" "<w><<</w>/<w>></w> : create up/down staircase\n" + "<w>(</w>/<w>)</w> : make feature by number/name\n" + "<w>\\</w> : make a shop\n" + "\n" + "<yellow>Other level related commands</yellow>\n" + "<w>Ctrl-A</w> : generate new Abyss area\n" + "<w>b</w> : controlled blink\n" + "<w>B</w> : banish yourself to the Abyss\n" "<w>u</w>/<w>d</w> : shift up/down one level\n" "<w>~</w> : go to a specific level\n" - "<w>(</w>/<w>)</w> : make feature by number/name\n" - "<w>]</w> : get a mutation\n" - "<w>[</w> : get a demonspawn mutation\n" "<w>:</w> : find branches in the dungeon\n" "<w>{</w> : magic mapping\n" - "<w>^</w> : gain piety\n" - "<w>_</w> : gain religion\n" - "<w>'</w> : list items\n" - "<w>\"</w> : list monsters\n" - "<w>?</w> : list wizard commands\n" - "<w>|</w> : create all unrand/fixed artefacts\n" - "<w>+</w> : make randart from item\n" - "<w>@</w> : set Str Int Dex\n" - "<w>\\</w> : make a shop\n", + "\n" + "<yellow>Debugging commands</yellow>\n" + "<w>f</w> : player combat damage stats\n" + "<w>F</w> : combat stats with fsim_kit\n" + "<w>Ctrl-F</w> : combat stats (monster vs PC)\n" + "<w>Ctrl-I</w> : item generation stats\n" + "\n" + "\n" + "<w>?</w> : list wizard commands\n", true, true); _show_keyhelp_menu(cols.formatted_lines(), false, true); diff --git a/crawl-ref/source/dat/mini.des b/crawl-ref/source/dat/mini.des index 9aa79e83fb..e5bdcefa95 100644 --- a/crawl-ref/source/dat/mini.des +++ b/crawl-ref/source/dat/mini.des @@ -1057,7 +1057,7 @@ ENDMAP # Anthill # NAME: minivault_29 -TAGS: allow_dup patrolling +TAGS: allow_dup MONS: patrolling queen ant, patrolling soldier ant MONS: patrolling giant ant, ant larva MAP diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index d26d1ee36b..bce2727800 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -4001,17 +4001,37 @@ int melee_attack::mons_to_hit() /////////////////////////////////////////////////////////////////////////// -static void wielded_weapon_check(const item_def *weapon) +static bool wielded_weapon_check(const item_def *weapon) { - if (you.received_weapon_warning == false - && weapon && weapon->base_type != OBJ_STAVES - && (weapon->base_type != OBJ_WEAPONS || is_range_weapon(*weapon))) + bool result = true; + if (!you.received_weapon_warning + && weapon && weapon->base_type != OBJ_STAVES + && (weapon->base_type != OBJ_WEAPONS || is_range_weapon(*weapon)) + || you.attribute[ATTR_WEAPON_SWAP_INTERRUPTED]) { - mpr("You might want to wield a more suitable implement when " - "attacking monsters.", MSGCH_WARN); + if (item_cursed(*weapon)) + { + mpr("You might want to wield a more suitable implement when " + "attacking monsters.", MSGCH_WARN); + } + else + { + std::string prompt = "Really attack while wielding " + + weapon->name(DESC_NOCAP_YOUR) + "? "; + + result = yesno(prompt.c_str(), true, 'n'); + } + learned_something_new(TUT_WIELD_WEAPON); // for tutorial Rangers - you.received_weapon_warning = true; + + // Don't warn again if you decide to continue your attack. + if (result) + { + you.received_weapon_warning = true; + you.attribute[ATTR_WEAPON_SWAP_INTERRUPTED] = 0; + } } + return (result); } // Returns true if you hit the monster. @@ -4025,7 +4045,11 @@ bool you_attack(int monster_attacked, bool unarmed_attacks) interrupt_activity(AI_HIT_MONSTER, defender); // Check if the player is fighting with something unsuitable. - wielded_weapon_check(attk.weapon); + if (!wielded_weapon_check(attk.weapon)) + { + you.turn_is_over = false; + return (false); + } bool attack = attk.attack(); if (!attack) diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index b524f4a78a..cf3620f270 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -184,15 +184,15 @@ bool can_wield(const item_def *weapon, bool say_reason, static bool _valid_weapon_swap(const item_def &item) { - // weapons and staves are valid weapons + // Weapons and staves are valid weapons. if (item.base_type == OBJ_WEAPONS || item.base_type == OBJ_STAVES) - return true; + return (true); - // misc. items need to be wielded to be evoked + // Misc. items need to be wielded to be evoked. if (item.base_type == OBJ_MISCELLANY && item.sub_type != MISC_RUNE_OF_ZOT) - return true; + return (true); - // some missiles need to be wielded for spells + // Some missiles need to be wielded for spells. if (item.base_type == OBJ_MISSILES) { if (item.sub_type == MI_STONE) @@ -201,19 +201,19 @@ static bool _valid_weapon_swap(const item_def &item) if (item.sub_type == MI_ARROW) return (player_knows_spell(SPELL_STICKS_TO_SNAKES)); - return false; + return (false); } - // Boneshards + // Boneshards. if (item.base_type == OBJ_CORPSES) { return (item.sub_type == CORPSE_SKELETON && player_knows_spell(SPELL_BONE_SHARDS)); } - // Sublimation of Blood + // Sublimation of Blood. if (!player_knows_spell(SPELL_SUBLIMATION_OF_BLOOD)) - return false; + return (false); if (item.base_type == OBJ_FOOD) return (item.sub_type == FOOD_CHUNK); @@ -224,7 +224,7 @@ static bool _valid_weapon_swap(const item_def &item) || item.sub_type == POT_BLOOD_COAGULATED); } - return false; + return (false); } bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages) @@ -3584,7 +3584,7 @@ void drink( int slot ) const bool alreadyknown = item_type_known(you.inv[item_slot]); - if (you.hunger_state == HS_ENGORGED && alreadyknown + if (alreadyknown && you.hunger_state == HS_ENGORGED && (is_blood_potion(you.inv[item_slot]) || you.inv[item_slot].sub_type == POT_PORRIDGE)) { @@ -3592,6 +3592,14 @@ void drink( int slot ) return; } + if (alreadyknown && you.inv[item_slot].sub_type == POT_BERSERK_RAGE + && !berserk_check_wielded_weapon()) + { + return; + } + + + // The "> 1" part is to reduce the amount of times that Xom is // stimulated when you are a low-level 1 trying your first unknown // potions on monsters. diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 975fd7aae0..f77d6cb54f 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2057,7 +2057,8 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, if (newlevel) { // When entering a new level, reset friendly_pickup to default. - you.friendly_pickup = Options.default_friendly_pickup; + if (you.religion == GOD_BEOGH || you.religion == GOD_SHINING_ONE) + you.friendly_pickup = Options.default_friendly_pickup; switch(you.level_type) { diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index d7aed4b10d..d9e6d175da 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -4013,7 +4013,7 @@ bool monsters::pickup_misc(item_def &item, int near) return pickup(item, MSLOT_MISCELLANY, near); } -// Jellies are handled elsewhere, in _handle_pickup()) in monstuff.cc. +// Jellies are handled elsewhere, in _handle_pickup() in monstuff.cc. bool monsters::pickup_item(item_def &item, int near, bool force) { // Equipping stuff can be forced when initially equipping monsters. diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index dcee293256..eee3987af6 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -691,8 +691,8 @@ static void _fire_monster_death_event(monsters *monster, apply_to_level( target, true, - target == level_id::current()? - _slime_pit_unlock_onlevel : _slime_pit_unlock_offlevel ); + target == level_id::current() ? _slime_pit_unlock_onlevel + : _slime_pit_unlock_offlevel); } } } @@ -1188,6 +1188,10 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) monster->set_transit( level_id(LEVEL_ABYSS) ); in_transit = true; monster->destroy_inventory(); + // Make monster stop patrolling and/or travelling. + monster->patrol_point = coord_def(0,0); + monster->travel_path.clear(); + monster->travel_target = MTRAV_NONE; break; case KILL_DISMISSED: diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index a8f4d8f79d..51a66351bb 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -749,6 +749,33 @@ int get_player_wielded_weapon() return (player_weapon_wielded()? get_player_wielded_item() : -1); } +// Returns false if the player is wielding a weapon inappropriate for Berserk. +bool berserk_check_wielded_weapon() +{ + if (you.equip[EQ_WEAPON] == -1) + return (true); + + const item_def weapon = you.inv[you.equip[EQ_WEAPON]]; + if (is_valid_item(weapon) && weapon.base_type != OBJ_STAVES + && (weapon.base_type != OBJ_WEAPONS || is_range_weapon(weapon)) + || you.attribute[ATTR_WEAPON_SWAP_INTERRUPTED]) + { + std::string prompt = "Do you really want to go berserk while " + "wielding " + weapon.name(DESC_NOCAP_YOUR) + + "? "; + + if (!yesno(prompt.c_str(), true, 'n')) + { + canned_msg(MSG_OK); + return (false); + } + + you.attribute[ATTR_WEAPON_SWAP_INTERRUPTED] = 0; + } + + return (true); +} + // Looks in equipment "slot" to see if there is an equipped "sub_type". // Returns number of matches (in the case of rings, both are checked) int player_equip( equipment_type slot, int sub_type, bool calc_unid ) diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index bae81da50e..a00dd66937 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -34,7 +34,8 @@ bool player_in_mappable_area(void); bool player_in_branch( int branch ); bool player_in_hell( void ); -int get_player_wielded_weapon(); +int get_player_wielded_weapon(void); +bool berserk_check_wielded_weapon(void); int player_equip( equipment_type slot, int sub_type, bool calc_unid = true ); int player_equip_ego_type( int slot, int sub_type ); int player_damage_type( void ); diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index c4c1975eb7..4e230c8583 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -4739,15 +4739,15 @@ static void _print_sacrifice_message(god_type god, const item_def &item, static void _altar_prayer() { - // different message from when first joining a religion - mpr( "You prostrate yourself in front of the altar and pray." ); + // Different message from when first joining a religion. + mpr("You prostrate yourself in front of the altar and pray."); if (you.religion == GOD_XOM) return; god_acting gdact; - // TSO blesses weapons with holy wrath, and long blades specially + // TSO blesses weapons with holy wrath, and long blades specially. if (you.religion == GOD_SHINING_ONE && !you.num_gifts[GOD_SHINING_ONE] && !player_under_penance() @@ -4763,7 +4763,7 @@ static void _altar_prayer() } } - // Lugonu blesses weapons with distortion + // Lugonu blesses weapons with distortion. if (you.religion == GOD_LUGONU && !you.num_gifts[GOD_LUGONU] && !player_under_penance() @@ -4776,7 +4776,7 @@ static void _altar_prayer() } offer_items(); -} // end _altar_prayer() +} bool god_hates_attacking_friend(god_type god, const actor *fr) { @@ -5076,7 +5076,7 @@ void offer_items() mprf(MSGCH_DIAGNOSTICS, "Sacrifice item value: %d", item_value(item)); #endif - + for ( int j = 0; j < item.quantity; ++j ) { const piety_gain_t gain = _sacrifice_one_item_noncount(item); @@ -5132,9 +5132,9 @@ void god_pitch(god_type which_god) // return, or not allow worshippers from other religions. -- bwr // Gods can be racist... - const bool you_evil = you.is_undead || you.species == SP_DEMONSPAWN; - if ( (you_evil && is_good_god(which_god)) || - (you.species != SP_HILL_ORC && which_god == GOD_BEOGH) ) + const bool you_evil = (you.is_undead || you.species == SP_DEMONSPAWN); + if (you_evil && is_good_god(which_god) + || which_god == GOD_BEOGH && you.species != SP_HILL_ORC) { you.turn_is_over = false; simple_god_message(" does not accept worship from those such as you!", @@ -5191,6 +5191,21 @@ void god_pitch(god_type which_god) you.gift_timeout = 0; } + if (you.religion == GOD_BEOGH || you.religion == GOD_SHINING_ONE) + { + // With these two, you can get permanent followers, so enable + // ally pickup control. + you.friendly_pickup = Options.default_friendly_pickup; + } + else + { + // With other gods you can only get stupid (zombies!), summoned + // or charmed allies, so pickup control makes no sense. + // Sorry about that! + you.friendly_pickup = FRIENDLY_PICKUP_NONE; + } + + set_god_ability_slots(); // remove old god's slots, reserve new god's #ifdef DGL_WHEREIS whereis_record(); @@ -5251,7 +5266,7 @@ void god_pitch(god_type which_god) } } - // note that you.worshipped[] has already been incremented + // Note that you.worshipped[] has already been incremented. if (you.religion == GOD_LUGONU && you.worshipped[GOD_LUGONU] == 1) gain_piety(20); // allow instant access to first power diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index a86681a523..e392966dc1 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1753,31 +1753,38 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) // Transformations. case SPELL_BLADE_HANDS: - transform(powc, TRAN_BLADE_HANDS); + if (!transform(powc, TRAN_BLADE_HANDS)) + canned_msg(MSG_SPELL_FIZZLES); break; case SPELL_SPIDER_FORM: - transform(powc, TRAN_SPIDER); + if (!transform(powc, TRAN_SPIDER)) + canned_msg(MSG_SPELL_FIZZLES); break; case SPELL_STATUE_FORM: - transform(powc, TRAN_STATUE); + if (!transform(powc, TRAN_STATUE)) + canned_msg(MSG_SPELL_FIZZLES); break; case SPELL_ICE_FORM: - transform(powc, TRAN_ICE_BEAST); + if (!transform(powc, TRAN_ICE_BEAST)) + canned_msg(MSG_SPELL_FIZZLES); break; case SPELL_DRAGON_FORM: - transform(powc, TRAN_DRAGON); + if (!transform(powc, TRAN_DRAGON)) + canned_msg(MSG_SPELL_FIZZLES); break; case SPELL_NECROMUTATION: - transform(powc, TRAN_LICH); + if (!transform(powc, TRAN_LICH)) + canned_msg(MSG_SPELL_FIZZLES); break; case SPELL_AIR_WALK: - transform(powc, TRAN_AIR); + if (!transform(powc, TRAN_AIR)) + canned_msg(MSG_SPELL_FIZZLES); break; case SPELL_ALTER_SELF: @@ -1803,6 +1810,9 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) // General enhancement. case SPELL_BERSERKER_RAGE: + if (!berserk_check_wielded_weapon()) + return (SPRET_ABORT); + cast_berserk(); break; diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index 802ad57cf1..68b31a0e0d 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -243,7 +243,7 @@ static bool tag_follower_at(const coord_def &pos) if (fmenv->speed_increment < 50) return (false); - // only friendly monsters, or those actively seeking the + // Only friendly monsters, or those actively seeking the // player, will follow up/down stairs. if (!mons_friendly(fmenv) && (fmenv->behaviour != BEH_SEEK || fmenv->foe != MHITYOU)) @@ -266,9 +266,14 @@ static bool tag_follower_at(const coord_def &pos) } } - // monster is chasing player through stairs: + // Monster is chasing player through stairs. fmenv->flags |= MF_TAKING_STAIRS; + // Clear patrolling/travel markers. + fmenv->patrol_point = coord_def(0,0); + fmenv->travel_path.clear(); + fmenv->travel_target = MTRAV_NONE; + #if DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "%s is marked for following.", fmenv->name(DESC_CAP_THE, true).c_str() ); |