summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/externs.h4
-rw-r--r--crawl-ref/source/ghost.cc7
-rw-r--r--crawl-ref/source/tags.cc2
3 files changed, 6 insertions, 7 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index dec1c914c2..14793f2abb 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1275,9 +1275,7 @@ public:
int shield_blocks; // Count of shield blocks this round.
god_type god; // What god the monster worships, if
- // any. This is currently only used for
- // monsters that are god gifts, to
- // indicate which god sent them.
+ // any.
std::auto_ptr<ghost_demon> ghost; // Ghost information.
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc
index 9f0a643372..2b8048a426 100644
--- a/crawl-ref/source/ghost.cc
+++ b/crawl-ref/source/ghost.cc
@@ -311,7 +311,8 @@ void ghost_demon::init_player_ghost()
const item_def& weapon = *you.weapon();
if (weapon.base_type == OBJ_WEAPONS || weapon.base_type == OBJ_STAVES)
{
- damage = property( weapon, PWPN_DAMAGE );
+ damage = property(weapon, PWPN_DAMAGE);
+
damage *= 25 + you.skills[weapon_skill(weapon)];
damage /= 25;
@@ -321,7 +322,7 @@ void ghost_demon::init_player_ghost()
// Ghosts can't get holy wrath, but they get to keep
// the weapon.
- if ( brand == SPWPN_HOLY_WRATH )
+ if (brand == SPWPN_HOLY_WRATH)
brand = SPWPN_NORMAL;
}
}
@@ -344,10 +345,10 @@ void ghost_demon::init_player_ghost()
damage = 50;
species = you.species;
+ job = you.char_class;
best_skill = ::best_skill(SK_FIGHTING, (NUM_SKILLS - 1), 99);
best_skill_level = you.skills[best_skill];
xl = you.experience_level;
- job = you.char_class;
add_spells();
}
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index b494a0031d..007dc9036a 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -2172,7 +2172,7 @@ static void unmarshall_monster(reader &th, monsters &m)
unmarshallSpells(th, m.spells);
- m.god = (god_type) unmarshallByte(th);
+ m.god = static_cast<god_type>( unmarshallByte(th) );
if (m.type == MONS_PLAYER_GHOST || m.type == MONS_PANDEMONIUM_DEMON)
m.set_ghost( unmarshallGhost(th) );