From 69a12f879afe1206926d96b7216dda13a7e8ca06 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Wed, 31 Oct 2007 01:52:52 +0000 Subject: Trunk->0.3 merge (2694-2695): Unarmed title, zap id messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2696 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/hiscores.cc | 7 ++++--- crawl-ref/source/item_use.cc | 17 +++++++++-------- crawl-ref/source/skills2.cc | 6 ++++-- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc index e77e56ec88..2a3c6b1902 100644 --- a/crawl-ref/source/hiscores.cc +++ b/crawl-ref/source/hiscores.cc @@ -32,6 +32,7 @@ #include #include #include +#include #include #include "AppHdr.h" @@ -965,9 +966,9 @@ void scorefile_entry::init() final_hp = you.hp; final_max_hp = you.hp_max; final_max_max_hp = you.hp_max + player_rotted(); - str = you.strength; - intel = you.intel; - dex = you.dex; + str = std::max(you.strength - stat_modifier(STAT_STRENGTH), 1); + intel = std::max(you.intel - stat_modifier(STAT_INTELLIGENCE), 1); + dex = std::max(you.dex - stat_modifier(STAT_DEXTERITY), 1); god = you.religion; if (you.religion != GOD_NO_GOD) diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 607a49cbeb..d280ff5309 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2939,7 +2939,15 @@ void zap_wand(void) zapping( static_cast(type_zapped), 30 + roll_dice(2, you.skills[SK_EVOCATIONS]), beam ); - if ((beam.obvious_effect || type_zapped == WAND_FIREBALL) && + // take off a charge + wand.plus--; + + // increment zap count + if ( wand.plus2 >= 0 ) + wand.plus2++; + + // identify if necessary + if ((beam.obvious_effect || type_zapped == ZAP_FIREBALL) && !alreadyknown) { set_ident_type( wand.base_type, wand.sub_type, ID_KNOWN_TYPE ); @@ -2950,13 +2958,6 @@ void zap_wand(void) set_ident_type( wand.base_type, wand.sub_type, ID_TRIED_TYPE ); } - // take off a charge - wand.plus--; - - // increment zap count - if ( wand.plus2 >= 0 ) - wand.plus2++; - if (item_type_known(wand) && (item_ident( wand, ISFLAG_KNOW_PLUSES ) || you.skills[SK_EVOCATIONS] > 5 + random2(15))) diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc index cc9e8f8e8d..62f5b2023c 100644 --- a/crawl-ref/source/skills2.cc +++ b/crawl-ref/source/skills2.cc @@ -20,6 +20,8 @@ #include "AppHdr.h" #include "skills2.h" +#include + #include #include #include @@ -2018,10 +2020,10 @@ std::string skill_title( unsigned char best_skill, unsigned char skill_lev, species = you.species; if (str == -1) - str = you.strength; + str = std::max(you.strength - stat_modifier(STAT_STRENGTH), 1); if (dex == -1) - dex = you.dex; + dex = std::max(you.dex - stat_modifier(STAT_DEXTERITY), 1); if (god == -1) god = you.religion; -- cgit v1.2.3-54-g00ecf