summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/docs/crawl_manual.txt2
-rw-r--r--crawl-ref/source/abl-show.cc22
-rw-r--r--crawl-ref/source/abyss.cc4
-rw-r--r--crawl-ref/source/actor.cc5
-rw-r--r--crawl-ref/source/beam.cc44
m---------crawl-ref/source/contrib/freetype0
m---------crawl-ref/source/contrib/libpng0
m---------crawl-ref/source/contrib/sdl0
m---------crawl-ref/source/contrib/sdl-image0
m---------crawl-ref/source/contrib/zlib0
-rw-r--r--crawl-ref/source/dat/float.des35
-rw-r--r--crawl-ref/source/delay.cc6
-rw-r--r--crawl-ref/source/dungeon.cc43
-rw-r--r--crawl-ref/source/effects.cc4
-rw-r--r--crawl-ref/source/fight.cc37
-rw-r--r--crawl-ref/source/files.cc8
-rw-r--r--crawl-ref/source/godabil.cc6
-rw-r--r--crawl-ref/source/item_use.cc20
-rw-r--r--crawl-ref/source/l_dgn.cc4
-rw-r--r--crawl-ref/source/main.cc2
-rw-r--r--crawl-ref/source/makeitem.cc4
-rw-r--r--crawl-ref/source/maps.cc4
-rw-r--r--crawl-ref/source/message.cc10
-rw-r--r--crawl-ref/source/misc.cc42
-rw-r--r--crawl-ref/source/misc.h3
-rw-r--r--crawl-ref/source/mon-abil.cc4
-rw-r--r--crawl-ref/source/mon-cast.cc19
-rw-r--r--crawl-ref/source/mon-stuff.cc23
-rw-r--r--crawl-ref/source/monster.cc8
-rw-r--r--crawl-ref/source/mpr.h7
-rw-r--r--crawl-ref/source/mutation.cc5
-rw-r--r--crawl-ref/source/ouch.cc20
-rw-r--r--crawl-ref/source/output.cc40
-rw-r--r--crawl-ref/source/player.cc32
-rw-r--r--crawl-ref/source/player.h2
-rw-r--r--crawl-ref/source/religion.cc16
-rw-r--r--crawl-ref/source/rltiles/UNUSED/other/reaping-2.pngbin0 -> 340 bytes
-rw-r--r--crawl-ref/source/rltiles/UNUSED/other/reaping-3.pngbin0 -> 354 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn.txt2
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/altars/dngn_altar_cheibriados.pngbin0 -> 795 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-item.txt6
-rw-r--r--crawl-ref/source/rltiles/dc-mon.txt2
-rw-r--r--crawl-ref/source/rltiles/dc-mon/unique/khufu.pngbin0 -> 3894 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-mon/unique/nikola.pngbin0 -> 3707 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-player.txt1
-rw-r--r--crawl-ref/source/rltiles/item/weapon/brands/i-reaping.pngbin0 -> 500 bytes
-rw-r--r--crawl-ref/source/rltiles/player/hand1/demonblade.pngbin0 -> 3040 bytes
-rw-r--r--crawl-ref/source/shopping.cc1
-rw-r--r--crawl-ref/source/shout.cc18
-rw-r--r--crawl-ref/source/skills.cc7
-rw-r--r--crawl-ref/source/spells1.cc9
-rw-r--r--crawl-ref/source/spells2.cc4
-rw-r--r--crawl-ref/source/spells3.cc30
-rw-r--r--crawl-ref/source/spells4.cc9
-rw-r--r--crawl-ref/source/spl-cast.cc9
-rw-r--r--crawl-ref/source/spl-mis.cc4
-rw-r--r--crawl-ref/source/stuff.cc9
-rw-r--r--crawl-ref/source/tilepick.cc6
-rw-r--r--crawl-ref/source/tilesdl.cc7
-rw-r--r--crawl-ref/source/traps.cc4
-rw-r--r--crawl-ref/source/xom.cc20
61 files changed, 280 insertions, 349 deletions
diff --git a/crawl-ref/docs/crawl_manual.txt b/crawl-ref/docs/crawl_manual.txt
index 3358aa4d0d..40d63f5deb 100644
--- a/crawl-ref/docs/crawl_manual.txt
+++ b/crawl-ref/docs/crawl_manual.txt
@@ -1964,7 +1964,7 @@ Reavers are warriors who learn the magics of destruction in order to
complement their deadliness in hand combat.
Warpers:
- --------
+--------
Warpers specialise in translocation magic, and are experts in travelling
long distances and positioning themselves precisely and use this to
their advantage in melee or missile combat.
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index bb69c1b8d8..a16fdf3ca6 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -702,6 +702,8 @@ static talent _get_talent(ability_type ability, bool check_confused)
case ABIL_TROG_BERSERK: // piety >= 30
invoc = true;
failure = 30 - you.piety; // starts at 0%
+ if (player_mental_clarity(true))
+ failure += 80;
break;
case ABIL_TROG_REGEN_MR: // piety >= 50
@@ -975,11 +977,8 @@ static bool _check_ability_possible(const ability_def& abil,
if (hungerCheck && you.species != SP_VAMPIRE)
{
const int expected_hunger = you.hunger - abil.food_cost * 2;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "hunger: %d, max. food_cost: %d, expected hunger: %d",
+ dprf("hunger: %d, max. food_cost: %d, expected hunger: %d",
you.hunger, abil.food_cost * 2, expected_hunger);
-#endif
// Safety margin for natural hunger, mutations etc.
if (expected_hunger <= 150)
{
@@ -1102,7 +1101,8 @@ static bool _check_ability_possible(const ability_def& abil,
mpr("You're too hungry to berserk.");
return (false);
}
- return (you.can_go_berserk(true) && berserk_check_wielded_weapon());
+ return (you.can_go_berserk(true, abil.ability == ABIL_TROG_BERSERK)
+ && berserk_check_wielded_weapon());
case ABIL_FLY_II:
if (you.duration[DUR_EXHAUSTED])
@@ -1161,7 +1161,7 @@ static bool _activate_talent(const talent& tal)
}
if ((tal.which == ABIL_EVOKE_BERSERK || tal.which == ABIL_TROG_BERSERK)
- && !you.can_go_berserk(true))
+ && !you.can_go_berserk(true, tal.which == ABIL_TROG_BERSERK))
{
crawl_state.zero_turns_taken();
return (false);
@@ -1745,7 +1745,7 @@ static bool _do_ability(const ability_def& abil)
case ABIL_TROG_BERSERK:
// Trog abilities don't use or train invocations.
- go_berserk(true);
+ go_berserk(true, true);
break;
case ABIL_TROG_REGEN_MR:
@@ -2080,9 +2080,7 @@ static bool _do_ability(const ability_def& abil)
case ABIL_CHEIBRIADOS_SLOUCH:
mpr("You can feel time thicken.");
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "your speed is %d", player_movement_speed());
-#endif
+ dprf("your speed is %d", player_movement_speed());
exercise(SK_INVOCATIONS, 4 + random2(4));
cheibriados_slouch(0);
break;
@@ -2118,10 +2116,8 @@ static void _pay_ability_costs(const ability_def& abil)
const int piety_cost = abil.piety_cost.cost();
const int hp_cost = abil.hp_cost.cost(you.hp_max);
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Cost: mp=%d; hp=%d; food=%d; piety=%d",
+ dprf("Cost: mp=%d; hp=%d; food=%d; piety=%d",
abil.mp_cost, hp_cost, food_cost, piety_cost );
-#endif
if (abil.mp_cost)
{
diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc
index 562f93729c..edde4516bc 100644
--- a/crawl-ref/source/abyss.cc
+++ b/crawl-ref/source/abyss.cc
@@ -674,9 +674,7 @@ static void _initialise_level_corrupt_seeds(int power)
const int low = power / 2, high = power * 3 / 2;
int nseeds = random_range(1, std::min(2 + power / 110, 4));
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Placing %d corruption seeds", nseeds);
-#endif
+ dprf("Placing %d corruption seeds", nseeds);
// The corruption centered on the player is free.
_place_corruption_seed(you.pos(), high + 300);
diff --git a/crawl-ref/source/actor.cc b/crawl-ref/source/actor.cc
index c42c9965d3..3cdeeb9c50 100644
--- a/crawl-ref/source/actor.cc
+++ b/crawl-ref/source/actor.cc
@@ -103,11 +103,8 @@ bool actor::check_res_magic(int power)
const int mrchance = (100 + mrs) - power;
const int mrch2 = random2(100) + random2(101);
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "Power: %d, MR: %d, target: %d, roll: %d",
+ dprf("Power: %d, MR: %d, target: %d, roll: %d",
power, mrs, mrchance, mrch2);
-#endif
return (mrch2 < mrchance);
}
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index affd03ce5a..f2e247b4b8 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -226,9 +226,7 @@ static void _ench_animation(int flavour, const monsters *mon, bool force)
bool zapping(zap_type ztype, int power, bolt &pbolt,
bool needs_tracer, const char* msg)
{
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "zapping: power=%d", power);
-#endif
+ dprf("zapping: power=%d", power);
pbolt.thrower = KILL_YOU_MISSILE;
@@ -307,9 +305,7 @@ bool player_tracer( zap_type ztype, int power, bolt &pbolt, int range)
// "Fire through friendly?" prompts.
if (pbolt.beam_cancelled)
{
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "%s", "Beam cancelled.");
-#endif
+ dprf("%s", "Beam cancelled.");
canned_msg(MSG_OK);
you.turn_is_over = false;
return (false);
@@ -3523,9 +3519,7 @@ static bool _test_beam_hit(int attack, int defence, bool is_beam,
attack = r[0].random2(attack);
}
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Beam attack: %d, defence: %d", attack, defence);
-#endif
+ dprf("Beam attack: %d, defence: %d", attack, defence);
// Reproducing old behavior here; magic dart is dodgable with DMsl
if (attack == AUTOMATIC_HIT)
return (true);
@@ -3533,9 +3527,7 @@ static bool _test_beam_hit(int attack, int defence, bool is_beam,
attack = r[1].random2(attack);
defence = r[2].random2avg(defence, 2);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Beam new attack: %d, defence: %d", attack, defence);
-#endif
+ dprf("Beam new attack: %d, defence: %d", attack, defence);
return (attack >= defence);
}
@@ -3598,9 +3590,7 @@ bool bolt::is_harmless(const monsters *mon) const
bool bolt::harmless_to_player() const
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "beam flavour: %d", flavour);
-#endif
+ dprf("beam flavour: %d", flavour);
switch (flavour)
{
@@ -3778,10 +3768,7 @@ bool bolt::misses_player()
const int block = you.shield_bonus();
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Beamshield: hit: %d, block %d",
- testhit, block);
-#endif
+ dprf("Beamshield: hit: %d, block %d", testhit, block);
if (testhit < block)
{
if (is_reflectable(you.shield()))
@@ -4312,9 +4299,7 @@ void bolt::affect_player()
expose_player_to_element(BEAM_SPORE, burn_power);
}
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Damage: %d", hurted );
-#endif
+ dprf("Damage: %d", hurted );
was_affected = apply_hit_funcs(&you, hurted) || was_affected;
@@ -5251,10 +5236,7 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon)
const god_type god =
(crawl_state.is_god_acting()) ? crawl_state.which_god_acting()
: GOD_NO_GOD;
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "HD: %d; pow: %d", mon->hit_dice, ench_power);
-#endif
+ dprf("HD: %d; pow: %d", mon->hit_dice, ench_power);
obvious_effect = true;
if (player_will_anger_monster(mon))
@@ -5276,10 +5258,7 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon)
case BEAM_ENSLAVE_SOUL:
{
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "HD: %d; pow: %d", mon->hit_dice, ench_power);
-#endif
+ dprf("HD: %d; pow: %d", mon->hit_dice, ench_power);
if (!mons_can_be_zombified(mon) || mons_intel(mon) < I_NORMAL)
{
@@ -5303,10 +5282,7 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon)
}
case BEAM_ENSLAVE_DEMON:
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "HD: %d; pow: %d", mon->hit_dice, ench_power);
-#endif
+ dprf("HD: %d; pow: %d", mon->hit_dice, ench_power);
if (mon->hit_dice * 11 / 2 >= random2(ench_power)
|| mons_is_unique(mon->type))
diff --git a/crawl-ref/source/contrib/freetype b/crawl-ref/source/contrib/freetype
-Subproject 18ee3862be4f96d3b3145dee253e80cf6a86522
+Subproject 5cc0f9cb0aaa3a188c05ddb99c7d246eb00e0fb
diff --git a/crawl-ref/source/contrib/libpng b/crawl-ref/source/contrib/libpng
-Subproject dba142841631c2683fd636f29ae5572509db265
+Subproject 1106497bfb29c4d7f9399dcbe06ace494d71fb6
diff --git a/crawl-ref/source/contrib/sdl b/crawl-ref/source/contrib/sdl
-Subproject e8c8283f8d94f559f84c5a4d0c3d3afe534bbea
+Subproject 4c5fa44b99857d289152e15d3ff4cff2433ee2e
diff --git a/crawl-ref/source/contrib/sdl-image b/crawl-ref/source/contrib/sdl-image
-Subproject 975a9df40a0d82c211bcc743e75ca814c614bcc
+Subproject c8a64a54abe3243843541b95ad7e609200a66af
diff --git a/crawl-ref/source/contrib/zlib b/crawl-ref/source/contrib/zlib
-Subproject 25eeb98fc4448d4c556521beda2e0ddfdc9f513
+Subproject 925b66b5e6c5e029657db0b9e9ce8b528b9d031
diff --git a/crawl-ref/source/dat/float.des b/crawl-ref/source/dat/float.des
index 052dd50bd5..17f3cd4b58 100644
--- a/crawl-ref/source/dat/float.des
+++ b/crawl-ref/source/dat/float.des
@@ -703,6 +703,41 @@ MAP
ENDMAP
##############################################################################
+# A variety of statues, with loot. (1KB)
+#
+NAME: statue_cache
+ORIENT: north
+TAGS: no_monster_gen
+DEPTH: D:12-20, Elf, Vault
+MONS: statue name:archer name_adjective ; crossbow ego:flame . bolt q:30
+MONS: statue name:archer name_adjective ; crossbow ego:frost . bolt q:30
+MONS: statue name:warrior name_adjective ; battleaxe ego:flaming good_item
+MONS: statue name:warrior name_adjective ; battleaxe ego:freezing good_item
+MONS: statue name:warrior name_adjective ; great mace ego:flaming good_item
+MONS: statue name:warrior name_adjective ; great mace ego:freezing good_item
+MONS: silver statue
+KMONS: 8 = statue name:wizard name_adjective spells:lehudib's_crystal_spear;iskenderun's_mystic_blast;slow;stone_arrow
+KMONS: 9 = statue name:wizard name_adjective spells:freezing_cloud;mephitic_cloud;throw_icicle;confuse
+MAP
+ cccccccccccccc
+ cccccccc7ccccc
+ cccccc.....ccc
+ cccc..ccccc.cc
+ ccc.ccccc5c.cc
+ ccc.cccccc.ccc
+ cc8.9cc3c.c6cc
+ c$$$$$cc.ccccc
+ c|*|*|c.c4cccc
+ccccccccc.ccccccccc
+........1.2........
+...................
+...................
+ .................
+ .............
+ ...@...
+ENDMAP
+
+##############################################################################
# The Shining One Protects a Powerful Item 1 (by abrahamwl)
#
# The basic theme of this vault is that the the Shining one has placed a
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 5a02bbccf8..a3a6ca6d5d 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -739,12 +739,10 @@ int check_recital_audience()
return (1);
}
-#ifdef DEBUG_DIAGNOSTICS
if (!found_monsters)
- mprf(MSGCH_DIAGNOSTICS, "No audience found!");
+ dprf("No audience found!");
else
- mprf(MSGCH_DIAGNOSTICS, "No sensible audience found!");
-#endif
+ dprf("No sensible audience found!");
// No use preaching to the choir, nor to common animals.
if (found_monsters)
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 0926c5f9ce..f8d614d73f 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -1196,19 +1196,13 @@ static void _fixup_misplaced_items()
if (feat >= DNGN_MINITEM)
continue;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "Item buggily placed in feature at (%d, %d).",
+ dprf("Item buggily placed in feature at (%d, %d).",
item.pos.x, item.pos.y);
-#endif
}
else
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "Item buggily placed out of bounds at (%d, %d).",
+ dprf("Item buggily placed out of bounds at (%d, %d).",
item.pos.x, item.pos.y);
-#endif
}
// Can't just unlink item because it might not have been linked yet.
@@ -1406,9 +1400,7 @@ static bool _fixup_stone_stairs(bool preserve_vault_stairs)
gc.y = random2(GYM);
}
while (grd(gc) != DNGN_FLOOR);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "add stair %d at pos(%d, %d)", s, gc.x, gc.y);
-#endif
+ dprf("add stair %d at pos(%d, %d)", s, gc.x, gc.y);
// base gets fixed up to be the right stone stair below...
grd(gc) = base;
stair_list[num_stairs++] = gc;
@@ -1598,9 +1590,7 @@ static void _dgn_verify_connectivity(unsigned nvaults)
if (!_fixup_stone_stairs(true))
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Warning: failed to preserve vault stairs.");
-#endif
+ dprf("Warning: failed to preserve vault stairs.");
if (!_fixup_stone_stairs(false))
{
dgn_level_vetoed = true;
@@ -2982,9 +2972,7 @@ static builder_rc_type _builder_basic(int level_number)
_make_trail( 50, 20, 40, 20, corrlength, intersect_chance, no_corr,
xbegin, ybegin, xend, yend);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Placing shaft trail...");
-#endif
+ dprf("Placing shaft trail...");
if (!one_chance_in(3)) // 2/3 chance it ends in a shaft
{
trap_def& ts(env.trap[0]);
@@ -2994,16 +2982,12 @@ static builder_rc_type _builder_basic(int level_number)
grd[xend][yend] = DNGN_UNDISCOVERED_TRAP;
if (shaft_known(level_number, false))
ts.reveal();
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Trail ends in shaft.");
-#endif
+ dprf("Trail ends in shaft.");
}
else
{
grd[xend][yend] = DNGN_FLOOR;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Trail does not end in shaft..");
-#endif
+ dprf("Trail does not end in shaft..");
}
}
@@ -3316,10 +3300,7 @@ static void _place_branch_entrances(int dlevel, char level_type)
&& player_branch_depth() == branches[i].startdepth)
{
// Place a stair.
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Placing stair to %s",
- branches[i].shortname);
-#endif
+ dprf("Placing stair to %s", branches[i].shortname);
std::string entry_tag = std::string(branches[i].abbrevname);
entry_tag += "_entry";
@@ -5793,9 +5774,7 @@ static void _place_altars()
if (random2(100) >= prob)
break;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Placing an altar");
-#endif
+ dprf("Placing an altar");
_place_altar();
// Reduce the chance and try to place another.
prob /= 5;
@@ -8004,9 +7983,7 @@ coord_def dgn_find_nearby_stair(dungeon_feature_type stair_to_find,
return (pos);
// Couldn't find a good place, warn, and use old behaviour.
-#ifdef DEBUG_DIAGNOSTICS
- mpr("Oops, couldn't find labyrinth entry marker.", MSGCH_DIAGNOSTICS);
-#endif
+ dprf("Oops, couldn't find labyrinth entry marker.");
stair_to_find = DNGN_FLOOR;
}
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 1c98e6e611..e9894917b0 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -4180,9 +4180,7 @@ static void _catchup_monster_moves(monsters *mon, int turns)
}
}
-#if DEBUG_DIAGNOSTICS
- mpr("backing off...", MSGCH_DIAGNOSTICS);
-#endif
+ dprf("backing off...");
}
else
{
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 91397a6fe9..3ddd3ba835 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1480,10 +1480,7 @@ bool melee_attack::player_hits_monster()
const int evasion = defender->melee_evasion(attacker);
const int evasion_helpful
= defender->melee_evasion(attacker, EV_IGNORE_HELPLESS);
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "your to-hit: %d; defender effective EV: %d",
- to_hit, evasion);
-#endif
+ dprf("your to-hit: %d; defender effective EV: %d", to_hit, evasion);
if (to_hit >= evasion_helpful || one_chance_in(20))
{
@@ -2024,7 +2021,7 @@ bool melee_attack::player_monattk_hit_effects(bool mondied)
// Vampiric *weapon* effects for the killing blow.
else if (mondied && damage_brand == SPWPN_VAMPIRICISM
&& you.equip[EQ_WEAPON] != -1
- && you.is_undead == US_ALIVE)
+ && you.species != SP_VAMPIRE) // vampires get their bonus elsewhere
{
if (defender->holiness() == MH_NATURAL
&& !defender->is_summoned()
@@ -2037,11 +2034,8 @@ bool melee_attack::player_monattk_hit_effects(bool mondied)
// More than if not killed.
const int heal = 1 + random2(damage_done);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "Vampiric healing: damage %d, healed %d",
+ dprf("Vampiric healing: damage %d, healed %d",
damage_done, heal);
-#endif
inc_hp(heal, false);
if (you.hunger_state != HS_ENGORGED)
@@ -3776,10 +3770,8 @@ bool melee_attack::player_check_monster_died()
{
if (!defender->alive())
{
-#if DEBUG_DIAGNOSTICS
// note: doesn't take account of special weapons, etc.
- mprf(MSGCH_DIAGNOSTICS, "Hit for %d.", damage_done);
-#endif
+ dprf("Hit for %d.", damage_done);
player_monattk_hit_effects(true);
@@ -3928,8 +3920,7 @@ int melee_attack::player_to_hit(bool random_factor)
your_to_hit = maybe_random2(your_to_hit, random_factor);
#if DEBUG_DIAGNOSTICS
- mprf( MSGCH_DIAGNOSTICS,
- "to hit die: %d; rolled value: %d; base: %d",
+ dprf( "to hit die: %d; rolled value: %d; base: %d",
roll_hit, your_to_hit, base_to_hit );
#endif
@@ -4058,11 +4049,8 @@ void melee_attack::player_apply_attack_delay()
you.time_taken =
std::max(2, div_rand_round(you.time_taken * final_attack_delay, 10));
-#if DEBUG_DIAGNOSTICS
- mprf( MSGCH_DIAGNOSTICS,
- "Weapon speed: %d; min: %d; attack time: %d",
+ dprf( "Weapon speed: %d; min: %d; attack time: %d",
final_attack_delay, min_delay, you.time_taken );
-#endif
}
int melee_attack::player_weapon_speed()
@@ -4264,10 +4252,7 @@ bool melee_attack::mons_attack_mons()
// Non-friendly monsters should never violate sanctuary.
else
{
-#ifdef DEBUG_DIAGNOSTICS
- mpr("Preventing hostile violation of sanctuary.",
- MSGCH_DIAGNOSTICS);
-#endif
+ dprf("Preventing hostile violation of sanctuary.");
cancel_attack = true;
return (false);
}
@@ -5019,9 +5004,7 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk)
special_attack_punctuation().c_str());
}
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Shock damage: %d", special_damage);
-#endif
+ dprf("Shock damage: %d", special_damage);
break;
case AF_VAMPIRIC:
@@ -5459,10 +5442,8 @@ void melee_attack::mons_perform_attack_rounds()
if (damage_done > 0)
{
-#ifdef DEBUG_DIAGNOSTICS
if (shield_blocked)
- mpr("ERROR: Non-zero damage after shield block!");
-#endif
+ dprf("ERROR: Non-zero damage after shield block!");
mons_announce_hit(attk);
check_defender_train_armour();
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 45a0664a5b..8ae63853a1 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1442,9 +1442,7 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
timeval -= (stepdown_value( check_stealth(), 50, 50, 150, 150 ) / 10);
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "arrival time: %d", timeval );
-#endif
+ dprf("arrival time: %d", timeval );
if (timeval > 0)
{
@@ -1803,7 +1801,7 @@ static std::string _make_ghost_filename()
bool load_ghost(bool creating_level)
{
- const bool wiz_cmd = crawl_state.prev_cmd == CMD_WIZARD;
+ const bool wiz_cmd = (crawl_state.prev_cmd == CMD_WIZARD);
ASSERT(you.transit_stair == DNGN_UNSEEN || creating_level);
ASSERT(!you.entering_level || creating_level);
@@ -1837,7 +1835,7 @@ bool load_ghost(bool creating_level)
if (gfile == NULL)
{
- if (wiz_cmd)
+ if (wiz_cmd && !creating_level)
mpr("No ghost files for this level.", MSGCH_PROMPT);
return (false); // no such ghost.
}
diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc
index 520f12f32b..edb1b723fb 100644
--- a/crawl-ref/source/godabil.cc
+++ b/crawl-ref/source/godabil.cc
@@ -158,9 +158,7 @@ bool trog_burn_spellbooks()
else
totalpiety++;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Burned book rarity: %d", rarity);
-#endif
+ dprf("Burned book rarity: %d", rarity);
destroy_item(si.link());
count++;
}
@@ -1258,7 +1256,7 @@ bool ponderousify_armour()
static int _slouch_monsters(coord_def where, int pow, int, actor* agent)
{
monsters* mon = monster_at(where);
- if (mon == NULL)
+ if (mon == NULL || mons_is_stationary(mon))
return (0);
int dmg = (mon->speed - 1000/player_movement_speed()/player_speed());
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 4bd5082d00..4553465d97 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -176,7 +176,7 @@ bool can_wield(item_def *weapon, bool say_reason,
if (you.hunger_state < HS_FULL
&& get_weapon_brand(*weapon) == SPWPN_VAMPIRICISM
- && you.species != SP_VAMPIRE)
+ && you.species != SP_VAMPIRE && you.species != SP_MUMMY)
{
if (say_reason)
{
@@ -2577,13 +2577,10 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
if (wepClass == OBJ_MISSILES && wepType == MI_NEEDLE)
pbolt.ench_power = AUTOMATIC_HIT;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "Base hit == %d; Base damage == %d "
+ dprf( "Base hit == %d; Base damage == %d "
"(item %d + launcher %d)",
baseHit, baseDam,
item_base_dam, lnch_base_dam);
-#endif
// Fix ammo damage bonus, since missiles only use inv_plus.
ammoDamBonus = ammoHitBonus;
@@ -2625,9 +2622,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
effSkill = shoot_skill;
const int speed = launcher_final_speed(launcher, you.shield());
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Final launcher speed: %d", speed);
-#endif
+ dprf("Final launcher speed: %d", speed);
you.time_taken = speed * you.time_taken / 100;
// [dshaligram] Improving missile weapons:
@@ -3031,10 +3026,8 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
// blowguns.
exHitBonus -= (30 - you.skills[SK_DARTS]) / 3;
baseHit -= (30 - you.skills[SK_DARTS]) / 3;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Needle base hit = %d, exHitBonus = %d",
+ dprf("Needle base hit = %d, exHitBonus = %d",
baseHit, exHitBonus);
-#endif
}
}
@@ -3065,13 +3058,10 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
scale_dice(pbolt.damage);
-#if DEBUG_DIAGNOSTICS
- mprf( MSGCH_DIAGNOSTICS,
- "H:%d+%d;a%dl%d. D:%d+%d;a%dl%d -> %d,%dd%d",
+ dprf( "H:%d+%d;a%dl%d. D:%d+%d;a%dl%d -> %d,%dd%d",
baseHit, exHitBonus, ammoHitBonus, lnchHitBonus,
baseDam, exDamBonus, ammoDamBonus, lnchDamBonus,
pbolt.hit, pbolt.damage.num, pbolt.damage.size );
-#endif
// Create message.
mprf( "%s %s%s %s.",
diff --git a/crawl-ref/source/l_dgn.cc b/crawl-ref/source/l_dgn.cc
index 4ef1cae954..99035d37f0 100644
--- a/crawl-ref/source/l_dgn.cc
+++ b/crawl-ref/source/l_dgn.cc
@@ -1355,10 +1355,8 @@ static bool _lua_map_place_valid(const map_def &map,
const coord_def &c,
const coord_def &size)
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "lua_map_place_invalid: (%d,%d) (%d,%d)",
+ dprf("lua_map_place_invalid: (%d,%d) (%d,%d)",
c.x, c.y, size.x, size.y);
-#endif
lua_stack_cleaner clean(_dgn_map_safe_bounds_fn->lua);
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index 95fa1189b8..d3feb08c00 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -2893,6 +2893,8 @@ void world_reacts()
stop_running();
you.increase_duration(DUR_PARALYSIS, 5 + random2(8), 13);
+ if (you.religion == GOD_XOM)
+ xom_is_stimulated(get_tension() > 0 ? 255 : 128);
}
if (you.hunger <= 100)
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 1e8f2a6147..3d8421ade8 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -884,9 +884,7 @@ static weapon_type _determine_weapon_subtype(int item_level)
static bool _try_make_item_special_unrand(item_def& item, int force_type,
int item_level)
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Making special unrand artefact.");
-#endif
+ dprf("Making special unrand artefact.");
bool abyss = item_level == level_id(LEVEL_ABYSS).absdepth();
int idx = find_okay_unrandart(item.base_type, force_type,
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 1d009e6c6c..42006436f7 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -478,10 +478,8 @@ static bool apply_vault_grid(map_def &def,
if (check_place && !_safe_vault_place(def, start, size))
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Bad vault place: (%d,%d) dim (%d,%d)",
+ dprf("Bad vault place: (%d,%d) dim (%d,%d)",
start.x, start.y, size.x, size.y);
-#endif
return (false);
}
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index c2fce04242..6a3d36c487 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -446,6 +446,16 @@ void mprf( const char *format, ... )
va_end( argp );
}
+#ifdef DEBUG_DIAGNOSTICS
+void dprf( const char *format, ... )
+{
+ va_list argp;
+ va_start( argp, format );
+ do_message_print( MSGCH_DIAGNOSTICS, 0, format, argp );
+ va_end( argp );
+}
+#endif
+
static bool _updating_view = false;
void mpr(const char *inf, msg_channel_type channel, int param)
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index ac26b3c96d..5697133c4a 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1109,11 +1109,8 @@ static void _maybe_bloodify_square(const coord_def& where, int amount,
if (x_chance_in_y(amount, 20))
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "might bleed now; square: (%d, %d); amount = %d",
+ dprf("might bleed now; square: (%d, %d); amount = %d",
where.x, where.y, amount);
-#endif
if (may_bleed)
{
env.pgrid(where) |= FPROP_BLOODY;
@@ -1299,10 +1296,7 @@ void search_around(bool only_adjacent)
// Maybe we shouldn't kill the trap for debugging
// purposes - oh well.
grd(*ri) = DNGN_FLOOR;
-#if DEBUG_DIAGNOSTICS
- mpr("You found a buggy trap! It vanishes!",
- MSGCH_DIAGNOSTICS);
-#endif
+ dprf("You found a buggy trap! It vanishes!");
}
}
}
@@ -2649,7 +2643,7 @@ void new_level(void)
{
if (you.level_type == LEVEL_PORTAL_VAULT)
{
- // This here because place_name can't find the name of a level that you
+ // This here because place_name can't find the name of a level that you
// *are no longer on* when it spits out the new notes list.
std::string desc = "Entered " + place_name(get_packed_place(), true, true);
take_note(Note(NOTE_DUNGEON_LEVEL_CHANGE, 0, 0, NULL,
@@ -2701,11 +2695,11 @@ bool scramble(void)
return (true);
}
-bool go_berserk(bool intentional)
+bool go_berserk(bool intentional, bool no_clarity)
{
ASSERT(!crawl_state.arena);
- if (!you.can_go_berserk(intentional))
+ if (!you.can_go_berserk(intentional, no_clarity))
return (false);
if (Tutorial.tutorial_left)
@@ -2749,6 +2743,7 @@ static bool _mons_has_path_to_player(const monsters *mon)
{
// Don't consider sleeping monsters safe, in case the player would
// rather retreat and try another path for maximum stabbing chances.
+ // TODO: This doesn't cover monsters encaged in glass.
if (mon->asleep())
return (true);
@@ -2776,6 +2771,26 @@ static bool _mons_has_path_to_player(const monsters *mon)
return (false);
}
+bool mons_can_hurt_player(const monsters *mon)
+{
+ // FIXME: This takes into account whether the player knows the map!
+ // It also always returns true for sleeping monsters, but that's okay
+ // for its current purposes. (Travel interruptions and tension.)
+ if (_mons_has_path_to_player(mon))
+ return (true);
+
+ // The monster need only see you to hurt you.
+ if (mons_has_los_attack(mon))
+ return (true);
+
+ // Even if the monster can not actually reach the player it might
+ // still use some ranged form of attack.
+ if (you.see_cell_no_trans(mon->pos()) && mons_has_ranged_ability(mon))
+ return (true);
+
+ return (false);
+}
+
bool mons_is_safe(const monsters *mon, bool want_move,
bool consider_user_options)
{
@@ -2796,10 +2811,7 @@ bool mons_is_safe(const monsters *mon, bool want_move,
|| (!you.see_cell_no_trans(mon->pos())
|| mons_class_habitat(mon->type) == HT_WATER
|| mons_class_habitat(mon->type) == HT_LAVA)
- && !_mons_has_path_to_player(mon)
- && !mons_has_los_attack(mon)
- && (!you.see_cell_no_trans(mon->pos())
- || !mons_has_ranged_ability(mon)));
+ && !mons_can_hurt_player(mon));
#ifdef CLUA_BINDINGS
if (consider_user_options)
diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h
index 3a6aad81f1..3c5cee6cbf 100644
--- a/crawl-ref/source/misc.h
+++ b/crawl-ref/source/misc.h
@@ -13,7 +13,7 @@ struct bolt;
struct dist;
struct activity_interrupt_data;
-bool go_berserk(bool intentional);
+bool go_berserk(bool intentional, bool no_clarity = false);
void search_around(bool only_adjacent = false);
void down_stairs(int old_level,
dungeon_feature_type force_stair = DNGN_UNSEEN,
@@ -59,6 +59,7 @@ std::string weird_smell();
std::string weird_sound();
+bool mons_can_hurt_player(const monsters *mon);
bool mons_is_safe(const monsters *mon, bool want_move = false,
bool consider_user_options = true);
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index e1fa72f6a5..32a764bcb1 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -1164,9 +1164,7 @@ bool mon_special_ability(monsters *monster, bolt & beem)
if (delay.type == DELAY_ASCENDING_STAIRS
|| delay.type == DELAY_DESCENDING_STAIRS)
{
-#ifdef DEBUG_DIAGNOSTICS
- mpr("Taking stairs, don't mesmerise.", MSGCH_DIAGNOSTICS);
-#endif
+ dprf("Taking stairs, don't mesmerise.");
break;
}
}
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc
index bd12bdb14c..8a6397d99f 100644
--- a/crawl-ref/source/mon-cast.cc
+++ b/crawl-ref/source/mon-cast.cc
@@ -813,6 +813,7 @@ bool setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
case SPELL_TOMB_OF_DOROKLOHE:
case SPELL_CHAIN_LIGHTNING: // the only user is reckless
case SPELL_SUMMON_EYEBALLS:
+ case SPELL_SUMMON_BUTTERFLIES:
return (true);
default:
if (check_validity)
@@ -1370,10 +1371,7 @@ static int _monster_abjure_square(const coord_def &pos,
shielded = true;
}
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Abj: dur: %d, pow: %d, ndur: %d",
- duration, pow, duration - pow);
-#endif
+ dprf("Abj: dur: %d, pow: %d, ndur: %d", duration, pow, duration - pow);
mon_enchant abj = target->get_ench(ENCH_ABJ);
if (!target->lose_ench_duration(abj, pow))
@@ -2157,6 +2155,19 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
spell_cast, monster->pos(), monster->foe, 0, god));
}
return;
+ case SPELL_SUMMON_BUTTERFLIES:
+ if (_mons_abjured(monster, monsterNearby))
+ return;
+
+ duration = std::min(2 + monster->hit_dice / 5, 6);
+ for (int i = 0; i < 15; ++i)
+ {
+ create_monster(
+ mgen_data(MONS_BUTTERFLY, SAME_ATTITUDE(monster),
+ monster, duration, spell_cast, monster->pos(),
+ monster->foe, 0, god));
+ }
+ return;
}
// If a monster just came into view and immediately cast a spell,
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc
index 9b54cac979..76f964fe20 100644
--- a/crawl-ref/source/mon-stuff.cc
+++ b/crawl-ref/source/mon-stuff.cc
@@ -403,10 +403,7 @@ bool explode_corpse(item_def& corpse, const coord_def& where)
cp.x += random_range(-LOS_RADIUS, LOS_RADIUS);
cp.y += random_range(-LOS_RADIUS, LOS_RADIUS);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Trying to scatter chunk to %d, %d...",
- cp.x, cp.y);
-#endif
+ dprf("Trying to scatter chunk to %d, %d...", cp.x, cp.y);
if (! in_bounds(cp))
continue;
@@ -414,9 +411,7 @@ bool explode_corpse(item_def& corpse, const coord_def& where)
if (! ld.see_cell(cp))
continue;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Cell is visible...");
-#endif
+ dprf("Cell is visible...");
if (feat_is_solid(grd(cp)) || actor_at(cp))
continue;
@@ -431,9 +426,7 @@ bool explode_corpse(item_def& corpse, const coord_def& where)
continue;
}
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Success");
-#endif
+ dprf("Success");
copy_item_to_grid(corpse, cp);
}
@@ -730,18 +723,12 @@ static bool _ely_heal_monster(monsters *monster, killer_type killer, int i)
else if (!YOU_KILL(killer))
return (false);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "monster hp: %d, max hp: %d",
- monster->hit_points, monster->max_hit_points);
-#endif
+ dprf("monster hp: %d, max hp: %d", monster->hit_points, monster->max_hit_points);
monster->hit_points = std::min(1 + random2(ely_penance/3),
monster->max_hit_points);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "new hp: %d, ely penance: %d",
- monster->hit_points, ely_penance);
-#endif
+ dprf("new hp: %d, ely penance: %d", monster->hit_points, ely_penance);
snprintf(info, INFO_SIZE, "%s heals %s%s",
god_name(god, false).c_str(),
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index b8e5f6f552..55b342a903 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -1783,7 +1783,7 @@ bool monsters::pickup_gold(item_def &item, int near)
bool monsters::pickup_misc(item_def &item, int near)
{
// Never pick up runes.
- if (item.sub_type == MISC_RUNE_OF_ZOT)
+ if (item.base_type == OBJ_MISCELLANY && item.sub_type == MISC_RUNE_OF_ZOT)
return (false);
// Holy monsters and worshippers of good gods won't pick up evil
@@ -2915,7 +2915,7 @@ bool monsters::asleep() const
bool monsters::backlit(bool check_haloed) const
{
- return (has_ench(ENCH_CORONA)
+ return (has_ench(ENCH_CORONA) || has_ench(ENCH_STICKY_FLAME)
|| ((check_haloed) ? haloed() : false));
}
@@ -5035,9 +5035,7 @@ void monsters::apply_enchantment(const mon_enchant &me)
// Don't clean up the monster in order to credit properly.
hurt(NULL, dam, BEAM_NAPALM, false);
-#if DEBUG_DIAGNOSTICS
- mprf( MSGCH_DIAGNOSTICS, "sticky flame damage: %d", dam );
-#endif
+ dprf("sticky flame damage: %d", dam);
// Credit the kill.
if (hit_points < 1)
diff --git a/crawl-ref/source/mpr.h b/crawl-ref/source/mpr.h
index e2eb48451d..5676e5d197 100644
--- a/crawl-ref/source/mpr.h
+++ b/crawl-ref/source/mpr.h
@@ -77,4 +77,11 @@ void mprf( msg_channel_type channel, int param, const char *format, ... );
void mprf( msg_channel_type channel, const char *format, ... );
void mprf( const char *format, ... );
+// Yay for C89 and lack of variadic #defines...
+#ifdef DEBUG_DIAGNOSTICS
+void dprf( const char *format, ... );
+#else
+static inline void dprf( const char *format, ... ) {}
+#endif
+
#endif
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 4c01425f4d..b7934cca2a 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -3043,10 +3043,7 @@ int how_mutated(bool all, bool levels)
}
}
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "how_mutated(): all = %u, levels = %u, j = %d",
- all, levels, j);
-#endif
+ dprf("how_mutated(): all = %u, levels = %u, j = %d", all, levels, j);
return (j);
}
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 1c7d94cf1f..40352ecc0c 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -80,9 +80,7 @@ int check_your_resists(int hurted, beam_type flavour)
int resist;
int original = hurted;
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "checking resistance: flavour=%d", flavour );
-#endif
+ dprf("checking resistance: flavour=%d", flavour );
if (flavour == BEAM_FIRE || flavour == BEAM_LAVA
|| flavour == BEAM_HELLFIRE || flavour == BEAM_FRAG)
@@ -310,9 +308,7 @@ void _item_corrode(int slot)
// Anti-corrosion items protect against 90% of corrosion.
if (wearing_amulet(AMU_RESIST_CORROSION) && !one_chance_in(10))
{
-#if DEBUG_DIAGNOSTICS
- mpr( "Amulet protects.", MSGCH_DIAGNOSTICS );
-#endif
+ dprf("Amulet protects.");
return;
}
@@ -747,10 +743,8 @@ bool drain_exp(bool announce_full)
you.exp_available = std::max(0, you.exp_available);
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "You lose %ld experience points, %ld from pool.",
+ dprf("You lose %ld experience points, %ld from pool.",
exp_drained, pool_drained);
-#endif
you.redraw_experience = true;
@@ -1013,9 +1007,7 @@ void ouch(int dam, int death_source, kill_method_type death_type,
{
// Deep Dwarves get to shave _any_ hp loss.
int shave = 1 + random2(2 + random2(1 + you.experience_level / 3));
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "HP shaved: %d.", shave);
-#endif
+ dprf("HP shaved: %d.", shave);
dam -= shave;
if (dam <= 0)
return;
@@ -1174,9 +1166,7 @@ void ouch(int dam, int death_source, kill_method_type death_type,
= se.death_description(scorefile_entry::DDV_VERBOSE);
#ifdef USE_OPTIONAL_WIZARD_DEATH
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Damage: %d; Hit points: %d", dam, you.hp);
-#endif
+ dprf("Damage: %d; Hit points: %d", dam, you.hp);
if (crawl_state.test || !yesno("Die?", false, 'n'))
{
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index ccad9bd3d9..04d4b9a7ca 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -497,39 +497,37 @@ static void _print_stats_ev(int x, int y)
static void _print_stats_wp(int y)
{
- cgotoxy(1, y, GOTO_STAT);
- textcolor(Options.status_caption_colour);
- cprintf("Wp: ");
+ int col;
+ std::string text;
if (you.weapon())
{
const item_def& wpn = *you.weapon();
- textcolor(wpn.colour);
+ col = wpn.colour;
const std::string prefix = menu_colour_item_prefix(wpn);
const int prefcol = menu_colour(wpn.name(DESC_INVENTORY), prefix);
if (prefcol != -1)
- textcolor(prefcol);
+ col = prefcol;
- cprintf("%s",
- wpn.name(DESC_INVENTORY, true, false, true)
- .substr(0, crawl_view.hudsz.x - 4).c_str());
- textcolor(LIGHTGREY);
+ text = wpn.name(DESC_INVENTORY, true, false, true);
+ }
+ else if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BLADE_HANDS)
+ {
+ col = RED;
+ text = "Blade Hands";
}
else
{
- if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BLADE_HANDS)
- {
- textcolor(RED);
- cprintf("Blade Hands");
- textcolor(LIGHTGREY);
- }
- else
- {
- textcolor(LIGHTGREY);
- cprintf("Nothing wielded");
- }
+ col = LIGHTGREY;
+ text = "Nothing wielded";
}
- clear_to_end_of_line();
+ cgotoxy(1, y, GOTO_STAT);
+ textcolor(Options.status_caption_colour);
+ cprintf("Wp: ");
+ textcolor(col);
+ int w = crawl_view.hudsz.x - 4;
+ cprintf("%-*s", w, text.substr(0, w).c_str());
+ textcolor(LIGHTGREY);
}
static void _print_stats_qv(int y)
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 733759432c..fb6b425834 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -2506,9 +2506,7 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain,
const unsigned long old_exp = you.experience;
const int old_avail = you.exp_available;
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "gain_exp: %d", exp_gained );
-#endif
+ dprf("gain_exp: %d", exp_gained );
if (you.experience + exp_gained > (unsigned int)MAX_EXP_TOTAL)
you.experience = MAX_EXP_TOTAL;
@@ -3810,9 +3808,7 @@ void display_char_status()
// character evaluates their ability to sneak around:
mprf("You feel %s.", stealth_desc(check_stealth()).c_str());
-#if DEBUG_DIAGNOSTICS
- mprf("stealth: %d", check_stealth());
-#endif
+ dprf("stealth: %d", check_stealth());
}
bool player_item_conserve(bool calc_unid)
@@ -5977,7 +5973,7 @@ bool player::can_go_berserk() const
return (can_go_berserk(false));
}
-bool player::can_go_berserk(bool verbose) const
+bool player::can_go_berserk(bool verbose, bool no_clarity) const
{
if (berserk())
{
@@ -6013,6 +6009,25 @@ bool player::can_go_berserk(bool verbose) const
return (false);
}
+ if (!no_clarity && player_mental_clarity(true))
+ {
+ if (verbose)
+ {
+ mpr("You're too calm and focused to rage.");
+ item_def *amu;
+ if (!player_mental_clarity(false) && wearing_amulet(AMU_CLARITY)
+ && (amu = &you.inv[you.equip[EQ_AMULET]]) && !item_type_known(*amu))
+ {
+ set_ident_type(amu->base_type, amu->sub_type, ID_KNOWN_TYPE);
+ set_ident_flags(*amu, ISFLAG_KNOW_PROPERTIES);
+ mprf("You are wearing: %s",
+ amu->name(DESC_INVENTORY_EQUIP).c_str());
+ }
+ }
+
+ return (false);
+ }
+
return (true);
}
@@ -6898,7 +6913,8 @@ bool player::visible_to(const actor *looker) const
bool player::backlit(bool check_haloed) const
{
return (get_contamination_level() > 0 || duration[DUR_CORONA]
- || (check_haloed ? haloed() : false));
+ || (check_haloed ? haloed() : false)
+ || duration[DUR_LIQUID_FLAMES]);
}
// This is the imperative version.
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index aebace1a3e..285d438c0c 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -412,7 +412,7 @@ public:
void attacking(actor *other);
bool can_go_berserk() const;
- bool can_go_berserk(bool verbose) const;
+ bool can_go_berserk(bool verbose, bool no_clarity = false) const;
void go_berserk(bool intentional);
bool berserk() const;
bool can_mutate() const;
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 3a2a86b920..3ec55a07cc 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2467,9 +2467,7 @@ void pray()
if (!was_praying)
_do_god_gift(true);
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "piety: %d (-%d)", you.piety, you.piety_hysteresis );
-#endif
+ dprf("piety: %d (-%d)", you.piety, you.piety_hysteresis );
}
void end_prayer(void)
@@ -3284,10 +3282,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
// melee). This means high level spells probably work
// pretty much like they used to (use spell, get piety).
piety_change = div_rand_round(level + 10, 80);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Spell practise, level: %d, dpiety: %d",
- level, piety_change);
-#endif
+ dprf("Spell practise, level: %d, dpiety: %d", level, piety_change);
retval = true;
}
break;
@@ -3839,9 +3834,7 @@ bool ely_destroy_weapons()
// item_value() multiplies by quantity.
const int value = item_value(item, true) / item.quantity;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Destroyed weapon value: %d", value);
-#endif
+ dprf("Destroyed weapon value: %d", value);
piety_gain_t pgain = PIETY_NONE;
const bool unholy_weapon = is_unholy_item(item);
@@ -5452,6 +5445,9 @@ int get_tension(god_type god, bool count_travelling)
if (you.see_cell(mons->pos()))
{
+ if (!mons_can_hurt_player(*mons))
+ continue;
+
// Monster is nearby.
if (!nearby_monster && !mons->wont_attack())
nearby_monster = true;
diff --git a/crawl-ref/source/rltiles/UNUSED/other/reaping-2.png b/crawl-ref/source/rltiles/UNUSED/other/reaping-2.png
new file mode 100644
index 0000000000..e5974b13b7
--- /dev/null
+++ b/crawl-ref/source/rltiles/UNUSED/other/reaping-2.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/UNUSED/other/reaping-3.png b/crawl-ref/source/rltiles/UNUSED/other/reaping-3.png
new file mode 100644
index 0000000000..5cf630aac5
--- /dev/null
+++ b/crawl-ref/source/rltiles/UNUSED/other/reaping-3.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn.txt b/crawl-ref/source/rltiles/dc-dngn.txt
index 37937cb390..0f49bf72cc 100644
--- a/crawl-ref/source/rltiles/dc-dngn.txt
+++ b/crawl-ref/source/rltiles/dc-dngn.txt
@@ -492,7 +492,7 @@ dngn_altar_jiyva DNGN_ALTAR_JIYVA
%rim 1
dngn_altar_fedhas DNGN_ALTAR_FEDHAS
%rim 0
-dngn_altar DNGN_ALTAR_CHEIBRIADOS
+dngn_altar_cheibriados DNGN_ALTAR_CHEIBRIADOS
%sdir dc-dngn
dngn_blue_fountain DNGN_BLUE_FOUNTAIN
diff --git a/crawl-ref/source/rltiles/dc-dngn/altars/dngn_altar_cheibriados.png b/crawl-ref/source/rltiles/dc-dngn/altars/dngn_altar_cheibriados.png
new file mode 100644
index 0000000000..bfebb6344b
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/altars/dngn_altar_cheibriados.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-item.txt b/crawl-ref/source/rltiles/dc-item.txt
index 12de4422f8..8d775bcb29 100644
--- a/crawl-ref/source/rltiles/dc-item.txt
+++ b/crawl-ref/source/rltiles/dc-item.txt
@@ -137,6 +137,8 @@ lajatang2
%sdir item/weapon/brands
%shrink 0
%rim 0
+# The order of weapon brands must be identical to the one defined
+# in itemprop-enum.h.
i-flaming BRAND_FLAMING
i-freezing BRAND_FREEZING
i-holy_wrath BRAND_HOLY_WRATH
@@ -156,6 +158,10 @@ i-distortion BRAND_DISTORTION
i-reaching BRAND_REACHING
i-returning BRAND_RETURNING
i-chaos BRAND_CHAOS
+# confuse
+# penetration
+i-reaping BRAND_REAPING
+# missile-only brands
i-venom BRAND_POISONED
i-curare BRAND_CURARE
%rim 1
diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt
index 7a6867737b..e87d129684 100644
--- a/crawl-ref/source/rltiles/dc-mon.txt
+++ b/crawl-ref/source/rltiles/dc-mon.txt
@@ -312,6 +312,7 @@ louise MONS_LOUISE
margery MONS_MARGERY
maud MONS_MAUD
maurice MONS_MAURICE
+nikola MONS_NIKOLA
norbert MONS_NORBERT
norris MONS_NORRIS
psyche MONS_PSYCHE
@@ -436,6 +437,7 @@ ancient_lich MONS_ANCIENT_LICH
## Mummies ('M')
%sdir dc-mon/unique
menkaure MONS_MENKAURE
+khufu MONS_KHUFU
%sdir dc-mon
mummy MONS_MUMMY
guardian_mummy MONS_GUARDIAN_MUMMY
diff --git a/crawl-ref/source/rltiles/dc-mon/unique/khufu.png b/crawl-ref/source/rltiles/dc-mon/unique/khufu.png
new file mode 100644
index 0000000000..09fe0876da
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-mon/unique/khufu.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon/unique/nikola.png b/crawl-ref/source/rltiles/dc-mon/unique/nikola.png
new file mode 100644
index 0000000000..3d2e235670
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-mon/unique/nikola.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-player.txt b/crawl-ref/source/rltiles/dc-player.txt
index 7118b954a2..92e218a444 100644
--- a/crawl-ref/source/rltiles/dc-player.txt
+++ b/crawl-ref/source/rltiles/dc-player.txt
@@ -481,6 +481,7 @@ sabre SABRE
sword3 SWORD3
sword_breaker SWORD_BREAKER
sword_jag SWORD_JAG
+demonblade DEMON_BLADE
## blunt
club CLUB
diff --git a/crawl-ref/source/rltiles/item/weapon/brands/i-reaping.png b/crawl-ref/source/rltiles/item/weapon/brands/i-reaping.png
new file mode 100644
index 0000000000..28e5fc42df
--- /dev/null
+++ b/crawl-ref/source/rltiles/item/weapon/brands/i-reaping.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/player/hand1/demonblade.png b/crawl-ref/source/rltiles/player/hand1/demonblade.png
new file mode 100644
index 0000000000..8a670e6e94
--- /dev/null
+++ b/crawl-ref/source/rltiles/player/hand1/demonblade.png
Binary files differ
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index d03614cce9..8cb0dfa4be 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -1371,6 +1371,7 @@ unsigned int item_value( item_def item, bool ident )
case SPARM_DARKNESS:
case SPARM_RESISTANCE:
+ case SPARM_REFLECTION:
valued *= 60;
break;
diff --git a/crawl-ref/source/shout.cc b/crawl-ref/source/shout.cc
index d7d21af7a4..561313a09c 100644
--- a/crawl-ref/source/shout.cc
+++ b/crawl-ref/source/shout.cc
@@ -470,11 +470,8 @@ static const char* _player_vampire_smells_blood(int dist)
void blood_smell(int strength, const coord_def& where)
{
const int range = strength * strength;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "blood stain at (%d, %d), range of smell = %d",
+ dprf("blood stain at (%d, %d), range of smell = %d",
where.x, where.y, range);
-#endif
// Of the player species, only Vampires can smell blood.
if (you.species == SP_VAMPIRE)
@@ -489,11 +486,8 @@ void blood_smell(int strength, const coord_def& where)
if (player_distance <= vamp_range)
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "Player smells blood, pos: (%d, %d), dist = %d)",
+ dprf("Player smells blood, pos: (%d, %d), dist = %d)",
you.pos().x, you.pos().y, player_distance);
-#endif
you.check_awaken(range - player_distance);
// Don't message if you can see the square.
if (!you.see_cell(where))
@@ -523,21 +517,17 @@ void blood_smell(int strength, const coord_def& where)
{
if (coinflip())
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "disturbing %s (%d, %d)",
+ dprf("disturbing %s (%d, %d)",
mi->name(DESC_PLAIN).c_str(),
mi->pos().x, mi->pos().y);
-#endif
behaviour_event(*mi, ME_DISTURB, MHITNOT, where);
}
continue;
}
}
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "alerting %s (%d, %d)",
+ dprf("alerting %s (%d, %d)",
mi->name(DESC_PLAIN).c_str(),
mi->pos().x, mi->pos().y);
-#endif
behaviour_event(*mi, ME_ALERT, MHITNOT, where);
if (mi->type == MONS_SHARK)
diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc
index d39635531a..608ebca844 100644
--- a/crawl-ref/source/skills.cc
+++ b/crawl-ref/source/skills.cc
@@ -156,13 +156,8 @@ int exercise(int exsk, int deg)
deg--;
}
-#ifdef DEBUG_DIAGNOSTICS
if (ret)
- {
- mprf(MSGCH_DIAGNOSTICS, "Exercised %s (deg: %d) by %d",
- skill_name(exsk), deg, ret);
- }
-#endif
+ dprf("Exercised %s (deg: %d) by %d", skill_name(exsk), deg, ret);
return (ret);
} // end exercise()
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index af80900803..647077f2f4 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -737,12 +737,9 @@ static bool _can_pacify_monster(const monsters *mon, const int healed)
const int random_factor = random2((you.skills[SK_INVOCATIONS] + 1) *
healed / divisor);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "pacifying %s? max hp: %d, factor: %d, Inv: %d, healed: %d, rnd: %d",
+ dprf("pacifying %s? max hp: %d, factor: %d, Inv: %d, healed: %d, rnd: %d",
mon->name(DESC_PLAIN).c_str(), mon->max_hit_points, factor,
you.skills[SK_INVOCATIONS], healed, random_factor);
-#endif
if (mon->max_hit_points < factor * random_factor)
return (true);
@@ -1142,10 +1139,8 @@ void abjuration(int pow)
if (mon->is_summoned(&duration))
{
int sockage = std::max(fuzz_value(abjdur, 60, 30), 40);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "%s abj: dur: %d, abj: %d",
+ dprf("%s abj: dur: %d, abj: %d",
mon->name(DESC_PLAIN).c_str(), duration, sockage);
-#endif
bool shielded = false;
// TSO and Trog's abjuration protection.
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 0e3dcb1aea..b4e15848b8 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -100,9 +100,7 @@ int detect_items(int pow)
static void _fuzz_detect_creatures(int pow, int *fuzz_radius, int *fuzz_chance)
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "dc_fuzz: Power is %d", pow);
-#endif
+ dprf("dc_fuzz: Power is %d", pow);
pow = std::max(1, pow);
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index d774db49e2..26747c1f07 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -655,10 +655,8 @@ bool cast_summon_horrible_things(int pow, god_type god)
bool receive_corpses(int pow, coord_def where)
{
-#if DEBUG_DIAGNOSTICS
// pow = invocations * 4, ranges from 0 to 108
- mprf(MSGCH_DIAGNOSTICS, "receive_corpses() power: %d", pow);
-#endif
+ dprf("receive_corpses() power: %d", pow);
// Kiku gives branch-appropriate corpses (like shadow creatures).
int expected_extra_corpses = 3 + pow / 18; // 3 at 0 Inv, 9 at 27 Inv.
@@ -1200,9 +1198,7 @@ bool cast_twisted_resurrection(int pow, god_type god)
return (false);
}
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Mass for abomination: %d", total_mass);
-#endif
+ dprf("Mass for abomination: %d", total_mass);
// This is what the old statement pretty much boils down to,
// the average will be approximately 10 * pow (or about 1000
@@ -1211,9 +1207,7 @@ bool cast_twisted_resurrection(int pow, god_type god)
// material components are far more important to this spell. - bwr
total_mass += roll_dice(20, pow);
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Mass including power bonus: %d", total_mass);
-#endif
+ dprf("Mass including power bonus: %d", total_mass);
if (total_mass < 400 + roll_dice(2, 500)
|| how_many_corpses < (coinflip() ? 3 : 2))
@@ -1561,9 +1555,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
}
#endif
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Target square (%d,%d)", pos.x, pos.y );
-#endif
+ dprf("Target square (%d,%d)", pos.x, pos.y );
if (pos == you.pos() || pos == coord_def(-1,-1))
{
@@ -1602,10 +1594,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
pos.x += random2(3) - 1;
pos.y += random2(3) - 1;
}
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "Scattered target square (%d, %d)", pos.x, pos.y);
-#endif
+ dprf("Scattered target square (%d, %d)", pos.x, pos.y);
}
if (!in_bounds(pos))
@@ -1622,10 +1611,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
// Merfolk should be able to control-tele into deep water.
if (_cell_vetoes_teleport(pos))
{
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS,
- "Target square (%d, %d) vetoed, now random teleport.", pos.x, pos.y);
-#endif
+ dprf("Target square (%d, %d) vetoed, now random teleport.", pos.x, pos.y);
is_controlled = false;
large_change = false;
}
@@ -1910,9 +1896,7 @@ bool project_noise(void)
redraw_screen();
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Target square (%d,%d)", pos.x, pos.y );
-#endif
+ dprf("Target square (%d,%d)", pos.x, pos.y );
if (!silenced( pos ))
{
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 992b768ed5..6819599ee5 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -575,10 +575,7 @@ static int _ignite_poison_monsters(coord_def where, int pow, int, actor *)
damage = mons_adjust_flavoured(mon, beam, damage);
simple_monster_message(mon, " seems to burn from within!");
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Dice: %dd%d; Damage: %d",
- dam_dice.num, dam_dice.size, damage);
-#endif
+ dprf("Dice: %dd%d; Damage: %d", dam_dice.num, dam_dice.size, damage);
if (!_player_hurt_monster(*mon, damage))
{
@@ -820,9 +817,7 @@ void cast_discharge(int pow)
dam = apply_random_around_square(_discharge_monsters, you.pos(),
true, pow, num_targs);
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Arcs: %d Damage: %d", num_targs, dam);
-#endif
+ dprf("Arcs: %d Damage: %d", num_targs, dam);
if (dam == 0)
{
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index e35944c8ce..7a65c84f2e 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -1338,9 +1338,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
}
}
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Spell #%d, power=%d", spell, powc);
-#endif
+ dprf("Spell #%d, power=%d", spell, powc);
switch (spell)
{
@@ -1788,10 +1786,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
{
const int sleep_power =
stepdown_value(powc * 9 / 10, 5, 35, 45, 50);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Sleep power stepdown: %d -> %d",
- powc, sleep_power);
-#endif
+ dprf("Sleep power stepdown: %d -> %d", powc, sleep_power);
if (!zapping(ZAP_HIBERNATION, sleep_power, beam, true))
return (SPRET_ABORT);
break;
diff --git a/crawl-ref/source/spl-mis.cc b/crawl-ref/source/spl-mis.cc
index 71de742b40..16a3599e70 100644
--- a/crawl-ref/source/spl-mis.cc
+++ b/crawl-ref/source/spl-mis.cc
@@ -291,10 +291,8 @@ void MiscastEffect::do_miscast()
// killed a target which was alive when the object was created.
if (!target->alive())
{
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Miscast target '%s' already dead",
+ dprf("Miscast target '%s' already dead",
target->name(DESC_PLAIN, true).c_str());
-#endif
return;
}
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index 2e55a337ab..ccff7125aa 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -221,10 +221,8 @@ static bool _tag_follower_at(const coord_def &pos)
fmenv->travel_path.clear();
fmenv->travel_target = MTRAV_NONE;
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "%s is marked for following.",
+ dprf("%s is marked for following.",
fmenv->name(DESC_CAP_THE, true).c_str() );
-#endif
return (true);
}
@@ -905,10 +903,9 @@ void zap_los_monsters(bool items_also)
if (mon == NULL || mons_class_flag(mon->type, M_NO_EXP_GAIN))
continue;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Dismissing %s",
+ dprf("Dismissing %s",
mon->name(DESC_PLAIN, true).c_str() );
-#endif
+
// Do a hard reset so the monster's items will be discarded.
mon->flags |= MF_HARD_RESET;
// Do a silent, wizard-mode monster_die() just to be extra sure the
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 4b15342183..ddc0a9013f 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -1004,7 +1004,7 @@ int tileidx_monster_base(const monsters *mon, bool detected)
case MONS_MENKAURE:
return TILEP_MONS_MENKAURE;
case MONS_KHUFU:
- return TILEP_MONS_GREATER_MUMMY; // TODO
+ return TILEP_MONS_KHUFU;
// guardian serpent ('N')
case MONS_AIZUL:
@@ -1079,7 +1079,7 @@ int tileidx_monster_base(const monsters *mon, bool detected)
case MONS_KIRKE:
return TILEP_MONS_KIRKE;
case MONS_NIKOLA:
- return TILEP_TODO; // TODO
+ return TILEP_MONS_NIKOLA; // TODO
case MONS_MAURICE:
return TILEP_MONS_MAURICE;
@@ -3907,7 +3907,7 @@ int tilep_equ_weapon(const item_def &item)
case WPN_SCIMITAR: return TILEP_HAND1_SCIMITAR;
case WPN_FALCHION: return TILEP_HAND1_FALCHION;
case WPN_SABRE: return TILEP_HAND1_SABRE;
- case WPN_DEMON_BLADE: return TILEP_HAND1_SWORD_BLACK;
+ case WPN_DEMON_BLADE: return TILEP_HAND1_DEMON_BLADE;
case WPN_QUICK_BLADE: return TILEP_HAND1_DAGGER;
case WPN_KATANA: return TILEP_HAND1_KATANA_SLANT;
case WPN_DOUBLE_SWORD: return TILEP_HAND1_DOUBLE_SWORD;
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index 1a1099ba6d..e3c1e978fd 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -1378,7 +1378,10 @@ int tile_known_weapon_brand(const item_def item)
if (item.base_type == OBJ_WEAPONS)
{
- if (get_weapon_brand(item) != SPWPN_NORMAL)
+ const int brand = get_weapon_brand(item);
+ if (brand == SPWPN_REAPING)
+ return TILE_BRAND_REAPING;
+ if (brand != SPWPN_NORMAL)
return (TILE_BRAND_FLAMING + get_weapon_brand(item) - 1);
}
else if (item.base_type == OBJ_MISSILES)
@@ -1397,6 +1400,8 @@ int tile_known_weapon_brand(const item_def item)
return TILE_BRAND_RETURNING;
case SPMSL_CHAOS:
return TILE_BRAND_CHAOS;
+ case SPMSL_REAPING:
+ return TILE_BRAND_REAPING;
default:
break;
}
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index 20ed72e4fd..e8b8d92bce 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -998,10 +998,8 @@ void free_self_from_net()
int hold = mitm[net].plus;
int do_what = damage_or_escape_net(hold);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "net.plus: %d, ATTR_HELD: %d, do_what: %d",
+ dprf("net.plus: %d, ATTR_HELD: %d, do_what: %d",
hold, you.attribute[ATTR_HELD], do_what);
-#endif
if (do_what <= 0) // You try to destroy the net
{
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index fd9f6c6a40..a2c7a4d227 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -3163,6 +3163,17 @@ static int _xom_draining_torment_effect(int sever, bool debug = false)
return (rc);
}
+static bool _has_min_animated_weapon_level()
+{
+ if (you.penance[GOD_XOM])
+ return (true);
+
+ if (_xom_is_bored())
+ return (you.max_level >= 4);
+
+ return (you.max_level >= 7);
+}
+
static int _xom_summon_hostiles(int sever, bool debug = false)
{
bool rc = false;
@@ -3170,8 +3181,9 @@ static int _xom_summon_hostiles(int sever, bool debug = false)
int result = XOM_DID_NOTHING;
- // Nasty, but fun. Only allow for xp >= 4.
- if (player_weapon_wielded() && you.max_level >= 4 && one_chance_in(4))
+ // Nasty, but fun.
+ if (player_weapon_wielded() && _has_min_animated_weapon_level()
+ && one_chance_in(4))
{
if (debug)
return (XOM_BAD_ANIMATE_WPN);
@@ -3680,7 +3692,7 @@ int xom_acts(bool niceness, int sever, int tension, bool debug)
take_note(Note(NOTE_MESSAGE, 0, 0, "suppress good act because of "
"zero tension"), true);
#endif
- return (XOM_GOOD_NOTHING);
+ return (debug ? XOM_GOOD_NOTHING : XOM_DID_NOTHING);
}
// Good stuff.
@@ -3712,7 +3724,7 @@ int xom_acts(bool niceness, int sever, int tension, bool debug)
tension);
take_note(Note(NOTE_MESSAGE, 0, 0, info), true);
#endif
- return (XOM_BAD_NOTHING);
+ return (debug ? XOM_BAD_NOTHING : XOM_DID_NOTHING);
}
// Bad mojo.