summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-31 01:52:52 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-31 01:52:52 +0000
commit69a12f879afe1206926d96b7216dda13a7e8ca06 (patch)
tree450e59f39e9c5128e0d7396fe05220025dabb8ce
parent7d18754c754005cc4c9db2a4ce89f41f3cb5a2a1 (diff)
downloadcrawl-ref-69a12f879afe1206926d96b7216dda13a7e8ca06.tar.gz
crawl-ref-69a12f879afe1206926d96b7216dda13a7e8ca06.zip
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
-rw-r--r--crawl-ref/source/hiscores.cc7
-rw-r--r--crawl-ref/source/item_use.cc17
-rw-r--r--crawl-ref/source/skills2.cc6
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 <stdio.h>
#include <ctype.h>
#include <unistd.h>
+#include <algorithm>
#include <memory>
#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<zap_type>(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 <algorithm>
+
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -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;