From 5c7d640f2cadbf0048d9c5c81e427e3ce1d5af0f Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sat, 25 Aug 2007 20:47:27 +0000 Subject: A few minor changes. Bugfixes: - vampire bats couldn't untransform - / of polymorph other do not autoID if you zap at yourself git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2032 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/docs/crawl_options.txt | 2 +- crawl-ref/source/acr.cc | 3 ++- crawl-ref/source/beam.cc | 11 +++++++++-- crawl-ref/source/command.cc | 22 ++++++++++++++++++++++ crawl-ref/source/food.cc | 8 +++++--- crawl-ref/source/misc.cc | 2 +- 6 files changed, 40 insertions(+), 8 deletions(-) diff --git a/crawl-ref/docs/crawl_options.txt b/crawl-ref/docs/crawl_options.txt index 1f693caac3..8b86626a0f 100644 --- a/crawl-ref/docs/crawl_options.txt +++ b/crawl-ref/docs/crawl_options.txt @@ -15,7 +15,7 @@ The contents of this text are: 3- Lua files. lua_file, base.lua, stash.lua, wield.lua, kills.lua, runrest.lua, - gearset.lua, eat.lua, trapwalk.lua + gearset.lua, eat.lua, pickup.lua, trapwalk.lua 4- Interface. 4-a Dropping and Picking up. autopickup, autopickup_exceptions, default_autopickup, diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 7f01edd703..47f2ae2afa 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -1796,7 +1796,8 @@ static void decrement_durations() // Vampire bat transformations are permanent (until ended.) if ((you.species != SP_VAMPIRE || - you.attribute[ATTR_TRANSFORMATION] != TRAN_BAT) + you.attribute[ATTR_TRANSFORMATION] != TRAN_BAT + || you.duration[DUR_TRANSFORMATION] <= 2) && you.duration[DUR_TRANSFORMATION] < 100 ) { if ( decrement_a_duration(DUR_TRANSFORMATION, diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 94c86b620f..c1fbdd170c 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -40,6 +40,7 @@ #include "enum.h" #include "it_use2.h" #include "items.h" +#include "itemname.h" #include "itemprop.h" #include "misc.h" #include "monplace.h" @@ -3170,10 +3171,16 @@ static int affect_player( bolt &beam ) { mpr("Strange energies course through your body."); you.mutate(); + beam.obvious_effect = true; } - else + else if (get_ident_type(OBJ_WANDS, WAND_POLYMORPH_OTHER) == ID_KNOWN_TYPE) + { mpr("This is polymorph other only!"); - beam.obvious_effect = true; + } + else + { + canned_msg( MSG_NOTHING_HAPPENS ); + } break; case BEAM_SLOW: diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 447b740ee2..ac2bdecbdb 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -34,6 +34,7 @@ #include "libutil.h" #include "menu.h" #include "ouch.h" +#include "player.h" #include "spl-cast.h" #include "spl-util.h" #include "stuff.h" @@ -373,6 +374,21 @@ void list_armour() if (armour_id != -1) estr << you.inv[armour_id].name(DESC_INVENTORY); + + if (!you_can_wear(i)) + { + if (i == EQ_BODY_ARMOUR || i == EQ_HELMET) + { + if (!you_tran_can_wear(i)) + estr << " (currently unavailable)"; + else + estr << " (ill-fitting)"; + } + else + estr << " (unavailable)"; + } + else if (!you_tran_can_wear(i)) + estr << " (currently unavailable)"; else estr << " none"; @@ -399,6 +415,8 @@ void list_jewellery(void) if (jewellery_id != -1) jstr << you.inv[jewellery_id].name(DESC_INVENTORY); + else if (!you_tran_can_wear(i)) + jstr << " (currently unavailable)"; else jstr << " none"; @@ -424,6 +442,8 @@ void list_weapons(void) { if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BLADE_HANDS) wstring += " blade hands"; + else if (!you_tran_can_wear(EQ_WEAPON)) + wstring += " (currently unavailable)"; else wstring += " empty hands"; } @@ -445,6 +465,8 @@ void list_weapons(void) if (is_valid_item( you.inv[i] )) wstring += you.inv[i].name(DESC_INVENTORY_EQUIP); + else if (!you_tran_can_wear(EQ_WEAPON)) + wstring += " (currently unavailable)"; else wstring += " none"; diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 4437026b37..10334a013b 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -337,9 +337,11 @@ bool butchery(void) if (you.duration[DUR_PRAYER] && rotten && god_likes_butchery(you.religion) ) { - simple_god_message(" refuses to accept that mouldy sacrifice!", - you.religion); -// simple_god_message(" demands fresh blood!", you.religion); + if (coinflip()) + simple_god_message(" refuses to accept that mouldy " + "sacrifice!", you.religion); + else + simple_god_message(" demands fresh blood!", you.religion); } // If we didn't switch weapons, we get in one turn of butchery; diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index ce5b05956f..d81bce85d5 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -970,7 +970,7 @@ static void exit_stair_message(dungeon_feature_type stair, bool /* going_up */) static void climb_message(dungeon_feature_type stair, bool going_up) { if (grid_is_portal(stair)) - mpr("You pass through the gateway."); + mpr("The world spins around you as you enter the gateway."); else if (grid_is_rock_stair(stair)) { if (going_up) -- cgit v1.2.3-54-g00ecf