summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-12-17 13:40:59 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-12-17 13:40:59 +1000
commitfc4c1660e532790ae84fd2978a086d20a3841f03 (patch)
treed4651e95d282eea896d3d105b5014c4126c8c195 /crawl-ref
parent630655e6f0b21126c76a7208316da0811845951f (diff)
parent761b088e911386a2860ba50a8a3271739264283c (diff)
downloadcrawl-ref-fc4c1660e532790ae84fd2978a086d20a3841f03.tar.gz
crawl-ref-fc4c1660e532790ae84fd2978a086d20a3841f03.zip
Merge branch 'master' into wizlab
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/docs/develop/levels/syntax.txt17
-rw-r--r--crawl-ref/docs/obsolete/spl-data.txt (renamed from crawl-ref/docs/historical/spl-data.txt)0
-rw-r--r--crawl-ref/docs/options_guide.txt10
-rw-r--r--crawl-ref/settings/init.txt1
-rw-r--r--crawl-ref/source/art-data.h189
-rw-r--r--crawl-ref/source/art-data.txt25
-rw-r--r--crawl-ref/source/art-func.h9
-rw-r--r--crawl-ref/source/artefact.cc9
-rw-r--r--crawl-ref/source/artefact.h3
-rw-r--r--crawl-ref/source/chardump.cc20
-rw-r--r--crawl-ref/source/command.cc2
-rw-r--r--crawl-ref/source/command.h2
-rw-r--r--crawl-ref/source/dat/altar.des9
-rw-r--r--crawl-ref/source/dat/crypt.des18
-rw-r--r--crawl-ref/source/dat/database/FAQ.txt89
-rw-r--r--crawl-ref/source/dat/database/godspeak.txt11
-rw-r--r--crawl-ref/source/dat/database/miscname.txt15
-rw-r--r--crawl-ref/source/dat/database/monspeak.txt15
-rw-r--r--crawl-ref/source/dat/database/monspell.txt32
-rw-r--r--crawl-ref/source/dat/descript/monsters.txt6
-rw-r--r--crawl-ref/source/dat/entry.des6
-rw-r--r--crawl-ref/source/dat/float.des3
-rw-r--r--crawl-ref/source/dat/hells.des4
-rw-r--r--crawl-ref/source/dat/hive.des14
-rw-r--r--crawl-ref/source/dat/lair.des6
-rw-r--r--crawl-ref/source/dat/mini.des6
-rw-r--r--crawl-ref/source/dat/pan.des2
-rw-r--r--crawl-ref/source/dat/vaults.des4
-rw-r--r--crawl-ref/source/decks.cc8
-rw-r--r--crawl-ref/source/defines.h4
-rw-r--r--crawl-ref/source/delay.cc9
-rw-r--r--crawl-ref/source/describe.cc21
-rw-r--r--crawl-ref/source/directn.cc47
-rw-r--r--crawl-ref/source/dungeon.cc4
-rw-r--r--crawl-ref/source/effects.cc14
-rw-r--r--crawl-ref/source/effects.h8
-rw-r--r--crawl-ref/source/enum.h9
-rw-r--r--crawl-ref/source/fight.cc49
-rw-r--r--crawl-ref/source/files.cc29
-rw-r--r--crawl-ref/source/files.h2
-rw-r--r--crawl-ref/source/initfile.cc82
-rw-r--r--crawl-ref/source/invent.cc4
-rw-r--r--crawl-ref/source/item_use.cc13
-rw-r--r--crawl-ref/source/itemname.cc10
-rw-r--r--crawl-ref/source/itemname.h1
-rw-r--r--crawl-ref/source/itemprop.cc11
-rw-r--r--crawl-ref/source/l_dgn.cc3
-rw-r--r--crawl-ref/source/l_dgntil.cc2
-rw-r--r--crawl-ref/source/lev-pand.cc3
-rw-r--r--crawl-ref/source/libgui.cc1
-rw-r--r--crawl-ref/source/main.cc30
-rw-r--r--crawl-ref/source/makeitem.cc6
-rw-r--r--crawl-ref/source/mapdef.cc19
-rw-r--r--crawl-ref/source/menu.cc3
-rw-r--r--crawl-ref/source/message.cc6
-rw-r--r--crawl-ref/source/misc.cc6
-rw-r--r--crawl-ref/source/mon-cast.cc3
-rw-r--r--crawl-ref/source/mon-data.h38
-rw-r--r--crawl-ref/source/mon-gear.cc51
-rw-r--r--crawl-ref/source/mon-info.cc2
-rw-r--r--crawl-ref/source/mon-pick.cc16
-rw-r--r--crawl-ref/source/mon-place.cc11
-rw-r--r--crawl-ref/source/mon-spll.h2
-rw-r--r--crawl-ref/source/mon-stuff.cc83
-rw-r--r--crawl-ref/source/mon-stuff.h3
-rw-r--r--crawl-ref/source/mon-util.cc19
-rw-r--r--crawl-ref/source/mon-util.h9
-rw-r--r--crawl-ref/source/monster.cc31
-rw-r--r--crawl-ref/source/mutation.cc8
-rw-r--r--crawl-ref/source/output.cc5
-rw-r--r--crawl-ref/source/player.cc65
-rw-r--r--crawl-ref/source/player.h17
-rw-r--r--crawl-ref/source/religion.cc10
-rw-r--r--crawl-ref/source/rltiles/UNUSED/monsters/giant_leech.pngbin0 -> 781 bytes
-rw-r--r--crawl-ref/source/rltiles/UNUSED/monsters/guardian_naga.png (renamed from crawl-ref/source/rltiles/dc-mon/guardian_naga.png)bin982 -> 982 bytes
-rw-r--r--crawl-ref/source/rltiles/UNUSED/monsters/naga_warrior_unique.pngbin0 -> 970 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-corpse.txt4
-rw-r--r--crawl-ref/source/rltiles/dc-misc.txt11
-rw-r--r--crawl-ref/source/rltiles/dc-mon.txt12
-rw-r--r--crawl-ref/source/rltiles/dc-mon/animals/anaconda.png (renamed from crawl-ref/source/rltiles/dc-mon/animals/grey_snake.png)bin747 -> 747 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-mon/animals/giant_leech.pngbin781 -> 690 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-mon/guardian_serpent.pngbin0 -> 910 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-mon/unique/aizul.pngbin0 -> 902 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-mon/unique/crazy_yiuf.pngbin0 -> 1079 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-mon/unique/maurice.pngbin0 -> 902 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-player.txt1
-rw-r--r--crawl-ref/source/rltiles/dc-unrand.txt1
-rw-r--r--crawl-ref/source/rltiles/effect/cloud_mutagenic_large1.pngbin0 -> 1979 bytes
-rw-r--r--crawl-ref/source/rltiles/effect/cloud_mutagenic_large2.pngbin0 -> 2253 bytes
-rw-r--r--crawl-ref/source/rltiles/effect/cloud_mutagenic_large3.pngbin0 -> 2115 bytes
-rw-r--r--crawl-ref/source/rltiles/effect/cloud_mutagenic_large4.pngbin0 -> 2298 bytes
-rw-r--r--crawl-ref/source/rltiles/effect/cloud_mutagenic_medium1.pngbin0 -> 1737 bytes
-rw-r--r--crawl-ref/source/rltiles/effect/cloud_mutagenic_medium2.pngbin0 -> 1852 bytes
-rw-r--r--crawl-ref/source/rltiles/effect/cloud_mutagenic_small1.pngbin0 -> 1518 bytes
-rw-r--r--crawl-ref/source/rltiles/effect/cloud_mutagenic_small2.pngbin0 -> 1593 bytes
-rw-r--r--crawl-ref/source/rltiles/effect/cloud_rain1.pngbin0 -> 1350 bytes
-rw-r--r--crawl-ref/source/rltiles/effect/cloud_rain2.pngbin0 -> 1373 bytes
-rw-r--r--crawl-ref/source/rltiles/item/armour/artefact/urand_pondering.pngbin0 -> 739 bytes
-rw-r--r--crawl-ref/source/rltiles/tiledef-unrand.cc2
-rw-r--r--crawl-ref/source/rng.cc20
-rw-r--r--crawl-ref/source/sha256.cc63
-rw-r--r--crawl-ref/source/sha256.h4
-rw-r--r--crawl-ref/source/show.cc15
-rw-r--r--crawl-ref/source/skills2.cc21
-rw-r--r--crawl-ref/source/skills2.h1
-rw-r--r--crawl-ref/source/spells1.cc2
-rw-r--r--crawl-ref/source/spells2.cc5
-rw-r--r--crawl-ref/source/spells3.cc10
-rw-r--r--crawl-ref/source/spl-book.cc8
-rw-r--r--crawl-ref/source/stash.cc9
-rw-r--r--crawl-ref/source/tags.cc36
-rw-r--r--crawl-ref/source/tags.h8
-rw-r--r--crawl-ref/source/tile2.cc2
-rw-r--r--crawl-ref/source/tilemcache.cc8
-rw-r--r--crawl-ref/source/tilepick.cc177
-rw-r--r--crawl-ref/source/tilereg.cc3
-rw-r--r--crawl-ref/source/tiles.h4
-rw-r--r--crawl-ref/source/tilesdl.cc1
-rw-r--r--crawl-ref/source/traps.cc31
-rw-r--r--crawl-ref/source/travel.cc12
-rwxr-xr-xcrawl-ref/source/util/art-data.pl3
-rw-r--r--crawl-ref/source/view.cc4
-rw-r--r--crawl-ref/source/wiz-item.cc236
-rw-r--r--crawl-ref/source/xom.cc107
-rw-r--r--crawl-ref/source/xom.h3
125 files changed, 1495 insertions, 633 deletions
diff --git a/crawl-ref/docs/develop/levels/syntax.txt b/crawl-ref/docs/develop/levels/syntax.txt
index 642e7f5564..c755b46b03 100644
--- a/crawl-ref/docs/develop/levels/syntax.txt
+++ b/crawl-ref/docs/develop/levels/syntax.txt
@@ -559,13 +559,20 @@ MONS: (list of monsters)
You can override the displayed monster tile using the "tile:"
specifier as follows:
- MONS: rat tile:giant_bat
+ MONS: rat tile:mons_giant_bat
In tiles version, this would create a monster that uses the
- 'giant_bat' tile, but is otherwise identical to a rat. Obviously, this
- substition of one monster onto another should never be used, but it
- can be useful for customised vault monsters if an alternate tile
- exists. In ASCII mode, this will do nothing.
+ 'monst_giant_bat' tile, but is otherwise identical to a rat.
+ Obviously, this substition of one monster onto another should
+ never be used, but it can be useful for customised vault monsters
+ if an alternate tile exists. In ASCII mode, this will do nothing.
+
+ You can set the monster's faction by specifying "att:" one of:
+ * att:hostile -- the default
+ * att:friendly -- tame, will follow you
+ * att:neutral -- hostile to both you and att:hostile monsters
+ * att:good_neutral -- hostile to att:hostile
+ * att:fellow_slime -- tame, won't follow you
Note that 8, 9, 0 also place monsters (see the table).
diff --git a/crawl-ref/docs/historical/spl-data.txt b/crawl-ref/docs/obsolete/spl-data.txt
index 7927d752da..7927d752da 100644
--- a/crawl-ref/docs/historical/spl-data.txt
+++ b/crawl-ref/docs/obsolete/spl-data.txt
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt
index 840f632ced..d71c797c87 100644
--- a/crawl-ref/docs/options_guide.txt
+++ b/crawl-ref/docs/options_guide.txt
@@ -48,7 +48,7 @@ The contents of this text are:
travel_delay, explore_delay, travel_avoid_terrain,
explore_greedy, explore_stop, explore_stop_pickup_ignore,
explore_improved, tc_reachable, tc_dangerous, tc_disconnected,
- tc_excluded, tc_exclude_circle, travel_stop_message,
+ tc_excluded, tc_exclude_circle, travel_stop_message,
runrest_ignore_message, runrest_ignore_poison,
runrest_ignore_monster, trapwalk_safe_hp,
trap_prompt, rest_wait_both, auto_exclude
@@ -57,7 +57,7 @@ The contents of this text are:
annotate_item_dropped
4-i Command Enhancements.
auto_list, easy_open, easy_unequip, equip_unequip,
- easy_confirm, allow_self_target,
+ easy_confirm, allow_self_target,
easy_butcher, always_confirm_butcher, prefer_safe_chunks,
easy_eat_chunks, easy_eat_gourmand, easy_eat_contaminated,
prompt_for_swap, easy_quit_item_prompts,
@@ -686,7 +686,7 @@ trap_item_brand = reverse
symbol (^) and the trap symbol is branded.
verbose_monster_pane = true
- If set to false using the console version of Crawl (rather than the
+ If set to false using the console version of Crawl (rather than the
tiles version), the pane listing the monsters in sight will give
the older, less detailed information like "distracted" or "resting"
rather than "fleeing", "sleeping", "unaware", etc.
@@ -964,8 +964,8 @@ trapwalk_safe_hp = <trap_name>:<minimum_hp>, ...
trap_prompt = true
If trap_prompt is set to true Crawl will use the trapwalk_safe_hp
values to decide whether the player should be prompted before
- stepping on a mechanical trap. Note that you'll always be prompted
- for non-mechanical traps.
+ stepping on or trying to disarm a mechanical trap. Note that you'll
+ always be prompted before stepping on non-mechanical traps.
rest_wait_both = false
If rest_wait_both is set to true then resting will only stop
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index e2e9b48b39..49524d2ae7 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -180,6 +180,7 @@ runrest_ignore_message = pray:
runrest_ignore_message = You feel.*sick
runrest_ignore_message = disappears in a puff of smoke
runrest_ignore_message = engulfed in a cloud of smoke
+runrest_ignore_message = standing in the rain
runrest_ignore_message = safely over a trap
runrest_ignore_message = You feel.*sick
runrest_ignore_message = A.*toadstool withers and dies
diff --git a/crawl-ref/source/art-data.h b/crawl-ref/source/art-data.h
index 18e7f5c132..29f93896bf 100644
--- a/crawl-ref/source/art-data.h
+++ b/crawl-ref/source/art-data.h
@@ -34,7 +34,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -53,7 +53,7 @@
0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"This blessed weapon loves nothing more than to sing to its owner, whether they want it to or not.",
@@ -72,7 +72,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"This was the favourite weapon of the old god Trog, before it was lost one day. It induces a bloodthirsty berserker rage in anyone who uses it to strike another.",
@@ -91,7 +91,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"It is rather unreliable.",
@@ -110,7 +110,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"It is the creation of a mad god, and carries a curse which transforms anyone possessing it into a prune. Fortunately, the curse works very slowly, and one can use it briefly with no consequences worse than slightly purple skin and a few wrinkles.",
@@ -129,7 +129,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"It rewards the powerful with power and the meek with weakness.",
@@ -148,7 +148,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"It was the magical weapon wielded by the mighty wizard Olgreb before he met his fate somewhere within these dungeons. It increases the ability of its wielder to use venomous magic, and carries magical powers which can be evoked.",
@@ -167,7 +167,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"Its power varies in proportion to its wielder's intelligence. Using it can be a bit risky.",
@@ -186,7 +186,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"It is lethally vampiric.",
@@ -205,7 +205,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 3, 0, 0,
- 0,
+
},
"",
"This weapon carries a terrible and highly irritating curse.",
@@ -224,7 +224,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"This truly accursed weapon is an instrument of Hell.",
@@ -243,7 +243,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"This dreadful weapon is used at the user's peril.",
@@ -262,7 +262,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, -1, 0, 0,
- 0,
+
},
"Eerie flames cover its twisted blade.",
"",
@@ -281,7 +281,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"This legendary item can unleash the fury of Hell.",
@@ -300,7 +300,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"It carries some of the powers of the arch-fiend Asmodeus.",
@@ -319,7 +319,7 @@
0, 0, 0, 0, 1, 0,
0, 0, 0, 1, 0,
0, 0, 0, 0, -20, 0,
- 0,
+
},
"",
"",
@@ -338,7 +338,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -357,7 +357,7 @@
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, -20, 0,
- 0,
+
},
"",
"",
@@ -376,7 +376,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 4, 0, 0,
- 0,
+
},
"",
"",
@@ -395,7 +395,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A dagger made of one huge piece of sapphire.",
"",
@@ -414,7 +414,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"An ugly rusty dagger.",
"",
@@ -433,7 +433,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, -1, 0, 0,
- 0,
+
},
"A long and sharp scythe, specially modified for combat purposes.",
"",
@@ -452,7 +452,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A sling made of weird blue leather.",
"",
@@ -471,7 +471,7 @@
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A wonderful golden bow.",
"",
@@ -490,7 +490,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -509,7 +509,7 @@
1, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -528,7 +528,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0,
0, 0, 0, 0, -50, 0,
- 0,
+
},
"A long sword made of one huge piece of crystal.",
"",
@@ -547,7 +547,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A flaming crossbow, forged in the fires of the Hells.",
"",
@@ -566,7 +566,7 @@
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"An adamantine great sword.",
"",
@@ -585,7 +585,7 @@
1, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -604,7 +604,7 @@
0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0,
0, 0, 0, 0, -30, 0,
- 0,
+
},
"",
"",
@@ -623,7 +623,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -642,7 +642,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A beautiful mithril axe, probably lost by some dwarven hero.",
"",
@@ -661,7 +661,7 @@
0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 2,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -680,7 +680,7 @@
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A hand crossbow made of some black material.",
"",
@@ -699,7 +699,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"An exceptionally large metal longbow.",
"",
@@ -718,7 +718,7 @@
0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 60, 0,
- 0,
+
},
"It is designed for easy concealment, but still packs a nasty punch.",
"",
@@ -737,7 +737,7 @@
0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -756,7 +756,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 50, 0,
- 0,
+
},
"A dainty little knife.",
"",
@@ -775,7 +775,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
6, 0, 0, 1, -20, 0,
- 0,
+
},
"A long sword made of weird glowing metal.",
"",
@@ -794,7 +794,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -813,10 +813,10 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
- "A double-ended whip made from the cured hides of the Lair of Beasts' deadly grey snakes.",
+ "A double-ended whip made from the cured hides of the Lair of Beasts' deadly anacondas.",
"",
NULL, NULL, NULL, { NULL }, NULL,
},
@@ -832,7 +832,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -851,7 +851,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -870,7 +870,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -889,7 +889,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"This bow has the color of dark rain clouds, and the smell of wet ozone.",
"",
@@ -908,7 +908,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 3, 0, 0,
- 0,
+
},
"",
"",
@@ -927,7 +927,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A robe made of the finest silk.",
"",
@@ -946,7 +946,7 @@
1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, -3, 0, 60, 0,
- 0,
+
},
"",
"",
@@ -965,7 +965,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -984,7 +984,7 @@
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A large crown of dull bronze, set with a dazzling array of gemstones.",
"",
@@ -998,12 +998,12 @@
OBJ_ARMOUR, ARM_CAP, +2, 0, DARKGREY, 0,
UNRAND_FLAG_NONE,
{
- SPARM_NORMAL, 0, 0, 0, 0, 0,
+ SPARM_SPIRIT_SHIELD, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 50,
0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 1,
+
},
"",
"",
@@ -1022,7 +1022,7 @@
0, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0,
5, 0, 0, 1, -80, 0,
- 0,
+
},
"A splendid flowing robe of fur and silk.",
"",
@@ -1041,7 +1041,7 @@
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A vibrating cloak.",
"",
@@ -1060,7 +1060,7 @@
0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 80, 0,
- 0,
+
},
"Some soft boots.",
"",
@@ -1079,7 +1079,7 @@
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0,
0, 0, 0, -1, 0, 0,
- 0,
+
},
"A chain mail made of pure gold.",
"",
@@ -1098,7 +1098,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"The skin of some strange animal.",
"",
@@ -1117,7 +1117,7 @@
0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A leather armour made of a salamander's skin.",
"",
@@ -1136,7 +1136,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 3, 3, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -1155,7 +1155,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A bronze shield.",
"",
@@ -1174,7 +1174,7 @@
0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0,
0, 0, 0, 2, 0, 0,
- 0,
+
},
"A dull grey robe.",
"",
@@ -1193,7 +1193,7 @@
0, 0, 0, 0, 0, 0,
1, 0, 1, 0, 0,
0, 0, 0, -1, 0, 0,
- 0,
+
},
"A weird-looking armour.",
"",
@@ -1212,7 +1212,7 @@
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 2, 2, 0, 0, 0,
- 0,
+
},
"A blue mask.",
"",
@@ -1231,7 +1231,7 @@
1, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 50, 0,
- 0,
+
},
"A long black robe made of strange glossy material.",
"",
@@ -1250,7 +1250,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -1269,7 +1269,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A dirty hat.",
"",
@@ -1288,7 +1288,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 5, 0, 0, 0, 0,
- 0,
+
},
"A pair of gloves made of white silk.",
"",
@@ -1307,7 +1307,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, -30, 0,
- 0,
+
},
"A phosphorescent cloak.",
"",
@@ -1326,7 +1326,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -1340,12 +1340,12 @@
OBJ_ARMOUR, ARM_SHIELD, +6, 0, ETC_GOLD, 0,
UNRAND_FLAG_NONE,
{
- SPARM_NORMAL, 0, 0, 0, 0, 0,
+ SPARM_SPIRIT_SHIELD, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 50,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 1,
+
},
"This is a large gong; you wonder if it could be worn as a shield.",
"This shield surely will be heard!",
@@ -1364,7 +1364,7 @@
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 50, 0,
- 0,
+
},
"A sky-blue amulet.",
"",
@@ -1383,7 +1383,7 @@
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, -3, 0, 0, 40, 0,
- 0,
+
},
"",
"",
@@ -1402,7 +1402,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 2,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -1421,7 +1421,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -1440,7 +1440,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0,
0, 0, 3, 3, -20, 0,
- 0,
+
},
"",
"",
@@ -1459,7 +1459,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -1478,7 +1478,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -1497,7 +1497,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
@@ -1516,7 +1516,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A shield-shaped amulet.",
"",
@@ -1535,12 +1535,31 @@
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"A robe of a material so flimsy it could almost be clouds.",
"",
"",
- NULL, NULL, _RCLOUDS_world_reacts, { NULL }, NULL,
+ _RCLOUDS_equip, NULL, _RCLOUDS_world_reacts, { NULL }, NULL,
+},
+
+/* UNRAND_PONDERING */
+{
+ "hat of Pondering", "slimy wizard hat",
+ OBJ_ARMOUR, ARM_WIZARD_HAT, +3, 0, LIGHTRED, 0,
+ UNRAND_FLAG_NONE,
+ {
+ SPARM_PONDEROUSNESS, 0, 0, 0, +5, 0,
+ 0, 0, 0, 0, 0, 30,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, +10,
+
+ },
+ "A slimy wizard hat.",
+ "",
+ "The favorite hat of the slug wizard Gastronok, stained with reddish slime and enchanted to aid in his arcane pondering. It has been specially enchanted to protect against the effects of salt, though you probably don't care.",
+ NULL, NULL, NULL, { NULL }, NULL,
},
/* UNRAND_DUMMY2 */
@@ -1554,7 +1573,7 @@
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
- 0,
+
},
"",
"",
diff --git a/crawl-ref/source/art-data.txt b/crawl-ref/source/art-data.txt
index 3827b0e41c..792b3fcf45 100644
--- a/crawl-ref/source/art-data.txt
+++ b/crawl-ref/source/art-data.txt
@@ -681,7 +681,7 @@ TILE_EQ: serpent_scourge
BRAND: SPWPN_VENOM
BOOL: poison, tilerim
DESC_ID: A double-ended whip made from the cured hides of the Lair of Beasts'
- deadly grey snakes.
+ deadly anacondas.
NAME: knife of Accuracy
APPEAR: thin dagger
@@ -798,7 +798,8 @@ PLUS: +2
COLOUR: DARKGREY
TILE: urand_bear
TILE_EQ: bear
-BOOL: life, berserk, spirit
+BRAND: SPARM_SPIRIT_SHIELD
+BOOL: life, berserk
MAGIC: 50
DESC_END: Once owned by Ukta, a powerful ogre shaman, this fur hat houses
the spirit of an especially mighty bear.
@@ -1021,8 +1022,9 @@ PLUS: +6
COLOUR: ETC_GOLD
TILE: urand_gong
TILE_EQ: gong
+BRAND: SPARM_SPIRIT_SHIELD
MAGIC: 50
-BOOL: elec, life, spirit
+BOOL: elec, life
DESC: This is a large gong; you wonder if it could be worn as a shield.
DESC_ID: This shield surely will be heard!
@@ -1121,6 +1123,23 @@ TILE_EQ: robe_clouds
BOOL: elec, lev
DESC: A robe of a material so flimsy it could almost be clouds.
+NAME: hat of Pondering
+APPEAR: slimy wizard hat
+OBJ: OBJ_ARMOUR/ARM_WIZARD_HAT
+PLUS: +3
+COLOUR: LIGHTRED
+TILE: urand_pondering
+TILE_EQ: wizard_bluegreen
+BRAND: SPARM_PONDEROUSNESS
+INT: +5
+MP: +10
+MAGIC: 30
+DESC: A slimy wizard hat.
+DESC_END: The favorite hat of the slug wizard Gastronok, stained with reddish
+ slime and enchanted to aid in his arcane pondering. It has been
+ specially enchanted to protect against the effects of salt, though
+ you probably don't care.
+
# This entry must always be last.
ENUM: DUMMY2
NAME: DUMMY UNRANDART 2
diff --git a/crawl-ref/source/art-func.h b/crawl-ref/source/art-func.h
index 719faf7e58..d0bbfd8151 100644
--- a/crawl-ref/source/art-func.h
+++ b/crawl-ref/source/art-func.h
@@ -513,9 +513,6 @@ static void _GONG_melee_effect(item_def* item, actor* wearer,
static void _RCLOUDS_world_reacts(item_def *item)
{
- if (one_chance_in(100))
- return;
-
cloud_type cloud;
if (one_chance_in(4))
cloud = CLOUD_RAIN;
@@ -529,3 +526,9 @@ static void _RCLOUDS_world_reacts(item_def *item)
place_cloud( cloud, *ri, random2(10), KC_OTHER, 1);
}
}
+
+static void _RCLOUDS_equip(item_def *item, bool *show_msgs, bool unmeld)
+{
+ _equip_mpr(show_msgs, "A thin mist springs up around you!");
+}
+
diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc
index 9ba3507056..9b2cc6feed 100644
--- a/crawl-ref/source/artefact.cc
+++ b/crawl-ref/source/artefact.cc
@@ -126,7 +126,7 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item,
return (false);
const int brand = get_weapon_brand(item);
- const int ego = get_armour_ego_type(item);
+ const int ego = get_armour_ego_type(item);
if (is_evil_god(which_god) && brand == SPWPN_HOLY_WRATH)
return (false);
@@ -1067,7 +1067,7 @@ void static _get_randart_properties(const item_def &item,
if (!done_powers && one_chance_in(10) && aclass == OBJ_ARMOUR
&& (atype == ARM_CAP || atype == ARM_SHIELD))
{
- proprt[ARTP_SPIRIT_SHIELD] = 1;
+ proprt[ARTP_BRAND] = SPARM_SPIRIT_SHIELD;
power_level++;
}
@@ -1881,8 +1881,7 @@ bool randart_is_bad( const item_def &item, artefact_properties_t &proprt )
if (_artefact_num_props( proprt ) == 0)
return (true);
- if ((item.base_type == OBJ_WEAPONS)
- && (proprt[ARTP_BRAND] == SPWPN_NORMAL))
+ if (item.base_type == OBJ_WEAPONS && proprt[ARTP_BRAND] == SPWPN_NORMAL)
return (true);
return (_randart_is_redundant( item, proprt )
@@ -2000,7 +1999,7 @@ bool make_item_unrandart( item_def &item, int unrand_index )
item.flags |= ISFLAG_UNRANDART;
_init_artefact_properties(item);
- if (unrand->prpty[ARTP_BRAND] != 0)
+ if (unrand->prpty[ARTP_CURSED] != 0)
do_curse_item( item );
// get true artefact name
diff --git a/crawl-ref/source/artefact.h b/crawl-ref/source/artefact.h
index 80c44e14cc..0bc887c647 100644
--- a/crawl-ref/source/artefact.h
+++ b/crawl-ref/source/artefact.h
@@ -13,7 +13,7 @@
class bolt;
// NOTE: NO_UNRANDARTS is automatically set by util/art-data.pl
-#define NO_UNRANDARTS 81
+#define NO_UNRANDARTS 82
#define ART_PROPERTIES ARTP_NUM_PROPERTIES
@@ -117,6 +117,7 @@ enum unrand_type
UNRAND_MAGE, // ring of the Mage
UNRAND_SHIELDING, // brooch of Shielding
UNRAND_RCLOUDS, // robe of Clouds
+ UNRAND_PONDERING, // hat of Pondering
UNRAND_DUMMY2, // DUMMY UNRANDART 2
UNRAND_LAST = UNRAND_DUMMY2
};
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 493fdcbf80..f71d4d3b15 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -911,26 +911,10 @@ static void _sdump_skills(dump_params &par)
text += " Skills:";
text += "\n";
- for (unsigned char i = 0; i < 50; i++)
- {
- if (you.skills[i] > 0)
- {
- text += ( (you.skills[i] == 27) ? " * " :
- (you.practise_skill[i]) ? " + "
- : " - " );
-
- text += "Level ";
- itoa( you.skills[i], tmp_quant, 10 );
- text += tmp_quant;
- text += " ";
- text += skill_name(i);
- text += "\n";
- }
- }
-
+ dump_skills(text);
text += "\n";
text += "\n";
-} // end dump_skills()
+}
//---------------------------------------------------------------
//
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 272d34e6dc..521df47d13 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -2424,7 +2424,7 @@ int list_wizard_commands(bool do_redraw_screen)
"<w>A</w> : set all skills to level\n"
"<w>g</w> : exercise a skill\n"
"<w>r</w> : change character's species\n"
- "<w>s</w> : fill experience pool\n"
+ "<w>s</w> : gain 20000 skill points\n"
"<w>S</w> : set skill to level\n"
"<w>x</w> : gain an experience level\n"
"<w>Ctrl-L</w> : change experience level\n"
diff --git a/crawl-ref/source/command.h b/crawl-ref/source/command.h
index 9aab940469..eb5dafbc16 100644
--- a/crawl-ref/source/command.h
+++ b/crawl-ref/source/command.h
@@ -28,7 +28,7 @@ void list_commands(int hotkey = 0, bool do_redraw_screen = false);
int list_wizard_commands(bool do_redraw_screen = false);
#endif
-// XXX: Actually defined in acr.cc; we may want to move this to command.cc.
+// XXX: Actually defined in main.cc; we may want to move this to command.cc.
void process_command(command_type cmd);
#endif
diff --git a/crawl-ref/source/dat/altar.des b/crawl-ref/source/dat/altar.des
index 852ec909a4..fdd8f63528 100644
--- a/crawl-ref/source/dat/altar.des
+++ b/crawl-ref/source/dat/altar.des
@@ -790,14 +790,17 @@ DEPTH: 3-11
TAGS: no_monster_gen patrolling temple_overflow_makhleb
TAGS: layout_rooms layout_city layout_open layout_cross
KFEAT: _ = altar_makhleb
-# Either one slow type 3 demon (iron devil or demonic crawler)
-# or two slow type 4 demons (smoke demons)
+# Either one slow type 3 or 4 demon (iron devil or demonic crawler or smoke demon)
# or three slow type 5 demons (manes).
+# The smoke demon can only come up in D:9-11.
SHUFFLE: 1234
NSUBST: 1 = 1:1 / *:.
NSUBST: 2 = 1:2 / *:.
NSUBST: 3 = 2:3 / *:.
-MONS: iron devil / demonic crawler / smoke demon / manes
+: if you.absdepth() < 9 then
+SUBST: 3 = 12
+: end
+MONS: iron devil, demonic crawler, smoke demon, manes
MAP
xxxxxxxxxxxxxxx
x.............x
diff --git a/crawl-ref/source/dat/crypt.des b/crawl-ref/source/dat/crypt.des
index 54e1fd6387..c1b6ade7cf 100644
--- a/crawl-ref/source/dat/crypt.des
+++ b/crawl-ref/source/dat/crypt.des
@@ -76,9 +76,9 @@ DEPTH: Crypt
MONS: death ooze
KFEAT: f = .
# "withered plant" instead of "plant"
-KMONS: f = w:2 col:darkgrey plant name:withered name_adjective \
- tile:withered_plant / w:1 col:lightgrey plant name:withered \
- name_adjective tile:withered_plant
+KMONS: f = w:2 col:darkgrey plant name:withered name_adjective \
+ tile:mons_withered_plant / w:1 col:lightgrey plant name:withered \
+ name_adjective tile:mons_withered_plant
SUBST: p = f:2 .:1
SUBST: 1 = 1:3 .:1
MAP
@@ -318,9 +318,9 @@ ORIENT: float
TAGS: tomb_entry no_monster_gen
KFEAT: f = .
# "withered plant" instead of "plant"
-KMONS: f = w:2 col:darkgrey plant name:withered name_adjective \
- tile:withered_plant / w:1 col:lightgrey plant name:withered \
- name_adjective tile:withered_plant
+KMONS: f = w:2 col:darkgrey plant name:withered name_adjective \
+ tile:mons_withered_plant / w:1 col:lightgrey plant name:withered \
+ name_adjective tile:mons_withered_plant
SUBST: p = f.
MAP
cccccccccc
@@ -634,9 +634,9 @@ SUBST: F = f ?
SUBST: f = p:1 .:1
KFEAT: p = .
# "withered plant" instead of "plant"
-KMONS: f = w:2 col:darkgrey plant name:withered name_adjective \
- tile:withered_plant / w:1 col:lightgrey plant name:withered \
- name_adjective tile:withered_plant
+KMONS: p = w:2 col:darkgrey plant name:withered name_adjective \
+ tile:mons_withered_plant / w:1 col:lightgrey plant name:withered \
+ name_adjective tile:mons_withered_plant
####### hidden skeleton; sometimes good pain weapon, but draining short sword
KFEAT: ! = .
KMONS: ! = skeletal warrior ; w:2 dagger ego:pain | short sword ego:draining |\
diff --git a/crawl-ref/source/dat/database/FAQ.txt b/crawl-ref/source/dat/database/FAQ.txt
index a8f26e309b..bdab918a2e 100644
--- a/crawl-ref/source/dat/database/FAQ.txt
+++ b/crawl-ref/source/dat/database/FAQ.txt
@@ -49,6 +49,34 @@ the item's letter. For pickup, this is only possible when choosing items
from a menu, i.e. ',,' or 'gg'.
Stacks that are selected only in part are marked with '#' rather than '+'.
%%%%
+Q:roguelike difference
+
+What are the biggest differences to other popular roguelike games?
+%%%%
+A:roguelike difference
+
+First, you might want to read the philosophy section in the manual ('?N') to
+read about general important principles in Crawl Stonesoup game design.
+
+As for specific differences, the most important are probably the following:
+* Species is *much* more important the starting profession (or "class").
+* Bones files only contain ghosts, never the dead character's equipment.
+* You cannot sell items to shops or elsewhere.
+* Resistances can be gained via mutations or items, never through eating.
+* For most gods in Crawl, prayer doesn't have any effect at all. Where it
+ does, it has both benefits and drawbacks. Check '^' to find out more.
+
+Also, our aim is to give Crawl a really smooth interface, so you should really
+read through the command list ('??') some time. The most intriguing "newish"
+commands are probably the following:
+
+* o, for automatic exploration of an unknown level
+* G, for automatic travel to another level
+* 5, for waiting and searching 100 turns or until something happens
+* %, to access an overview screen for all your stats and resistances
+* X, to access the level map for easier travelling and more subcommands ('X?')
+* Ctrl-F, to find and travel to items or features you've seen before
+%%%%
Q:downstairs
I can't find any downstairs. Am I missing something?
@@ -61,9 +89,11 @@ looking corridors and along walls near empty terrain, you will eventually
find one. Note that most levels feature three downstairs as well as three
upstairs, not counting any escape hatches. If you get stuck, you might
try another set of stairs from the level above.
+
Alternatively, if you are in one of the branches, you might also have
reached its lowest level and have to turn around to explore another one.
-Check the database ('?/b') for the number of levels per branch.
+Check the overmap ('Ctrl-O') to see how deep you've delved into a given
+branch, or the database ('?/b') for the number of levels for unseen branches.
%%%%
Q:stuck
@@ -85,6 +115,7 @@ A:survival
A: If you've got trouble even reaching the Temple, you might want to try
out the Tutorial for some general playing hints. (To do this, press
'Ctrl-T' in the character selection menu.)
+
Also, there are easy playing combinations and more challenging ones
(marked in dark grey on the selection screen). If you are new to Crawl,
sticking to the easier ones is advisable. In general, treat each new
@@ -158,8 +189,8 @@ where not enough monsters are generated to dine on. You might also be too
choosy about what you eat: unless you are herbivorous you will have to
occasionally eat monster chunks, even those that sometimes make you sick
(coloured brown in the menu and the prompt). If you worship a god who
-enjoys sacrifices pay attention to your own hunger status and wait until
-the end of prayer before chopping a corpse if need be.
+enjoys sacrifices pay attention to your own hunger status instead of offering
+all corpses you come across.
Also, casting (difficult) spells will make you hungry, but high
Intelligence and Spellcasting will lessen this effect. If you press 'II',
you can read about the hunger effects of your spells.
@@ -220,10 +251,10 @@ permanently. There is another type of special item that pops up a bit more
frequently:
* egoitem: these are ordinary items with one special property. For example,
- a short sword of venom, a cap of see invisible or boots of running. These
- can be affected by enchanting scrolls and also by corrosion and acids.
- Weapons of this type are branded, and only divine intervention can change
- the brand.
+ a short sword of venom, a cap of see invisible, or boots of running.
+ These can be affected by enchanting scrolls and also by corrosion and
+ acids. Weapons of this type are branded, and only divine intervention can
+ change the brand.
%%%%
Q:oklobs
@@ -273,14 +304,16 @@ The game keeps crashing. / I think I found a bug. What do I do?
A:bug
A: Please submit a bug report on SourceForge, and give as much information
-as you can. (What were you doing at the time? What did you expect to
-happen, what happened instead? etc.) Most importantly, what version are you
-playing? Sometimes a screenshot can be helpful. For crashes or
-monsters/items/levels behaving oddly, we probably need a save file. To be
-on the safe side, attach the entire zipped save of the character in
-question. If there are error messages, please write them down. Short of a
-save file, a guide on how to reproduce the crash (or bug) can be useful;
-you can use wizard mode for this.
+as you can: What were you doing at the time? What did you expect to
+happen, what happened instead? etc.
+Most importantly, what version are you playing? (If you're not sure, you can
+check in-game with '?v'.) Console or tiles?
+
+Sometimes a screenshot can be helpful. For crashes or monsters/items/levels
+behaving oddly, we probably need a save file. To be on the safe side, attach
+the entire zipped save of the character in question. If there are error
+messages, please write them down. Short of a save file, a guide on how to
+reproduce the crash (or bug) can be useful; you can use wizard mode for this.
If you don't log in to SourceForge or leave an email address at least check
the thread from time to time in case we have some more questions. In any case
@@ -354,7 +387,7 @@ We really appreciate your help!
%%%%
Q:help
-I cannot code, but I'd really like to help improve the game. What can I do?
+I cannot code, but I'd like to help improve the game. What can I do?
%%%%
A:help
@@ -370,7 +403,7 @@ patch_guide.txt in the docs/ folder.
If you've got some cool addition, you can send it over the mailing list, or
post it as a SourceForge item. You can also help us by giving feedback on
-the most recent version or trunk (available via SVN, Windows binaries
+the most recent version or trunk (available via git, Windows binaries
downloadable from http://crawl.develz.org/trunk/).
Thanks a lot for your support!
@@ -388,7 +421,7 @@ many changes will invalidate your saved games. If that doesn't bother you,
go ahead and play!
Be sure to leave some feedback/suggestions/bug reports on the SourceForge
-trackers. When doing so please mention the version (r?????) you're
+trackers. When doing so please mention the version (see '?v') you're
currently playing, in case the bug's already been fixed or the feature
already implemented.
%%%%
@@ -422,17 +455,17 @@ out changelog.txt in the docs/ folder.
##############################################
Q:tiles lag
-The tiles version is awfully slow on Windows! What can I do to improve that?
+The tiles version is awfully slow on Windows! How can I improve that?
%%%%
A:tiles lag
First, we're really sorry about that! Stonesoup 0.5 was tested on several
-systems and the gigantic lag on some Windows systems was completely unexpected.
-
+systems and the gigantic lag on some Windows systems was completely
+unexpected.
Crawl 0.5 renders graphics using OpenGL and SDL. For most video cards, this
should be faster than the 0.4 version. However, the default driver that ships
-with Windows is extremely slow. If you are having performance problems, be sure
-to update your video card driver as a first step.
+with Windows is extremely slow. If you are having performance problems, be
+sure to update your video card driver as a first step.
We're working on a solution for this problem, but in the meantime you can try
to see whether tweaking some options will improve performance. See
@@ -442,11 +475,11 @@ solved, or you could try the non-graphical console version.
We'd like to apologize for the grief that this has caused some players, but we
hope that it's understandable that making this change in 0.5 has allowed a lot
-of graphical improvements: Uniques get on-screen names. All monsters get health
-bars. Graphical menus. Full screen mode. Eee PC support.
-None of those things would have been possible in previous tiles versions. On
-top of that, if you have an adequate driver 0.5 can often be faster than 0.4,
-because the GPU can easily do the work that used to take the CPU a lot of time.
+of graphical improvements: Uniques get on-screen names. All monsters get
+health bars. Graphical menus. Full screen mode. Eee PC support. None of those
+things would have been possible in previous tiles versions. On top of that, if
+you have an adequate driver 0.5 can often be faster than 0.4, because the GPU
+can easily do the work that used to take the CPU a lot of time.
At any rate, it'll be fixed. Just be patient. :)
%%%%
diff --git a/crawl-ref/source/dat/database/godspeak.txt b/crawl-ref/source/dat/database/godspeak.txt
index 29b8d734a3..595d0b210d 100644
--- a/crawl-ref/source/dat/database/godspeak.txt
+++ b/crawl-ref/source/dat/database/godspeak.txt
@@ -309,6 +309,17 @@ Xom casts you into the Abyss!
The world seems to spin as Xom's maniacal laughter rings in your ears.
%%%%
+Xom revert banishment
+
+w:30
+"Kidding!"
+
+"On second thought, though..."
+
+"No, I've changed my mind."
+
+Xom pulls you back into the comparable quietude of the dungeon.
+%%%%
# Xom upgrades a nearby hostile monster's weapon to a chaos brand
Xom chaos upgrade
diff --git a/crawl-ref/source/dat/database/miscname.txt b/crawl-ref/source/dat/database/miscname.txt
index 2a4d9788ae..0946b2f676 100644
--- a/crawl-ref/source/dat/database/miscname.txt
+++ b/crawl-ref/source/dat/database/miscname.txt
@@ -217,3 +217,18 @@ the chiming of a distant gong
the tinkle of an enormous bell
%%%%
+SHT_int_loss
+
+Your mind reels, touched by the horrors through the portal.
+
+Your quiver within your mortal coil, caressed by the liquid insanity through the scintillating gateway.
+
+# Bal-Sagoth
+The summoning rite seemed to take a not insignificant toll on your sanity.
+
+You have a brief vision of a great black cyclopean cityscape with towering stygian walls.
+
+Your vision is obscured by outlandish glyphs which seem to writhe squamously and alter their shape.
+
+You feel inexorably dogged by some nameless and implacable gloom.
+%%%%
diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt
index 6b0a310829..4ccb9c92d7 100644
--- a/crawl-ref/source/dat/database/monspeak.txt
+++ b/crawl-ref/source/dat/database/monspeak.txt
@@ -2716,6 +2716,21 @@ Maurice nonstealing
@The_monster@ groans, "What are you, a monk?"
%%%%
+# Triggered when Maurice tries to steal but is too confused to do so.
+Maurice confused nonstealing
+
+w:70
+__NONE
+
+@The_monster@ makes a clumsy attempt to grab your valuables.
+
+@The_monster@ fumbles for your pockets and misses.
+
+@The_monster@ lunges for your pockets and trips.
+
+w:5
+@The_monster@ sings off-key, "You got some money for me?"
+%%%%
############ MENKAURE ### A mummy whose rest you've disturbed
Menkaure
diff --git a/crawl-ref/source/dat/database/monspell.txt b/crawl-ref/source/dat/database/monspell.txt
index 1145bf6045..0ce22a12e5 100644
--- a/crawl-ref/source/dat/database/monspell.txt
+++ b/crawl-ref/source/dat/database/monspell.txt
@@ -245,6 +245,22 @@ giant eyeball cast targeted
giant eyeball cast
@The_monster@ looks around.
+%%%%
+guardian serpent cast targeted
+
+@The_monster@ coils @objective@self and waves @possessive@ upper body at @target@.
+
+@The_monster@ casts a spell at @target@.
+%%%%
+guardian serpent cast
+
+@The_monster@ coils @objective@self and performs some mystic snake dance.
+
+@The_monster@ casts a spell.
+
+@The_monster@ gestures with its tail.
+
+@The_monster@ weaves intricate patterns with the tip of its tongue.
###########################################################################
# Generic messages for priests and wizards which have been polymorphed into
# something without hands.
@@ -293,6 +309,22 @@ unseen priest cast
You hear some strange, mumbled prayers to @God@.
%%%%
+non-humanoid wizard cast targeted
+
+@The_monster@ stares at @target@ and mumbles some strange words.
+
+@The_monster@ casts a spell at @target@.
+%%%%
+non-humanoid wizard cast
+
+@The_monster@ mumbles some strange words.
+
+@The_monster@ casts a spell.
+%%%%
+unseen non-humanoid wizard cast
+
+You hear some strange, mumbled words.
+%%%%
wizard cast targeted
@The_monster@ gestures at @target@ while chanting.
diff --git a/crawl-ref/source/dat/descript/monsters.txt b/crawl-ref/source/dat/descript/monsters.txt
index 3c7108bd0d..131c577bdb 100644
--- a/crawl-ref/source/dat/descript/monsters.txt
+++ b/crawl-ref/source/dat/descript/monsters.txt
@@ -168,11 +168,9 @@ Grum
A tough-looking gnoll, wearing the pelt of one of his former war dogs.
%%%%
-guardian naga
+guardian serpent
-A hybrid; human from the chest up, with a scaly, muscular torso trailing off like that of a snake.
-
-These nagas are often used as guardians by powerful creatures.
+Serpents are distinct and rare members of scaly society. They are light and swift like snakes, yet also intelligent like nagas. Their lack of hands, together with an extreme sense of duty, makes them renowned guardians. It is said that a guardian serpent would rather die in battle than leave anything to an intruder.
%%%%
Harold
diff --git a/crawl-ref/source/dat/entry.des b/crawl-ref/source/dat/entry.des
index 1415848d3f..46b5c365b1 100644
--- a/crawl-ref/source/dat/entry.des
+++ b/crawl-ref/source/dat/entry.des
@@ -4496,7 +4496,7 @@ MONS: giant cockroach / giant ant / butterfly / killer bee / bumblebee /\
MONS: swamp worm / lindwurm / worm / spiny worm
MONS: swamp drake / hydra / wyvern / fire drake
MONS: bear / polar bear / grizzly bear / black bear
-MONS: black mamba / water moccasin / grey snake / salamander / viper
+MONS: black mamba / water moccasin / anaconda / salamander / viper
MAP
xxxxxxxx@xxxxxxxx
xxxxxx.G.G.xxxxxx
@@ -4908,8 +4908,8 @@ tttttttttttt1ttttttwwtttttttttttttttttttttt
tttt...1ttttt..tttwwwttt.tttttttt....ttttt
ttt..{..ttttt.t.tttwwwt...tttt.....t...tt
tt......tttttt.ttttttwww...t.....ttttt..
-tttt..tttttttt.ttttttttwww...ttttttttt..
-ttttt.ttttttt.ttttttttttwwwWttttttttttt..
+tttt..t.tttttt.ttttttttwww...ttttttttt..
+ttttt..tttttt.ttttttttttwwwWttttttttttt..
ttttt.tttttt.tttttttttttttwWWtttttttttt.
tttt..tttttt..tttttttttttt..wwwtttttt..
tttt.ttttttttt..tttttttt...tttttt.....
diff --git a/crawl-ref/source/dat/float.des b/crawl-ref/source/dat/float.des
index 7941996a09..052dd50bd5 100644
--- a/crawl-ref/source/dat/float.des
+++ b/crawl-ref/source/dat/float.des
@@ -383,10 +383,9 @@ MONS: bear / black bear / grizzly bear / polar bear
MONS: hippogriff / griffon
MONS: yak / sheep / weight:3 death yak
MONS: hound / wolf / hog
-SUBST: 1 = 1:30 2 3 4 .:20
+SUBST: 1 = 1:30 2 3 4 .
MAP
cccccccccc
-c1.1.1.1.c
c.1.1.1.1c
c1.1.1.1.c
c.1.1.1.1c
diff --git a/crawl-ref/source/dat/hells.des b/crawl-ref/source/dat/hells.des
index 77dc787d3e..e3cb0c5f4d 100644
--- a/crawl-ref/source/dat/hells.des
+++ b/crawl-ref/source/dat/hells.des
@@ -354,8 +354,8 @@ xxxxx..l.l.l.l.............................................c....cxxxxx
xxxxx.l.l.l.l.l............................................c....cxxxxx
xxxx.l.l.l.l.l.............................................c...ccccxxx
xxxxl.l.l.l.l.l............................................+...c..ccxx
-xxxx.l.l.l.G.l.l.................}1].......................+...+.T.cxx
-xxxxl.l.l.l.l.l.l.................)........................+...c..ccxx
+xxxx.l.l.l.G.l.l.................<1<.......................+...+.T.cxx
+xxxxl.l.l.l.l.l.l.................<........................+...c..ccxx
xxxx.l.l.l.l.l.l...........................................c...ccccxxx
xxxxx.l.l.l.l.l.l..........................................c....cxxxxx
xxxxx..l.l.l.l.............................................c....cxxxxx
diff --git a/crawl-ref/source/dat/hive.des b/crawl-ref/source/dat/hive.des
index 4292c44765..aae9cf4032 100644
--- a/crawl-ref/source/dat/hive.des
+++ b/crawl-ref/source/dat/hive.des
@@ -536,9 +536,9 @@ xxxxxxxxxxx.......x..................xxx....4..........wwwwwwwwwwwwwwwxa5axxxxxx
xxxxxxxxxxx.....xxx...4...........................xxxx.4wwwwwwwwwwwwwwwa=axxxxxx
xxxxxxxxxxxx..xxx.............xx....(.........xxxxxxxx....wwwwwwwwwwwwwwaaxxxxxx
xxxxxxxxxxxxxxxx.............xxxx..................xxxx......wwwwwwwwwwxxxxxxxxx
-xxxxxxxxxxxxxxxxx....{..}..xxxxxx..]......xxx...........4.wwwwwwwwwwwwxxxxxxxxxx
+xxxxxxxxxxxxxxxxx....{..<..xxxxxx..<......xxx...........4.wwwwwwwwwwwwxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx........xxx........xxxxxx....4....wwwwwwwwwwwwwwxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxx..[.xxx........xxx)....wwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxx..[.xxx........xxx<....wwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx.........xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -581,7 +581,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXXXXXXXXXXXXXXXXXXXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxXXXXX...................Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxX........................XXxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxXXXXXxXX.......{.......(........XXXXxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxX...............}.......)............XXXXxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxX...............<.......<............XXXXxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxXXXXXXXX.....................P...................XXxxxxxxxxxxxxxxxxxx
xxxxxxxxxxX...............4.....4.............................Xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxXXXXX........................P.4......4....4.......Xxxxxxxxxxxxxxxxxx
@@ -632,7 +632,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxaaaaaaaaaaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxaaaaaaaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxaaaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.4...].[..4..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.4...<.[..4..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx......d......xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -656,7 +656,7 @@ MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxXXXXxxXXxxxxxxxxxxxxxxxxxxxxxxxxxxXXxxXXxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxX.........XxxxxxxxxxxxxxxxxxxxxxxxX......Xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxX..{..}.4..XxxxxxxxxxxxxxxxxxxxxX...NNN...Xxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxX..{..<.4..XxxxxxxxxxxxxxxxxxxxxX...NNN...Xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxX.........XxxxxxxxxxxxxxxxxxxxxX...4.334...Xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxWwwWxxXXXxxxxxxxxxxxxxxxxxxxxxxX.........Xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxWwwWxxxxxxxxxxxxxxxxxxxxxxxxxxxX.3...Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -715,11 +715,11 @@ xxxxxxxxxxxxxW..334..WxxxxxxxxxxxxxxxxxxxxxxxxxxxWWWxxxxxxxxxxxxxxxxxxxWwwxxxxxx
xxxxxxxxxxxxxxW.NNN.WxxxxxxxxxxxxxxxxxxxxxxxxxxxWWWxxxxxxxxxxxxxxxxxxxwWwwxxxxxx
xxxxxxxxxxxxxxx..W.WxxxxxxxxxxxxxxxxxxxxxxxxxxWWWWxxxxxxxxxxxxxxxxxX..4Wwxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWWWWxxxxxxxxxxxxxxxxxX..(...wwxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWWWWxxxxxxxxxxxxxxxxxxxxX..).Xxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWWWWxxxxxxxxxxxxxxxxxxxxX..<.Xxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWWWWxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.WWWWWxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.4[..4WWxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx....]..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx....<..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP
diff --git a/crawl-ref/source/dat/lair.des b/crawl-ref/source/dat/lair.des
index cb3f14eae1..5a788b554e 100644
--- a/crawl-ref/source/dat/lair.des
+++ b/crawl-ref/source/dat/lair.des
@@ -585,7 +585,7 @@ NAME: hibernation_bobbens
DEPTH: Lair:4-8
TAGS: allow_dup no_monster_gen no_item_gen mini_float
MONS: w:5 death drake / ice dragon / dragon / swamp dragon
-MONS: swamp dragon / hydra / grey snake
+MONS: swamp dragon / hydra / anaconda
MONS: swamp drake / w:20 spiny frog / w:20 komodo dragon /\
w:20 gila monster / w:20 black mamba
: if you.absdepth() >= 18 then
@@ -905,10 +905,10 @@ KFEAT: Z = weight:2 teleport trap / .
KFEAT: z = teleport trap / Zot trap / weight:20 .
MONS: naga / nothing
MONS: greater naga / nothing
-MONS: guardian naga / nothing
+MONS: guardian serpent / nothing
MONS: naga warrior / nothing
MONS: naga mage / nothing
-MONS: greater naga / guardian naga
+MONS: greater naga / guardian serpent
SHUFFLE: 'X / "Y
SHUFFLE: 'X / 'X / AB, "Y / CD
SUBST: A=x, B=x, C=x, D=x
diff --git a/crawl-ref/source/dat/mini.des b/crawl-ref/source/dat/mini.des
index 1197e9936b..4f61617b69 100644
--- a/crawl-ref/source/dat/mini.des
+++ b/crawl-ref/source/dat/mini.des
@@ -1394,7 +1394,7 @@ ENDMAP
#
NAME: fake_naga_vault
DEPTH: D:15-26, Vault, Elf, Snake
-MONS: mimic, patrolling guardian naga
+MONS: mimic, patrolling guardian serpent
ITEM: any good_item
: local b = crawl.random2(10)
: if b > 7 then
@@ -1487,7 +1487,7 @@ ENDMAP
#DEPTH: D:20-26
#TAGS: no_monster_gen no_pool_fixup
#KMONS: 1 = yaktaur captain
-#KMONS: 2 = grey snake
+#KMONS: 2 = anaconda
#KMONS: 3 = storm dragon
#ITEM: potion of cure mutation/potion of gain dexterity/potion of gain strength
#ITEM: potion of gain intelligence/potion of experience/w:40 potion of heal wounds
@@ -2416,7 +2416,7 @@ MONS: wolf spider w:7 / giant mite w:3
MONS: oklob plant
MONS: jelly
MONS: trapdoor spider / wolf spider
-MONS: guardian naga
+MONS: guardian serpent
MONS: curse skull
# Randomise wall type: in 50% of maps, you cannot dig to the stairs.
SUBST: x : xxxxxxvvvccb
diff --git a/crawl-ref/source/dat/pan.des b/crawl-ref/source/dat/pan.des
index 8ccf336169..cab4668063 100644
--- a/crawl-ref/source/dat/pan.des
+++ b/crawl-ref/source/dat/pan.des
@@ -6,7 +6,7 @@
{{
function pan_lord_warning(e)
- crawl.mpr("Be careful! A famous pandemonium lord has residence here!", "warning")
+ crawl.mpr("You feel a terrible weight on your shoulders! A mighty lord of Pandemonium must reside here.", "warning")
end
}}
diff --git a/crawl-ref/source/dat/vaults.des b/crawl-ref/source/dat/vaults.des
index 17c6788474..cee6e36ea2 100644
--- a/crawl-ref/source/dat/vaults.des
+++ b/crawl-ref/source/dat/vaults.des
@@ -417,9 +417,9 @@ xxxx..AAAAAAAAAAAAAAAAAAAAAAAAAAA....BBBBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx..AAAAAAAAAAAAAAAAAAAAAAAAAAA.11.BBBBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx..AAAAAAAAAAAAAAAAAAAAAAAAAA.1111.BBBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx..AAAAAAAAAAAAAAAAAAAAAAAAA.1....1.BBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
-xxxx...........................1..(}..1...........................xxxx
+xxxx...........................1..(<..1...........................xxxx
xxxx..........................11.[..{.11..........................xxxx
-xxxx...........................1..])..1...........................xxxx
+xxxx...........................1..<<..1...........................xxxx
xxxx............................1....1............................xxxx
xxxx..CCCCCCCCCCCCCCCCCCCCCCCCC..1111..DDDDDDDDDDDDDDDDDDDDDDDDD..xxxx
xxxx..CCCCCCCCCCCCCCCCCCCCCCCCCC..11..DDDDDDDDDDDDDDDDDDDDDDDDDD..xxxx
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index bf52b877a7..360bf4652e 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -2082,11 +2082,9 @@ static void _experience_card(int power, deck_rarity_type rarity)
mpr("You feel knowledgeable.");
// Put some free XP into pool; power_level 2 means fill pool
- if (power_level >= 2)
- you.exp_available = you.exp_pool_cutoff();
- else
- you.exp_available += power * 50;
- you.step_down_exp_pool();
+ you.exp_available += power * 50;
+ if (power_level >= 2 || you.exp_available > FULL_EXP_POOL)
+ you.exp_available = FULL_EXP_POOL;
level_change();
}
diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h
index 20809e552d..03a7ab6be5 100644
--- a/crawl-ref/source/defines.h
+++ b/crawl-ref/source/defines.h
@@ -141,7 +141,9 @@ const int ANON_FRIENDLY_MONSTER = -1999;
const int DEBUG_COOKIE = 32767;
const int MAX_SKILL_LEVEL = 27;
-const unsigned int MAX_EXP_TOTAL = 8999999;
+const int MAX_EXP_TOTAL = 8999999;
+const int MAX_EXP_POOL = 20000;
+const int FULL_EXP_POOL = MAX_EXP_POOL;
const int MIN_HIT_MISS_PERCENTAGE = 5;
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index cc11099929..5af0f6aa4c 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -173,7 +173,7 @@ static int _recite_to_monsters(coord_def where, int pow, int, actor *)
case 10:
case 11:
case 12:
- if (!mon->add_ench(mon_enchant(ENCH_NEUTRAL, 0, KC_YOU,
+ if (!mon->add_ench(mon_enchant(ENCH_TEMP_PACIF, 0, KC_YOU,
(16 + random2avg(13, 2)) * 10)))
{
return (0);
@@ -203,7 +203,7 @@ static int _recite_to_monsters(coord_def where, int pow, int, actor *)
{
if (holiness == MH_UNDEAD || holiness == MH_DEMONIC)
{
- if (!mon->add_ench(mon_enchant(ENCH_NEUTRAL, 0, KC_YOU,
+ if (!mon->add_ench(mon_enchant(ENCH_TEMP_PACIF, 0, KC_YOU,
(16 + random2avg(13, 2)) * 10)))
{
return (0);
@@ -1560,7 +1560,10 @@ void armour_wear_effects(const int item_slot)
}
if (is_artefact(arm))
- use_artefact(arm, NULL, melded);
+ {
+ bool show_msgs = true;
+ use_artefact(arm, &show_msgs, melded);
+ }
if (item_cursed(arm) && !melded)
{
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index e77ff17982..8846f838ea 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -201,7 +201,6 @@ static std::vector<std::string> _randart_propnames( const item_def& item )
{ "rC", ARTP_COLD, 1 },
{ "rN", ARTP_NEGATIVE_ENERGY, 1 },
{ "MR", ARTP_MAGIC, 2 },
- { "Spirit", ARTP_SPIRIT_SHIELD, 2 },
// Quantitative attributes
{ "AC", ARTP_AC, 0 },
@@ -228,10 +227,13 @@ static std::vector<std::string> _randart_propnames( const item_def& item )
if (!type.empty())
propnames.push_back(type);
}
- else if (item.base_type == OBJ_WEAPONS
- && item_ident(item, ISFLAG_KNOW_TYPE))
+ else if (item_ident(item, ISFLAG_KNOW_TYPE))
{
- std::string ego = weapon_brand_name(item, true);
+ std::string ego;
+ if (item.base_type == OBJ_WEAPONS)
+ ego = weapon_brand_name(item, true);
+ else if (item.base_type == OBJ_ARMOUR)
+ ego = armour_ego_name(item, true);
if (!ego.empty())
{
// XXX: Ugly hack to remove the brackets...
@@ -393,7 +395,6 @@ static std::string _randart_descrip( const item_def &item )
{ ARTP_LEVITATE, "It lets you levitate.", false},
{ ARTP_BLINK, "It lets you blink.", false},
{ ARTP_BERSERK, "It lets you go berserk.", false},
- { ARTP_SPIRIT_SHIELD, "It shields you from harm at the cost of magical power.", false},
{ ARTP_NOISES, "It makes noises.", false},
{ ARTP_PREVENT_SPELLCASTING, "It prevents spellcasting.", false},
{ ARTP_CAUSE_TELEPORTATION, "It causes teleportation.", false},
@@ -2802,9 +2803,7 @@ void get_monster_db_desc(const monsters& mons, describe_info &inf,
// For undetected mimics describe mimicked item instead.
if (!force_seen && mons_is_unknown_mimic(&mons))
{
- item_def item;
- get_mimic_item(&mons, item);
- get_item_desc(item, inf);
+ get_item_desc(get_mimic_item(&mons), inf);
return;
}
@@ -2812,12 +2811,6 @@ void get_monster_db_desc(const monsters& mons, describe_info &inf,
inf.title = mons.full_name(DESC_CAP_A, true);
std::string db_name = mons.base_name(DESC_DBNAME, force_seen);
- if (mons_is_mimic(mons.type) && mons.type != MONS_GOLD_MIMIC)
- {
- db_name = "mimic";
- if (inf.title.empty())
- inf.title = "A mimic";
- }
// This is somewhat hackish, but it's a good way of over-riding monsters'
// descriptions in Lua vaults by using MonPropsMarker. This is also the
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index dbebce5637..66d3b94f96 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -521,11 +521,7 @@ void full_describe_view()
const bool unknown_mimic = (mon && mons_is_unknown_mimic(mon));
if (unknown_mimic) // It'll be on top.
- {
- item_def item;
- get_mimic_item(mon, item);
- list_items.push_back(item);
- }
+ list_items.push_back(get_mimic_item(mon));
const int oid = igrd(*ri);
if (oid == NON_ITEM)
@@ -1754,11 +1750,7 @@ std::string get_terse_square_desc(const coord_def &gc)
const monsters& mons = *monster_at(gc);
if (mons_is_mimic(mons.type) && !(mons.flags & MF_KNOWN_MIMIC))
- {
- item_def item;
- get_mimic_item(&mons, item);
- desc = item.name(DESC_PLAIN);
- }
+ desc = get_mimic_item(&mons).name(DESC_PLAIN);
else
desc = mons.full_name(DESC_PLAIN, true);
}
@@ -3133,6 +3125,8 @@ static std::string _get_monster_desc(const monsters *mon)
if (mon->attitude == ATT_FRIENDLY)
text += pronoun + " is friendly.\n";
+ else if (mon->good_neutral())
+ text += pronoun + " seems to be peaceful towards you.\n";
else if (mon->neutral()) // don't differentiate between permanent or not
text += pronoun + " is indifferent to you.\n";
@@ -3145,35 +3139,6 @@ static std::string _get_monster_desc(const monsters *mon)
if (mons_intel(mon) <= I_PLANT && mon->type != MONS_RAKSHASA_FAKE)
text += pronoun + " is mindless.\n";
- // Give an indication of monsters being capable of seeing/sensing
- // invisible creatures.
- if (mons_behaviour_perceptible(mon) && !mon->asleep()
- && !mons_is_confused(mon)
- && (mon->can_see_invisible() || mons_sense_invis(mon)))
- {
- const actor* foe = mon->get_foe();
- if (foe && foe->invisible() && !mons_is_fleeing(mon))
- {
- if (!you.can_see(foe))
- text += pronoun + " is looking at something unseen.\n";
- else if (mon->can_see_invisible())
- {
- text += pronoun + " is watching "
- + foe->name(DESC_NOCAP_THE)
- + ".\n";
- }
- else
- {
- text += pronoun + " is looking in ";
- std::string name = foe->atype() == ACT_PLAYER
- ? "your" : (foe->name(DESC_NOCAP_THE) + "'s");
- text += name + " general direction.\n";
- }
- }
- else if (!foe || mons_is_fleeing(mon))
- text += pronoun + " seems to be peering into the shadows.\n";
- }
-
if (mons_enslaved_body_and_soul(mon))
{
text += mon->pronoun(PRONOUN_CAP_POSSESSIVE)
@@ -3388,9 +3353,7 @@ static void _describe_cell(const coord_def& where, bool in_range)
_describe_monster(mon);
else
{
- item_def item;
- get_mimic_item( mon, item );
- std::string name = get_menu_colour_prefix_tags(item,
+ std::string name = get_menu_colour_prefix_tags(get_mimic_item(mon),
DESC_NOCAP_A);
mprf(MSGCH_FLOOR_ITEMS, "You see %s here.", name.c_str());
}
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index aab2d4e0e4..0926c5f9ce 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -4875,6 +4875,10 @@ static void _dgn_give_mon_spec_items(mons_spec &mspec,
destroy_item(item_made, true);
}
}
+
+ // Pre-wield ranged weapons.
+ if (mon.inv[MSLOT_WEAPON] == NON_ITEM && mon.inv[MSLOT_ALT_WEAPON] != NON_ITEM)
+ mon.swap_weapons(false);
}
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 7573ca6313..e97fc60ac8 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1959,9 +1959,8 @@ static int _failed_acquirement(bool quiet)
}
int acquirement_create_item(object_class_type class_wanted,
- int agent,
- bool quiet,
- const coord_def &pos)
+ int agent, bool quiet,
+ const coord_def &pos, bool debug)
{
ASSERT(class_wanted != OBJ_RANDOM);
@@ -2145,7 +2144,10 @@ int acquirement_create_item(object_class_type class_wanted,
destroy_item(thing, true);
return _failed_acquirement(quiet);
}
- mark_had_book(thing);
+ // Don't mark books as seen if only generated for the
+ // acquirement statistics.
+ if (!debug)
+ mark_had_book(thing);
}
else if (thing.base_type == OBJ_JEWELLERY)
{
@@ -2288,7 +2290,7 @@ int acquirement_create_item(object_class_type class_wanted,
}
bool acquirement(object_class_type class_wanted, int agent,
- bool quiet, int* item_index)
+ bool quiet, int* item_index, bool debug)
{
ASSERT(!crawl_state.arena);
@@ -2369,7 +2371,7 @@ bool acquirement(object_class_type class_wanted, int agent,
}
*item_index =
- acquirement_create_item(class_wanted, agent, quiet, you.pos());
+ acquirement_create_item(class_wanted, agent, quiet, you.pos(), debug);
return (*item_index != NON_ITEM);
}
diff --git a/crawl-ref/source/effects.h b/crawl-ref/source/effects.h
index c430e17be2..dbabe6cd48 100644
--- a/crawl-ref/source/effects.h
+++ b/crawl-ref/source/effects.h
@@ -55,12 +55,12 @@ void collect_radius_points(std::vector<std::vector<coord_def> > &radius_points,
void random_uselessness(int scroll_slot = -1);
bool acquirement(object_class_type force_class, int agent,
- bool quiet = false, int *item_index = NULL);
+ bool quiet = false, int *item_index = NULL,
+ bool debug = false);
int acquirement_create_item(object_class_type class_wanted,
- int agent,
- bool quiet,
- const coord_def &pos);
+ int agent, bool quiet,
+ const coord_def &pos, bool debug = false);
bool recharge_wand(const int item_slot = -1);
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 4d9733c34a..7938b7fa1d 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1240,7 +1240,7 @@ enum enchant_type
ENCH_SLEEPY, // Monster can't wake until this wears off.
ENCH_HELD, // 25 -- Caught in a net.
ENCH_BATTLE_FRENZY, // Monster is in a battle frenzy
- ENCH_NEUTRAL,
+ ENCH_TEMP_PACIF,
ENCH_PETRIFYING,
ENCH_PETRIFIED,
ENCH_LOWERED_MR, // 30
@@ -1653,7 +1653,7 @@ enum monster_type // (int) menv[].type
MONS_KOBOLD,
MONS_LICH,
MONS_MUMMY,
- MONS_GUARDIAN_NAGA,
+ MONS_GUARDIAN_SERPENT,
MONS_OGRE, // 40
MONS_PLANT,
MONS_QUEEN_BEE,
@@ -1781,7 +1781,7 @@ enum monster_type // (int) menv[].type
MONS_FIRE_DRAKE,
MONS_SHADOW_DRAGON, // 165
MONS_VIPER,
- MONS_GREY_SNAKE,
+ MONS_ANACONDA,
MONS_DEEP_TROLL,
MONS_GIANT_BLOWFLY,
MONS_RED_WASP, // 170
@@ -2198,7 +2198,7 @@ enum mon_spellbook_type
MST_ORC_WIZARD_I = 0,
MST_ORC_WIZARD_II,
MST_ORC_WIZARD_III,
- MST_GUARDIAN_NAGA = 10,
+ MST_GUARDIAN_SERPENT = 10,
MST_LICH_I = 20,
MST_LICH_II,
MST_LICH_III,
@@ -2560,7 +2560,6 @@ enum artefact_prop_type
ARTP_CURSED,
ARTP_STEALTH,
ARTP_MAGICAL_POWER,
- ARTP_SPIRIT_SHIELD,
ARTP_NUM_PROPERTIES // 30
};
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 063fd8c9f8..91397a6fe9 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1898,8 +1898,22 @@ int melee_attack::player_weapon_type_modify(int damage)
case DAM_WHIP:
if (damage < HIT_MED)
attack_verb = "whack";
- else
+ else if (damage < HIT_STRONG)
attack_verb = "thrash";
+ else
+ {
+ switch(defender->holiness())
+ {
+ case MH_HOLY:
+ case MH_NATURAL:
+ case MH_DEMONIC:
+ attack_verb = "punish";
+ verb_degree = " causing immense pain";
+ break;
+ default:
+ attack_verb = "devastate";
+ }
+ }
break;
case -1: // unarmed
@@ -4516,7 +4530,8 @@ std::string melee_attack::mons_attack_verb(const mon_attack_def &attk)
"kick",
"tentacle-slap",
"tail-slap",
- "gore"
+ "gore",
+ "constrict"
};
return (attack_types[attk.type]);
@@ -4725,6 +4740,17 @@ void melee_attack::splash_defender_with_acid(int strength)
static void _steal_item_from_player(monsters *mon)
{
+ if (mon->confused())
+ {
+ std::string msg = getSpeakString("Maurice confused nonstealing");
+ if (!msg.empty() && msg != "__NONE")
+ {
+ msg = replace_all(msg, "@The_monster@", mon->name(DESC_CAP_THE));
+ mpr(msg.c_str(), MSGCH_TALK);
+ }
+ return;
+ }
+
mon_inv_type mslot = NUM_MONSTER_SLOTS;
int steal_what = -1;
int total_value = 0;
@@ -5161,6 +5187,13 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk)
atk_name(DESC_CAP_THE).c_str());
}
break;
+
+ case AF_CRUSH:
+ mprf("%s %s being crushed%s",
+ def_name(DESC_CAP_THE).c_str(),
+ defender->conj_verb("are").c_str(),
+ special_attack_punctuation().c_str());
+ break;
}
}
@@ -5227,8 +5260,17 @@ void melee_attack::mons_perform_attack_rounds()
init_attack();
- const mon_attack_def attk = mons_attack_spec(attacker_as_monster(),
+ mon_attack_def attk = mons_attack_spec(attacker_as_monster(),
attack_number);
+ if (attk.type == AT_WEAP_ONLY)
+ {
+ int weap = attacker_as_monster()->inv[MSLOT_WEAPON];
+ if (weap == NON_ITEM)
+ attk.type = AT_NONE;
+ else if (is_range_weapon(mitm[weap]))
+ attk.type = AT_SHOOT;
+ }
+
if (attk.type == AT_NONE)
{
// Make sure the monster uses up some energy, even
@@ -5265,6 +5307,7 @@ void melee_attack::mons_perform_attack_rounds()
case AT_BITE:
case AT_PECK:
+ case AT_CONSTRICT:
noise_factor = 100;
break;
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 7836f63a1b..b05bbde518 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -75,7 +75,10 @@
#include "state.h"
#include "stuff.h"
#include "tags.h"
+#ifdef USE_TILE
#include "tiles.h"
+#include "tiledef-player.h"
+#endif
#include "terrain.h"
#include "travel.h"
#include "tutorial.h"
@@ -2149,26 +2152,36 @@ bool apply_to_all_dungeons(bool (*applicator)())
return (success);
}
-static bool _get_and_validate_version(FILE *restoreFile, char &major,
- char &minor, std::string* reason)
+bool get_save_version(FILE *file, char &major, char &minor)
{
- std::string dummy;
- if (reason == 0)
- reason = &dummy;
-
// Read first two bytes.
char buf[2];
- if (read2(restoreFile, buf, 2) != 2)
+ if (read2(file, buf, 2) != 2)
{
// Empty file?
major = minor = -1;
- *reason = "File is corrupt.";
return (false);
}
major = buf[0];
minor = buf[1];
+ return (true);
+}
+
+static bool _get_and_validate_version(FILE *restoreFile, char &major,
+ char &minor, std::string* reason)
+{
+ std::string dummy;
+ if (reason == 0)
+ reason = &dummy;
+
+ if (!get_save_version(restoreFile, major, minor))
+ {
+ *reason = "File is corrupt.";
+ return (false);
+ }
+
if (major != TAG_MAJOR_VERSION)
{
*reason = make_stringf("Major version mismatch: %d (want %d).",
diff --git a/crawl-ref/source/files.h b/crawl-ref/source/files.h
index d81e23240e..fa30603f60 100644
--- a/crawl-ref/source/files.h
+++ b/crawl-ref/source/files.h
@@ -91,6 +91,8 @@ void save_game(bool leave_game, const char *bye = NULL);
// Save game without exiting (used when changing levels).
void save_game_state();
+bool get_save_version(FILE *file, char &major, char &minor);
+
void restore_game(void);
bool apply_to_all_dungeons(bool (*applicator)());
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 9fdbf2a886..396f217e40 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -3474,6 +3474,7 @@ enum commandline_option_type {
CLO_BUILDDB,
CLO_HELP,
CLO_VERSION,
+ CLO_SAVE_VERSION,
CLO_EXTRA_OPT_FIRST,
CLO_EXTRA_OPT_LAST,
@@ -3483,7 +3484,7 @@ enum commandline_option_type {
static const char *cmd_ops[] = {
"scores", "name", "species", "job", "plain", "dir", "rc",
"rcdir", "tscores", "vscores", "scorefile", "morgue", "macro",
- "mapstat", "arena", "test", "builddb", "help", "version",
+ "mapstat", "arena", "test", "builddb", "help", "version", "save-version",
"extra-opt-first", "extra-opt-last",
};
@@ -3524,6 +3525,77 @@ static void _print_version()
printf("%s", compilation_info().c_str());
}
+static void _print_save_version(char *name)
+{
+ bool need_unlink = false;
+ std::string basename = get_savedir_filename(name, "", "");
+ std::string filename = basename + ".sav";
+
+ FILE *charf = fopen(name, "rb");
+
+ if (!charf) {
+#ifdef LOAD_UNPACKAGE_CMD
+ std::string zipfile = basename + PACKAGE_SUFFIX;
+ FILE *handle = fopen(zipfile.c_str(), "rb+");
+ if (handle == NULL)
+ {
+ fprintf(stderr, "Unable to open %s for reading!\n",
+ zipfile.c_str());
+ return;
+ }
+ else
+ {
+ fclose(handle);
+
+ // Create command.
+ char cmd_buff[1024];
+
+ std::string zipname = basename;
+ std::string directory = get_savedir();
+ std::string savefile = filename;
+ savefile.erase(0, savefile.rfind(FILE_SEPARATOR) + 1);
+
+ escape_path_spaces(zipname);
+ escape_path_spaces(directory);
+ escape_path_spaces(savefile);
+ snprintf( cmd_buff, sizeof(cmd_buff), UNPACK_SPECIFIC_FILE_CMD,
+ zipname.c_str(),
+ directory.c_str(),
+ savefile.c_str() );
+
+ if (system( cmd_buff ) != 0)
+ {
+ fprintf(stderr, "Warning: Zip command "
+ "(UNPACK_SPECIFIC_FILE_CMD) "
+ "returned non-zero value!" EOL );
+ }
+ need_unlink = true;
+ }
+#endif
+ charf = fopen(filename.c_str(), "rb");
+ }
+ if (!charf) {
+ fprintf(stderr, "Unable to open %s for reading!\n", filename.c_str());
+ goto cleanup;
+ }
+
+ char major, minor;
+ if (!get_save_version(charf, major, minor)) {
+ fprintf(stderr, "Save file is invalid.\n");
+ }
+ else {
+ printf("Save file version for %s is %d.%d\n", name, major, minor);
+ }
+
+cleanup:
+#ifdef LOAD_UNPACKAGE_CMD
+ if (need_unlink)
+ unlink(filename.c_str());
+#else
+ ;
+#endif
+}
+
static bool _check_extra_opt(char* _opt)
{
std::string opt(_opt);
@@ -3817,6 +3889,14 @@ bool parse_args( int argc, char **argv, bool rc_only )
_print_version();
end(0);
+ case CLO_SAVE_VERSION:
+ // Always parse.
+ if (!next_is_param)
+ return (false);
+
+ _print_save_version(next_arg);
+ end(0);
+
case CLO_EXTRA_OPT_FIRST:
if (!next_is_param)
return (false);
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 699b15059b..047a502467 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -38,7 +38,11 @@
#include "mon-util.h"
#include "state.h"
+#ifdef USE_TILE
#include "tiles.h"
+#include "tiledef-main.h"
+#include "tiledef-dngn.h"
+#endif
///////////////////////////////////////////////////////////////////////////////
// Inventory menu shenanigans
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index abb21d0fc2..4bd5082d00 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -3454,7 +3454,8 @@ void jewellery_wear_effects(item_def &item)
// so we don't allow them to make the base types known.
if (artefact)
{
- use_artefact(item);
+ bool show_msgs = true;
+ use_artefact(item, &show_msgs);
if (learn_pluses && (item.plus != 0 || item.plus2 != 0))
set_ident_flags(item, ISFLAG_KNOW_PLUSES);
@@ -5700,16 +5701,6 @@ void use_artefact(item_def &item, bool *show_msgs, bool unmeld)
if (proprt[ARTP_NOISES])
you.attribute[ATTR_NOISES] = 1;
- if (proprt[ARTP_SPIRIT_SHIELD])
- {
- set_mp(0, false);
- mpr("You feel the spirits watch over you.");
- if (you.species == SP_DEEP_DWARF)
- mpr("Now linked to your health, your magic stops regenerating.");
-
- artefact_wpn_learn_prop(item, ARTP_SPIRIT_SHIELD);
- }
-
if (!alreadyknown && Options.autoinscribe_artefacts)
add_autoinscription(item, artefact_auto_inscription(item));
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index d477d1b767..ee2e39b4b5 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -350,12 +350,13 @@ const char* weapon_brand_name(const item_def& item, bool terse)
}
-static const char* armour_ego_name( special_armour_type sparm, bool terse )
+const char* armour_ego_name(const item_def& item, bool terse)
{
if (!terse)
{
- switch ( sparm )
+ switch (get_armour_ego_type(item))
{
+ case SPARM_NORMAL: return "";
case SPARM_RUNNING: return "running";
case SPARM_FIRE_RESISTANCE: return "fire resistance";
case SPARM_COLD_RESISTANCE: return "cold resistance";
@@ -382,8 +383,9 @@ static const char* armour_ego_name( special_armour_type sparm, bool terse )
}
else
{
- switch (sparm)
+ switch (get_armour_ego_type(item))
{
+ case SPARM_NORMAL: return "";
case SPARM_RUNNING: return " {run}";
case SPARM_FIRE_RESISTANCE: return " {rF+}";
case SPARM_COLD_RESISTANCE: return " {rC+}";
@@ -1304,7 +1306,7 @@ std::string item_def::name_aux(description_level_type desc,
if (sub_type == ARM_NAGA_BARDING && sparm == SPARM_RUNNING)
buff << (terse ? "speed" : "speedy slithering");
else
- buff << armour_ego_name(sparm, terse);
+ buff << armour_ego_name(*this, terse);
}
}
diff --git a/crawl-ref/source/itemname.h b/crawl-ref/source/itemname.h
index 271bf2d340..bd49966118 100644
--- a/crawl-ref/source/itemname.h
+++ b/crawl-ref/source/itemname.h
@@ -97,6 +97,7 @@ std::string make_name(unsigned long seed, bool all_caps, int maxlen = -1,
char start = 0);
const char* weapon_brand_name(const item_def& item, bool terse);
+const char* armour_ego_name(const item_def& item, bool terse);
void init_properties();
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 9a9bf3e022..720dfff844 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -946,11 +946,16 @@ int get_ammo_brand( const item_def &item )
special_armour_type get_armour_ego_type( const item_def &item )
{
- // Artefact armours have no ego type, must look up powers
- // separately.
- if (item.base_type != OBJ_ARMOUR || is_artefact( item ))
+ // Armour ego types are "brands", so we do the randart lookup here.
+ if (item.base_type != OBJ_ARMOUR)
return (SPARM_NORMAL);
+ if (is_artefact( item ))
+ {
+ return (static_cast<special_armour_type>(
+ artefact_wpn_property( item, ARTP_BRAND )));
+ }
+
return (static_cast<special_armour_type>(item.special));
}
diff --git a/crawl-ref/source/l_dgn.cc b/crawl-ref/source/l_dgn.cc
index b7891b2c7f..4ef1cae954 100644
--- a/crawl-ref/source/l_dgn.cc
+++ b/crawl-ref/source/l_dgn.cc
@@ -19,6 +19,9 @@
#include "random.h"
#include "spl-util.h"
#include "state.h"
+#ifdef USE_TILE
+#include "tiledef-dngn.h"
+#endif
#include "view.h"
///////////////////////////////////////////////////////////////////////////
diff --git a/crawl-ref/source/l_dgntil.cc b/crawl-ref/source/l_dgntil.cc
index 6939b98aea..4e68e8d782 100644
--- a/crawl-ref/source/l_dgntil.cc
+++ b/crawl-ref/source/l_dgntil.cc
@@ -13,6 +13,8 @@
#ifdef USE_TILE
+#include "tiledef-dngn.h"
+
#include "env.h"
unsigned int get_tile_idx(lua_State *ls, int arg)
diff --git a/crawl-ref/source/lev-pand.cc b/crawl-ref/source/lev-pand.cc
index ab2075910e..57d6ae931c 100644
--- a/crawl-ref/source/lev-pand.cc
+++ b/crawl-ref/source/lev-pand.cc
@@ -123,6 +123,9 @@ void init_pandemonium(void)
if (one_chance_in(30))
env.mons_alloc[pc] = MONS_IMP;
+ if (one_chance_in(30))
+ env.mons_alloc[pc] = MONS_SIXFIRHY;
+
if (one_chance_in(20))
{
env.mons_alloc[pc] =
diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc
index eb63694c25..51fe4aeb0b 100644
--- a/crawl-ref/source/libgui.cc
+++ b/crawl-ref/source/libgui.cc
@@ -27,6 +27,7 @@
#include "terrain.h"
#include "tiles.h"
#include "tilesdl.h"
+#include "tiledef-main.h"
#include "travel.h"
#include "viewgeom.h"
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index 508bab53ce..86b5813784 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -312,17 +312,18 @@ int main( int argc, char *argv[] )
static void _show_commandline_options_help()
{
puts("Command line options:");
- puts(" -help prints this list of options");
- puts(" -name <string> character name");
- puts(" -species <arg> preselect race (by letter, abbreviation, or name)");
- puts(" -job <arg> preselect class (by letter, abbreviation, or name)");
- puts(" -plain don't use IBM extended characters");
- puts(" -dir <path> crawl directory");
- puts(" -rc <file> init file name");
- puts(" -rcdir <dir> directory that contains (included) rc files");
- puts(" -morgue <dir> directory to save character dumps");
- puts(" -macro <dir> directory to save/find macro.txt");
- puts(" -version Crawl version (and compilation info)");
+ puts(" -help prints this list of options");
+ puts(" -name <string> character name");
+ puts(" -species <arg> preselect race (by letter, abbreviation, or name)");
+ puts(" -job <arg> preselect class (by letter, abbreviation, or name)");
+ puts(" -plain don't use IBM extended characters");
+ puts(" -dir <path> crawl directory");
+ puts(" -rc <file> init file name");
+ puts(" -rcdir <dir> directory that contains (included) rc files");
+ puts(" -morgue <dir> directory to save character dumps");
+ puts(" -macro <dir> directory to save/find macro.txt");
+ puts(" -version Crawl version (and compilation info)");
+ puts(" -save-version <name> Save file version for the given player");
puts("");
puts("Command line options override init file options, which override");
puts("environment options (CRAWL_NAME, CRAWL_DIR, CRAWL_RC).");
@@ -552,7 +553,7 @@ static void _do_wizard_command(int wiz_command, bool silent_fail)
break;
case 's':
- you.exp_available = you.exp_pool_cutoff();
+ you.exp_available = FULL_EXP_POOL;
you.redraw_experience = true;
break;
@@ -3187,7 +3188,10 @@ static bool _untrap_target(const coord_def move, bool check_confused)
mpr("You can't disarm traps in your present form.");
return (true);
}
- if (env.cgrid(target) != EMPTY_CLOUD)
+
+ const int cloud = env.cgrid(target);
+ if (cloud != EMPTY_CLOUD
+ && is_damaging_cloud(env.cloud[ cloud ].type, true))
{
mpr("You can't get to that trap right now.");
return (true);
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 32e7454bc8..c6dec74d41 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -2291,6 +2291,12 @@ bool is_armour_brand_ok(int type, int brand)
case SPARM_FIRE_RESISTANCE:
case SPARM_COLD_RESISTANCE:
case SPARM_RESISTANCE:
+ if (type == ARM_DRAGON_ARMOUR
+ || type == ARM_ICE_DRAGON_ARMOUR
+ || type == ARM_GOLD_DRAGON_ARMOUR)
+ {
+ return (false); // contradictory or redundant
+ }
return (true); // in portal vaults, these can happen on every slot
case SPARM_MAGIC_RESISTANCE:
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 76dc38c452..493e79bb91 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -43,6 +43,10 @@
#include "stuff.h"
#include "env.h"
#include "tags.h"
+#ifdef USE_TILE
+#include "tiledef-dngn.h"
+#include "tiledef-player.h"
+#endif
static const char *map_section_names[] = {
"",
@@ -3052,6 +3056,18 @@ mons_list::mons_spec_slot mons_list::parse_mons_spec(std::string spec)
mspec.patrolling = strip_tag(mon_str, "patrolling");
mspec.band = strip_tag(mon_str, "band");
+ const std::string att = strip_tag_prefix(mon_str, "att:");
+ if (att.empty() || att == "hostile")
+ mspec.attitude = ATT_HOSTILE;
+ else if (att == "friendly")
+ mspec.attitude = ATT_FRIENDLY;
+ else if (att == "good_neutral")
+ mspec.attitude = ATT_GOOD_NEUTRAL;
+ else if (att == "fellow_slime" || att == "strict_neutral")
+ mspec.attitude = ATT_STRICT_NEUTRAL;
+ else if (att == "neutral")
+ mspec.attitude = ATT_NEUTRAL;
+
// Useful for summoned monsters.
if (strip_tag(mon_str, "seen"))
mspec.extra_monster_flags |= MF_SEEN;
@@ -3164,9 +3180,6 @@ mons_list::mons_spec_slot mons_list::parse_mons_spec(std::string spec)
#ifdef USE_TILE
if (!tile.empty())
{
- // Modify the string to prevent them from using non-mons tiles.
- if (tile.find("mons_") == std::string::npos)
- tile = std::string("mons_" + tile);
unsigned int index;
if (!tile_player_index(tile.c_str(), index))
{
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index 10f865adc5..6741d16f08 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -25,6 +25,9 @@
#include "newgame.h"
#include "terrain.h"
#include "tiles.h"
+ #include "tiledef-dngn.h"
+ #include "tiledef-main.h"
+ #include "tiledef-player.h"
#include "travel.h"
#endif
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index 4dbff6c4b4..9da82cd6a6 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -678,9 +678,9 @@ static void set_Message_Line(bool force = false)
{
if (!force && Message_Line >= 0)
return;
- Message_Line = Options.delay_message_clear
- ? crawl_view.msgsz.y - 1
- : 0;
+
+ Message_Line = Options.delay_message_clear ? crawl_view.msgsz.y - 1
+ : 0;
}
// Adds a given message to the message history.
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 1460170e52..ac26b3c96d 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2201,12 +2201,6 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
const bool known_trap = (grd(you.pos()) != DNGN_UNDISCOVERED_TRAP
&& !force_stair);
- if (!known_trap && !force_stair)
- {
- mpr("You can't go down here!");
- return;
- }
-
if (you.flight_mode() == FL_LEVITATE && !force_stair)
{
if (known_trap)
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc
index 13a87415f6..bd12bdb14c 100644
--- a/crawl-ref/source/mon-cast.cc
+++ b/crawl-ref/source/mon-cast.cc
@@ -2308,7 +2308,8 @@ void mons_cast_noise(monsters *monster, bolt &pbolt, spell_type spell_cast,
// Last, generic wizard, priest or demon.
if (wizard)
- key_list.push_back("wizard" + cast_str);
+ key_list.push_back((std::string)((shape <= MON_SHAPE_NAGA) ? "" : "non-humanoid ")
+ + "wizard" + cast_str);
else if (priest)
key_list.push_back("priest" + cast_str);
else if (mons_is_demon(monster->type))
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index 73dde6150e..e9094329bd 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -195,6 +195,24 @@ static monsterentry mondata[] = {
MONUSE_NOTHING, MONEAT_NOTHING, SIZE_HUGE
},
+
+// Use this to replace removed monsters, to retain save compatibility.
+// Please put it in #if (TAG_MAJOR_VERSION <= X), so they will go away
+// after save compat is broken.
+#define AXED_MON(id) \
+{ \
+ id, 'X', LIGHTRED, "removed "#id, \
+ M_NO_EXP_GAIN, \
+ MR_NO_FLAGS, \
+ 0, 10, MONS_PROGRAM_BUG, MONS_PROGRAM_BUG, MH_NONLIVING, -3, \
+ { AT_NO_ATK, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, \
+ { 0, 0, 0, 0 }, \
+ 0, 0, MST_NO_SPELLS, CE_CONTAMINATED, Z_NOZOMBIE, S_SILENT, \
+ I_PLANT, HT_LAND, FL_NONE, 0, DEFAULT_ENERGY, \
+ MONUSE_NOTHING, MONEAT_NOTHING, SIZE_HUGE \
+},
+
+
// Real monsters begin here {dlb}:
// insects ('a')
@@ -2635,13 +2653,13 @@ static monsterentry mondata[] = {
},
{
- MONS_GUARDIAN_NAGA, 'N', LIGHTGREEN, "guardian naga",
+ MONS_GUARDIAN_SERPENT, 'N', LIGHTGREEN, "guardian serpent",
M_SPELLCASTER | M_SEE_INVIS | M_ACTUAL_SPELLS | M_WARM_BLOOD | M_SPEAKS,
MR_RES_POISON,
- 350, 10, MONS_NAGA, MONS_GUARDIAN_NAGA, MH_NATURAL, -6,
+ 350, 10, MONS_GUARDIAN_SERPENT, MONS_GUARDIAN_SERPENT, MH_NATURAL, -6,
{ {AT_HIT, AF_PLAIN, 26}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 8, 3, 5, 0 },
- 6, 14, MST_GUARDIAN_NAGA, CE_MUTAGEN_RANDOM, Z_BIG, S_SHOUT,
+ 6, 14, MST_GUARDIAN_SERPENT, CE_MUTAGEN_RANDOM, Z_BIG, S_SHOUT,
I_HIGH, HT_LAND, FL_NONE, 15, DEFAULT_ENERGY,
MONUSE_OPEN_DOORS, MONEAT_NOTHING, SIZE_LARGE
},
@@ -2872,11 +2890,11 @@ static monsterentry mondata[] = {
},
{
- MONS_GREY_SNAKE, 'S', LIGHTGREY, "grey snake",
+ MONS_ANACONDA, 'S', LIGHTGREY, "anaconda",
M_COLD_BLOOD,
MR_NO_FLAGS,
- 600, 10, MONS_SNAKE, MONS_GREY_SNAKE, MH_NATURAL, -3,
- { {AT_BITE, AF_PLAIN, 30}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
+ 600, 10, MONS_SNAKE, MONS_ANACONDA, MH_NATURAL, -3,
+ { {AT_CONSTRICT, AF_CRUSH, 30}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 11, 3, 5, 0 },
4, 16, MST_NO_SPELLS, CE_CLEAN, Z_SMALL, S_HISS,
I_INSECT, HT_LAND, FL_NONE, 18, DEFAULT_ENERGY,
@@ -4173,10 +4191,10 @@ static monsterentry mondata[] = {
{
MONS_STATUE, '8', LIGHTGREY, "statue",
- M_STATIONARY | M_SPEAKS,
+ M_STATIONARY | M_SPEAKS | M_ARCHER,
MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_ELEC,
0, 10, MONS_CLAY_GOLEM, MONS_STATUE, MH_NONLIVING, MAG_IMMUNE,
- { {AT_HIT, AF_WEAP_ONLY, 20}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
+ { {AT_WEAP_ONLY, AF_PLAIN, 20}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 8, 0, 0, 70 },
12, 1, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT,
I_HIGH, HT_LAND, FL_NONE, 10, DEFAULT_ENERGY,
@@ -4584,7 +4602,7 @@ static monsterentry mondata[] = {
M_SPELLCASTER | M_SEE_INVIS | M_WARM_BLOOD | M_SPEAKS
| M_ACTUAL_SPELLS | M_UNIQUE,
MR_RES_POISON,
- 350, 10, MONS_NAGA, MONS_GUARDIAN_NAGA, MH_NATURAL, -6,
+ 350, 10, MONS_GUARDIAN_SERPENT, MONS_GUARDIAN_SERPENT, MH_NATURAL, -6,
{ {AT_HIT, AF_PLAIN, 25}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 14, 0, 0, 142 },
8, 18, MST_AIZUL, CE_MUTAGEN_RANDOM, Z_NOZOMBIE, S_SHOUT,
@@ -4849,7 +4867,7 @@ static monsterentry mondata[] = {
550, 15, MONS_HUMAN, MONS_HUMAN, MH_NATURAL, -5,
{ {AT_HIT, AF_PLAIN, 18}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 11, 0, 0, 90 },
- 0, 9, MST_GUARDIAN_NAGA, CE_CONTAMINATED, Z_NOZOMBIE, S_SHOUT,
+ 0, 9, MST_GUARDIAN_SERPENT, CE_CONTAMINATED, Z_NOZOMBIE, S_SHOUT,
I_NORMAL, HT_LAND, FL_NONE, 10, DEFAULT_ENERGY,
MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM
},
diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc
index 96ff1feef1..1c261102a9 100644
--- a/crawl-ref/source/mon-gear.cc
+++ b/crawl-ref/source/mon-gear.cc
@@ -1204,13 +1204,17 @@ void give_shield(monsters *mon, int level)
void give_armour(monsters *mon, int level)
{
+ item_def item;
item_make_species_type item_race = MAKE_ITEM_RANDOM_RACE;
+ item.base_type = OBJ_UNASSIGNED;
+ item.quantity = 1;
+
int force_colour = 0; // mv: Important!!! Items with force_colour = 0
// are colored by default after following
// switch. Others will get force_colour.
- item_def item;
+ bool force_item = false;
switch (mon->type)
{
@@ -1381,9 +1385,20 @@ void give_armour(monsters *mon, int level)
break;
case MONS_GASTRONOK:
- item_race = MAKE_ITEM_NO_RACE;
- item.base_type = OBJ_ARMOUR;
- item.sub_type = ARM_WIZARD_HAT;
+ if (one_chance_in(10))
+ {
+ force_item = true;
+ make_item_unrandart(item, UNRAND_PONDERING);
+ }
+ else
+ {
+ item_race = MAKE_ITEM_NO_RACE;
+ item.base_type = OBJ_ARMOUR;
+ item.sub_type = ARM_WIZARD_HAT;
+
+ // Not as good as it sounds. Still just +0 a lot of the time.
+ level = MAKE_GOOD_ITEM;
+ }
break;
case MONS_MAURICE:
@@ -1483,10 +1498,14 @@ void give_armour(monsters *mon, int level)
return;
}
+ // Only happens if something in above switch doesn't set it. {dlb}
+ if (item.base_type == OBJ_UNASSIGNED)
+ return;
+
const object_class_type xitc = item.base_type;
const int xitt = item.sub_type;
- if (mons_is_unique(mon->type) && level != MAKE_GOOD_ITEM)
+ if (!force_item && mons_is_unique(mon->type) && level != MAKE_GOOD_ITEM)
{
if (x_chance_in_y(9 + mon->hit_dice, 100))
level = MAKE_GOOD_ITEM;
@@ -1494,17 +1513,33 @@ void give_armour(monsters *mon, int level)
level = level * 2 + 5;
}
- const int thing_created = items(0, xitc, xitt, true, level, item_race);
+ // Note this mess, all the work above doesn't mean much unless
+ // force_item is set... otherwise we're just going to take the base
+ // and subtype and create a new item. - bwr
+ const int thing_created =
+ ((force_item) ? get_item_slot() : items(0, xitc, xitt, true,
+ level, item_race));
if (thing_created == NON_ITEM)
return;
- _give_monster_item(mon, thing_created);
+ // Copy temporary item into the item array if were forcing it, since
+ // items() won't have done it for us.
+ if (force_item)
+ mitm[thing_created] = item;
+
+ item_def &i = mitm[thing_created];
+
+ if (force_item)
+ item_set_appearance(i);
+
+ _give_monster_item(mon, thing_created, force_item);
// mv: All items with force_colour = 0 are colored via items().
if (force_colour)
mitm[thing_created].colour = force_colour;
- switch(mon->type)
+
+ switch (mon->type)
{
case MONS_NIKOLA:
mitm[thing_created].plus2 = TGLOV_DESC_GAUNTLETS;
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc
index 0bc3e5c899..c62e6aaf1c 100644
--- a/crawl-ref/source/mon-info.cc
+++ b/crawl-ref/source/mon-info.cc
@@ -33,7 +33,7 @@ monster_info::monster_info(const monsters *m)
: m_mon(m), m_attitude(ATT_HOSTILE), m_difficulty(0),
m_brands(0), m_fullname(true)
{
- // XXX: this doesn't take into account ENCH_NEUTRAL, but that's probably
+ // XXX: this doesn't take into account ENCH_TEMP_PACIF, but that's probably
// a bug for mons_attitude, not this.
// XXX: also, mons_attitude_type should be sorted hostile/neutral/friendly;
// will break saves a little bit though.
diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc
index 59c27f4e61..84d540d8c8 100644
--- a/crawl-ref/source/mon-pick.cc
+++ b/crawl-ref/source/mon-pick.cc
@@ -222,7 +222,7 @@ bool mons_abyss(int mcls)
case MONS_GREAT_ORB_OF_EYES:
case MONS_GOLDEN_EYE:
case MONS_GREEN_DEATH:
- case MONS_GUARDIAN_NAGA:
+ case MONS_GUARDIAN_SERPENT:
case MONS_HAIRY_DEVIL:
case MONS_HELLION:
case MONS_HELLWING:
@@ -383,7 +383,7 @@ int mons_rare_abyss(int mcls)
case MONS_DEMONIC_CRAWLER:
case MONS_EXECUTIONER:
case MONS_GREEN_DEATH:
- case MONS_GUARDIAN_NAGA:
+ case MONS_GUARDIAN_SERPENT:
case MONS_HAIRY_DEVIL:
case MONS_HELLION:
case MONS_ICE_DEVIL:
@@ -689,7 +689,7 @@ int mons_standard_level(int mcls)
case MONS_BLINK_FROG:
case MONS_BUTTERFLY:
case MONS_GIANT_BLOWFLY:
- case MONS_GUARDIAN_NAGA:
+ case MONS_GUARDIAN_SERPENT:
case MONS_RAKSHASA:
case MONS_SLIME_CREATURE:
case MONS_STONE_GOLEM:
@@ -1091,7 +1091,7 @@ int mons_standard_rare(int mcls)
case MONS_DEEP_ELF_DEMONOLOGIST:
case MONS_DEEP_ELF_PRIEST:
case MONS_DEEP_ELF_SORCERER:
- case MONS_GUARDIAN_NAGA:
+ case MONS_GUARDIAN_SERPENT:
return 3;
case MONS_PULSATING_LUMP:
@@ -1800,7 +1800,7 @@ int mons_pitsnake_level(int mcls)
case MONS_WATER_MOCCASIN:
case MONS_BLACK_MAMBA:
case MONS_VIPER:
- case MONS_GREY_SNAKE:
+ case MONS_ANACONDA:
case MONS_NAGA:
mlev += 2;
break;
@@ -1810,7 +1810,7 @@ int mons_pitsnake_level(int mcls)
mlev += 3;
break;
- case MONS_GUARDIAN_NAGA:
+ case MONS_GUARDIAN_SERPENT:
mlev += 4;
break;
@@ -1844,11 +1844,11 @@ int mons_pitsnake_rare(int mcls)
return 34;
case MONS_VIPER:
- case MONS_GREY_SNAKE:
+ case MONS_ANACONDA:
return 32;
case MONS_GREATER_NAGA:
- case MONS_GUARDIAN_NAGA:
+ case MONS_GUARDIAN_SERPENT:
case MONS_SMALL_SNAKE:
return 15;
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc
index 6629b8acf1..a4273c6a7c 100644
--- a/crawl-ref/source/mon-place.cc
+++ b/crawl-ref/source/mon-place.cc
@@ -1116,6 +1116,17 @@ static int _place_monster_aux(const mgen_data &mg,
int id = mon->mindex();
env.mgrid(fpos) = id;
+ if (mons_is_mimic(mg.cls))
+ {
+ // Mimics who mimic thin air get the axe.
+ if (!give_mimic_item(mon))
+ {
+ mon->reset();
+ mgrd(fpos) = NON_MONSTER;
+ return (-1);
+ }
+ }
+
// Generate a brand shiny new monster, or zombie.
if (mons_class_is_zombified(mg.cls))
_define_zombie(id, mg.base_type, mg.cls, mg.power, fpos);
diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h
index ed5d9ea79e..a5aaa6526b 100644
--- a/crawl-ref/source/mon-spll.h
+++ b/crawl-ref/source/mon-spll.h
@@ -52,7 +52,7 @@
}
},
- { MST_GUARDIAN_NAGA,
+ { MST_GUARDIAN_SERPENT,
{
SPELL_TELEPORT_OTHER,
SPELL_TELEPORT_OTHER,
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc
index afe17384ac..4b869341dc 100644
--- a/crawl-ref/source/mon-stuff.cc
+++ b/crawl-ref/source/mon-stuff.cc
@@ -62,13 +62,14 @@
static bool _wounded_damaged(monster_type mon_type);
-// This function creates an artificial item to represent a mimic's
-// appearance. Eventually, mimics could be redone to be more like
-// dancing weapons: there'd only be one type and it would look like the
-// item it carries. - bwr
-void get_mimic_item( const monsters *mimic, item_def &item )
+int _make_mimic_item(monster_type type)
{
- ASSERT(mimic != NULL && mons_is_mimic( mimic->type));
+ int it = items(0, OBJ_UNASSIGNED, 0, true, 0, 0);
+
+ if (it == NON_ITEM)
+ return NON_ITEM;
+
+ item_def &item = mitm[it];
item.base_type = OBJ_UNASSIGNED;
item.sub_type = 0;
@@ -78,22 +79,16 @@ void get_mimic_item( const monsters *mimic, item_def &item )
item.quantity = 1;
item.plus = 0;
item.plus2 = 0;
- item.pos = mimic->pos();
item.link = NON_ITEM;
- int prop = 127 * mimic->pos().x + 269 * mimic->pos().y;
-
- rng_save_excursion exc;
- seed_rng( prop );
-
- switch (mimic->type)
+ int prop;
+ switch (type)
{
case MONS_WEAPON_MIMIC:
item.base_type = OBJ_WEAPONS;
- item.sub_type = (59 * mimic->pos().x + 79 * mimic->pos().y)
- % (WPN_MAX_NONBLESSED + 1);
+ item.sub_type = random2(WPN_MAX_NONBLESSED + 1);
- prop %= 100;
+ prop = random2(100);
if (prop < 20)
make_item_randart(item);
@@ -111,10 +106,9 @@ void get_mimic_item( const monsters *mimic, item_def &item )
case MONS_ARMOUR_MIMIC:
item.base_type = OBJ_ARMOUR;
- item.sub_type = (59 * mimic->pos().x + 79 * mimic->pos().y)
- % NUM_ARMOURS;
+ item.sub_type = random2(NUM_ARMOURS);
- prop %= 100;
+ prop = random2(100);
if (prop < 20)
make_item_randart(item);
@@ -134,39 +128,55 @@ void get_mimic_item( const monsters *mimic, item_def &item )
case MONS_SCROLL_MIMIC:
item.base_type = OBJ_SCROLLS;
- item.sub_type = prop % NUM_SCROLLS;
+ item.sub_type = random2(NUM_SCROLLS);
break;
case MONS_POTION_MIMIC:
item.base_type = OBJ_POTIONS;
- item.sub_type = prop % NUM_POTIONS;
+ item.sub_type = random2(NUM_POTIONS);
break;
case MONS_GOLD_MIMIC:
default:
item.base_type = OBJ_GOLD;
- item.quantity = 5 + prop % 30;
+ item.quantity = 5 + random2(1000);
break;
}
item_colour(item); // also sets special vals for scrolls/potions
+
+ return (it);
+}
+
+const item_def *give_mimic_item(monsters *mimic)
+{
+ ASSERT(mimic != NULL && mons_is_mimic(mimic->type));
+
+ mimic->destroy_inventory();
+ int it = _make_mimic_item(mimic->type);
+ if (it == NON_ITEM)
+ return 0;
+ if (!mimic->pickup_misc(mitm[it], 0))
+ ASSERT("Mimic failed to pickup its item.");
+ return (&mitm[mimic->inv[MSLOT_MISCELLANY]]);
+}
+
+const item_def &get_mimic_item(const monsters *mimic)
+{
+ ASSERT(mimic != NULL && mons_is_mimic(mimic->type));
+
+ ASSERT(mimic->inv[MSLOT_MISCELLANY] != NON_ITEM);
+
+ return (mitm[mimic->inv[MSLOT_MISCELLANY]]);
}
// Sets the colour of a mimic to match its description... should be called
// whenever a mimic is created or teleported. -- bwr
int get_mimic_colour( const monsters *mimic )
{
- ASSERT( mimic != NULL && mons_is_mimic( mimic->type ) );
+ ASSERT(mimic != NULL);
- if (mimic->type == MONS_SCROLL_MIMIC)
- return (LIGHTGREY);
- else if (mimic->type == MONS_GOLD_MIMIC)
- return (YELLOW);
-
- item_def item;
- get_mimic_item( mimic, item );
-
- return (item.colour);
+ return (get_mimic_item(mimic).colour);
}
// Monster curses a random player inventory item.
@@ -2126,6 +2136,8 @@ int monster_die(monsters *monster, killer_type killer,
{
_elven_twin_died(monster, in_transit);
}
+ else if (mons_is_mimic(monster->type))
+ monster->destroy_inventory();
else if (!monster->is_summoned())
{
if (mons_genus(monster->type) == MONS_MUMMY)
@@ -2483,7 +2495,7 @@ bool monster_polymorph(monsters *monster, monster_type targetc,
mon_enchant abj = monster->get_ench(ENCH_ABJ);
mon_enchant charm = monster->get_ench(ENCH_CHARM);
- mon_enchant neutral = monster->get_ench(ENCH_NEUTRAL);
+ mon_enchant temp_pacif= monster->get_ench(ENCH_TEMP_PACIF);
mon_enchant shifter = monster->get_ench(ENCH_GLOWING_SHAPESHIFTER,
ENCH_SHAPESHIFTER);
mon_enchant sub = monster->get_ench(ENCH_SUBMERGED);
@@ -2528,7 +2540,7 @@ bool monster_polymorph(monsters *monster, monster_type targetc,
monster->add_ench(abj);
monster->add_ench(charm);
- monster->add_ench(neutral);
+ monster->add_ench(temp_pacif);
monster->add_ench(shifter);
monster->add_ench(sub);
monster->add_ench(summon);
@@ -3733,7 +3745,10 @@ void monster_teleport(monsters *monster, bool instan, bool silent)
monster_type old_type = monster->type;
monster->type = static_cast<monster_type>(
MONS_GOLD_MIMIC + random2(5));
+ monster->destroy_inventory();
+ give_mimic_item(monster);
monster->colour = get_mimic_colour(monster);
+ was_seen = false;
// If it's changed form, you won't recognise it.
// This assumes that a non-gold mimic turning into another item of
diff --git a/crawl-ref/source/mon-stuff.h b/crawl-ref/source/mon-stuff.h
index 97acee430f..a3050ac5be 100644
--- a/crawl-ref/source/mon-stuff.h
+++ b/crawl-ref/source/mon-stuff.h
@@ -61,7 +61,8 @@ public:
// for definition of type monsters {dlb}
#include "externs.h"
-void get_mimic_item( const monsters *mimic, item_def & item );
+const item_def *give_mimic_item(monsters *mimic);
+const item_def &get_mimic_item(const monsters *mimic);
int get_mimic_colour( const monsters *mimic );
void alert_nearby_monsters(void);
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index e86602e9c9..9420d1d78c 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1081,14 +1081,6 @@ mon_attack_def mons_attack_spec(const monsters *mon, int attk_number)
attk.flavour = RANDOM_ELEMENT(flavours);
}
- if (attk.flavour == AF_WEAP_ONLY)
- {
- if (mon->inv[MSLOT_WEAPON] != NON_ITEM) // not mon->weapon() !
- attk.flavour = AF_PLAIN;
- else
- return (mon_attack_def::attk(0, AT_NONE));
- }
-
// Slime creature attacks are multiplied by the number merged.
if (mon->type == MONS_SLIME_CREATURE && mon->number > 1)
attk.damage *= mon->number;
@@ -2150,10 +2142,10 @@ void mons_stop_fleeing_from_sanctuary(monsters *monster)
behaviour_event(monster, ME_EVAL, MHITYOU);
}
-void mons_pacify(monsters *mon)
+void mons_pacify(monsters *mon, mon_attitude_type att)
{
// Make the monster permanently neutral.
- mon->attitude = ATT_NEUTRAL;
+ mon->attitude = att;
mon->flags |= MF_WAS_NEUTRAL;
if (!testbits(mon->flags, MF_GOT_HALF_XP) && !mon->is_summoned())
@@ -3231,6 +3223,8 @@ std::string do_mon_str_replacements(const std::string &in_msg,
monster->pronoun(PRONOUN_CAP_POSSESSIVE));
msg = replace_all(msg, "@possessive@",
monster->pronoun(PRONOUN_NOCAP_POSSESSIVE));
+ msg = replace_all(msg, "@objective@",
+ monster->pronoun(PRONOUN_OBJECTIVE));
// Body parts.
bool can_plural = false;
@@ -3526,7 +3520,10 @@ mon_body_shape get_mon_shape(const int type)
case 'M': // mummies
return (MON_SHAPE_HUMANOID);
case 'N': // nagas
- return (MON_SHAPE_NAGA);
+ if (mons_genus(type) == MONS_GUARDIAN_SERPENT)
+ return (MON_SHAPE_SNAKE);
+ else
+ return (MON_SHAPE_NAGA);
case 'O': // ogres
return (MON_SHAPE_HUMANOID);
case 'P': // plants
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h
index a79260d378..b9c5424aee 100644
--- a/crawl-ref/source/mon-util.h
+++ b/crawl-ref/source/mon-util.h
@@ -51,9 +51,12 @@ enum mon_attack_type
AT_TENTACLE_SLAP,
AT_TAIL_SLAP,
AT_GORE,
+ AT_CONSTRICT,
AT_SHOOT, // Attack representing missile damage for M_ARCHER.
- AT_RANDOM // Anything but AT_SHOOT.
+ AT_WEAP_ONLY, // Ranged weap: shoot point-blank like AT_SHOOT, melee weap:
+ // use it, no weapon: stand there doing nothing.
+ AT_RANDOM // Anything but AT_SHOOT and AT_WEAP_ONLY.
};
enum mon_attack_flavour
@@ -86,7 +89,7 @@ enum mon_attack_flavour
AF_CHAOS,
AF_STEAL,
AF_STEAL_FOOD,
- AF_WEAP_ONLY // AF_PLAIN if wielding a weapon, nothing if not
+ AF_CRUSH
};
// Non-spell "summoning" types to give to monsters::mark_summoned(), or
@@ -581,7 +584,7 @@ monster_type random_draconian_monster_species();
void define_monster(int midx);
void define_monster(monsters &mons);
-void mons_pacify(monsters *mon);
+void mons_pacify(monsters *mon, mon_attitude_type att = ATT_GOOD_NEUTRAL);
bool mons_should_fire(struct bolt &beam);
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 19872b3b9a..d31935af61 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -164,8 +164,8 @@ mon_attitude_type monsters::temp_attitude() const
{
if (has_ench(ENCH_CHARM))
return ATT_FRIENDLY;
- else if (has_ench(ENCH_NEUTRAL))
- return ATT_NEUTRAL;
+ else if (has_ench(ENCH_TEMP_PACIF))
+ return ATT_GOOD_NEUTRAL;
else
return attitude;
}
@@ -489,7 +489,7 @@ static int _mons_offhand_weapon_index(const monsters *m)
item_def *monsters::weapon(int which_attack)
{
const mon_attack_def attk = mons_attack_spec(this, which_attack);
- if (attk.type != AT_HIT)
+ if (attk.type != AT_HIT && attk.type != AT_WEAP_ONLY)
return (NULL);
// Even/odd attacks use main/offhand weapon.
@@ -2065,12 +2065,8 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
// Various special cases:
// non-gold mimics, dancing weapons, ghosts, Pan demons
- if (mons_is_mimic(mon.type) && mon.type != MONS_GOLD_MIMIC)
- {
- item_def item;
- get_mimic_item(&mon, item);
- return (item.name(desc));
- }
+ if (mons_is_mimic(mon.type))
+ return (get_mimic_item(&mon).name(desc));
if (mon.type == MONS_DANCING_WEAPON && mon.inv[MSLOT_WEAPON] != NON_ITEM)
{
@@ -2945,14 +2941,14 @@ bool monsters::friendly() const
bool monsters::neutral() const
{
- return (attitude == ATT_NEUTRAL || has_ench(ENCH_NEUTRAL)
+ return (attitude == ATT_NEUTRAL || has_ench(ENCH_TEMP_PACIF)
|| attitude == ATT_GOOD_NEUTRAL
|| attitude == ATT_STRICT_NEUTRAL);
}
bool monsters::good_neutral() const
{
- return (attitude == ATT_GOOD_NEUTRAL);
+ return (attitude == ATT_GOOD_NEUTRAL || has_ench(ENCH_TEMP_PACIF));
}
bool monsters::strict_neutral() const
@@ -4322,9 +4318,11 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet)
behaviour_event(this, ME_EVAL);
break;
- case ENCH_NEUTRAL:
+ case ENCH_TEMP_PACIF:
if (!quiet)
- simple_monster_message(this, " is no longer neutral.");
+ simple_monster_message(this, (" seems to come to "
+ + pronoun(PRONOUN_NOCAP_POSSESSIVE) + " senses.").c_str());
+ // Yeah, this _is_ offensive to Zin, but hey, he deserves it (1KB).
behaviour_event(this, ME_EVAL);
break;
@@ -4613,7 +4611,7 @@ void monsters::timeout_enchantments(int levels)
case ENCH_INVIS: case ENCH_CHARM: case ENCH_SLEEP_WARY:
case ENCH_SICK: case ENCH_SLEEPY: case ENCH_PARALYSIS:
case ENCH_PETRIFYING: case ENCH_PETRIFIED: case ENCH_SWIFT:
- case ENCH_BATTLE_FRENZY: case ENCH_NEUTRAL:
+ case ENCH_BATTLE_FRENZY: case ENCH_TEMP_PACIF:
case ENCH_LOWERED_MR: case ENCH_SOUL_RIPE:
lose_ench_levels(i->second, levels);
break;
@@ -4750,7 +4748,7 @@ void monsters::apply_enchantment(const mon_enchant &me)
case ENCH_MIGHT:
case ENCH_FEAR:
case ENCH_PARALYSIS:
- case ENCH_NEUTRAL:
+ case ENCH_TEMP_PACIF:
case ENCH_PETRIFYING:
case ENCH_PETRIFIED:
case ENCH_SICK:
@@ -5365,6 +5363,9 @@ bool monsters::can_go_berserk() const
if (holiness() != MH_NATURAL || type == MONS_KRAKEN_TENTACLE)
return (false);
+ if (mons_intel(this) == I_PLANT)
+ return (false);
+
if (berserk() || has_ench(ENCH_FATIGUE))
return (false);
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index a8de02db3f..4c01425f4d 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -2624,7 +2624,7 @@ std::string mutation_name(mutation_type mut, int level, bool colour)
{
const bool fully_active = mutation_is_fully_active(mut);
const bool fully_inactive =
- (!fully_active) && _mutation_is_fully_inactive(mut);
+ (!fully_active && _mutation_is_fully_inactive(mut));
// level == -1 means default action of current level
if (level == -1)
@@ -2677,7 +2677,7 @@ std::string mutation_name(mutation_type mut, int level, bool colour)
else if (result.empty() && level > 0)
result = mdef.have[level - 1];
- if (fully_inactive)
+ if (fully_inactive || player_mutation_level(mut) < you.mutation[mut])
{
result = "(" + result;
result += ")";
@@ -2686,7 +2686,7 @@ std::string mutation_name(mutation_type mut, int level, bool colour)
if (colour)
{
const char* colourname = "lightgrey"; // the default
- const bool permanent = (you.demon_pow[mut] > 0);
+ const bool permanent = (you.demon_pow[mut] > 0);
if (innate)
colourname = (level > 0 ? "cyan" : "lightblue");
else if (permanent)
@@ -2703,6 +2703,8 @@ std::string mutation_name(mutation_type mut, int level, bool colour)
else
colourname = demonspawn ? "red" : "lightblue";
}
+ else if (fully_inactive)
+ colourname = "darkgrey";
// Build the result
std::ostringstream ostr;
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 6513cc0b17..ccad9bd3d9 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -848,10 +848,9 @@ static bool _need_stats_printed()
static short _get_exp_pool_colour(int pool)
{
- int cutoff = you.exp_pool_cutoff();
- if (pool < cutoff*3/4)
+ if (pool < MAX_EXP_POOL/2)
return (HUD_VALUE_COLOUR);
- else if (pool < cutoff)
+ else if (pool < MAX_EXP_POOL*3/4)
return (YELLOW);
else
return (RED);
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 3f01f0b354..733759432c 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -68,9 +68,37 @@
#include "view.h"
#include "shout.h"
#include "viewgeom.h"
-#include "tiles.h"
#include "xom.h"
+#ifdef USE_TILE
+#include "tiles.h"
+#include "tiledef-player.h"
+
+dolls_data::dolls_data()
+{
+ parts = new int[TILEP_PART_MAX];
+ memset(parts, 0, TILEP_PART_MAX * sizeof(int));
+}
+
+dolls_data::dolls_data(const dolls_data& _orig)
+{
+ parts = new int[TILEP_PART_MAX];
+ memcpy(parts, _orig.parts, TILEP_PART_MAX * sizeof(int));
+}
+
+const dolls_data& dolls_data::operator=(const dolls_data& other)
+{
+ memcpy(parts, other.parts, TILEP_PART_MAX * sizeof(int));
+ return (*this);
+}
+
+dolls_data::~dolls_data()
+{
+ delete[] parts;
+ parts = NULL;
+}
+#endif
+
std::string pronoun_you(description_level_type desc)
{
switch (desc)
@@ -2466,21 +2494,6 @@ void forget_map(unsigned char chance_forgotten, bool force)
#endif
}
-int player::exp_pool_cutoff() const
-{
- int total = std::max(total_skill_points, skill_cost_needed(2));
- // total = std::min(total, skill_cost_needed(27));
- return (total / 3);
-}
-
-void player::step_down_exp_pool()
-{
- int cutoff = you.exp_pool_cutoff();
- int step = cutoff/4;
- you.exp_available = stepdown_value(you.exp_available,
- cutoff, step, 3*step, 4*step);
-}
-
void gain_exp( unsigned int exp_gained, unsigned int* actual_gain,
unsigned int* actual_avail_gain)
{
@@ -2493,7 +2506,11 @@ 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 (you.experience + exp_gained > MAX_EXP_TOTAL)
+#if DEBUG_DIAGNOSTICS
+ mprf(MSGCH_DIAGNOSTICS, "gain_exp: %d", exp_gained );
+#endif
+
+ if (you.experience + exp_gained > (unsigned int)MAX_EXP_TOTAL)
you.experience = MAX_EXP_TOTAL;
else
you.experience += exp_gained;
@@ -2508,13 +2525,10 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain,
exp_gained /= 2;
}
- you.exp_available += exp_gained;
- you.step_down_exp_pool();
-
-#if DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "gain_exp: %d of %d",
- you.exp_available - old_avail, exp_gained);
-#endif
+ if (you.exp_available + exp_gained > (unsigned int)MAX_EXP_POOL)
+ you.exp_available = MAX_EXP_POOL;
+ else
+ you.exp_available += exp_gained;
level_change();
@@ -3819,8 +3833,7 @@ int player_mental_clarity(bool calc_unid, bool items)
int player_spirit_shield(bool calc_unid)
{
return player_equip(EQ_AMULET, AMU_GUARDIAN_SPIRIT, calc_unid)
- + player_equip_ego_type(EQ_HELMET, SPARM_SPIRIT_SHIELD)
- + scan_artefacts(ARTP_SPIRIT_SHIELD);
+ + player_equip_ego_type(EQ_HELMET, SPARM_SPIRIT_SHIELD);
}
// Returns whether the player has the effect of the amulet from a
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index 8acd5577fb..aebace1a3e 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -15,16 +15,14 @@
#include <vector>
#ifdef USE_TILE
-// This used to be in tiles.h. (jpeg)
-#include "tiledef-main.h"
-#include "tiledef-dngn.h"
-#include "tiledef-player.h"
-
struct dolls_data
{
- dolls_data() { memset(parts, 0, sizeof(parts)); }
+ dolls_data();
+ dolls_data(const dolls_data& orig);
+ const dolls_data& operator=(const dolls_data& other);
+ ~dolls_data();
- int parts[TILEP_PART_MAX];
+ int *parts;
};
#endif
@@ -539,10 +537,7 @@ public:
void set_duration(duration_type dur, int turns, int cap = 0,
const char *msg = NULL);
- // How large can the experience pool grow without loss?
- int exp_pool_cutoff() const;
- // Step down experience above cutoff.
- void step_down_exp_pool();
+
protected:
void _removed_beholder();
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 3aa2db88ff..3a2a86b920 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -5573,7 +5573,15 @@ int get_tension(god_type god, bool count_travelling)
tension /= div;
if (you.level_type == LEVEL_ABYSS)
- tension = std::max(2, tension);
+ {
+ if (tension < 2)
+ tension = 2;
+ else
+ {
+ tension *= 3;
+ tension /= 2;
+ }
+ }
if (you.cannot_act())
{
diff --git a/crawl-ref/source/rltiles/UNUSED/monsters/giant_leech.png b/crawl-ref/source/rltiles/UNUSED/monsters/giant_leech.png
new file mode 100644
index 0000000000..7bb57ead17
--- /dev/null
+++ b/crawl-ref/source/rltiles/UNUSED/monsters/giant_leech.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon/guardian_naga.png b/crawl-ref/source/rltiles/UNUSED/monsters/guardian_naga.png
index aa7aed8e08..aa7aed8e08 100644
--- a/crawl-ref/source/rltiles/dc-mon/guardian_naga.png
+++ b/crawl-ref/source/rltiles/UNUSED/monsters/guardian_naga.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/UNUSED/monsters/naga_warrior_unique.png b/crawl-ref/source/rltiles/UNUSED/monsters/naga_warrior_unique.png
new file mode 100644
index 0000000000..dc580c3c57
--- /dev/null
+++ b/crawl-ref/source/rltiles/UNUSED/monsters/naga_warrior_unique.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-corpse.txt b/crawl-ref/source/rltiles/dc-corpse.txt
index 14b7bf8b06..f947bf65b0 100644
--- a/crawl-ref/source/rltiles/dc-corpse.txt
+++ b/crawl-ref/source/rltiles/dc-corpse.txt
@@ -107,7 +107,7 @@ small_snake CORPSE_SMALL_SNAKE
snake CORPSE_SNAKE
black_mamba CORPSE_BLACK_MAMBA
water_moccasin CORPSE_WATER_MOCCASIN
-grey_snake CORPSE_GREY_SNAKE
+anaconda CORPSE_ANACONDA
viper CORPSE_VIPER
## Bears ('U')
@@ -224,7 +224,7 @@ big_kobold CORPSE_BIG_KOBOLD
## Nagas ('N')
naga CORPSE_NAGA
-guardian_naga CORPSE_GUARDIAN_NAGA
+guardian_serpent CORPSE_GUARDIAN_SERPENT
## Ogres ('O')
ogre CORPSE_OGRE
diff --git a/crawl-ref/source/rltiles/dc-misc.txt b/crawl-ref/source/rltiles/dc-misc.txt
index 082d35c8a0..653b614435 100644
--- a/crawl-ref/source/rltiles/dc-misc.txt
+++ b/crawl-ref/source/rltiles/dc-misc.txt
@@ -24,6 +24,17 @@ cloud_blue_smoke CLOUD_BLUE_SMOKE
cloud_grey_smoke CLOUD_GREY_SMOKE
cloud_miasma CLOUD_MIASMA
cloud_tloc_energy CLOUD_TLOC_ENERGY
+cloud_mutagenic_small1 CLOUD_MUTAGENIC_0
+cloud_mutagenic_small2
+cloud_mutagenic_medium1 CLOUD_MUTAGENIC_1
+cloud_mutagenic_medium2
+cloud_mutagenic_large1 CLOUD_MUTAGENIC_2
+cloud_mutagenic_large2
+cloud_mutagenic_large3
+cloud_mutagenic_large4
+cloud_rain1 CLOUD_RAIN
+cloud_rain2
+cloud_grey_smoke CLOUD_MIST
#########MAP
%sdir dc-misc
diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt
index 0b1d2f1a80..b162e9ad2a 100644
--- a/crawl-ref/source/rltiles/dc-mon.txt
+++ b/crawl-ref/source/rltiles/dc-mon.txt
@@ -129,7 +129,7 @@ small_snake MONS_SMALL_SNAKE
snake MONS_SNAKE
black_mamba MONS_BLACK_MAMBA
water_moccasin MONS_WATER_MOCCASIN
-grey_snake MONS_GREY_SNAKE
+anaconda MONS_ANACONDA
lava_snake MONS_LAVA_SNAKE
viper MONS_VIPER
salamander MONS_SALAMANDER
@@ -309,6 +309,7 @@ kirke MONS_KIRKE
louise MONS_LOUISE
margery MONS_MARGERY
maud MONS_MAUD
+maurice MONS_MAURICE
norbert MONS_NORBERT
norris MONS_NORRIS
psyche MONS_PSYCHE
@@ -438,11 +439,14 @@ greater_mummy MONS_GREATER_MUMMY
mummy_priest MONS_MUMMY_PRIEST
## Nagas ('N')
+%sdir dc-mon/unique
+aizul MONS_AIZUL
+%sdir dc-mon
naga MONS_NAGA
-guardian_naga MONS_GUARDIAN_NAGA
naga_mage MONS_NAGA_MAGE
naga_warrior MONS_NAGA_WARRIOR
greater_naga MONS_GREATER_NAGA
+guardian_serpent MONS_GUARDIAN_SERPENT
## Ogres ('O')
%sdir dc-mon/unique
@@ -528,6 +532,7 @@ wandering_mushroom MONS_WANDERING_MUSHROOM
## Goblins ('g')
%sdir dc-mon/unique
ijyb MONS_IJYB
+crazy_yiuf MONS_CRAZY_YIUF
grum MONS_GRUM
%sdir dc-mon
goblin MONS_GOBLIN
@@ -636,3 +641,6 @@ lich TRAN_LICH
dc-misc/unseen_monster MONS_UNKNOWN
dc-misc/unseen_monster MCACHE_START
+%sdir dc-misc
+todo TODO
+error ERROR
diff --git a/crawl-ref/source/rltiles/dc-mon/animals/grey_snake.png b/crawl-ref/source/rltiles/dc-mon/animals/anaconda.png
index 2da9df3b93..2da9df3b93 100644
--- a/crawl-ref/source/rltiles/dc-mon/animals/grey_snake.png
+++ b/crawl-ref/source/rltiles/dc-mon/animals/anaconda.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon/animals/giant_leech.png b/crawl-ref/source/rltiles/dc-mon/animals/giant_leech.png
index 7bb57ead17..fd886aecbc 100644
--- a/crawl-ref/source/rltiles/dc-mon/animals/giant_leech.png
+++ b/crawl-ref/source/rltiles/dc-mon/animals/giant_leech.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon/guardian_serpent.png b/crawl-ref/source/rltiles/dc-mon/guardian_serpent.png
new file mode 100644
index 0000000000..dcddb5e2e9
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-mon/guardian_serpent.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon/unique/aizul.png b/crawl-ref/source/rltiles/dc-mon/unique/aizul.png
new file mode 100644
index 0000000000..89098d2f68
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-mon/unique/aizul.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon/unique/crazy_yiuf.png b/crawl-ref/source/rltiles/dc-mon/unique/crazy_yiuf.png
new file mode 100644
index 0000000000..4f2ea63dd9
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-mon/unique/crazy_yiuf.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon/unique/maurice.png b/crawl-ref/source/rltiles/dc-mon/unique/maurice.png
new file mode 100644
index 0000000000..284ad4645c
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-mon/unique/maurice.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-player.txt b/crawl-ref/source/rltiles/dc-player.txt
index 2cfc521901..7118b954a2 100644
--- a/crawl-ref/source/rltiles/dc-player.txt
+++ b/crawl-ref/source/rltiles/dc-player.txt
@@ -6,7 +6,6 @@
%include dc-mon.txt
effect/net_trap TRAP_NET
-dc-misc/error ERROR
dc-misc/cursor CURSOR
%rim 1
diff --git a/crawl-ref/source/rltiles/dc-unrand.txt b/crawl-ref/source/rltiles/dc-unrand.txt
index 82f5f3bafc..37c833f358 100644
--- a/crawl-ref/source/rltiles/dc-unrand.txt
+++ b/crawl-ref/source/rltiles/dc-unrand.txt
@@ -28,6 +28,7 @@ urand_starlight UNRAND_STARLIGHT
urand_ratskin_cloak UNRAND_RATSKIN_CLOAK
urand_gong UNRAND_GONG
urand_clouds UNRAND_RCLOUDS
+urand_pondering UNRAND_PONDERING
%sdir item/weapon/artefact
spwpn_singing_sword UNRAND_SINGING_SWORD
diff --git a/crawl-ref/source/rltiles/effect/cloud_mutagenic_large1.png b/crawl-ref/source/rltiles/effect/cloud_mutagenic_large1.png
new file mode 100644
index 0000000000..4981568033
--- /dev/null
+++ b/crawl-ref/source/rltiles/effect/cloud_mutagenic_large1.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/effect/cloud_mutagenic_large2.png b/crawl-ref/source/rltiles/effect/cloud_mutagenic_large2.png
new file mode 100644
index 0000000000..dd8be346e9
--- /dev/null
+++ b/crawl-ref/source/rltiles/effect/cloud_mutagenic_large2.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/effect/cloud_mutagenic_large3.png b/crawl-ref/source/rltiles/effect/cloud_mutagenic_large3.png
new file mode 100644
index 0000000000..3ccb9310c4
--- /dev/null
+++ b/crawl-ref/source/rltiles/effect/cloud_mutagenic_large3.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/effect/cloud_mutagenic_large4.png b/crawl-ref/source/rltiles/effect/cloud_mutagenic_large4.png
new file mode 100644
index 0000000000..84c4361773
--- /dev/null
+++ b/crawl-ref/source/rltiles/effect/cloud_mutagenic_large4.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/effect/cloud_mutagenic_medium1.png b/crawl-ref/source/rltiles/effect/cloud_mutagenic_medium1.png
new file mode 100644
index 0000000000..270ac1fe87
--- /dev/null
+++ b/crawl-ref/source/rltiles/effect/cloud_mutagenic_medium1.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/effect/cloud_mutagenic_medium2.png b/crawl-ref/source/rltiles/effect/cloud_mutagenic_medium2.png
new file mode 100644
index 0000000000..0eab442177
--- /dev/null
+++ b/crawl-ref/source/rltiles/effect/cloud_mutagenic_medium2.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/effect/cloud_mutagenic_small1.png b/crawl-ref/source/rltiles/effect/cloud_mutagenic_small1.png
new file mode 100644
index 0000000000..84581c10ca
--- /dev/null
+++ b/crawl-ref/source/rltiles/effect/cloud_mutagenic_small1.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/effect/cloud_mutagenic_small2.png b/crawl-ref/source/rltiles/effect/cloud_mutagenic_small2.png
new file mode 100644
index 0000000000..3ca327c057
--- /dev/null
+++ b/crawl-ref/source/rltiles/effect/cloud_mutagenic_small2.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/effect/cloud_rain1.png b/crawl-ref/source/rltiles/effect/cloud_rain1.png
new file mode 100644
index 0000000000..58a2e0970f
--- /dev/null
+++ b/crawl-ref/source/rltiles/effect/cloud_rain1.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/effect/cloud_rain2.png b/crawl-ref/source/rltiles/effect/cloud_rain2.png
new file mode 100644
index 0000000000..b4086d81a7
--- /dev/null
+++ b/crawl-ref/source/rltiles/effect/cloud_rain2.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/item/armour/artefact/urand_pondering.png b/crawl-ref/source/rltiles/item/armour/artefact/urand_pondering.png
new file mode 100644
index 0000000000..2112c795bf
--- /dev/null
+++ b/crawl-ref/source/rltiles/item/armour/artefact/urand_pondering.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/tiledef-unrand.cc b/crawl-ref/source/rltiles/tiledef-unrand.cc
index d94fb597a4..fc02792ad8 100644
--- a/crawl-ref/source/rltiles/tiledef-unrand.cc
+++ b/crawl-ref/source/rltiles/tiledef-unrand.cc
@@ -94,6 +94,7 @@ int unrandart_to_tile(int unrand)
case UNRAND_MAGE: return TILE_UNRAND_MAGE;
case UNRAND_SHIELDING: return TILE_UNRAND_SHIELDING;
case UNRAND_RCLOUDS: return TILE_UNRAND_RCLOUDS;
+ case UNRAND_PONDERING: return TILE_UNRAND_PONDERING;
default: return -1;
}
}
@@ -179,6 +180,7 @@ int unrandart_to_doll_tile(int unrand)
case UNRAND_BEAR_SPIRIT: return TILEP_HELM_BEAR;
case UNRAND_DRAGONMASK: return TILEP_HELM_ART_DRAGONHELM;
case UNRAND_ALCHEMIST: return TILEP_HELM_TURBAN_PURPLE;
+ case UNRAND_PONDERING: return TILEP_HELM_WIZARD_BLUEGREEN;
default: return -1;
}
}
diff --git a/crawl-ref/source/rng.cc b/crawl-ref/source/rng.cc
index 8c856e7229..4b7200093c 100644
--- a/crawl-ref/source/rng.cc
+++ b/crawl-ref/source/rng.cc
@@ -29,6 +29,12 @@ void seed_rng(unsigned long* seed_key, size_t num_keys)
// MT19937 -- see mt19937ar.cc for details/licence
init_by_array(seed_key, num_keys);
+ // Reset the sha256 generator to get predictable random numbers in case
+ // of a saved rng state.
+#ifdef MORE_HARDENED_PRNG
+ reset_sha256_state();
+#endif
+
// for std::random_shuffle()
srand(seed_key[0]);
}
@@ -38,6 +44,12 @@ void seed_rng(long seed)
// MT19937 -- see mt19937ar.cc for details/licence
init_genrand(seed);
+ // Reset the sha256 generator to get predictable random numbers in case
+ // of a saved rng state.
+#ifdef MORE_HARDENED_PRNG
+ reset_sha256_state();
+#endif
+
// for std::random_shuffle()
srand(seed);
}
@@ -87,11 +99,19 @@ unsigned long random_int( void )
void push_rng_state()
{
+#ifndef MORE_HARDENED_PRNG
push_mt_state();
+#else
+ push_sha256_state();
+#endif
}
void pop_rng_state()
{
+#ifndef MORE_HARDENED_PRNG
pop_mt_state();
+#else
+ pop_sha256_state();
+#endif
}
diff --git a/crawl-ref/source/sha256.cc b/crawl-ref/source/sha256.cc
index a36d316d92..96443587a0 100644
--- a/crawl-ref/source/sha256.cc
+++ b/crawl-ref/source/sha256.cc
@@ -11,12 +11,13 @@
#include <stdint.h>
typedef uint32_t u32;
-typedef uint64_t u64;
#include "mt19937ar.h"
#ifdef MORE_HARDENED_PRNG
+#include <stack>
+
#include <cstring>
#include <cstdio>
#include <cstdlib>
@@ -137,12 +138,50 @@ void sha256chunk(const char* chunk, sha256state* ss)
}
}
-// 256 bits
-u32 mt_sha256_block[8], mt_block[8];
-u32 mt_block_index = 0;
+struct sha256mt_state
+{
+ // 256 bits
+ u32 mt_sha256_block[8], mt_block[8];
+ u32 mt_block_index;
+
+ sha256mt_state()
+ {
+ mt_block_index = 0;
+ }
+};
+
+sha256mt_state effective_state;
+
+std::stack<sha256mt_state> sha256mt_state_stack;
+
+void reset_sha256_state()
+{
+ effective_state.mt_block_index = 0;
+}
+
+void push_sha256_state()
+{
+ sha256mt_state_stack.push(effective_state);
+ push_mt_state();
+}
+
+void pop_sha256_state()
+{
+ if (sha256mt_state_stack.empty())
+ return;
+
+ effective_state = sha256mt_state_stack.top();
+
+ sha256mt_state_stack.pop();
+ pop_mt_state();
+}
unsigned long sha256_genrand()
{
+ u32 &mt_block_index = effective_state.mt_block_index;
+ u32 *mt_sha256_block = effective_state.mt_sha256_block;
+ u32 *mt_block = effective_state.mt_block;
+
// Needs some hashing
if (!(mt_block_index % 8))
{
@@ -166,7 +205,21 @@ unsigned long sha256_genrand()
return mt_sha256_block[mt_block_index++];
}
#else // MORE_HARDENED_PRNG
-// Stub this to MT function
+// Stub these to MT functions
+void push_sha256_state()
+{
+ push_mt_state();
+}
+
+void pop_sha256_state()
+{
+ pop_mt_state();
+}
+
+void reset_sha256_state()
+{
+}
+
unsigned long sha256_genrand()
{
return genrand_int32();
diff --git a/crawl-ref/source/sha256.h b/crawl-ref/source/sha256.h
index 44986adc6b..6ddbb0a0c6 100644
--- a/crawl-ref/source/sha256.h
+++ b/crawl-ref/source/sha256.h
@@ -2,6 +2,10 @@
#define sha256_h
unsigned long sha256_genrand();
+void push_sha256_state();
+void pop_sha256_state();
+
+void reset_sha256_state();
#endif
diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc
index 0d12f7f0ad..8205d55b99 100644
--- a/crawl-ref/source/show.cc
+++ b/crawl-ref/source/show.cc
@@ -218,19 +218,19 @@ static show_item_type _item_to_show_code(const item_def &item)
void show_def::_update_item_at(const coord_def &gp, const coord_def &ep)
{
- item_def eitem;
+ const item_def *eitem;
// Check for mimics.
const monsters* m = monster_at(gp);
if (m && mons_is_unknown_mimic(m))
- get_mimic_item(m, eitem);
+ eitem = &get_mimic_item(m);
else if (igrd(gp) != NON_ITEM)
- eitem = mitm[igrd(gp)];
+ eitem = &mitm[igrd(gp)];
else
return;
unsigned short &ecol = grid(ep).colour;
- glyph g = get_item_glyph(&eitem);
+ glyph g = get_item_glyph(eitem);
const dungeon_feature_type feat = grd(gp);
if (Options.feature_item_brand && is_critical_feature(feat))
@@ -242,10 +242,13 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep)
const unsigned short gcol = env.grid_colours(gp);
ecol = (feat == DNGN_SHALLOW_WATER) ?
(gcol != BLACK ? gcol : CYAN) : g.col;
- if (eitem.link != NON_ITEM && !crawl_state.arena)
+ // monster(mimic)-owned items have link = NON_ITEM+1+midx
+ if (eitem->link > NON_ITEM && igrd(gp) != NON_ITEM)
+ ecol |= COLFLAG_ITEM_HEAP;
+ else if (eitem->link < NON_ITEM && !crawl_state.arena)
ecol |= COLFLAG_ITEM_HEAP;
grid(ep).cls = SH_ITEM;
- grid(ep).item = _item_to_show_code(eitem);
+ grid(ep).item = _item_to_show_code(*eitem);
}
#ifdef USE_TILE
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index c9c0c0046e..534220621d 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -2178,3 +2178,24 @@ bool is_invalid_skill(int skill)
return (false);
}
+
+void dump_skills(std::string &text)
+{
+ char tmp_quant[20];
+ for (unsigned char i = 0; i < 50; i++)
+ {
+ if (you.skills[i] > 0)
+ {
+ text += ( (you.skills[i] == 27) ? " * " :
+ (you.practise_skill[i]) ? " + "
+ : " - " );
+
+ text += "Level ";
+ itoa( you.skills[i], tmp_quant, 10 );
+ text += tmp_quant;
+ text += " ";
+ text += skill_name(i);
+ text += "\n";
+ }
+ }
+}
diff --git a/crawl-ref/source/skills2.h b/crawl-ref/source/skills2.h
index c7daf44be8..361acace5b 100644
--- a/crawl-ref/source/skills2.h
+++ b/crawl-ref/source/skills2.h
@@ -33,5 +33,6 @@ unsigned int skill_exp_needed(int lev);
void show_skills();
void wield_warning(bool newWeapon = true);
bool is_invalid_skill(int skill);
+void dump_skills(std::string &text);
#endif
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index c1d4b40057..af80900803 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -839,7 +839,7 @@ static int _healing_spell(int healed, bool divine_ability,
else
{
simple_monster_message(monster, " turns neutral.");
- mons_pacify(monster);
+ mons_pacify(monster, ATT_NEUTRAL);
// Give a small piety return.
if (pgain > 0)
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 7287a9694c..0e3dcb1aea 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -48,7 +48,10 @@
#include "religion.h"
#include "stuff.h"
#include "teleport.h"
+#ifdef USE_TILE
#include "tiles.h"
+#include "tiledef-main.h"
+#endif
#include "terrain.h"
#include "traps.h"
#include "view.h"
@@ -1151,7 +1154,7 @@ bool cast_sticks_to_snakes(int pow, god_type god)
mon = MONS_BLACK_MAMBA;
if (pow > 90 && one_chance_in(3))
- mon = MONS_GREY_SNAKE;
+ mon = MONS_ANACONDA;
if (create_monster(
mgen_data(mon, beha, &you,
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 480730e6f9..d774db49e2 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -22,6 +22,7 @@
#include "branch.h"
#include "cloud.h"
#include "coordit.h"
+#include "database.h"
#include "directn.h"
#include "debug.h"
#include "delay.h"
@@ -588,11 +589,12 @@ bool cast_shadow_creatures(god_type god)
bool cast_summon_horrible_things(int pow, god_type god)
{
- if (one_chance_in(3)
- && !lose_stat(STAT_INTELLIGENCE, 1, true, "summoning horrible things"))
+ if (one_chance_in(3))
{
- canned_msg(MSG_NOTHING_HAPPENS);
- return (false);
+ // if someone deletes the db, no message is ok
+ mpr(getMiscString("SHT_int_loss").c_str());
+ lose_stat(STAT_INTELLIGENCE, 1, true, "summoning horrible things");
+ // Since sustAbil no longer helps here, this can't fail anymore -- 1KB
}
int how_many_small =
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index c69bdce331..f5f89f44b6 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -2467,6 +2467,9 @@ static bool _get_weighted_discs(bool completely_random, god_type god,
for (int i = 0; i < SPTYP_LAST_EXPONENT; i++)
{
int disc = 1 << i;
+ if (disc & SPTYP_DIVINATION)
+ continue;
+
if (god_dislikes_spell_discipline(disc, god))
continue;
@@ -3052,8 +3055,9 @@ bool make_book_theme_randart(item_def &book, int disc1, int disc2,
set_artefact_name(book, name);
- book.plus = disc1;
- book.plus2 = disc2;
+ // Save primary/secondary disciplines back into the book.
+ book.plus = max1;
+ book.plus2 = max2;
return (true);
}
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc
index 9eb534b0ff..cb3a461b61 100644
--- a/crawl-ref/source/stash.cc
+++ b/crawl-ref/source/stash.cc
@@ -380,21 +380,16 @@ void Stash::update()
// There's something on this square. Take a squint at it.
const item_def *pitem;
- item_def mimic_item;
if (_grid_has_mimic_item(p))
- {
- get_mimic_item(monster_at(p), mimic_item);
- pitem = &mimic_item;
- }
+ pitem = &get_mimic_item(monster_at(p));
else
{
pitem = &mitm[igrd(p)];
+ tutorial_first_item(*pitem);
}
const item_def& item = *pitem;
- tutorial_first_item(item);
-
if (!_grid_has_perceived_multiple_items(p))
items.clear();
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 37396402f3..f0d1707dd6 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1388,12 +1388,7 @@ static void tag_read_you(reader &th, char minorVersion)
you.entry_cause = static_cast<entry_cause_type>( unmarshallByte(th) );
you.entry_cause_god = static_cast<god_type>( unmarshallByte(th) );
- if (minorVersion < TAG_MINOR_SYNCH_TIME)
- unmarshallByte(th);
- if (minorVersion >= TAG_MINOR_DISEASE)
- you.disease = unmarshallLong(th);
- else
- you.disease = unmarshallByte(th);
+ you.disease = unmarshallLong(th);
you.species = static_cast<species_type>(unmarshallByte(th));
you.hp = unmarshallShort(th);
@@ -1905,30 +1900,9 @@ show_type unmarshallShowtype(reader &th)
{
show_type obj;
obj.cls = static_cast<show_class>(unmarshallByte(th));
- if (th.getMinorVersion() < TAG_MINOR_SHOWTYPE_EXTENDED)
- {
- unsigned short d = unmarshallShort(th);
- switch (obj.cls)
- {
- case SH_FEATURE:
- obj.feat = static_cast<dungeon_feature_type>(d);
- break;
- case SH_ITEM:
- obj.item = static_cast<show_item_type>(d);
- break;
- case SH_MONSTER:
- obj.mons = static_cast<monster_type>(d);
- break;
- default:
- break;
- }
- }
- else
- {
- obj.feat = static_cast<dungeon_feature_type>(unmarshallShort(th));
- obj.item = static_cast<show_item_type>(unmarshallShort(th));
- obj.mons = static_cast<monster_type>(unmarshallShort(th));
- }
+ obj.feat = static_cast<dungeon_feature_type>(unmarshallShort(th));
+ obj.item = static_cast<show_item_type>(unmarshallShort(th));
+ obj.mons = static_cast<monster_type>(unmarshallShort(th));
obj.colour = unmarshallShort(th);
return (obj);
}
@@ -2199,8 +2173,6 @@ static void tag_read_level( reader &th, char minorVersion )
static_cast<unsigned char>(unmarshallByte(th)) );
env.map_knowledge[i][j].object = unmarshallShowtype(th);
- if (minorVersion < TAG_MINOR_MAPCELL_NOCOLOUR)
- unmarshallShort(th);
env.map_knowledge[i][j].flags = unmarshallShort(th);
env.pgrid[i][j] = unmarshallLong(th);
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h
index a700eb50ac..33cc24396a 100644
--- a/crawl-ref/source/tags.h
+++ b/crawl-ref/source/tags.h
@@ -40,18 +40,14 @@ enum tag_file_type // file types supported by tag system
enum tag_major_version
{
TAG_MAJOR_START = 5,
- TAG_MAJOR_VERSION = 9
+ TAG_MAJOR_VERSION = 10
};
// Minor version will be reset to zero when major version changes.
enum tag_minor_version
{
TAG_MINOR_RESET = 0, // Minor tags were reset
- TAG_MINOR_DISEASE = 1, // you.disease changed to an integer
- TAG_MINOR_MAPCELL_NOCOLOUR = 2, // map_cell::colour removed
- TAG_MINOR_SHOWTYPE_EXTENDED = 3, // map_cell::object stores more data
- TAG_MINOR_SYNCH_TIME = 4, // player::synch_time removed
- TAG_MINOR_VERSION = 4 // Current version. (Keep equal to max.)
+ TAG_MINOR_VERSION = 0 // Current version. (Keep equal to max.)
};
struct enum_info
diff --git a/crawl-ref/source/tile2.cc b/crawl-ref/source/tile2.cc
index 801cba1437..62f6955812 100644
--- a/crawl-ref/source/tile2.cc
+++ b/crawl-ref/source/tile2.cc
@@ -16,6 +16,8 @@
#include "player.h"
#include "stuff.h"
#include "tiles.h"
+#include "tiledef-dngn.h"
+#include "tiledef-player.h"
void tile_default_flv(level_area_type lev, branch_type br, tile_flavour &flv)
{
diff --git a/crawl-ref/source/tilemcache.cc b/crawl-ref/source/tilemcache.cc
index cb4a77fe0f..2a6ff9f6f8 100644
--- a/crawl-ref/source/tilemcache.cc
+++ b/crawl-ref/source/tilemcache.cc
@@ -8,6 +8,8 @@
#include "ghost.h"
#include "mon-util.h"
+#include "tiledef-player.h"
+
mcache_manager mcache;
// Used internally for streaming.
@@ -404,7 +406,7 @@ bool mcache_monster::get_weapon_offset(int mon_tile, int &ofs_x, int &ofs_y)
case TILEP_MONS_NAGA:
case TILEP_MONS_GREATER_NAGA:
case TILEP_MONS_NAGA_WARRIOR:
- case TILEP_MONS_GUARDIAN_NAGA:
+ case TILEP_MONS_GUARDIAN_SERPENT:
case TILEP_MONS_NAGA_MAGE:
ofs_x = 0;
ofs_y = 1;
@@ -441,6 +443,10 @@ bool mcache_monster::get_weapon_offset(int mon_tile, int &ofs_x, int &ofs_y)
ofs_x = -1;
ofs_y = -3;
break;
+ case TILEP_MONS_MAURICE:
+ ofs_x = -2;
+ ofs_y = -2;
+ break;
case TILEP_MONS_SONJA:
ofs_x = -2;
ofs_y = -7;
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 4af9a4e880..258ce242ba 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -596,8 +596,8 @@ int tileidx_monster_base(const monsters *mon, bool detected)
// nagas ('N')
case MONS_NAGA:
return TILEP_MONS_NAGA;
- case MONS_GUARDIAN_NAGA:
- return TILEP_MONS_GUARDIAN_NAGA;
+ case MONS_GUARDIAN_SERPENT:
+ return TILEP_MONS_GUARDIAN_SERPENT;
case MONS_NAGA_MAGE:
return TILEP_MONS_NAGA_MAGE;
case MONS_NAGA_WARRIOR:
@@ -642,8 +642,8 @@ int tileidx_monster_base(const monsters *mon, bool detected)
return TILEP_MONS_BLACK_MAMBA;
case MONS_VIPER:
return TILEP_MONS_VIPER;
- case MONS_GREY_SNAKE:
- return TILEP_MONS_GREY_SNAKE;
+ case MONS_ANACONDA:
+ return TILEP_MONS_ANACONDA;
// trolls ('T')
case MONS_TROLL:
@@ -769,12 +769,7 @@ int tileidx_monster_base(const monsters *mon, bool detected)
case MONS_ARMOUR_MIMIC:
case MONS_SCROLL_MIMIC:
case MONS_POTION_MIMIC:
- {
- // Use item tile.
- item_def item;
- get_mimic_item( mon, item );
- return tileidx_item(item);
- }
+ return tileidx_item(get_mimic_item(mon));
case MONS_DANCING_WEAPON:
{
@@ -920,68 +915,125 @@ int tileidx_monster_base(const monsters *mon, bool detected)
case MONS_DEATH_COB:
return TILEP_MONS_DEATH_COB;
- // non-human uniques
+ // -------------------------------------
+ // non-human uniques, sorted by glyph, then difficulty
+ // -------------------------------------
+
+ // centaur ('c')
+ case MONS_NESSOS:
+ return TILEP_MONS_NESSOS;
+
+ // draconian ('d')
+ case MONS_TIAMAT:
+ return TILEP_MONS_TIAMAT;
+
+ // elves ('e')
+ case MONS_DOWAN:
+ return TILEP_MONS_DEEP_ELF_MAGE; // TODO
+ case MONS_DUVESSA:
+ return TILEP_MONS_DEEP_ELF_FIGHTER; // TODO
+
+ // goblins and gnolls ('g')
case MONS_IJYB:
return TILEP_MONS_IJYB;
+ case MONS_CRAZY_YIUF:
+ return TILEP_MONS_CRAZY_YIUF;
case MONS_GRUM:
return TILEP_MONS_GRUM;
- case MONS_MENKAURE:
- return TILEP_MONS_MENKAURE;
+
+ // slug ('j')
+ case MONS_GASTRONOK:
+ return TILEP_MONS_GASTRONOK;
+
+ // merfolk ('m')
+ case MONS_ILSUIW:
+ if (in_water)
+ return TILEP_MONS_ILSUIW_WATER;
+ else
+ return TILEP_MONS_ILSUIW;
+
+ // orcs ('o')
+ case MONS_BLORK_THE_ORC:
+ return TILEP_MONS_BLORK_THE_ORC;
case MONS_URUG:
return TILEP_MONS_URUG;
- case MONS_EROLCHA:
- return TILEP_MONS_EROLCHA;
- case MONS_SNORG:
- return TILEP_MONS_SNORG;
- case MONS_PURGY:
- return TILEP_MONS_PURGY;
+ case MONS_NERGALLE:
+ return TILEP_MONS_NERGALLE;
+ case MONS_SAINT_ROKA:
+ return TILEP_MONS_SAINT_ROKA;
+
+ // curse skull ('z')
+ case MONS_MURRAY:
+ return TILEP_MONS_MURRAY;
+
+ // cyclops and giants ('C')
case MONS_POLYPHEMUS:
return TILEP_MONS_POLYPHEMUS;
case MONS_ANTAEUS:
return TILEP_MONS_ANTAEUS;
- case MONS_TIAMAT:
- return TILEP_MONS_TIAMAT;
+
+ // dragons and hydras ('D')
+ case MONS_LERNAEAN_HYDRA:
+ return TILEP_MONS_LERNAEAN_HYDRA;
case MONS_XTAHUA:
return TILEP_MONS_XTAHUA;
- case MONS_BORIS:
- return TILEP_MONS_BORIS;
- case MONS_MURRAY:
- return TILEP_MONS_MURRAY;
- case MONS_ROXANNE:
- return TILEP_MONS_ROXANNE;
- case MONS_SONJA:
- return TILEP_MONS_SONJA;
+
+ // efreet ('E')
case MONS_AZRAEL:
return TILEP_MONS_AZRAEL;
- case MONS_ILSUIW:
- if (in_water)
- return TILEP_MONS_ILSUIW_WATER;
- else
- return TILEP_MONS_ILSUIW;
+
+ // frog ('F')
case MONS_PRINCE_RIBBIT:
return TILEP_MONS_PRINCE_RIBBIT;
- case MONS_GASTRONOK:
- return TILEP_MONS_GASTRONOK;
- case MONS_NERGALLE:
- return TILEP_MONS_NERGALLE;
- case MONS_SAINT_ROKA:
- return TILEP_MONS_SAINT_ROKA;
- case MONS_NESSOS:
- return TILEP_MONS_NESSOS;
- case MONS_LERNAEAN_HYDRA:
- return TILEP_MONS_LERNAEAN_HYDRA;
+
+ // jelly ('J')
case MONS_DISSOLUTION:
return TILEP_MONS_DISSOLUTION;
- // human uniques ('@')
+ // kobolds ('K')
+ case MONS_SONJA:
+ return TILEP_MONS_SONJA;
+ case MONS_PIKEL:
+ return TILEP_MONS_BIG_KOBOLD; // TODO
+
+ // lich ('L')
+ case MONS_BORIS:
+ return TILEP_MONS_BORIS;
+
+ // mummies ('M')
+ case MONS_MENKAURE:
+ return TILEP_MONS_MENKAURE;
+ case MONS_KHUFU:
+ return TILEP_MONS_GREATER_MUMMY; // TODO
+
+ // guardian serpent ('N')
+ case MONS_AIZUL:
+ return TILEP_MONS_AIZUL;
+
+ // ogre ('O')
+ case MONS_EROLCHA:
+ return TILEP_MONS_EROLCHA;
+
+ // trolls ('T')
+ case MONS_PURGY:
+ return TILEP_MONS_PURGY;
+ case MONS_SNORG:
+ return TILEP_MONS_SNORG;
+
+ // statue ('8')
+ case MONS_ROXANNE:
+ return TILEP_MONS_ROXANNE;
+
+ // -------------------------------------
+ // non-human uniques ('@')
+ // -------------------------------------
+
case MONS_TERENCE:
return TILEP_MONS_TERENCE;
case MONS_JESSICA:
return TILEP_MONS_JESSICA;
case MONS_SIGMUND:
return TILEP_MONS_SIGMUND;
- case MONS_BLORK_THE_ORC:
- return TILEP_MONS_BLORK_THE_ORC;
case MONS_EDMUND:
return TILEP_MONS_EDMUND;
case MONS_PSYCHE:
@@ -1026,6 +1078,10 @@ int tileidx_monster_base(const monsters *mon, bool detected)
return TILEP_MONS_EUSTACHIO;
case MONS_KIRKE:
return TILEP_MONS_KIRKE;
+ case MONS_NIKOLA:
+ return TILEP_TODO; // TODO
+ case MONS_MAURICE:
+ return TILEP_MONS_MAURICE;
// unique major demons ('&')
case MONS_MNOLEG:
@@ -1881,8 +1937,8 @@ static int _tileidx_corpse(const item_def &item)
case MONS_NAGA_WARRIOR:
case MONS_GREATER_NAGA:
return TILE_CORPSE_NAGA;
- case MONS_GUARDIAN_NAGA:
- return TILE_CORPSE_GUARDIAN_NAGA;
+ case MONS_GUARDIAN_SERPENT:
+ return TILE_CORPSE_GUARDIAN_SERPENT;
// ogres ('O')
case MONS_OGRE:
@@ -1902,8 +1958,8 @@ static int _tileidx_corpse(const item_def &item)
return TILE_CORPSE_SMALL_SNAKE;
case MONS_SNAKE:
return TILE_CORPSE_SNAKE;
- case MONS_GREY_SNAKE:
- return TILE_CORPSE_GREY_SNAKE;
+ case MONS_ANACONDA:
+ return TILE_CORPSE_ANACONDA;
case MONS_WATER_MOCCASIN:
return TILE_CORPSE_WATER_MOCCASIN;
case MONS_BLACK_MAMBA:
@@ -2622,6 +2678,21 @@ static int _tileidx_cloud(int type, int decay)
ch = TILE_CLOUD_BLACK_SMOKE;
break;
+ case CLOUD_MUTAGENIC:
+ ch = (dur == 0 ? TILE_CLOUD_MUTAGENIC_0 :
+ dur == 1 ? TILE_CLOUD_MUTAGENIC_1
+ : TILE_CLOUD_MUTAGENIC_2);
+ ch += random2(tile_main_count(ch));
+ break;
+
+ case CLOUD_MIST:
+ ch = TILE_CLOUD_MIST;
+ break;
+
+ case CLOUD_RAIN:
+ ch = TILE_CLOUD_RAIN + random2(tile_main_count(TILE_CLOUD_RAIN));
+ break;
+
default:
ch = TILE_CLOUD_GREY_SMOKE;
break;
@@ -4620,9 +4691,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected)
t0 |= TILE_FLAG_S_UNDER;
}
- item_def item;
- get_mimic_item( mon, item );
- if (item_needs_autopickup(item))
+ if (item_needs_autopickup(get_mimic_item(mon)))
{
if (foreground)
env.tile_bg[ep.x][ep.y] |= TILE_FLAG_CURSOR3;
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index c908bc2d06..753ea5be30 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -51,7 +51,10 @@
#include "tilefont.h"
#include "tilesdl.h"
#include "tilemcache.h"
+#include "tiledef-dngn.h"
#include "tiledef-gui.h"
+#include "tiledef-main.h"
+#include "tiledef-player.h"
#include <sys/stat.h>
#include <SDL_opengl.h>
diff --git a/crawl-ref/source/tiles.h b/crawl-ref/source/tiles.h
index 20f5a5f8a3..d938715e55 100644
--- a/crawl-ref/source/tiles.h
+++ b/crawl-ref/source/tiles.h
@@ -8,9 +8,7 @@
#ifdef USE_TILE
-#include "tiledef-main.h"
-#include "tiledef-dngn.h"
-#include "tiledef-player.h"
+#include "tiledef_defines.h"
#include "beam.h"
#include "enum.h"
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index 83ce8e8724..1a1099ba6d 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -27,6 +27,7 @@
#include "viewgeom.h"
#include "tiledef-dngn.h"
+#include "tiledef-main.h"
#include "tilefont.h"
#include <SDL.h>
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index 8bf5d030f0..20ed72e4fd 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -14,6 +14,7 @@
#include "artefact.h"
#include "beam.h"
#include "branch.h"
+#include "clua.h"
#include "coord.h"
#include "delay.h"
#include "describe.h"
@@ -28,6 +29,7 @@
#include "mon-util.h"
#include "mon-stuff.h"
#include "mon-transit.h"
+#include "options.h"
#include "ouch.h"
#include "player.h"
#include "skills.h"
@@ -640,8 +642,10 @@ void trap_def::trigger(actor& triggerer, bool flat_footed)
break;
}
- // If the shaft isn't triggered, don't reveal it.
- if (!triggerer.will_trigger_shaft() && !you_know)
+ // If the shaft isn't known, don't reveal it.
+ // The shafting code in downstairs() needs to know
+ // whether it's undiscovered.
+ if (!you_know)
this->hide();
// Known shafts don't trigger as traps.
@@ -776,6 +780,27 @@ void disarm_trap(const coord_def& where)
break;
}
+#ifdef CLUA_BINDINGS
+ // Prompt for any trap for which you might not survive setting it off.
+ // (See trapwalk.lua)
+ if (Options.trap_prompt
+ && !clua.callbooleanfn(false, "ch_cross_trap", "s", trap_name(where)))
+ {
+ std::string prompt = make_stringf(
+ "Really try disarming that %s?",
+ feature_description(trap.category(),
+ get_trap_type(where),
+ false, DESC_BASENAME,
+ false).c_str());
+
+ if (!yesno(prompt.c_str(), true, 'n'))
+ {
+ canned_msg(MSG_OK);
+ return;
+ }
+ }
+#endif
+
// Make the actual attempt
you.turn_is_over = true;
if (random2(you.skills[SK_TRAPS_DOORS] + 2) <= random2(you.your_level + 5))
@@ -1317,7 +1342,7 @@ bool is_valid_shaft_level(const level_id &place)
}
// Shafts can be generated visible.
-//
+//
// Starts about 50% of the time and approaches 0% for randomly
// placed traps, and starts at 100% and approaches 50% for
// others (e.g. at end of corridor).
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index f8e4eb55cb..6da7bc6ee0 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -546,11 +546,7 @@ inline static void _check_interesting_square(int x, int y,
if (const monsters *mons = monster_at(pos))
{
if (mons_is_unknown_mimic(mons))
- {
- item_def item;
- get_mimic_item(mons, item);
- ed.found_item(pos, item);
- }
+ ed.found_item(pos, get_mimic_item(mons));
}
if (igrd(pos) != NON_ITEM)
@@ -1084,12 +1080,8 @@ static bool _is_greed_inducing_square(const LevelStashes *ls,
if (const monsters *mons = monster_at(c))
{
if (mons_is_unknown_mimic(mons) && mons_was_seen(mons))
- {
- item_def mimic_item;
- get_mimic_item(mons, mimic_item);
- if (item_needs_autopickup(mimic_item))
+ if (item_needs_autopickup(get_mimic_item(mons)))
return (true);
- }
}
return (false);
}
diff --git a/crawl-ref/source/util/art-data.pl b/crawl-ref/source/util/art-data.pl
index 67a4dfe476..55bfad78f3 100755
--- a/crawl-ref/source/util/art-data.pl
+++ b/crawl-ref/source/util/art-data.pl
@@ -46,7 +46,6 @@ my %field_type = (
RND_TELE => "bool",
SEEINV => "bool",
SPECIAL => "bool",
- SPIRIT => "bool",
STEALTH => "num",
STR => "num",
VALUE => "num",
@@ -475,7 +474,7 @@ my @art_order = (
"SEEINV", "INV", "LEV", "BLINK", "BERSERK", "NOISES", "\n",
"NOSPELL", "RND_TELE", "NOTELEP", "ANGRY", "METAB", "\n",
"MUTATE", "ACC", "DAM", "CURSED", "STEALTH", "MP", "\n",
- "SPIRIT", "}",
+ "}",
"DESC", "\n",
"DESC_ID", "\n",
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index b78f09e760..b8e6447a89 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -70,6 +70,10 @@
#include "tutorial.h"
#include "xom.h"
+#ifdef USE_TILE
+#include "tiledef-dngn.h"
+#endif
+
#define DEBUG_PANE_BOUNDS 0
crawl_view_geometry crawl_view;
diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc
index 903dd91292..42376be3ae 100644
--- a/crawl-ref/source/wiz-item.cc
+++ b/crawl-ref/source/wiz-item.cc
@@ -28,8 +28,11 @@
#include "mon-stuff.h"
#include "mon-util.h"
#include "options.h"
+#include "output.h"
#include "religion.h"
+#include "skills2.h"
#include "spl-book.h"
+#include "spl-util.h"
#include "stash.h"
#include "stuff.h"
#include "terrain.h"
@@ -220,6 +223,11 @@ void wizard_create_spec_object()
destroy_item(thing_created);
return;
}
+ if (Options.autoinscribe_artefacts && is_artefact(mitm[thing_created]))
+ {
+ mitm[thing_created].inscription
+ = artefact_auto_inscription(mitm[thing_created]);
+ }
}
// Deck colour (which control rarity) already set.
@@ -270,8 +278,7 @@ const char* _prop_name[ARTP_NUM_PROPERTIES] = {
"Dam",
"Curse",
"Stlth",
- "MP",
- "Spirit"
+ "MP"
};
#define ARTP_VAL_BOOL 0
@@ -307,8 +314,7 @@ char _prop_type[ARTP_NUM_PROPERTIES] = {
ARTP_VAL_ANY, //DAMAGE
ARTP_VAL_POS, //CURSED
ARTP_VAL_ANY, //STEALTH
- ARTP_VAL_ANY, //MAGICAL_POWER
- ARTP_VAL_BOOL //SPIRIT_SHIELD
+ ARTP_VAL_ANY //MAGICAL_POWER
};
static void _tweak_randart(item_def &item)
@@ -319,6 +325,8 @@ static void _tweak_randart(item_def &item)
MSGCH_PROMPT);
return;
}
+ else
+ mesclr();
artefact_properties_t props;
artefact_wpn_properties(item, props);
@@ -828,7 +836,7 @@ static void _debug_acquirement_stats(FILE *ostat)
mesclr();
mpr("[a] Weapons [b] Armours [c] Jewellery [d] Books");
- mpr("[e] Staves [f] Food [g] Miscellaneous");
+ mpr("[e] Staves [f] Wands [g] Miscellaneous [h] Food");
mpr("What kind of item would you like to get acquirement stats on? ",
MSGCH_PROMPT);
@@ -841,8 +849,9 @@ static void _debug_acquirement_stats(FILE *ostat)
case 'c': type = OBJ_JEWELLERY; break;
case 'd': type = OBJ_BOOKS; break;
case 'e': type = OBJ_STAVES; break;
- case 'f': type = OBJ_FOOD; break;
+ case 'f': type = OBJ_WANDS; break;
case 'g': type = OBJ_MISCELLANY; break;
+ case 'h': type = OBJ_FOOD; break;
default:
canned_msg( MSG_OK );
return;
@@ -880,7 +889,7 @@ static void _debug_acquirement_stats(FILE *ostat)
int item_index = NON_ITEM;
- if (!acquirement(type, AQ_WIZMODE, true, &item_index)
+ if (!acquirement(type, AQ_WIZMODE, true, &item_index, true)
|| item_index == NON_ITEM
|| !mitm[item_index].is_valid())
{
@@ -898,9 +907,31 @@ static void _debug_acquirement_stats(FILE *ostat)
total_plus += item.plus + item.plus2;
if (is_artefact(item))
+ {
num_arts++;
+ if (type == OBJ_BOOKS)
+ {
+ if (item.sub_type == BOOK_RANDART_THEME)
+ {
+ const int disc1 = item.plus & 0xFF;
+ ego_quants[disc1]++;
+ }
+ else if (item.sub_type == BOOK_RANDART_LEVEL)
+ {
+ const int level = item.plus;
+ ego_quants[SPTYP_LAST_EXPONENT + level]++;
+ }
+ }
+ }
else if (type == OBJ_ARMOUR) // Exclude artefacts when counting egos.
ego_quants[get_armour_ego_type(item)]++;
+ else if (type == OBJ_BOOKS && item.sub_type == BOOK_MANUAL)
+ {
+ // Store skills in subtype array, so as not to overlap
+ // with artefact spell disciplines/levels.
+ const int skill = item.plus;
+ subtype_quants[200 + skill]++;
+ }
// Include artefacts for weapon brands.
if (type == OBJ_WEAPONS)
@@ -923,7 +954,115 @@ static void _debug_acquirement_stats(FILE *ostat)
return;
}
- fprintf(ostat, "acquirement called %d times, total quantity = %d\n\n",
+ // Print acquirement base type.
+ fprintf(ostat, "Acquiring %s for:\n\n",
+ type == OBJ_WEAPONS ? "weapons" :
+ type == OBJ_ARMOUR ? "armour" :
+ type == OBJ_JEWELLERY ? "jewellery" :
+ type == OBJ_BOOKS ? "books" :
+ type == OBJ_STAVES ? "staves" :
+ type == OBJ_WANDS ? "wands" :
+ type == OBJ_MISCELLANY ? "misc. items" :
+ type == OBJ_FOOD ? "food"
+ : "buggy items");
+
+ // Print player species/profession.
+ std::string godname = "";
+ if (you.religion != GOD_NO_GOD)
+ godname += " of " + god_name(you.religion);
+
+ fprintf(ostat, "%s the %s, Level %d %s %s%s\n\n",
+ you.your_name.c_str(), player_title().c_str(),
+ you.experience_level,
+ species_name(you.species, you.experience_level).c_str(),
+ you.class_name, godname.c_str());
+
+ // Print player equipment.
+ const int e_order[] =
+ {
+ EQ_WEAPON, EQ_BODY_ARMOUR, EQ_SHIELD, EQ_HELMET, EQ_CLOAK,
+ EQ_GLOVES, EQ_BOOTS, EQ_AMULET, EQ_RIGHT_RING, EQ_LEFT_RING
+ };
+
+ bool naked = true;
+ for (int i = 0; i < NUM_EQUIP; i++)
+ {
+ int eqslot = e_order[i];
+
+ // Only output filled slots.
+ if (you.equip[ e_order[i] ] != -1)
+ {
+ // The player has something equipped.
+ const int item_idx = you.equip[e_order[i]];
+ const item_def& item = you.inv[item_idx];
+ const bool melded = !player_wearing_slot(e_order[i]);
+
+ fprintf(ostat, "%-7s: %s %s\n", equip_slot_to_name(eqslot),
+ item.name(DESC_PLAIN, true).c_str(),
+ melded ? "(melded)" : "");
+ naked = false;
+ }
+ }
+ if (naked)
+ fprintf(ostat, "Not wearing or wielding anything.\n");
+
+ // Also print the skills, in case they matter.
+ std::string skills = "\nSkills:\n";
+ dump_skills(skills);
+ fprintf(ostat, "%s\n\n", skills.c_str());
+
+ if (type == OBJ_BOOKS && you.skills[SK_SPELLCASTING])
+ {
+ // For spellbooks, for each spell discipline, list the number of
+ // unseen and total spells available.
+ std::vector<int> total_spells(SPTYP_LAST_EXPONENT);
+ std::vector<int> unseen_spells(SPTYP_LAST_EXPONENT);
+
+ for (int i = 0; i < NUM_SPELLS; ++i)
+ {
+ const spell_type spell = (spell_type) i;
+
+ if (!is_valid_spell(spell))
+ continue;
+
+ if (you_cannot_memorise(spell))
+ continue;
+
+ // Only use spells available in books you might find lying about
+ // the dungeon.
+ if (spell_rarity(spell) == -1)
+ continue;
+
+ const bool seen = you.seen_spell[spell];
+
+ const unsigned int disciplines = get_spell_disciplines(spell);
+ for (int d = 0; d < SPTYP_LAST_EXPONENT; ++d)
+ {
+ const int disc = 1 << d;
+ if (disc & SPTYP_DIVINATION)
+ continue;
+
+ if (disciplines & disc)
+ {
+ total_spells[d]++;
+ if (!seen)
+ unseen_spells[d]++;
+ }
+ }
+ }
+ for (int d = 0; d < SPTYP_LAST_EXPONENT; ++d)
+ {
+ const int disc = 1 << d;
+ if (disc & SPTYP_DIVINATION)
+ continue;
+
+ fprintf(ostat, "%-13s: %2d/%2d spells unseen\n",
+ spelltype_long_name(disc),
+ unseen_spells[d], total_spells[d]);
+ }
+ }
+
+ fprintf(ostat, "\nAcquirement called %d times, total quantity = %d\n\n",
acq_calls, total_quant);
fprintf(ostat, "%5.2f%% artefacts.\n",
@@ -1010,40 +1149,111 @@ static void _debug_acquirement_stats(FILE *ostat)
}
fprintf(ostat, "\n\n");
}
+ else if (type == OBJ_BOOKS)
+ {
+ // Print disciplines of artefact spellbooks.
+ if (subtype_quants[BOOK_RANDART_THEME]
+ + subtype_quants[BOOK_RANDART_LEVEL] > 0)
+ {
+ fprintf(ostat, "Primary disciplines/levels of randart books:\n");
+
+ const char* names[] = {
+ "conjuration",
+ "enchantment",
+ "fire magic",
+ "ice magic",
+ "transmutation",
+ "necromancy",
+ "summoning",
+ "divination",
+ "translocation",
+ "poison magic",
+ "earth magic",
+ "air magic",
+ "holy magic"
+ };
+
+ for (int i = 0; i < SPTYP_LAST_EXPONENT; ++i)
+ {
+ if (ego_quants[i] > 0)
+ {
+ fprintf(ostat, "%17s: %5.2f\n", names[i],
+ 100.0 * (float) ego_quants[i] / (float) num_arts);
+ }
+ }
+ // List levels for fixed level randarts.
+ for (int i = 1; i < 9; ++i)
+ {
+ const int k = SPTYP_LAST_EXPONENT + i;
+ if (ego_quants[k] > 0)
+ {
+ fprintf(ostat, "%15s %d: %5.2f\n", "level", i,
+ 100.0 * (float) ego_quants[i] / (float) num_arts);
+ }
+ }
+ }
+
+ // Also list skills for manuals.
+ if (subtype_quants[BOOK_MANUAL] > 0)
+ {
+ const int mannum = subtype_quants[BOOK_MANUAL];
+ fprintf(ostat, "\nManuals:\n");
+ for (int i = SK_FIGHTING; i <= SK_EVOCATIONS; ++i)
+ {
+ const int k = 200 + i;
+ if (subtype_quants[k] > 0)
+ {
+ fprintf(ostat, "%17s: %5.2f\n", skill_name(i),
+ 100.0 * (float) subtype_quants[k] / (float) mannum);
+ }
+ }
+ }
+ fprintf(ostat, "\n\n");
+ }
item_def item;
item.quantity = 1;
item.base_type = type;
+ const description_level_type desc = (type == OBJ_BOOKS ? DESC_PLAIN
+ : DESC_DBNAME);
+ const bool terse = (type == OBJ_BOOKS ? false : true);
+
+ // First, get the maximum name length.
int max_width = 0;
for (int i = 0; i < 256; ++i)
{
+ if (type == OBJ_BOOKS && i >= 200)
+ break;
+
if (subtype_quants[i] == 0)
continue;
item.sub_type = i;
-
- std::string name = item.name(DESC_DBNAME, true, true);
+ std::string name = item.name(desc, terse, true);
max_width = std::max(max_width, (int) name.length());
}
+ // Now output the sub types.
char format_str[80];
sprintf(format_str, "%%%ds: %%6.2f\n", max_width);
for (int i = 0; i < 256; ++i)
{
+ if (type == OBJ_BOOKS && i >= 200)
+ break;
+
if (subtype_quants[i] == 0)
continue;
item.sub_type = i;
-
- std::string name = item.name(DESC_DBNAME, true, true);
+ std::string name = item.name(desc, terse, true);
fprintf(ostat, format_str, name.c_str(),
(float) subtype_quants[i] * 100.0 / (float) total_quant);
}
- fprintf(ostat, "----------------------\n");
+ fprintf(ostat, "-----------------------------------------\n\n");
mpr("Results written into 'items.stat'.");
}
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index d4df0e71d1..cb12146d07 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -1254,6 +1254,11 @@ static int _xom_send_allies(int sever, bool debug = false)
numdemons = random2(numdemons + 1);
numdemons = std::min(numdemons + 2, 16);
+ // Limit number of demons by experience level.
+ const int maxdemons = (you.max_level * 3);
+ if (numdemons > maxdemons)
+ numdemons = maxdemons;
+
int numdifferent = 0;
// If we have a mix of demons and non-demons, there's a chance
@@ -3164,8 +3169,9 @@ static int _xom_summon_hostiles(int sever, bool debug = false)
const std::string speech = _get_xom_speech("hostile monster");
int result = XOM_DID_NOTHING;
- // Nasty, but fun.
- if (player_weapon_wielded() && one_chance_in(4))
+
+ // Nasty, but fun. Only allow for xp >= 4.
+ if (player_weapon_wielded() && you.max_level >= 4 && one_chance_in(4))
{
if (debug)
return (XOM_BAD_ANIMATE_WPN);
@@ -3195,6 +3201,11 @@ static int _xom_summon_hostiles(int sever, bool debug = false)
numdemons = random2(numdemons + 1);
numdemons = std::min(numdemons + 1, 14);
+ // Limit number of demons by experience level.
+ const int maxdemons = (you.max_level * 2);
+ if (numdemons > maxdemons)
+ numdemons = maxdemons;
+
int num_summoned = 0;
for (int i = 0; i < numdemons; ++i)
{
@@ -3227,6 +3238,85 @@ static int _xom_summon_hostiles(int sever, bool debug = false)
return (result);
}
+static bool _has_min_banishment_level()
+{
+ return (you.max_level >= 9);
+}
+
+// Rolls whether banishment will be averted.
+static bool _will_not_banish()
+{
+ return x_chance_in_y(5, you.max_level);
+}
+
+// Disallow early banishment and make it much rarer later-on.
+// While Xom is bored, the chance is increased.
+static bool _allow_xom_banishment()
+{
+ // Always allowed if under penance.
+ if (you.penance[GOD_XOM])
+ return (true);
+
+ // If Xom is bored, banishment becomes viable earlier.
+ if (_xom_is_bored() && _will_not_banish())
+ return (false);
+
+ // Below the minimum experience level, only fake banishment is allowed.
+ if (!_has_min_banishment_level())
+ {
+ // Allow banishment; it will be retracted right away.
+ if (one_chance_in(5) && x_chance_in_y(you.piety, 1000))
+ return (true);
+ else
+ return (false);
+ }
+ else if (_will_not_banish())
+ return (false);
+
+ return (true);
+}
+
+static int _xom_maybe_reverts_banishment(bool debug = false)
+{
+ // Never revert if Xom is bored or the player is under penance.
+ if (_xom_feels_nasty())
+ return XOM_BAD_BANISHMENT;
+
+ // Sometimes Xom will immediately revert the banishment.
+ // Always so, if the banishment happened below the minimum exp level.
+ if (!_xom_feels_nasty() && !_has_min_banishment_level()
+ || x_chance_in_y(you.piety, 1000))
+ {
+ if (!debug)
+ {
+ more();
+ god_speaks(GOD_XOM, _get_xom_speech("revert banishment").c_str());
+ down_stairs(you.your_level, DNGN_EXIT_ABYSS);
+ take_note(Note(NOTE_XOM_EFFECT, you.piety, -1,
+ "revert banishment"), true);
+ }
+ return XOM_BAD_PSEUDO_BANISHMENT;
+ }
+ return XOM_BAD_BANISHMENT;
+}
+
+static int _xom_do_banishment(bool debug = false)
+{
+ if (!_allow_xom_banishment())
+ return (XOM_DID_NOTHING);
+
+ if (debug)
+ return _xom_maybe_reverts_banishment(debug);
+
+ god_speaks(GOD_XOM, _get_xom_speech("banishment").c_str());
+
+ // Handles note taking.
+ banished(DNGN_ENTER_ABYSS, "Xom");
+ const int result = _xom_maybe_reverts_banishment(debug);
+
+ return (result);
+}
+
static int _xom_is_bad(int sever, int tension, bool debug = false)
{
int done = XOM_DID_NOTHING;
@@ -3354,14 +3444,8 @@ static int _xom_is_bad(int sever, int tension, bool debug = false)
}
else if (one_chance_in(sever) && you.level_type != LEVEL_ABYSS)
{
- if (!debug)
- {
- god_speaks(GOD_XOM, _get_xom_speech("banishment").c_str());
- // handles note taking
- banished(DNGN_ENTER_ABYSS, "Xom");
- badness = 5;
- }
- done = XOM_BAD_BANISHMENT;
+ done = _xom_do_banishment(debug);
+ badness = (done == XOM_BAD_BANISHMENT ? 5 : 1);
}
}
@@ -3942,7 +4026,8 @@ static const char* _xom_effect_to_name(int effect)
"miscast (pseudo)", "miscast (minor)", "miscast (major)",
"miscast (nasty)", "stat loss", "teleportation", "swap weapons",
"chaos upgrade", "mutation", "polymorph", "repel stairs", "confusion",
- "draining", "torment", "animate weapon", "summon demons", "banishment"
+ "draining", "torment", "animate weapon", "summon demons",
+ "banishment (pseudo)", "banishment"
};
std::string result = "";
diff --git a/crawl-ref/source/xom.h b/crawl-ref/source/xom.h
index 7839987c9d..50f670e15a 100644
--- a/crawl-ref/source/xom.h
+++ b/crawl-ref/source/xom.h
@@ -61,8 +61,9 @@ enum xom_event_type
XOM_BAD_TORMENT,
XOM_BAD_ANIMATE_WPN,
XOM_BAD_SUMMON_DEMONS, // 35
+ XOM_BAD_PSEUDO_BANISHMENT,
XOM_BAD_BANISHMENT,
- XOM_LAST_BAD_ACT = XOM_BAD_BANISHMENT, // 36
+ XOM_LAST_BAD_ACT = XOM_BAD_BANISHMENT, // 37
XOM_PLAYER_DEAD = 100, // player already dead (shouldn't happen)
NUM_XOM_EVENTS