From d764d49f10bab7f7c52cd2bf162dce86d02d822e Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 2 Jul 2008 13:17:35 +0000 Subject: If a monster wields a non-branded launcher there is no message, so we *know* it is a plain one -> it is now auto-identified which enables us to autoidentify branded ammo shot from it. Fix Trolls starting out wearing bucklers and remove the stat checks during (normal) random weapon choice. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6333 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mon-util.cc | 7 +++++-- crawl-ref/source/newgame.cc | 35 +++++------------------------------ 2 files changed, 10 insertions(+), 32 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index e6f118a6ef..a19ca4cd6c 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -3295,7 +3295,7 @@ void monsters::equip_weapon(item_def &item, int near, bool msg) if (brand == SPWPN_PROTECTION) ac += 5; - if (msg && brand != SPWPN_NORMAL) + if (msg) { bool message_given = true; switch (brand) @@ -3331,8 +3331,11 @@ void monsters::equip_weapon(item_def &item, int near, bool msg) mpr("Its appearance distorts for a moment."); break; default: - message_given = false; + // A ranged weapon without special message is known to be unbranded. + if (!is_range_weapon(item)) + message_given = false; } + if (message_given) set_ident_flags(item, ISFLAG_KNOW_TYPE); } diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index d700765be8..46af9fbeda 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -2332,13 +2332,7 @@ static bool _choose_weapon() if (startwep[i] == WPN_UNARMED) cprintf("%c - claws" EOL, letter); else - { - int x = effective_stat_bonus(startwep[i]); - - cprintf("%c - %s%s" EOL, letter, - weapon_base_name(startwep[i]), - (x <= -4) ? " (not ideal)" : "" ); - } + cprintf("%c - %s" EOL, letter, weapon_base_name(startwep[i])); if (Options.prev_weapon == startwep[i]) prevmatch = true; @@ -2397,15 +2391,6 @@ static bool _choose_weapon() while (keyin != '*' && keyin != '+' && (keyin < 'a' || keyin > ('a' + num_choices) || startwep_restrictions[keyin - 'a'] == CC_BANNED)); - - - if (keyin != '*' && keyin != '+' - && (claws_allowed && startwep[keyin - 'a'] == WPN_UNARMED - || effective_stat_bonus(startwep[keyin - 'a']) > -4)) - { - cprintf(EOL "A fine choice. " EOL); - delay(1000); - } } if (Options.random_pick || Options.weapon == WPN_RANDOM @@ -2428,19 +2413,8 @@ static bool _choose_weapon() } if (!good_choices) - { - // Still try to choose a decent weapon. - for (int times = 0; times < 50; times++) - { - keyin = random2(num_choices); - if (claws_allowed && startwep[keyin] == WPN_UNARMED) - break; + keyin = random2(num_choices); - int x = effective_stat_bonus(startwep[keyin]); - if (x > -2) - break; - } - } keyin += 'a'; } else @@ -3299,9 +3273,10 @@ static void _newgame_make_item(int slot, equipment_type eqslot, if (item.base_type == OBJ_ARMOUR && replacement != -1 && !you_can_wear(eqslot)) { - // Don't replace shields with bucklers for draconians and ogres. + // Don't replace shields with bucklers for large races or draconians if (sub_type != ARM_SHIELD - || !player_genus(GENPC_OGRE) && !player_genus(GENPC_DRACONIAN)) + || player_size(PSIZE_TORSO) < SIZE_LARGE + && !player_genus(GENPC_DRACONIAN)) { item.sub_type = replacement; } -- cgit v1.2.3-54-g00ecf