summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-12-25 11:20:27 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-12-25 11:20:27 +1000
commit97c650b1162b808278ee8207d3dd7a65e0b5ae80 (patch)
tree6a033d7ee32069c96deb64ee6df9f884876c124f
parent123e41762d8db75f5b28d51a032a4ba6bc3a928c (diff)
parent701f0d3bae53d22d476eeec3d85ee02a26623a66 (diff)
downloadcrawl-ref-97c650b1162b808278ee8207d3dd7a65e0b5ae80.tar.gz
crawl-ref-97c650b1162b808278ee8207d3dd7a65e0b5ae80.zip
Merge branch 'master' into wizlab
-rw-r--r--crawl-ref/docs/develop/levels/syntax.txt9
-rw-r--r--crawl-ref/source/cloud.cc6
-rw-r--r--crawl-ref/source/dat/database/monspeak.txt50
-rw-r--r--crawl-ref/source/dat/database/monspell.txt24
-rw-r--r--crawl-ref/source/dat/database/quotes.txt10
-rw-r--r--crawl-ref/source/dat/descript/monsters.txt4
-rw-r--r--crawl-ref/source/dat/uniques.des4
-rw-r--r--crawl-ref/source/dat/zot.des2
-rw-r--r--crawl-ref/source/describe.cc24
-rw-r--r--crawl-ref/source/directn.cc11
-rw-r--r--crawl-ref/source/dungeon.cc2
-rw-r--r--crawl-ref/source/effects.cc7
-rw-r--r--crawl-ref/source/enum.h9
-rw-r--r--crawl-ref/source/fight.cc5
-rw-r--r--crawl-ref/source/fight.h1
-rw-r--r--crawl-ref/source/godabil.cc2
-rw-r--r--crawl-ref/source/hiscores.cc4
-rw-r--r--crawl-ref/source/it_use2.cc1
-rw-r--r--crawl-ref/source/item_use.cc3
-rw-r--r--crawl-ref/source/kills.cc7
-rw-r--r--crawl-ref/source/main.cc15
-rw-r--r--crawl-ref/source/mapdef.cc12
-rw-r--r--crawl-ref/source/maps.cc2
-rw-r--r--crawl-ref/source/mon-abil.cc2
-rw-r--r--crawl-ref/source/mon-cast.cc249
-rw-r--r--crawl-ref/source/mon-cast.h1
-rw-r--r--crawl-ref/source/mon-data.h32
-rw-r--r--crawl-ref/source/mon-gear.cc8
-rw-r--r--crawl-ref/source/mon-info.cc39
-rw-r--r--crawl-ref/source/mon-place.cc5
-rw-r--r--crawl-ref/source/mon-spll.h22
-rw-r--r--crawl-ref/source/mon-stuff.cc17
-rw-r--r--crawl-ref/source/mon-util.cc14
-rw-r--r--crawl-ref/source/monster.cc54
-rw-r--r--crawl-ref/source/monster.h1
-rw-r--r--crawl-ref/source/output.cc3
-rw-r--r--crawl-ref/source/player.cc5
-rw-r--r--crawl-ref/source/player.h1
-rw-r--r--crawl-ref/source/religion.cc2
-rw-r--r--crawl-ref/source/rltiles/UNUSED/other/dngn_altar_base.pngbin0 -> 512 bytes
-rw-r--r--crawl-ref/source/rltiles/UNUSED/other/pedestal.pngbin0 -> 617 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn.txt678
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/dngn_trap_shaft.pngbin317 -> 551 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown0.pngbin0 -> 1392 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown1.pngbin0 -> 1380 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown2.pngbin0 -> 1227 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown3.pngbin0 -> 1284 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown4.pngbin0 -> 1423 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown5.pngbin0 -> 1388 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown6.pngbin0 -> 1260 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown7.pngbin0 -> 1332 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown8.pngbin0 -> 1268 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray0.pngbin919 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray1.pngbin893 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray2.pngbin853 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray3.pngbin864 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray4.pngbin956 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray5.pngbin1275 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray6.pngbin1255 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray7.pngbin1267 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray8.pngbin1259 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/ice0.pngbin679 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/ice1.pngbin899 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/ice2.pngbin886 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/ice3.pngbin987 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/snake0.pngbin936 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/snake1.pngbin938 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/snake2.pngbin1057 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/snake3.pngbin1119 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown0.pngbin0 -> 1561 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown1.pngbin0 -> 1885 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown2.pngbin0 -> 1745 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown3.pngbin0 -> 1709 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan0.pngbin679 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan1.pngbin899 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan2.pngbin886 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan3.pngbin987 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_gray0.pngbin701 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_gray1.pngbin1020 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_gray2.pngbin981 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_gray3.pngbin1100 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_green0.pngbin679 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_green1.pngbin840 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_green2.pngbin833 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_green3.pngbin921 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta0.pngbin686 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta1.pngbin930 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta2.pngbin905 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta3.pngbin1016 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_red0.pngbin677 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_red1.pngbin836 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_red2.pngbin831 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_red3.pngbin914 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow0.pngbin673 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow1.pngbin894 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow2.pngbin883 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow3.pngbin970 -> 0 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-mon.txt5
-rw-r--r--crawl-ref/source/rltiles/dc-mon/unique/kirke.pngbin1029 -> 1072 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-mon/unique/mara.pngbin0 -> 1430 bytes
-rw-r--r--crawl-ref/source/rltiles/tiledef_defines.h47
-rw-r--r--crawl-ref/source/rltiles/tool/tile.cc43
-rw-r--r--crawl-ref/source/rltiles/tool/tile.h20
-rw-r--r--crawl-ref/source/rltiles/tool/tile_colour.cc220
-rw-r--r--crawl-ref/source/rltiles/tool/tile_colour.h49
-rw-r--r--crawl-ref/source/rltiles/tool/tile_list_processor.cc390
-rw-r--r--crawl-ref/source/rltiles/tool/tile_list_processor.h17
-rw-r--r--crawl-ref/source/rltiles/tool/tile_page.cc35
-rw-r--r--crawl-ref/source/rltiles/tool/tile_page.h7
-rw-r--r--crawl-ref/source/show.cc3
-rw-r--r--crawl-ref/source/showsymb.cc11
-rw-r--r--crawl-ref/source/spl-book.cc12
-rw-r--r--crawl-ref/source/spl-data.h178
-rw-r--r--crawl-ref/source/tags.h2
-rw-r--r--crawl-ref/source/tile2.cc2
-rw-r--r--crawl-ref/source/tilepick.cc36
-rw-r--r--crawl-ref/source/tiletex.cc39
-rw-r--r--crawl-ref/source/travel.cc4
118 files changed, 2142 insertions, 325 deletions
diff --git a/crawl-ref/docs/develop/levels/syntax.txt b/crawl-ref/docs/develop/levels/syntax.txt
index 0a7b56d7e2..d99fb5faf9 100644
--- a/crawl-ref/docs/develop/levels/syntax.txt
+++ b/crawl-ref/docs/develop/levels/syntax.txt
@@ -821,6 +821,9 @@ COLOUR: . = green / blue:5 / red / none
Even more so than base colours, elemental colours should be used
very, very, very sparingly.
+ Colours apply automatically to floor and rock wall tiles, although
+ not all branches have coloured variations for their tile set.
+
FTILE: . = floor_grass:20 / floor_dirt / none
Similar to COLOUR, FTILE allows you to attach explicit floor
tiles to any glyph. In non-tiles builds, this does nothing.
@@ -838,6 +841,9 @@ FTILE: . = floor_grass:20 / floor_dirt / none
Like COLOUR, this should be used sparingly.
+ If COLOUR is also specified and there is a coloured variation
+ of this tile, then it will be used.
+
RTILE: x = wall_hive:15 / wall_lair / none
Identical to FTILE, but for rock walls. Not useful for anything
but the rock wall feature.
@@ -854,6 +860,9 @@ TILE: x = wall_flesh
Like COLOUR and FTILE, this should be used sparingly and to good
effect.
+ If COLOUR is also specified and there is a coloured variation
+ of this tile, then it will be used.
+
To override doors, use the specific tile set in combination with the
"no_random" specifier. Example:
+ = no_random dngn_fleshy_orifice
diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.cc
index 9678edc16c..638432f504 100644
--- a/crawl-ref/source/cloud.cc
+++ b/crawl-ref/source/cloud.cc
@@ -765,6 +765,12 @@ void in_a_cloud()
if (you.duration[DUR_FIRE_SHIELD])
you.duration[DUR_FIRE_SHIELD] = 1;
+ if (you.misled())
+ {
+ mpr("The rain washes away illusions!", MSGCH_DURATION);
+ you.duration[DUR_MISLED] = 0;
+ }
+
mpr("You are standing in the rain.");
break;
diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt
index 4ccb9c92d7..95ef7accc5 100644
--- a/crawl-ref/source/dat/database/monspeak.txt
+++ b/crawl-ref/source/dat/database/monspeak.txt
@@ -2552,6 +2552,56 @@ Louise
@_mercenary_guard_@
### END Louise
%%%%
+############ MARA ### A powerful demon lord, Lord of Illusions
+Mara
+
+@_Mara_common_@
+
+w:5
+
+@_Mara_rare_@
+%%%%
+_Mara_common_
+
+VISUAL:@The_monster@'s face changes twice.
+
+@The_monster@ says, "I mislead the hearts of men!"
+
+@The_monster@ says, "What good are steel and magic against my illusions?"
+
+# Buddhism
+@The_monster@ says, "Entranced by some poetic flight, are you?"
+
+@The_monster@ says, "Bound art thou by all the snares!"
+
+# And original
+@The_monster@ growls.
+
+VISUAL SPELL:@The_monster@ gestures.
+
+VISUAL SPELL:@The_monster@ points ostentatiously.
+
+SPELL:@The_monster@ weaves an illusion.
+%%%%
+_Mara_rare_
+
+# Lord of Light
+@The_monster@ screams, "Tenfold be your damnation!"
+
+@The_monster@'s features momentarily become yours. "Wouldst slay thyself?"
+
+@The_monster@ says, "I stand as high above you as a star above the ocean's bottom."
+
+@The_monster@ smirks. "I am one who seeks the Path and the Right."
+
+@The_monster@ says, "Thou art lean, ill-favoured, death is in thy neighbourhood!"
+
+@The_monster@ says, "Difficult is the way of exertion, difficult to pass, difficult to enter upon."
+
+@The_monster@ calls, "Stop! In seven days from now the wheel of empire will appear!"
+
+@The_monster@ boasts, "I am lord over the four continents and the two thousand adjacent isles."
+%%%%
############ MARGERY ### A powerful sorceress, guarding the ORB
Margery
diff --git a/crawl-ref/source/dat/database/monspell.txt b/crawl-ref/source/dat/database/monspell.txt
index 0ce22a12e5..c1556fcc50 100644
--- a/crawl-ref/source/dat/database/monspell.txt
+++ b/crawl-ref/source/dat/database/monspell.txt
@@ -85,6 +85,30 @@ Greater Healing cast
@The_monster@ briefly glows brightly.
%%%%
+Mislead cast
+
+@The_monster@ weaves an illusion.
+
+@The_monster@ misleads you.
+
+@The_monster@ clouds your mind.
+%%%%
+unseen Mislead cast
+
+Something tries to mislead you!
+
+Something weaves an illusion around you!
+%%%%
+Mara Summon cast
+
+@The_monster@ weaves an illusion.
+
+@The_monster@ shimmers.
+%%%%
+unseen Mara summon cast
+
+Something weaves an illusion!
+%%%%
Symbol of Torment cast
@The_monster@ calls on the powers of Hell!
diff --git a/crawl-ref/source/dat/database/quotes.txt b/crawl-ref/source/dat/database/quotes.txt
index 436eb7ab71..0f0e8d5920 100644
--- a/crawl-ref/source/dat/database/quotes.txt
+++ b/crawl-ref/source/dat/database/quotes.txt
@@ -756,6 +756,16 @@ dreadful nostrils and making ring waves around him, which can reach many
miles. Could one doubt that this is the Leviathan of Job?"
-Jacob Wallenberg, "Min son på galejan", 1781.
%%%%
+Mara
+
+"This night the Lord of Illusion passed among you, Mara, mighty among
+ dreamers, mighty for ill. He did come upon another who may work with the
+ stuff of dreams in a different way. He did meet with Dharma, who may expel
+ a dreamer from his dream. They did struggle, and the Lord Mara is no more.
+ Why did they struggle, deathgod against illusionist? You say their ways are
+ incomprehensible, being the ways of gods. This is not the answer."
+ -Roger Zelazny, "Lord of Light", 1967
+%%%%
Menkaure
"Ye men of Egypt, ye have heard your king!
diff --git a/crawl-ref/source/dat/descript/monsters.txt b/crawl-ref/source/dat/descript/monsters.txt
index 131c577bdb..da05efc32f 100644
--- a/crawl-ref/source/dat/descript/monsters.txt
+++ b/crawl-ref/source/dat/descript/monsters.txt
@@ -1042,6 +1042,10 @@ manticore
A hideous cross-breed, bearing the features of a human and a lion, with great bat-like wings. Its tail bristles with spikes that can be loosed at potential prey.
%%%%
+Mara
+
+This tall and powerful demon is Mara, Lord of Illusions, mighty among dreamers. He is capable of creating intricately detailed illusions, able to mislead even the minds of the mightiest and most brilliant spell-casters.
+%%%%
merfolk
Half fish, half man, the merfolk are citizens of both water and land, and they'll fiercely protect their chosen territory.
diff --git a/crawl-ref/source/dat/uniques.des b/crawl-ref/source/dat/uniques.des
index 8f301d0ae3..365d66e8eb 100644
--- a/crawl-ref/source/dat/uniques.des
+++ b/crawl-ref/source/dat/uniques.des
@@ -215,6 +215,10 @@ NAME: uniq_maud
DEPTH: 14-16
: place_unique(_G, "Maud")
+NAME: uniq_mara
+DEPTH: 20-27, !Lair, !Slime
+: place_unique(_G, "Mara")
+
NAME: uniq_maurice
DEPTH: 8-9, 10-13, !Lair, !Slime
: place_unique(_G, "Maurice")
diff --git a/crawl-ref/source/dat/zot.des b/crawl-ref/source/dat/zot.des
index bdc8ee1d46..4f6d81b319 100644
--- a/crawl-ref/source/dat/zot.des
+++ b/crawl-ref/source/dat/zot.des
@@ -416,7 +416,7 @@ ORIENT: float
LFLOORCOL: lightgrey
LROCKCOL: lightgrey
LFLOORTILE: floor_tomb
-LROCKTILE: wall_zot_gray
+LROCKTILE: wall_zot_white
MAP
.
ENDMAP
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 8846f838ea..95473fc4a1 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2731,16 +2731,21 @@ static std::string _monster_stat_description(const monsters& mon)
<< ".$";
}
- // Magic resistance at MAG_IMMUNE.
- if (mons_immune_magic(&mon))
- result << pronoun << " is immune to magical enchantments.$";
- else // How resistant is it? Same scale as the player.
+ // Magic resistance at MAG_IMMUNE, but not for Rs, as there is then
+ // too much information leak.
+ if (mon.type != MONS_RAKSHASA && mon.type != MONS_MARA
+ && mon.type != MONS_RAKSHASA_FAKE && mon.type != MONS_MARA_FAKE)
{
- const int mr = mon.res_magic();
- if (mr >= 10)
+ if (mons_immune_magic(&mon))
+ result << pronoun << " is immune to magical enchantments.$";
+ else // How resistant is it? Same scale as the player.
{
- result << pronoun << make_stringf(" is %s resistant to magic.$",
- magic_res_adjective(mr).c_str());
+ const int mr = mon.res_magic();
+ if (mr >= 10)
+ {
+ result << pronoun << make_stringf(" is %s resistant to magic.$",
+ magic_res_adjective(mr).c_str());
+ }
}
}
@@ -2929,7 +2934,8 @@ void get_monster_db_desc(const monsters& mons, describe_info &inf,
<< " is incapable of using stairs.$";
}
- if (mons.is_summoned() && mons.type != MONS_RAKSHASA_FAKE)
+ if (mons.is_summoned() && (mons.type != MONS_RAKSHASA_FAKE
+ && mons.type != MONS_MARA_FAKE))
{
inf.body << "$" << "This monster has been summoned, and is thus only "
"temporary. Killing it yields no experience, nutrition "
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index 1526fd6255..518d21b23c 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -3140,8 +3140,11 @@ static std::string _get_monster_desc(const monsters *mon)
else if (mon->neutral()) // don't differentiate between permanent or not
text += pronoun + " is indifferent to you.\n";
- if (mon->is_summoned() && mon->type != MONS_RAKSHASA_FAKE)
+ if (mon->is_summoned() && (mon->type != MONS_RAKSHASA_FAKE
+ && mon->type != MONS_MARA_FAKE))
+ {
text += pronoun + " has been summoned.\n";
+ }
if (mon->haloed())
text += pronoun + " is illuminated by a divine halo.\n";
@@ -3242,7 +3245,8 @@ std::string get_monster_equipment_desc(const monsters *mon, bool full_desc,
std::string weap = "";
// We don't report rakshasa equipment in order not to give away the
- // true rakshasa when it summons.
+ // true rakshasa when it summons. But Mara is fine, because his weapons
+ // and armour are cloned with him.
if (mon->type != MONS_DANCING_WEAPON
&& (mon->type != MONS_RAKSHASA || mon->friendly()))
@@ -3258,7 +3262,8 @@ std::string get_monster_equipment_desc(const monsters *mon, bool full_desc,
}
// Print the rest of the equipment only for full descriptions.
- if (full_desc && (mon->type != MONS_RAKSHASA || mon->friendly()))
+ if (full_desc && ((mon->type != MONS_RAKSHASA && mon->type != MONS_MARA
+ && mon->type != MONS_MARA_FAKE) || mon->friendly()))
{
const int mon_arm = mon->inv[MSLOT_ARMOUR];
const int mon_shd = mon->inv[MSLOT_SHIELD];
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index f8d614d73f..bef185979e 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -3592,7 +3592,7 @@ static int _place_uniques(int level_number, char level_type)
int num_placed = 0;
// Magic numbers for dpeg's unique system.
- int A = 3;
+ int A = 2;
int B = 5;
while (one_chance_in(A))
{
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index e9894917b0..30687dd58d 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -937,6 +937,13 @@ void direct_effect(monsters *source, spell_type spell,
mons_cast_haunt(source);
break;
+ case SPELL_MISLEAD:
+ if (!def)
+ mons_cast_mislead(source);
+ else
+ defender->confuse(source, source->hit_dice * 12);
+ break;
+
default:
ASSERT(false);
}
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 94d2b6328d..322a67c270 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1203,6 +1203,7 @@ enum duration_type
DUR_SLIMIFY,
DUR_TIME_STEP,
DUR_ICEMAIL_DEPLETED, // Wait this many turns for full Icemail
+ DUR_MISLED,
NUM_DURATIONS
};
@@ -2060,6 +2061,8 @@ enum monster_type // (int) menv[].type
MONS_CRAZY_YIUF,
MONS_SLAVE,
MONS_GIANT_LEECH,
+ MONS_MARA,
+ MONS_MARA_FAKE,
// Testing monsters
MONS_TEST_SPAWNER,
@@ -2314,6 +2317,8 @@ enum mon_spellbook_type
MST_AIZUL,
MST_EXECUTIONER,
MST_HAROLD,
+ MST_MARA,
+ MST_MARA_FAKE,
MST_TEST_SPAWNER = 200,
NUM_MSTYPES,
@@ -2912,6 +2917,10 @@ enum spell_type
SPELL_BLINK_CLOSE,
SPELL_BLINK_RANGE,
SPELL_BLINK_AWAY,
+ SPELL_MISLEAD,
+ SPELL_FAKE_MARA_SUMMON,
+ SPELL_SUMMON_RAKSHASA,
+ SPELL_SUMMON_PLAYER_GHOST,
NUM_SPELLS
};
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 3ddd3ba835..1543ddabb1 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -5670,7 +5670,7 @@ int melee_attack::mons_to_hit()
///////////////////////////////////////////////////////////////////////////
-static bool wielded_weapon_check(const item_def *weapon)
+bool wielded_weapon_check(item_def *weapon, bool no_message)
{
bool weapon_warning = false;
bool unarmed_warning = false;
@@ -5694,6 +5694,9 @@ static bool wielded_weapon_check(const item_def *weapon)
if (!you.received_weapon_warning && !you.confused()
&& (weapon_warning || unarmed_warning))
{
+ if (no_message)
+ return (false);
+
std::string prompt = "Really attack while ";
if (unarmed_warning)
prompt += "being unarmed?";
diff --git a/crawl-ref/source/fight.h b/crawl-ref/source/fight.h
index 70e29f2a02..2bc47bd030 100644
--- a/crawl-ref/source/fight.h
+++ b/crawl-ref/source/fight.h
@@ -60,6 +60,7 @@ bool monster_attack(monsters* attacker, bool allow_unarmed = true);
bool monsters_fight(monsters* attacker, monsters* attacked,
bool allow_unarmed = true);
+bool wielded_weapon_check(item_def *weapon, bool no_message = false);
int calc_your_to_hit(bool random_factor);
int calc_heavy_armour_penalty(bool random_factor);
diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc
index edb1b723fb..f8b6ce9960 100644
--- a/crawl-ref/source/godabil.cc
+++ b/crawl-ref/source/godabil.cc
@@ -1256,7 +1256,7 @@ bool ponderousify_armour()
static int _slouch_monsters(coord_def where, int pow, int, actor* agent)
{
monsters* mon = monster_at(where);
- if (mon == NULL || mons_is_stationary(mon))
+ if (mon == NULL || mons_is_stationary(mon) || mon->cannot_move())
return (0);
int dmg = (mon->speed - 1000/player_movement_speed()/player_speed());
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 4fa9d16826..a64b191e73 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -1200,6 +1200,10 @@ std::string scorefile_entry::death_source_desc() const
return ("");
}
+ // XXX: Deals specially with Mara's clones.
+ if (death_source == MONS_MARA_FAKE)
+ return ("an illusion of Mara");
+
// XXX no longer handles mons_num correctly! FIXME
return (!death_source_name.empty() ?
death_source_name : mons_type_name(death_source, DESC_NOCAP_A));
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index bc916fe007..ccca70a29d 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -76,6 +76,7 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
you.rotting = 0;
you.disease = 0;
you.duration[DUR_CONF] = 0;
+ you.duration[DUR_MISLED] = 0;
break;
case POT_HEAL_WOUNDS:
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 4553465d97..691ffb0217 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -175,12 +175,13 @@ bool can_wield(item_def *weapon, bool say_reason,
}
if (you.hunger_state < HS_FULL
+ && you.hunger < you_max_hunger() - 500 // ghouls
&& get_weapon_brand(*weapon) == SPWPN_VAMPIRICISM
&& you.species != SP_VAMPIRE && you.species != SP_MUMMY)
{
if (say_reason)
{
- mpr("You're too hungry to wield that.");
+ mpr("As you grasp it, you feel a great hunger. Being not satiated, you stop.");
// If it's a standard weapon, you know its ego now.
if (!is_artefact(*weapon) && !is_blessed(*weapon)
&& !item_type_known(*weapon))
diff --git a/crawl-ref/source/kills.cc b/crawl-ref/source/kills.cc
index fa7e0a3924..f0ea8ee3f0 100644
--- a/crawl-ref/source/kills.cc
+++ b/crawl-ref/source/kills.cc
@@ -280,7 +280,7 @@ void Kills::merge(const Kills &k)
void Kills::record_kill(const struct monsters *mon)
{
// Handle player ghosts separately.
- if (mon->type == MONS_PLAYER_GHOST)
+ if (mon->type == MONS_PLAYER_GHOST && !mon->is_summoned())
{
record_ghost_kill(mon);
return ;
@@ -533,6 +533,9 @@ std::string kill_def::base_name(const kill_monster_desc &md) const
case MONS_RAKSHASA_FAKE:
name = "illusory " + name;
break;
+ case MONS_MARA_FAKE:
+ name = "illusory " + name;
+ break;
}
return name;
}
@@ -622,7 +625,7 @@ kill_ghost::kill_ghost(const monsters *mon)
// Check whether this is really a ghost, since we also have to handle
// the Pandemonic demons.
- if (mon->type == MONS_PLAYER_GHOST)
+ if (mon->type == MONS_PLAYER_GHOST && !mon->is_summoned())
ghost_name = "The ghost of " + get_ghost_description(*mon, true);
}
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index d3feb08c00..c1b4c6d615 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -1296,6 +1296,12 @@ static void _go_upstairs()
if (_marker_vetoes_stair())
return;
+ if (you.duration[DUR_MISLED])
+ {
+ mpr("Away from their source, illusions no longer mislead you.", MSGCH_DURATION);
+ you.duration[DUR_MISLED] = 0;
+ }
+
tag_followers(); // Only those beside us right now can follow.
start_delay(DELAY_ASCENDING_STAIRS,
1 + (you.burden_state > BS_UNENCUMBERED));
@@ -1367,6 +1373,12 @@ static void _go_downstairs()
if (!check_annotation_exclusion_warning())
return;
+ if (you.duration[DUR_MISLED])
+ {
+ mpr("Away from their source, illusions no longer mislead you.", MSGCH_DURATION);
+ you.duration[DUR_MISLED] = 0;
+ }
+
if (shaft)
{
start_delay( DELAY_DESCENDING_STAIRS, 0, you.your_level );
@@ -2427,6 +2439,7 @@ static void _decrement_durations()
_decrement_a_duration(DUR_LOWERED_MR, delay, "You feel more resistant to magic.");
_decrement_a_duration(DUR_SLIMIFY, delay, "You feel less slimy.",
coinflip(), "Your slime is starting to congeal.");
+ _decrement_a_duration(DUR_MISLED, delay, "Your thoughts are your own once more.");
if (you.duration[DUR_PARALYSIS] || you.petrified())
{
@@ -4618,7 +4631,7 @@ static void _compile_time_asserts()
COMPILE_CHECK(SP_VAMPIRE == 30 , c3);
COMPILE_CHECK(SPELL_DEBUGGING_RAY == 103 , c4);
COMPILE_CHECK(SPELL_RETURNING_AMMUNITION == 162 , c5);
- COMPILE_CHECK(NUM_SPELLS == 211 , c6);
+ COMPILE_CHECK(NUM_SPELLS == 215 , c6);
//jmf: NEW ASSERTS: we ought to do a *lot* of these
COMPILE_CHECK(NUM_SPECIES < SP_UNKNOWN , c7);
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index effde648fa..060ec78677 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -501,21 +501,27 @@ void map_lines::apply_grid_overlay(const coord_def &c)
// Over-ride whatever property is already there.
env.pgrid(gc) |= property;
#ifdef USE_TILE
- const int floor = (*overlay)(x, y).floortile;
+ int floor = (*overlay)(x, y).floortile;
if (floor)
{
+ if (colour)
+ floor = tile_dngn_coloured(floor, colour);
int offset = random2(tile_dngn_count(floor));
env.tile_flv(gc).floor = floor + offset;
}
- const int rock = (*overlay)(x, y).rocktile;
+ int rock = (*overlay)(x, y).rocktile;
if (rock)
{
+ if (colour)
+ rock = tile_dngn_coloured(rock, colour);
int offset = random2(tile_dngn_count(rock));
env.tile_flv(gc).wall = rock + offset;
}
- const int tile = (*overlay)(x, y).tile;
+ int tile = (*overlay)(x, y).tile;
if (tile)
{
+ if (colour)
+ tile = tile_dngn_coloured(tile, colour);
int offset = random2(tile_dngn_count(tile));
if (grd(gc) == DNGN_FLOOR && !floor)
env.tile_flv(gc).floor = tile + offset;
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 42006436f7..07da121e02 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -337,7 +337,7 @@ static bool _safe_vault_place(const map_def &map,
if (lines[dp.y][dp.x] == ' ')
continue;
- if (dgn_Map_Mask[cp.x][cp.y])
+ if (dgn_Map_Mask[cp.x][cp.y] == MMT_VAULT)
return (false);
const dungeon_feature_type dfeat = grd(cp);
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index 32a764bcb1..5325d3f27b 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -1043,6 +1043,8 @@ bool mon_special_ability(monsters *monster, bolt & beem)
case MONS_BLINK_FROG:
case MONS_KILLER_KLOWN:
case MONS_PRINCE_RIBBIT:
+ case MONS_MARA:
+ case MONS_MARA_FAKE:
case MONS_GOLDEN_EYE:
if (one_chance_in(7) || monster->caught() && one_chance_in(3))
used = monster_blink(monster);
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc
index 8a6397d99f..761521f7ab 100644
--- a/crawl-ref/source/mon-cast.cc
+++ b/crawl-ref/source/mon-cast.cc
@@ -16,11 +16,14 @@
#include "fprop.h"
#include "fight.h"
#include "ghost.h"
+#include "items.h"
#include "misc.h"
+#include "message.h"
#include "mon-behv.h"
#include "mon-iter.h"
#include "mon-place.h"
#include "terrain.h"
+#include "tutorial.h"
#include "mgen_data.h"
#include "coord.h"
#include "mon-speak.h"
@@ -39,6 +42,7 @@
#include "teleport.h"
#include "view.h"
#include "viewchar.h"
+#include "xom.h"
static bool _valid_mon_spells[NUM_SPELLS];
@@ -727,7 +731,8 @@ static bool _los_free_spell(spell_type spell_cast)
|| spell_cast == SPELL_SMITING
|| spell_cast == SPELL_HAUNT
|| spell_cast == SPELL_FIRE_STORM
- || spell_cast == SPELL_AIRSTRIKE);
+ || spell_cast == SPELL_AIRSTRIKE
+ || spell_cast == SPELL_MISLEAD);
}
// Set up bolt structure for monster spell casting.
@@ -762,6 +767,7 @@ bool setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
case SPELL_BRAIN_FEED:
pbolt.type = DMNBM_BRAIN_FEED;
return (true);
+ case SPELL_MISLEAD:
case SPELL_SMITING:
case SPELL_AIRSTRIKE:
pbolt.type = DMNBM_SMITING;
@@ -781,6 +787,9 @@ bool setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
case SPELL_VAMPIRE_SUMMON:
case SPELL_SHADOW_CREATURES: // summon anything appropriate for level
case SPELL_FAKE_RAKSHASA_SUMMON:
+ case SPELL_FAKE_MARA_SUMMON:
+ case SPELL_SUMMON_PLAYER_GHOST:
+ case SPELL_SUMMON_RAKSHASA:
case SPELL_SUMMON_DEMON:
case SPELL_SUMMON_UGLY_THING:
case SPELL_ANIMATE_DEAD:
@@ -814,6 +823,7 @@ bool setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
case SPELL_CHAIN_LIGHTNING: // the only user is reckless
case SPELL_SUMMON_EYEBALLS:
case SPELL_SUMMON_BUTTERFLIES:
+ case SPELL_MISLEAD:
return (true);
default:
if (check_validity)
@@ -1542,6 +1552,130 @@ void mons_cast_haunt(monsters *monster)
_pick_random_wraith, random_range(3, 6), GOD_NO_GOD, &fpos);
}
+int _count_mara_fakes()
+{
+ int count = 0;
+ for (monster_iterator mi; mi; ++mi)
+ {
+ if (mi->type == MONS_MARA_FAKE)
+ count++;
+ }
+
+ return count;
+}
+
+bool _unsuitable_misled_monster(monster_type mons)
+{
+ return (mons_is_unique(mons) || mons_is_mimic(mons)
+ || mons_class_is_stationary(mons) || mons_genus(mons) == MONS_DRACONIAN
+ || mons == MONS_DANCING_WEAPON || mons == MONS_UGLY_THING
+ || mons == MONS_VERY_UGLY_THING || mons == MONS_ZOMBIE_SMALL
+ || mons == MONS_ZOMBIE_LARGE || mons == MONS_SKELETON_SMALL
+ || mons == MONS_SKELETON_LARGE || mons == MONS_SIMULACRUM_SMALL
+ || mons == MONS_SIMULACRUM_LARGE || mons == MONS_SPECTRAL_THING
+ || mons == MONS_SLIME_CREATURE || mons == MONS_BALLISTOMYCETE
+ || mons == MONS_HYDRA || mons == MONS_PLAYER_GHOST
+ || mons == MONS_SHAPESHIFTER || mons == MONS_PANDEMONIUM_DEMON
+ || mons == MONS_KILLER_KLOWN || mons == MONS_KRAKEN
+ || mons == MONS_KRAKEN_TENTACLE
+ || mons == MONS_GLOWING_SHAPESHIFTER);
+}
+
+monster_type _get_misled_monster (monsters *monster)
+{
+ monster_type mons = random_monster_at_grid(monster->pos());
+ if (_unsuitable_misled_monster(mons))
+ mons = random_monster_at_grid(monster->pos());
+
+ if (_unsuitable_misled_monster(mons))
+ return (MONS_GIANT_BAT);
+
+ return mons;
+}
+
+int _update_mislead_monsters(monsters* monster)
+{
+ int count = 0;
+
+ for (monster_iterator mi; mi; ++mi)
+ {
+ if (*mi == monster)
+ continue;
+
+ // Don't affect uniques, named monsters, and monsters with special tiles.
+ if (mons_is_unique(mi->type) || !mi->mname.empty()
+ || mi->props.exists("monster_tile") || mi->props.exists("mislead_as"))
+ {
+ continue;
+ }
+ else
+ {
+ mi->props["mislead_as"] = short(_get_misled_monster(*mi));
+ count++;
+ }
+ }
+
+ return count;
+}
+
+void mons_cast_mislead(monsters *monster)
+{
+ // This really only affects the player; it causes confusion when cast on
+ // non-player foes, but that is dealt with inside ye-great-Switch-of-Doom.
+ if (monster->foe != MHITYOU)
+ return;
+
+ // Prevents Mislead spam by Mara and co. {due}
+ if (you.duration[DUR_MISLED] > 10 && one_chance_in(3))
+ return;
+
+ if (wearing_amulet(AMU_CLARITY))
+ {
+ mpr("Your vision blurs momentarily.");
+ return;
+ }
+
+ _update_mislead_monsters(monster);
+
+ const int old_value = you.duration[DUR_MISLED];
+ you.increase_duration(DUR_MISLED, monster->hit_dice * 12 / 3, 50);
+ if (you.duration[DUR_MISLED] > old_value)
+ {
+ you.check_awaken(500);
+
+ if (old_value <= 0)
+ {
+ mpr("But for a moment, strange images dance in front of your eyes.", MSGCH_WARN);
+#ifdef USE_TILE
+ tiles.add_overlay(you.pos(), tileidx_zap(MAGENTA));
+ update_screen();
+#else
+ flash_view(MAGENTA);
+#endif
+ more();
+ }
+ else
+ mpr("You are even more misled!", MSGCH_WARN);
+
+ learned_something_new(TUT_YOU_ENCHANTED);
+
+ xom_is_stimulated((you.duration[DUR_MISLED] - old_value)
+ / BASELINE_DELAY);
+ }
+
+ return;
+}
+
+bool _find_players_ghost ()
+{
+ bool found = false;
+ for (monster_iterator mi; mi; ++mi)
+ if (mi->type == MONS_PLAYER_GHOST && mi->mname == you.your_name)
+ found = true;
+
+ return found;
+}
+
void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
bool do_noise, bool special_ability)
{
@@ -1605,8 +1739,8 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
const bool wizard = monster->is_actual_spellcaster();
god_type god = (priest || !(priest || wizard)) ? monster->god : GOD_NO_GOD;
- // Used for summon X elemental, and nothing else. {bookofjude}
- monster_type el_summon_type = MONS_NO_MONSTER;
+ // Used for summon X elemental and nothing else. {bookofjude}
+ monster_type summon_type = MONS_NO_MONSTER;
switch (spell_cast)
{
@@ -1667,20 +1801,20 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
return;
case SPELL_WATER_ELEMENTALS:
- if (el_summon_type == MONS_NO_MONSTER)
- el_summon_type = MONS_WATER_ELEMENTAL;
+ if (summon_type == MONS_NO_MONSTER)
+ summon_type = MONS_WATER_ELEMENTAL;
// Deliberate fall through
case SPELL_EARTH_ELEMENTALS:
- if (el_summon_type == MONS_NO_MONSTER)
- el_summon_type = MONS_EARTH_ELEMENTAL;
+ if (summon_type == MONS_NO_MONSTER)
+ summon_type = MONS_EARTH_ELEMENTAL;
// Deliberate fall through
case SPELL_AIR_ELEMENTALS:
- if (el_summon_type == MONS_NO_MONSTER)
- el_summon_type = MONS_AIR_ELEMENTAL;
+ if (summon_type == MONS_NO_MONSTER)
+ summon_type = MONS_AIR_ELEMENTAL;
// Deliberate fall through
case SPELL_FIRE_ELEMENTALS:
- if (el_summon_type == MONS_NO_MONSTER)
- el_summon_type = MONS_FIRE_ELEMENTAL;
+ if (summon_type == MONS_NO_MONSTER)
+ summon_type = MONS_FIRE_ELEMENTAL;
if (_mons_abjured(monster, monsterNearby))
return;
@@ -1690,11 +1824,42 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
for (sumcount = 0; sumcount < sumcount2; sumcount++)
{
create_monster(
- mgen_data(el_summon_type, SAME_ATTITUDE(monster), monster,
+ mgen_data(summon_type, SAME_ATTITUDE(monster), monster,
+ 3, spell_cast, monster->pos(), monster->foe, 0, god));
+ }
+ return;
+
+ case SPELL_SUMMON_RAKSHASA:
+ sumcount2 = 1 + random2(4) + random2(monster->hit_dice / 7 + 1);
+
+ for (sumcount = 0; sumcount < sumcount2; sumcount++)
+ {
+ create_monster(
+ mgen_data(MONS_RAKSHASA, SAME_ATTITUDE(monster), monster,
3, spell_cast, monster->pos(), monster->foe, 0, god));
}
return;
+ case SPELL_SUMMON_PLAYER_GHOST:
+
+ // Do nothing in the arena; this could instead create a ghost of an
+ // existant monster, but that would require the spell being dealth with
+ // as a bolt instead.
+ if (crawl_state.arena)
+ return;
+
+ // Only summon one ghost.
+ if (_find_players_ghost())
+ return;
+
+ mpr("There is a horrible, sudden wrenching feeling in your soul!", MSGCH_WARN);
+
+ create_monster(
+ mgen_data(MONS_PLAYER_GHOST, SAME_ATTITUDE(monster), monster,
+ 6, spell_cast, monster->pos(), monster->foe, 0, god));
+
+ return;
+
case SPELL_KRAKEN_TENTACLES:
{
int kraken_index = monster->mindex();
@@ -1737,6 +1902,66 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
mpr("Tentacles burst out of the water!");
return;
}
+ case SPELL_FAKE_MARA_SUMMON:
+ // We only want there to be two fakes, which, plus Mara, means
+ // a total of three Maras; if we already have two, give up, otherwise
+ // we want to summon either one more or two more.
+ sumcount2 = 2 - _count_mara_fakes();
+
+ for (sumcount = 0; sumcount < sumcount2; sumcount++)
+ {
+ mgen_data summ_mon = mgen_data(MONS_MARA_FAKE, SAME_ATTITUDE(monster),
+ monster, 3, spell_cast, monster->pos(),
+ monster->foe, 0, god);
+ // This is somewhat hacky, to prevent "A Mara", and such, as MONS_FAKE_MARA
+ // is not M_UNIQUE.
+ summ_mon.mname = "Mara";
+ summ_mon.extra_flags |= MF_NAME_REPLACE;
+
+ int created = create_monster(summ_mon);
+ if (created == -1)
+ continue;
+
+ // Mara's clones are special; they have the same stats as him, and
+ // are exact clones, so they are created damaged if necessary, with
+ // identical enchants and with the same items.
+ monsters *new_fake = &menv[created];
+ new_fake->hit_points = monster->hit_points;
+ new_fake->max_hit_points = monster->max_hit_points;
+ mon_enchant_list::iterator ei;
+ for (ei = monster->enchantments.begin(); ei != monster->enchantments.end(); ++ei)
+ {
+ new_fake->enchantments.insert(*ei);
+ }
+
+ // Code basically lifted from clone_monster. In theory, it only needs
+ // to copy weapon and armour slots; instead, copy the whole inventory.
+ for (int i = 0; i < NUM_MONSTER_SLOTS; i++)
+ {
+ const int old_index = monster->inv[i];
+
+ if (old_index == NON_ITEM)
+ continue;
+
+ const int new_index = get_item_slot(0);
+ if (new_index == NON_ITEM)
+ {
+ new_fake->unequip(mitm[old_index], i, 0, true);
+ new_fake->inv[i] = NON_ITEM;
+ continue;
+ }
+
+ new_fake->inv[i] = new_index;
+ mitm[new_index] = mitm[old_index];
+ mitm[new_index].set_holding_monster(new_fake->mindex());
+
+ // Mark items as summoned, so there's no way to get three nice
+ // weapons or such out of him.
+ mitm[new_index].flags |= ISFLAG_SUMMONED;
+ }
+ }
+ return;
+
case SPELL_FAKE_RAKSHASA_SUMMON:
sumcount2 = (coinflip() ? 2 : 3);
diff --git a/crawl-ref/source/mon-cast.h b/crawl-ref/source/mon-cast.h
index 896c377ceb..22629b4f9a 100644
--- a/crawl-ref/source/mon-cast.h
+++ b/crawl-ref/source/mon-cast.h
@@ -27,5 +27,6 @@ bool setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast,
bool check_validity = false);
void mons_cast_haunt(monsters *monster);
+void mons_cast_mislead(monsters *monster);
#endif
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index e9094329bd..c0c251c67b 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -1097,7 +1097,7 @@ static monsterentry mondata[] = {
{
MONS_MERFOLK, 'm', LIGHTBLUE, "merfolk",
M_WARM_BLOOD | M_SPEAKS,
- MR_RES_POISON | MR_RES_COLD,
+ MR_NO_FLAGS,
500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -3,
{ {AT_HIT, AF_PLAIN, 14}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 9, 2, 4, 0 },
@@ -1109,7 +1109,7 @@ static monsterentry mondata[] = {
{
MONS_MERMAID, 'm', CYAN, "mermaid",
M_SPELLCASTER | M_WARM_BLOOD | M_SPEAKS,
- MR_RES_POISON | MR_RES_COLD,
+ MR_NO_FLAGS,
500, 10, MONS_MERMAID, MONS_MERMAID, MH_NATURAL, -5,
{ {AT_HIT, AF_PLAIN, 10}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 8, 2, 3, 0 },
@@ -1121,7 +1121,7 @@ static monsterentry mondata[] = {
{
MONS_SIREN, 'm', LIGHTCYAN, "siren",
M_SPELLCASTER | M_WARM_BLOOD | M_SPEAKS,
- MR_RES_POISON | MR_RES_COLD,
+ MR_NO_FLAGS,
500, 12, MONS_MERMAID, MONS_SIREN, MH_NATURAL, -7,
{ {AT_HIT, AF_PLAIN, 10}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 8, 2, 3, 0 },
@@ -4673,6 +4673,32 @@ static monsterentry mondata[] = {
},
{
+ MONS_MARA, 'R', LIGHTRED, "Mara",
+ M_SPELLCASTER | M_SEE_INVIS | M_ACTUAL_SPELLS | M_SPEAKS | M_UNIQUE,
+ MR_RES_POISON | MR_RES_ELEC,
+ 0, 15, MONS_RAKSHASA, MONS_RAKSHASA, MH_DEMONIC, -10,
+ { {AT_HIT, AF_PLAIN, 40}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
+ { 20, 0, 0, 140 },
+ 15, 15, MST_MARA, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT,
+ I_HIGH, HT_LAND, FL_NONE, 10, DEFAULT_ENERGY,
+ MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM
+},
+
+// Illusions of Mara. Only two ever exist at the one time; identical stats to
+// Mara.
+{
+ MONS_MARA_FAKE, 'R', LIGHTRED, "Mara",
+ M_SPELLCASTER | M_SEE_INVIS | M_ACTUAL_SPELLS | M_SPEAKS,
+ MR_RES_POISON | MR_RES_ELEC,
+ 0, 15, MONS_RAKSHASA_FAKE, MONS_RAKSHASA_FAKE, MH_DEMONIC, MAG_IMMUNE,
+ { {AT_HIT, AF_PLAIN, 40}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
+ { 20, 0, 0, 140 },
+ 15, 15, MST_MARA_FAKE, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT,
+ I_HIGH, HT_LAND, FL_NONE, 10, DEFAULT_ENERGY,
+ MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM
+},
+
+{
// Snorg can go berserk.
MONS_SNORG, 'T', LIGHTGREEN, "Snorg",
M_UNIQUE | M_WARM_BLOOD | M_SPEAKS,
diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc
index 1c261102a9..01edc35951 100644
--- a/crawl-ref/source/mon-gear.cc
+++ b/crawl-ref/source/mon-gear.cc
@@ -364,6 +364,13 @@ static item_make_species_type _give_weapon(monsters *mon, int level,
0);
break;
+ case MONS_MARA:
+ item.base_type = OBJ_WEAPONS;
+ item.sub_type = random_choose(WPN_DEMON_BLADE, WPN_DEMON_TRIDENT,
+ WPN_DEMON_WHIP, -1);
+ level = MAKE_GOOD_ITEM;
+ break;
+
case MONS_DEEP_ELF_FIGHTER:
case MONS_DEEP_ELF_HIGH_PRIEST:
case MONS_DEEP_ELF_KNIGHT:
@@ -1440,6 +1447,7 @@ void give_armour(monsters *mon, int level)
case MONS_DRACONIAN_KNIGHT:
case MONS_WIZARD:
case MONS_ILSUIW:
+ case MONS_MARA:
if (item_race == MAKE_ITEM_RANDOM_RACE)
item_race = MAKE_ITEM_NO_RACE;
item.base_type = OBJ_ARMOUR;
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc
index c62e6aaf1c..07b0e4eab8 100644
--- a/crawl-ref/source/mon-info.cc
+++ b/crawl-ref/source/mon-info.cc
@@ -42,6 +42,8 @@ monster_info::monster_info(const monsters *m)
int mtype = m->type;
if (mtype == MONS_RAKSHASA_FAKE)
mtype = MONS_RAKSHASA;
+ else if (mtype == MONS_MARA_FAKE)
+ mtype = MONS_MARA;
// Currently, difficulty is defined as "average hp".
m_difficulty = mons_difficulty(mtype);
@@ -79,12 +81,21 @@ bool monster_info::less_than(const monster_info& m1,
int m1type = m1.m_mon->type;
int m2type = m2.m_mon->type;
+ if (!crawl_state.arena && you.misled())
+ {
+ m1type = m1.m_mon->get_mislead_type();
+ m2type = m2.m_mon->get_mislead_type();
+ }
// Don't differentiate real rakshasas from fake ones.
if (m1type == MONS_RAKSHASA_FAKE)
m1type = MONS_RAKSHASA;
+ else if (m1type == MONS_MARA_FAKE)
+ m1type = MONS_MARA;
if (m2type == MONS_RAKSHASA_FAKE)
m2type = MONS_RAKSHASA;
+ else if (m2type == MONS_MARA_FAKE)
+ m2type = MONS_MARA;
// Force plain but different coloured draconians to be treated like the
// same sub-type.
@@ -207,11 +218,15 @@ void monster_info::to_string(int count, std::string& desc,
int& desc_color) const
{
std::ostringstream out;
+ monster_type type = m_mon->type;
+ if (!crawl_state.arena && you.misled())
+ type = m_mon->get_mislead_type();
+
if (count == 1)
{
- if (mons_is_mimic(m_mon->type))
- out << mons_type_name(m_mon->type, DESC_PLAIN);
+ if (mons_is_mimic(type))
+ out << mons_type_name(type, DESC_PLAIN);
else
out << m_mon->full_name(DESC_PLAIN);
}
@@ -220,7 +235,9 @@ void monster_info::to_string(int count, std::string& desc,
// Don't pluralise uniques, ever. Multiple copies of the same unique
// are unlikely in the dungeon currently, but quite common in the
// arena. This prevens "4 Gra", etc. {due}
- if (mons_is_unique(m_mon->type))
+ // Unless it's Mara, who summons illusions of himself.
+ if (mons_is_unique(type) && type != MONS_MARA
+ && type != MONS_MARA_FAKE)
{
out << count << " "
<< m_mon->name(DESC_PLAIN);
@@ -228,18 +245,18 @@ void monster_info::to_string(int count, std::string& desc,
// Don't differentiate between dancing weapons, mimics, (very)
// ugly things or draconians of different types.
else if (m_fullname
- && m_mon->type != MONS_DANCING_WEAPON
- && mons_genus(m_mon->type) != MONS_DRACONIAN
- && m_mon->type != MONS_UGLY_THING
- && m_mon->type != MONS_VERY_UGLY_THING
- && !mons_is_mimic(m_mon->type)
+ && type != MONS_DANCING_WEAPON
+ && mons_genus(type) != MONS_DRACONIAN
+ && type != MONS_UGLY_THING
+ && type != MONS_VERY_UGLY_THING
+ && !mons_is_mimic(type)
&& m_mon->mname.empty())
{
out << count << " "
<< pluralise(m_mon->name(DESC_PLAIN));
}
- else if (m_mon->type >= MONS_DRACONIAN
- && m_mon->type <= MONS_PALE_DRACONIAN)
+ else if (type >= MONS_DRACONIAN
+ && type <= MONS_PALE_DRACONIAN)
{
out << count << " "
<< pluralise(mons_type_name(MONS_DRACONIAN, DESC_PLAIN));
@@ -247,7 +264,7 @@ void monster_info::to_string(int count, std::string& desc,
else
{
out << count << " "
- << pluralise(mons_type_name(m_mon->type, DESC_PLAIN));
+ << pluralise(mons_type_name(type, DESC_PLAIN));
}
}
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc
index a4273c6a7c..9faa371cb8 100644
--- a/crawl-ref/source/mon-place.cc
+++ b/crawl-ref/source/mon-place.cc
@@ -2927,8 +2927,9 @@ monster_type summon_any_demon(demon_class_type dct)
break;
case DEMON_COMMON:
- temp_rand = random2(3948);
- mon = ((temp_rand > 3367) ? MONS_NEQOXEC : // 14.69%
+ temp_rand = random2(4066);
+ mon = ((temp_rand > 3947) ? MONS_SIXFIRHY : // 3.00%
+ (temp_rand > 3367) ? MONS_NEQOXEC : // 14.69%
(temp_rand > 2787) ? MONS_ORANGE_DEMON : // 14.69%
(temp_rand > 2207) ? MONS_HELLWING : // 14.69%
(temp_rand > 1627) ? MONS_SMOKE_DEMON : // 14.69%
diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h
index a5aaa6526b..526d37f378 100644
--- a/crawl-ref/source/mon-spll.h
+++ b/crawl-ref/source/mon-spll.h
@@ -1297,6 +1297,28 @@
}
},
+ { MST_MARA,
+ {
+ SPELL_MISLEAD,
+ SPELL_FAKE_MARA_SUMMON,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_SUMMON_PLAYER_GHOST,
+ SPELL_PAIN,
+ SPELL_TELEPORT_SELF,
+ }
+ },
+
+ { MST_MARA_FAKE,
+ {
+ SPELL_MISLEAD,
+ SPELL_NO_SPELL,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_NO_SPELL,
+ SPELL_PAIN,
+ SPELL_TELEPORT_SELF,
+ }
+ },
+
{ MST_TEST_SPAWNER,
{
SPELL_SHADOW_CREATURES,
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc
index 76f964fe20..add22f09c5 100644
--- a/crawl-ref/source/mon-stuff.cc
+++ b/crawl-ref/source/mon-stuff.cc
@@ -133,7 +133,9 @@ int _make_mimic_item(monster_type type)
case MONS_POTION_MIMIC:
item.base_type = OBJ_POTIONS;
- item.sub_type = random2(NUM_POTIONS);
+ do
+ item.sub_type = random2(NUM_POTIONS);
+ while (is_blood_potion(item));
break;
case MONS_GOLD_MIMIC:
@@ -158,6 +160,7 @@ const item_def *give_mimic_item(monsters *mimic)
return 0;
if (!mimic->pickup_misc(mitm[it], 0))
ASSERT("Mimic failed to pickup its item.");
+ ASSERT(mimic->inv[MSLOT_MISCELLANY] != NON_ITEM);
return (&mitm[mimic->inv[MSLOT_MISCELLANY]]);
}
@@ -1461,7 +1464,7 @@ int monster_die(monsters *monster, killer_type killer,
const bool gives_xp = (!summoned && !mons_class_flag(monster->type,
M_NO_EXP_GAIN));
- const bool drop_items = !hard_reset;
+ bool drop_items = !hard_reset;
const bool mons_reset(killer == KILL_RESET || killer == KILL_DISMISSED);
@@ -1728,7 +1731,7 @@ int monster_die(monsters *monster, killer_type killer,
}
// Cheibriados hates fast monsters.
- if (mons_is_fast(monster))
+ if (mons_is_fast(monster) && !monster->cannot_move())
{
did_god_conduct(DID_KILL_FAST, monster->hit_dice,
true, monster);
@@ -2047,7 +2050,7 @@ int monster_die(monsters *monster, killer_type killer,
// A banished monster that doesn't go on the transit list
// loses all items.
if (!monster->is_summoned())
- monster->destroy_inventory();
+ drop_items = false;
break;
}
@@ -2055,7 +2058,7 @@ int monster_die(monsters *monster, killer_type killer,
monster->flags |= MF_BANISHED;
monster->set_transit(level_id(LEVEL_ABYSS));
in_transit = true;
- monster->destroy_inventory();
+ drop_items = false;
// Make monster stop patrolling and/or travelling.
monster->patrol_point.reset();
monster->travel_path.clear();
@@ -2066,7 +2069,7 @@ int monster_die(monsters *monster, killer_type killer,
break;
default:
- monster->destroy_inventory();
+ drop_items = false;
break;
}
@@ -2129,7 +2132,7 @@ int monster_die(monsters *monster, killer_type killer,
_elven_twin_died(monster, in_transit);
}
else if (mons_is_mimic(monster->type))
- monster->destroy_inventory();
+ drop_items = false;
else if (!monster->is_summoned())
{
if (mons_genus(monster->type) == MONS_MUMMY)
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 9420d1d78c..3687e1711c 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -148,7 +148,8 @@ void init_mon_name_cache()
if (mon == MONS_RAKSHASA_FAKE
|| mon == MONS_ARMOUR_MIMIC
|| mon == MONS_SCROLL_MIMIC
- || mon == MONS_POTION_MIMIC)
+ || mon == MONS_POTION_MIMIC
+ || mon == MONS_MARA_FAKE)
{
// Keep previous entry.
continue;
@@ -2569,6 +2570,7 @@ static bool _ms_los_spell(spell_type monspell)
if (monspell == SPELL_SMITING
|| monspell == SPELL_AIRSTRIKE
|| monspell == SPELL_HAUNT
+ || monspell == SPELL_MISLEAD
|| spell_typematch(monspell, SPTYP_SUMMONING))
{
return (true);
@@ -2584,7 +2586,8 @@ static bool _ms_ranged_spell(spell_type monspell, bool attack_only = false,
// Check for Smiting specially, so it's not filtered along
// with the summon spells.
if (attack_only
- && (monspell == SPELL_SMITING || monspell == SPELL_AIRSTRIKE))
+ && (monspell == SPELL_SMITING || monspell == SPELL_AIRSTRIKE
+ || monspell == SPELL_MISLEAD))
{
return (true);
}
@@ -2732,6 +2735,10 @@ const char *mons_pronoun(monster_type mon_type, pronoun_type variant,
{
gender = GENDER_FEMALE;
}
+ // Mara's fakes aren't a unique, but should still be classified
+ // as male.
+ else if (mon_type == MONS_MARA_FAKE)
+ gender = GENDER_MALE;
else if (mons_is_unique(mon_type) && mon_type != MONS_PLAYER_GHOST)
{
switch (mon_type)
@@ -2812,7 +2819,8 @@ bool mons_has_smite_attack(const monsters *monster)
|| hspell_pass[i] == SPELL_SMITING
|| hspell_pass[i] == SPELL_HELLFIRE_BURST
|| hspell_pass[i] == SPELL_FIRE_STORM
- || hspell_pass[i] == SPELL_AIRSTRIKE)
+ || hspell_pass[i] == SPELL_AIRSTRIKE
+ || hspell_pass[i] == SPELL_MISLEAD)
{
return (true);
}
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 55b342a903..4cefe30857 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -326,6 +326,7 @@ int monsters::body_weight() const
case MONS_SPECTRAL_WARRIOR:
case MONS_ELECTRIC_GOLEM:
case MONS_RAKSHASA_FAKE:
+ case MONS_MARA_FAKE:
return (0);
case MONS_ZOMBIE_SMALL:
@@ -2039,10 +2040,14 @@ static std::string _invalid_monster_str(monster_type type)
static std::string _str_monam(const monsters& mon, description_level_type desc,
bool force_seen)
{
- if (mon.type == MONS_NO_MONSTER)
+ monster_type type = mon.type;
+ if (!crawl_state.arena && you.misled())
+ type = mon.get_mislead_type();
+
+ if (type == MONS_NO_MONSTER)
return ("DEAD MONSTER");
- else if (invalid_monster_type(mon.type) && mon.type != MONS_PROGRAM_BUG)
- return _invalid_monster_str(mon.type);
+ else if (invalid_monster_type(type) && type != MONS_PROGRAM_BUG)
+ return _invalid_monster_str(type);
const bool arena_submerged = crawl_state.arena && !force_seen
&& mon.submerged();
@@ -2065,10 +2070,10 @@ 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))
+ if (mons_is_mimic(type))
return (get_mimic_item(&mon).name(desc));
- if (mon.type == MONS_DANCING_WEAPON && mon.inv[MSLOT_WEAPON] != NON_ITEM)
+ if (type == MONS_DANCING_WEAPON && mon.inv[MSLOT_WEAPON] != NON_ITEM)
{
unsigned long ignore_flags = ISFLAG_KNOW_CURSE | ISFLAG_KNOW_PLUSES;
bool use_inscrip = true;
@@ -2085,16 +2090,16 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
}
if (desc == DESC_DBNAME)
- return (get_monster_data(mon.type)->name);
+ return (get_monster_data(type)->name);
- if (mon.type == MONS_PLAYER_GHOST)
+ if (type == MONS_PLAYER_GHOST)
return (apostrophise(mon.mname) + " ghost");
// Some monsters might want the name of a different creature.
- monster_type nametype = mon.type;
+ monster_type nametype = type;
// Tack on other prefixes.
- switch (mon.type)
+ switch (type)
{
case MONS_ZOMBIE_SMALL: case MONS_ZOMBIE_LARGE:
case MONS_SKELETON_SMALL: case MONS_SKELETON_LARGE:
@@ -2159,7 +2164,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
result += "submerged ";
// Tack on other prefixes.
- switch (mon.type)
+ switch (type)
{
case MONS_UGLY_THING:
case MONS_VERY_UGLY_THING:
@@ -2185,7 +2190,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
break;
}
- if (mon.type == MONS_SLIME_CREATURE && desc != DESC_DBNAME)
+ if (type == MONS_SLIME_CREATURE && desc != DESC_DBNAME)
{
ASSERT(mon.number <= 5);
const char* cardinals[] = {"buggy ", "", "large ", "very large ",
@@ -2193,7 +2198,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
result += cardinals[mon.number];
}
- if (mon.type == MONS_BALLISTOMYCETE && desc != DESC_DBNAME)
+ if (type == MONS_BALLISTOMYCETE && desc != DESC_DBNAME)
{
result += mon.number ? "active " : "";
}
@@ -2231,7 +2236,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
}
// Add suffixes.
- switch (mon.type)
+ switch (type)
{
case MONS_ZOMBIE_SMALL:
case MONS_ZOMBIE_LARGE:
@@ -2260,7 +2265,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
result.insert(1, "n");
}
- if (mons_is_unique(mon.type) && starts_with(result, "the "))
+ if (mons_is_unique(type) && starts_with(result, "the "))
{
switch (desc)
{
@@ -2278,7 +2283,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
{
// If momentarily in original form, don't display "shaped
// shifter".
- if (mons_genus(mon.type) != MONS_SHAPESHIFTER)
+ if (mons_genus(type) != MONS_SHAPESHIFTER)
result += " shaped shifter";
}
@@ -2350,7 +2355,10 @@ std::string monsters::full_name(description_level_type desc,
}
}
- const int _type = mons_is_zombified(this) ? base_monster : type;
+ int _type = mons_is_zombified(this) ? base_monster : type;
+ if (!crawl_state.arena && you.misled())
+ _type = get_mislead_type();
+
if (mons_genus(_type) == MONS_HYDRA && flag == 0)
return (title);
@@ -3720,7 +3728,11 @@ void monsters::ghost_init()
enchantments.clear();
ench_countdown = 0;
- find_place_to_live();
+ // Summoned player ghosts are already given a position; calling this
+ // in those instances will cause a segfault. Instead, check to see
+ // if we have a home first. {due}
+ if (!in_bounds(pos()))
+ find_place_to_live();
}
void monsters::uglything_init(bool only_mutate)
@@ -5705,6 +5717,14 @@ const monsterentry *monsters::find_monsterentry() const
: get_monster_data(type);
}
+monster_type monsters::get_mislead_type() const
+{
+ if (props.exists("mislead_as"))
+ return static_cast<monster_type>(props["mislead_as"].get_short());
+ else
+ return type;
+}
+
int monsters::action_energy(energy_use_type et) const
{
bool swift = has_ench(ENCH_SWIFT);
diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h
index c17aeee6ce..400ad01769 100644
--- a/crawl-ref/source/monster.h
+++ b/crawl-ref/source/monster.h
@@ -117,6 +117,7 @@ public:
bool has_base_name() const;
const monsterentry *find_monsterentry() const;
+ monster_type get_mislead_type() const;
void init_experience();
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 04d4b9a7ca..4da287188f 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -734,6 +734,9 @@ static void _get_status_lights(std::vector<status_light>& out)
if (you.duration[DUR_LIQUID_FLAMES])
out.push_back(status_light(RED, "Fire"));
+ if (you.duration[DUR_MISLED])
+ out.push_back(status_light(LIGHTMAGENTA, "Misled"));
+
if (you.duration[DUR_POISONING])
{
int color = _bad_ench_colour( you.duration[DUR_POISONING], 5, 10 );
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index fb6b425834..4e5cf2dc77 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -6895,6 +6895,11 @@ bool player::invisible() const
return (duration[DUR_INVIS] && !backlit());
}
+bool player::misled() const
+{
+ return (duration[DUR_MISLED]);
+}
+
bool player::visible_to(const actor *looker) const
{
if (crawl_state.arena)
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index 285d438c0c..d7f5306c08 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -325,6 +325,7 @@ public:
bool is_levitating() const;
bool cannot_speak() const;
bool invisible() const;
+ bool misled() const;
bool can_see_invisible() const;
bool can_see_invisible(bool unid) const;
bool visible_to(const actor *looker) const;
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 3ec55a07cc..accadce94e 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -5151,7 +5151,7 @@ bool god_likes_fresh_corpses(god_type god)
bool god_hates_butchery(god_type god)
{
- return (god == GOD_ELYVILON);
+ return (false);
}
harm_protection_type god_protects_from_harm(god_type god, bool actual)
diff --git a/crawl-ref/source/rltiles/UNUSED/other/dngn_altar_base.png b/crawl-ref/source/rltiles/UNUSED/other/dngn_altar_base.png
new file mode 100644
index 0000000000..322d674f71
--- /dev/null
+++ b/crawl-ref/source/rltiles/UNUSED/other/dngn_altar_base.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/UNUSED/other/pedestal.png b/crawl-ref/source/rltiles/UNUSED/other/pedestal.png
new file mode 100644
index 0000000000..07e57b7480
--- /dev/null
+++ b/crawl-ref/source/rltiles/UNUSED/other/pedestal.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn.txt b/crawl-ref/source/rltiles/dc-dngn.txt
index 0f49bf72cc..053c487f86 100644
--- a/crawl-ref/source/rltiles/dc-dngn.txt
+++ b/crawl-ref/source/rltiles/dc-dngn.txt
@@ -8,7 +8,8 @@ dngn_unseen DNGN_UNSEEN
# Multiple tile definitions are STATIC, that is they may change between
# saves but are otherwise fixed.
-wall/brick_brown0 WALL_NORMAL
+
+wall/brick_brown0 WALL_NORMAL WALL_BRICK WALL_BRICK_BROWN
wall/brick_brown1
wall/brick_brown2
wall/brick_brown3
@@ -16,15 +17,246 @@ wall/brick_brown4
wall/brick_brown5
wall/brick_brown6
wall/brick_brown7
-floor/pebble_gray0 FLOOR_NORMAL
-floor/pebble_gray1
-floor/pebble_gray2
-floor/pebble_gray3
-floor/pebble_gray4
-floor/pebble_gray5
-floor/pebble_gray6
-floor/pebble_gray7
-floor/pebble_gray8
+
+%variation WALL_BRICK blue
+%hue 30 240
+%hue 0 240
+%repeat WALL_BRICK WALL_BRICK_BLUE
+%resetcol
+
+%variation WALL_BRICK green
+%hue 30 90
+%hue 0 90
+%repeat WALL_BRICK WALL_BRICK_GREEN WALL_SNAKE
+%resetcol
+
+%variation WALL_BRICK cyan
+%hue 30 180
+%hue 0 180
+%repeat WALL_BRICK WALL_BRICK_CYAN
+%resetcol
+
+%variation WALL_BRICK red
+%hue 30 0
+%repeat WALL_BRICK WALL_BRICK_RED
+%resetcol
+
+%variation WALL_BRICK magenta
+%hue 30 300
+%hue 0 300
+%repeat WALL_BRICK WALL_BRICK_MAGENTA
+%resetcol
+
+%variation WALL_BRICK lightgray
+%desat 30
+%desat 0
+%lum 0 10
+%repeat WALL_BRICK WALL_BRICK_LIGHTGRAY
+%resetcol
+
+%variation WALL_BRICK darkgray
+%desat 30
+%lum 30 -20
+%desat 0
+%repeat WALL_BRICK WALL_BRICK_DARKGRAY
+%resetcol
+
+%variation WALL_BRICK lightblue
+%hue 30 240
+%lum 30 15
+%hue 0 240
+%repeat WALL_BRICK WALL_BRICK_LIGHTBLUE
+%resetcol
+
+%variation WALL_BRICK lightgreen
+%hue 30 90
+%lum 30 15
+%hue 0 90
+%lum 0 5
+%repeat WALL_BRICK WALL_BRICK_LIGHTGREEN
+%resetcol
+
+%variation WALL_BRICK lightcyan
+%hue 30 180
+%lum 30 15
+%hue 0 180
+%lum 0 5
+%repeat WALL_BRICK WALL_BRICK_LIGHTCYAN
+%resetcol
+
+%variation WALL_BRICK lightred
+%hue 30 0
+%lum 30 15
+%lum 0 5
+%repeat WALL_BRICK WALL_BRICK_LIGHTRED
+%resetcol
+
+%variation WALL_BRICK lightmagenta
+%hue 30 300
+%lum 30 15
+%hue 0 300
+%lum 0 5
+%repeat WALL_BRICK WALL_BRICK_LIGHTMAGENTA
+%resetcol
+
+%variation WALL_BRICK yellow
+%hue 30 60
+%hue 0 60
+%repeat WALL_BRICK WALL_BRICK_YELLOW
+%resetcol
+
+%variation WALL_BRICK white
+%desat 30
+%lum 30 30
+%desat 0
+%lum 0 15
+%repeat WALL_BRICK WALL_BRICK_WHITE
+%resetcol
+
+# The colorized versions of FLOOR_PEBBLE were made from
+# pebble_gray*.png, by colorizing the non-border color
+# with hue 30, sat 50, lum +20 in GIMP.
+%desat 28
+%desat 29
+%desat 30
+floor/pebble_brown0 FLOOR_PEBBLE FLOOR_PEBBLE_LIGHTGRAY FLOOR_NORMAL
+floor/pebble_brown1
+floor/pebble_brown2
+floor/pebble_brown3
+floor/pebble_brown4
+floor/pebble_brown5
+floor/pebble_brown6
+floor/pebble_brown7
+floor/pebble_brown8
+%resetcol
+
+%variation FLOOR_PEBBLE brown
+%hue 28 30
+%hue 29 30
+# Can't just use %repeat here, as we want the coloured versions.
+floor/pebble_brown0 FLOOR_PEBBLE_BROWN
+floor/pebble_brown1
+floor/pebble_brown2
+floor/pebble_brown3
+floor/pebble_brown4
+floor/pebble_brown5
+floor/pebble_brown6
+floor/pebble_brown7
+floor/pebble_brown8
+%resetcol
+
+%variation FLOOR_PEBBLE blue
+%hue 28 240
+%hue 29 240
+%hue 30 240
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_BLUE
+%resetcol
+
+%variation FLOOR_PEBBLE green
+%hue 28 90
+%hue 29 90
+%hue 30 90
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_GREEN
+%resetcol
+
+%variation FLOOR_PEBBLE cyan
+%hue 28 180
+%hue 29 180
+%hue 30 180
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_CYAN
+%resetcol
+
+%variation FLOOR_PEBBLE red
+%hue 28 0
+%hue 29 0
+%hue 30 0
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_RED
+%resetcol
+
+%variation FLOOR_PEBBLE magenta
+%hue 28 300
+%hue 29 300
+%hue 30 300
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_MAGENTA
+%resetcol
+
+%variation FLOOR_PEBBLE darkgray
+%desat 28
+%desat 29
+%desat 30
+%lum 28 -7
+%lum 29 -7
+%lum 30 -7
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_DARKGRAY
+%resetcol
+
+%variation FLOOR_PEBBLE lightblue
+%hue 28 240
+%hue 29 240
+%hue 30 240
+%lum 28 7
+%lum 29 7
+%lum 30 7
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_LIGHTBLUE
+%resetcol
+
+%variation FLOOR_PEBBLE lightgreen
+%hue 28 90
+%hue 29 90
+%hue 30 90
+%lum 28 7
+%lum 29 7
+%lum 30 7
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_LIGHTGREEN
+%resetcol
+
+%variation FLOOR_PEBBLE lightcyan
+%hue 28 180
+%hue 29 180
+%hue 30 180
+%lum 28 7
+%lum 29 7
+%lum 30 7
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_LIGHTCYAN
+%resetcol
+
+%variation FLOOR_PEBBLE lightred
+%hue 28 0
+%hue 29 0
+%hue 30 0
+%lum 28 7
+%lum 29 7
+%lum 30 7
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_LIGHTRED
+%resetcol
+
+%variation FLOOR_PEBBLE lightmagenta
+%hue 28 300
+%hue 29 300
+%hue 30 300
+%lum 28 7
+%lum 29 7
+%lum 30 7
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_LIGHTMAGENTA
+%resetcol
+
+%variation FLOOR_PEBBLE yellow
+%hue 28 60
+%hue 29 60
+%hue 30 60
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_YELLOW
+%resetcol
+
+%variation FLOOR_PEBBLE white
+%desat 28
+%desat 29
+%desat 30
+%lum 0 20
+%lum 28 40
+%lum 29 40
+%lum 30 40
+%repeat FLOOR_PEBBLE_BROWN FLOOR_PEBBLE_WHITE
+%resetcol
wall/relief0 WALL_HALL
wall/relief1
@@ -39,21 +271,18 @@ wall/hive0 WALL_HIVE
wall/hive1
wall/hive2
wall/hive3
-floor/hive0 FLOOR_HIVE
+
+floor/hive0 FLOOR_HIVE FLOOR_ORC
floor/hive1
floor/hive2
floor/hive3
-wall/ice0 WALL_ICE
-wall/ice1
-wall/ice2
-wall/ice3
floor/ice0 FLOOR_ICE
floor/ice1
floor/ice2
floor/ice3
-wall/lair0 WALL_LAIR
+wall/lair0 WALL_LAIR WALL_ORC WALL_SWAMP
wall/lair1
wall/lair2
wall/lair3
@@ -62,16 +291,6 @@ floor/lair1
floor/lair2
floor/lair3
-## orcs don't have their own floor or walls yet...
-wall/lair0 WALL_ORC
-wall/lair1
-wall/lair2
-wall/lair3
-floor/hive0 FLOOR_ORC
-floor/hive1
-floor/hive2
-floor/hive3
-
wall/slime0 WALL_SLIME
wall/slime1
wall/slime2
@@ -81,20 +300,12 @@ floor/bog_green1
floor/bog_green2
floor/bog_green3
-wall/snake0 WALL_SNAKE
-wall/snake1
-wall/snake2
-wall/snake3
floor/snake0 FLOOR_SNAKE
floor/snake1
floor/snake2
floor/snake3
## swamp also doesn't have any unique walls...
-wall/lair0 WALL_SWAMP
-wall/lair1
-wall/lair2
-wall/lair3
floor/swamp0 FLOOR_SWAMP
floor/swamp1
floor/swamp2
@@ -118,40 +329,87 @@ floor/rect_gray1
floor/rect_gray2
floor/rect_gray3
-wall/zot_blue0 WALL_ZOT_BLUE
+wall/zot_blue0 WALL_ZOT WALL_ZOT_BLUE
wall/zot_blue1
wall/zot_blue2
wall/zot_blue3
-wall/zot_cyan0 WALL_ZOT_CYAN
-wall/zot_cyan1
-wall/zot_cyan2
-wall/zot_cyan3
+%variation WALL_ZOT green
+%hue 240 120
+%repeat WALL_ZOT WALL_ZOT_GREEN
+%resetcol
+
+%variation WALL_ZOT cyan
+%hue 240 180
+%repeat WALL_ZOT WALL_ZOT_CYAN WALL_ICE
+%resetcol
+
+%variation WALL_ZOT red
+%hue 240 0
+%repeat WALL_ZOT WALL_ZOT_RED
+%resetcol
+
+%variation WALL_ZOT magenta
+%hue 240 300
+%repeat WALL_ZOT WALL_ZOT_MAGENTA
+%resetcol
+
+%variation WALL_ZOT brown
+%hue 240 30
+%repeat WALL_ZOT WALL_ZOT_BROWN
+%resetcol
+
+%variation WALL_ZOT lightgray
+%desat 240
+%lum 240 -15
+%repeat WALL_ZOT WALL_ZOT_LIGHTGRAY
+%resetcol
+
+%variation WALL_ZOT darkgray
+%desat 240
+%lum 240 -30
+%repeat WALL_ZOT WALL_ZOT_DARKGRAY
+%resetcol
-wall/zot_gray0 WALL_ZOT_GRAY
-wall/zot_gray1
-wall/zot_gray2
-wall/zot_gray3
+%variation WALL_ZOT lightblue
+%lum 240 40
+%repeat WALL_ZOT WALL_ZOT_LIGHTBLUE
+%resetcol
-wall/zot_green0 WALL_ZOT_GREEN
-wall/zot_green1
-wall/zot_green2
-wall/zot_green3
+%variation WALL_ZOT lightgreen
+%hue 240 120
+%lum 240 15
+%repeat WALL_ZOT WALL_ZOT_LIGHTGREEN
+%resetcol
-wall/zot_magenta0 WALL_ZOT_MAGENTA
-wall/zot_magenta1
-wall/zot_magenta2
-wall/zot_magenta3
+%variation WALL_ZOT lightcyan
+%hue 240 180
+%lum 240 15
+%repeat WALL_ZOT WALL_ZOT_LIGHTCYAN
+%resetcol
-wall/zot_red0 WALL_ZOT_RED
-wall/zot_red1
-wall/zot_red2
-wall/zot_red3
+%variation WALL_ZOT lightred
+%hue 240 0
+%lum 240 40
+%repeat WALL_ZOT WALL_ZOT_LIGHTRED
+%resetcol
-wall/zot_yellow0 WALL_ZOT_YELLOW
-wall/zot_yellow1
-wall/zot_yellow2
-wall/zot_yellow3
+%variation WALL_ZOT lightmagenta
+%hue 240 300
+%lum 240 40
+%repeat WALL_ZOT WALL_ZOT_LIGHTMAGENTA
+%resetcol
+
+%variation WALL_ZOT yellow
+%hue 240 60
+%repeat WALL_ZOT WALL_ZOT_YELLOW
+%resetcol
+
+%variation WALL_ZOT white
+%desat 240
+%lum 240 10
+%repeat WALL_ZOT WALL_ZOT_WHITE
+%resetcol
wall/wall_flesh0 WALL_FLESH
wall/wall_flesh1
@@ -178,16 +436,169 @@ floor/floor_vines4
floor/floor_vines5
floor/floor_vines6
-wall/pebble_red0 WALL_PEBBLE_RED
+wall/pebble_red0 WALL_PEBBLE WALL_PEBBLE_RED
wall/pebble_red1
wall/pebble_red2
wall/pebble_red3
-floor/rough_red0 FLOOR_ROUGH_RED
+%variation WALL_PEBBLE blue
+%hue 0 240
+%repeat WALL_PEBBLE WALL_PEBBLE_BLUE
+%resetcol
+
+%variation WALL_PEBBLE green
+%hue 0 90
+%repeat WALL_PEBBLE WALL_PEBBLE_GREEN
+%resetcol
+
+%variation WALL_PEBBLE cyan
+%hue 0 180
+%repeat WALL_PEBBLE WALL_PEBBLE_CYAN
+%resetcol
+
+%variation WALL_PEBBLE magenta
+%hue 0 300
+%repeat WALL_PEBBLE WALL_PEBBLE_MAGENTA
+%resetcol
+
+%variation WALL_PEBBLE brown
+%hue 0 30
+%repeat WALL_PEBBLE WALL_PEBBLE_BROWN
+%resetcol
+
+%variation WALL_PEBBLE lightgray
+%desat 0
+%lum 0 -10
+%repeat WALL_PEBBLE WALL_PEBBLE_LIGHTGRAY
+%resetcol
+
+%variation WALL_PEBBLE darkgray
+%desat 0
+%lum 0 -30
+%repeat WALL_PEBBLE WALL_PEBBLE_DARKGRAY
+%resetcol
+
+%variation WALL_PEBBLE lightblue
+%hue 0 240
+%lum 0 15
+%repeat WALL_PEBBLE WALL_PEBBLE_LIGHTBLUE
+%resetcol
+
+%variation WALL_PEBBLE lightgreen
+%hue 0 90
+%lum 0 15
+%repeat WALL_PEBBLE WALL_PEBBLE_LIGHTGREEN
+%resetcol
+
+%variation WALL_PEBBLE lightcyan
+%hue 0 180
+%lum 0 15
+%repeat WALL_PEBBLE WALL_PEBBLE_LIGHTCYAN
+%resetcol
+
+%variation WALL_PEBBLE lightred
+%lum 0 15
+%repeat WALL_PEBBLE WALL_PEBBLE_LIGHTRED
+%resetcol
+
+%variation WALL_PEBBLE lightmagenta
+%hue 0 300
+%lum 0 15
+%repeat WALL_PEBBLE WALL_PEBBLE_LIGHTMAGENTA
+%resetcol
+
+%variation WALL_PEBBLE yellow
+%hue 0 60
+%repeat WALL_PEBBLE WALL_PEBBLE_YELLOW
+%resetcol
+
+%variation WALL_PEBBLE white
+%desat 0
+%lum 0 20
+%repeat WALL_PEBBLE WALL_PEBBLE_WHITE
+%resetcol
+
+floor/rough_red0 FLOOR_ROUGH FLOOR_ROUGH_RED
floor/rough_red1
floor/rough_red2
floor/rough_red3
+%variation FLOOR_ROUGH blue
+%hue 0 240
+%repeat FLOOR_ROUGH FLOOR_ROUGH_BLUE
+%resetcol
+
+%variation FLOOR_ROUGH green
+%hue 0 90
+%repeat FLOOR_ROUGH FLOOR_ROUGH_GREEN
+%resetcol
+
+%variation FLOOR_ROUGH cyan
+%hue 0 180
+%repeat FLOOR_ROUGH FLOOR_ROUGH_CYAN
+%resetcol
+
+%variation FLOOR_ROUGH magenta
+%hue 0 300
+%repeat FLOOR_ROUGH FLOOR_ROUGH_MAGENTA
+%resetcol
+
+%variation FLOOR_ROUGH brown
+%hue 0 30
+%repeat FLOOR_ROUGH FLOOR_ROUGH_BROWN
+%resetcol
+
+%variation FLOOR_ROUGH lightgray
+%desat 0
+%repeat FLOOR_ROUGH FLOOR_ROUGH_LIGHTGRAY
+%resetcol
+
+%variation FLOOR_ROUGH darkgray
+%desat 0
+%lum 0 -10
+%repeat FLOOR_ROUGH FLOOR_ROUGH_DARKGRAY
+%resetcol
+
+%variation FLOOR_ROUGH lightblue
+%hue 0 240
+%lum 0 10
+%repeat FLOOR_ROUGH FLOOR_ROUGH_LIGHTBLUE
+%resetcol
+
+%variation FLOOR_ROUGH lightgreen
+%hue 0 90
+%lum 0 10
+%repeat FLOOR_ROUGH FLOOR_ROUGH_LIGHTGREEN
+%resetcol
+
+%variation FLOOR_ROUGH lightcyan
+%hue 0 180
+%lum 0 10
+%repeat FLOOR_ROUGH FLOOR_ROUGH_LIGHTCYAN
+%resetcol
+
+%variation FLOOR_ROUGH lightred
+%lum 0 10
+%repeat FLOOR_ROUGH FLOOR_ROUGH_LIGHTRED
+%resetcol
+
+%variation FLOOR_ROUGH lightmagenta
+%hue 0 300
+%lum 0 10
+%repeat FLOOR_ROUGH FLOOR_ROUGH_LIGHTMAGENTA
+%resetcol
+
+%variation FLOOR_ROUGH yellow
+%hue 0 60
+%repeat FLOOR_ROUGH FLOOR_ROUGH_YELLOW
+%resetcol
+
+%variation FLOOR_ROUGH white
+%desat 0
+%lum 0 20
+%repeat FLOOR_ROUGH FLOOR_ROUGH_WHITE
+%resetcol
+
floor/floor_sand_stone0 FLOOR_SAND_STONE
floor/floor_sand_stone1
floor/floor_sand_stone2
@@ -321,15 +732,149 @@ floor/dirt_w
floor/dirt_nw
floor/dirt_full
-wall/stone2_gray0 DNGN_STONE_WALL
+wall/stone2_gray0 DNGN_STONE_WALL DNGN_STONE_WALL_LIGHTGRAY
wall/stone2_gray1
wall/stone2_gray2
wall/stone2_gray3
-wall/dngn_metal_wall DNGN_METAL_WALL
-wall/dngn_green_crystal_wall DNGN_GREEN_CRYSTAL_WALL
+%variation DNGN_STONE_WALL blue
+%hue 26 240
+%hue 27 240
+%hue 28 240
+%hue 29 240
+%hue 30 240
+%hue 31 240
+%hue 32 240
+%hue 33 240
+wall/stone2_brown0 DNGN_STONE_WALL_BLUE
+wall/stone2_brown1
+wall/stone2_brown2
+wall/stone2_brown3
+%resetcol
+
+%variation DNGN_STONE_WALL green
+%hue 240 120
+%repeat DNGN_STONE_WALL_BLUE DNGN_STONE_WALL_GREEN
+%resetcol
+
+%variation DNGN_STONE_WALL cyan
+%hue 240 180
+%repeat DNGN_STONE_WALL_BLUE DNGN_STONE_WALL_CYAN
+%resetcol
+
+%variation DNGN_STONE_WALL red
+%hue 240 0
+%repeat DNGN_STONE_WALL_BLUE DNGN_STONE_WALL_RED
+%resetcol
+
+%variation DNGN_STONE_WALL magenta
+%hue 240 300
+%repeat DNGN_STONE_WALL_BLUE DNGN_STONE_WALL_MAGENTA
+%resetcol
+
+%variation DNGN_STONE_WALL brown
+%hue 240 30
+%repeat DNGN_STONE_WALL_BLUE DNGN_STONE_WALL_BROWN
+%resetcol
+
+%variation DNGN_STONE_WALL darkgray
+%lum 0 -20
+%repeat DNGN_STONE_WALL DNGN_STONE_WALL_DARKGRAY
+%resetcol
+
+%variation DNGN_STONE_WALL yellow
+%hue 240 60
+%repeat DNGN_STONE_WALL_BLUE DNGN_STONE_WALL_YELLOW
+%resetcol
+
+%variation DNGN_STONE_WALL white
+%lum 0 30
+%repeat DNGN_STONE_WALL DNGN_STONE_WALL_WHITE
+%resetcol
+
wall/dngn_wax_wall DNGN_WAX_WALL
wall/dngn_transparent_wall DNGN_TRANSPARENT_WALL
+wall/dngn_metal_wall DNGN_METAL_WALL
+
+%hue 150 120
+wall/dngn_green_crystal_wall DNGN_GREEN_CRYSTAL_WALL DNGN_CRYSTAL DNGN_CRYSTAL_GREEN
+%resetcol
+
+%variation DNGN_CRYSTAL blue
+%hue 120 240
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_BLUE
+%resetcol
+
+%variation DNGN_CRYSTAL cyan
+%hue 120 180
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_CYAN
+%resetcol
+
+%variation DNGN_CRYSTAL red
+%hue 120 0
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_RED
+%resetcol
+
+%variation DNGN_CRYSTAL magenta
+%hue 120 300
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_MAGENTA
+%resetcol
+
+%variation DNGN_CRYSTAL brown
+%hue 120 30
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_BROWN
+%resetcol
+
+%variation DNGN_CRYSTAL lightgray
+%desat 120
+%lum 120 -20
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_LIGHTGRAY
+%resetcol
+
+%variation DNGN_CRYSTAL darkgray
+%desat 120
+%lum 120 -40
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_DARKGRAY
+%resetcol
+
+%variation DNGN_CRYSTAL lightblue
+%hue 120 240
+%lum 120 30
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_LIGHTBLUE
+%resetcol
+
+%variation DNGN_CRYSTAL lightgreen
+%lum 120 30
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_LIGHTGREEN
+%resetcol
+
+%variation DNGN_CRYSTAL lightcyan
+%hue 120 180
+%lum 120 30
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_LIGHTCYAN
+%resetcol
+
+%variation DNGN_CRYSTAL lightred
+%hue 120 0
+%lum 120 30
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_LIGHTRED
+%resetcol
+
+%variation DNGN_CRYSTAL lightmagenta
+%hue 120 300
+%lum 120 30
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_LIGHTMAGENTA
+%resetcol
+
+%variation DNGN_CRYSTAL yellow
+%hue 120 60
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_YELLOW
+%resetcol
+
+%variation DNGN_CRYSTAL white
+%desat 120
+%repeat DNGN_CRYSTAL DNGN_CRYSTAL_WHITE
+%resetcol
## doors
dngn_detected_secret_door DNGN_DETECTED_SECRET_DOOR
@@ -409,9 +954,11 @@ dngn_open_sea DNGN_OPEN_SEA
dngn_open_sea
dngn_open_sea
dngn_open_sea2
+
dngn_deep_water DNGN_DEEP_WATER
dngn_deep_water
dngn_deep_water2
+
dngn_shallow_water DNGN_SHALLOW_WATER
dngn_shallow_water
dngn_shallow_water
@@ -495,8 +1042,9 @@ dngn_altar_fedhas DNGN_ALTAR_FEDHAS
dngn_altar_cheibriados DNGN_ALTAR_CHEIBRIADOS
%sdir dc-dngn
-dngn_blue_fountain DNGN_BLUE_FOUNTAIN
+dngn_blue_fountain DNGN_FOUNTAIN DNGN_BLUE_FOUNTAIN
dngn_blue_fountain2
+
dngn_sparkling_fountain DNGN_SPARKLING_FOUNTAIN
dngn_sparkling_fountain2
dngn_blood_fountain DNGN_BLOOD_FOUNTAIN
diff --git a/crawl-ref/source/rltiles/dc-dngn/dngn_trap_shaft.png b/crawl-ref/source/rltiles/dc-dngn/dngn_trap_shaft.png
index 32129807fb..a931331eed 100644
--- a/crawl-ref/source/rltiles/dc-dngn/dngn_trap_shaft.png
+++ b/crawl-ref/source/rltiles/dc-dngn/dngn_trap_shaft.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown0.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown0.png
new file mode 100644
index 0000000000..5dc062e52b
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown0.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown1.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown1.png
new file mode 100644
index 0000000000..1ce8b1266c
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown1.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown2.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown2.png
new file mode 100644
index 0000000000..ed419e9c05
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown2.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown3.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown3.png
new file mode 100644
index 0000000000..2ce7e3b88a
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown3.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown4.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown4.png
new file mode 100644
index 0000000000..68445fb04c
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown4.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown5.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown5.png
new file mode 100644
index 0000000000..6fb2823fd8
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown5.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown6.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown6.png
new file mode 100644
index 0000000000..4fc9439df5
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown6.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown7.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown7.png
new file mode 100644
index 0000000000..c16754ea86
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown7.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown8.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown8.png
new file mode 100644
index 0000000000..7309612217
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_brown8.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray0.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray0.png
deleted file mode 100644
index 8e1001ba8a..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray0.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray1.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray1.png
deleted file mode 100644
index d30a2d3032..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray1.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray2.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray2.png
deleted file mode 100644
index 4be0aa155d..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray2.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray3.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray3.png
deleted file mode 100644
index feb030714b..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray3.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray4.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray4.png
deleted file mode 100644
index 64f2dd7878..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray4.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray5.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray5.png
deleted file mode 100644
index 024c193f48..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray5.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray6.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray6.png
deleted file mode 100644
index 74a9ecfc4a..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray6.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray7.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray7.png
deleted file mode 100644
index ba61403cf8..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray7.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray8.png b/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray8.png
deleted file mode 100644
index 12967b7c9d..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/floor/pebble_gray8.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/ice0.png b/crawl-ref/source/rltiles/dc-dngn/wall/ice0.png
deleted file mode 100644
index d5b8dbc269..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/ice0.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/ice1.png b/crawl-ref/source/rltiles/dc-dngn/wall/ice1.png
deleted file mode 100644
index aa17851f29..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/ice1.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/ice2.png b/crawl-ref/source/rltiles/dc-dngn/wall/ice2.png
deleted file mode 100644
index 5ed0cfd9af..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/ice2.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/ice3.png b/crawl-ref/source/rltiles/dc-dngn/wall/ice3.png
deleted file mode 100644
index 60b4d072f5..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/ice3.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/snake0.png b/crawl-ref/source/rltiles/dc-dngn/wall/snake0.png
deleted file mode 100644
index 867db7b4c1..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/snake0.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/snake1.png b/crawl-ref/source/rltiles/dc-dngn/wall/snake1.png
deleted file mode 100644
index 485609f953..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/snake1.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/snake2.png b/crawl-ref/source/rltiles/dc-dngn/wall/snake2.png
deleted file mode 100644
index 673912e445..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/snake2.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/snake3.png b/crawl-ref/source/rltiles/dc-dngn/wall/snake3.png
deleted file mode 100644
index 46bd9d32d4..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/snake3.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown0.png b/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown0.png
new file mode 100644
index 0000000000..d4bdb5a45d
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown0.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown1.png b/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown1.png
new file mode 100644
index 0000000000..53e64d6cbd
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown1.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown2.png b/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown2.png
new file mode 100644
index 0000000000..67b967acdf
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown2.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown3.png b/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown3.png
new file mode 100644
index 0000000000..1ff9c971b3
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/wall/stone2_brown3.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan0.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan0.png
deleted file mode 100644
index d5b8dbc269..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan0.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan1.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan1.png
deleted file mode 100644
index aa17851f29..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan1.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan2.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan2.png
deleted file mode 100644
index 5ed0cfd9af..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan2.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan3.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan3.png
deleted file mode 100644
index 60b4d072f5..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_cyan3.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray0.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray0.png
deleted file mode 100644
index cc512906af..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray0.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray1.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray1.png
deleted file mode 100644
index 2c1e681055..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray1.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray2.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray2.png
deleted file mode 100644
index 1173861ea8..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray2.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray3.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray3.png
deleted file mode 100644
index 541a48bb9b..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_gray3.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_green0.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_green0.png
deleted file mode 100644
index 2a7cb2fbe5..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_green0.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_green1.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_green1.png
deleted file mode 100644
index 9e6da5180d..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_green1.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_green2.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_green2.png
deleted file mode 100644
index f3005eece8..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_green2.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_green3.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_green3.png
deleted file mode 100644
index f6c8823dcd..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_green3.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta0.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta0.png
deleted file mode 100644
index 081bd32cd7..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta0.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta1.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta1.png
deleted file mode 100644
index 32c59f0ec8..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta1.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta2.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta2.png
deleted file mode 100644
index d3ad13c8b0..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta2.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta3.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta3.png
deleted file mode 100644
index 9517f113a2..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_magenta3.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_red0.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_red0.png
deleted file mode 100644
index 6f31de45e3..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_red0.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_red1.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_red1.png
deleted file mode 100644
index bc20553c60..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_red1.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_red2.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_red2.png
deleted file mode 100644
index b0f709c961..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_red2.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_red3.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_red3.png
deleted file mode 100644
index fed8b0cd3d..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_red3.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow0.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow0.png
deleted file mode 100644
index 6994559ef6..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow0.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow1.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow1.png
deleted file mode 100644
index aaa15e6709..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow1.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow2.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow2.png
deleted file mode 100644
index e21cd799ff..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow2.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow3.png b/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow3.png
deleted file mode 100644
index d1ab2feb2f..0000000000
--- a/crawl-ref/source/rltiles/dc-dngn/wall/zot_yellow3.png
+++ /dev/null
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt
index 261076e9f2..df137c5f11 100644
--- a/crawl-ref/source/rltiles/dc-mon.txt
+++ b/crawl-ref/source/rltiles/dc-mon.txt
@@ -232,9 +232,14 @@ azrael MONS_AZRAEL
efreet MONS_EFREET
## Rakshasa ('R')
+%sdir dc-mon/unique
+mara MONS_MARA
+mara MONS_MARA_FAKE
+%sdir dc-mon/demons
rakshasa MONS_RAKSHASA
rakshasa MONS_RAKSHASA_FAKE
+
## Abominations ('X')
abomination_large MONS_ABOMINATION_LARGE
abomination_large1
diff --git a/crawl-ref/source/rltiles/dc-mon/unique/kirke.png b/crawl-ref/source/rltiles/dc-mon/unique/kirke.png
index a10a319863..77769d5e06 100644
--- a/crawl-ref/source/rltiles/dc-mon/unique/kirke.png
+++ b/crawl-ref/source/rltiles/dc-mon/unique/kirke.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-mon/unique/mara.png b/crawl-ref/source/rltiles/dc-mon/unique/mara.png
new file mode 100644
index 0000000000..2cb82ea411
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-mon/unique/mara.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/tiledef_defines.h b/crawl-ref/source/rltiles/tiledef_defines.h
index fb7e447988..238afd682b 100644
--- a/crawl-ref/source/rltiles/tiledef_defines.h
+++ b/crawl-ref/source/rltiles/tiledef_defines.h
@@ -2,6 +2,7 @@
#define TILEDEF_DEFINES_H
#include <cassert>
+#include <vector>
class tile_info
{
@@ -47,4 +48,50 @@ typedef unsigned int (tile_count_func)(unsigned int);
typedef const char *(tile_name_func)(unsigned int);
typedef tile_info &(tile_info_func)(unsigned int);
+typedef struct tile_variation
+{
+ tile_variation(int i, int c) : idx(i), col(c) { }
+ int idx;
+ int col;
+
+ static int cmp(tile_variation left, tile_variation right)
+ {
+ if (left.idx < right.idx)
+ return (-1);
+ if (left.idx > right.idx)
+ return (1);
+ if (left.col < right.col)
+ return (-1);
+ if (left.col > right.col)
+ return (1);
+ return (0);
+ }
+};
+
+template<class F, class R>
+bool binary_search(F find, std::pair<F, R> *arr, int num_pairs,
+ int (*cmpfnc)(F, F), R &result)
+{
+ int first = 0;
+ int last = num_pairs - 1;
+
+ do
+ {
+ int half = (last - first) / 2 + first;
+ int cmp = cmpfnc(find, arr[half].first);
+ if (cmp < 0)
+ last = half - 1;
+ else if (cmp > 0)
+ first = half + 1;
+ else
+ {
+ result = arr[half].second;
+ return true;
+ }
+
+ } while (first <= last);
+
+ return false;
+}
+
#endif
diff --git a/crawl-ref/source/rltiles/tool/tile.cc b/crawl-ref/source/rltiles/tool/tile.cc
index 2febfd73b2..65d82c9b18 100644
--- a/crawl-ref/source/rltiles/tool/tile.cc
+++ b/crawl-ref/source/rltiles/tool/tile.cc
@@ -17,9 +17,12 @@ tile::tile(const tile &img, const char *enumnam, const char *parts) :
copy(img);
if (enumnam)
- m_enumname = enumnam;
+ m_enumname.push_back(enumnam);
if (parts)
m_parts_ctg = parts;
+
+ for (int i = 0; i < MAX_COLOUR; ++i)
+ m_variations[i] = -1;
}
tile::~tile()
@@ -39,27 +42,37 @@ bool tile::valid() const
return m_pixels && m_width && m_height;
}
-const std::string &tile::filename()
+const std::string &tile::filename() const
{
return m_filename;
}
-const std::string &tile::enumname()
+int tile::enumcount() const
+{
+ return m_enumname.size();
+}
+
+const std::string &tile::enumname(int idx) const
{
- return m_enumname;
+ return m_enumname[idx];
}
-const std::string &tile::parts_ctg()
+void tile::add_enumname(const std::string &name)
+{
+ m_enumname.push_back(name);
+}
+
+const std::string &tile::parts_ctg() const
{
return m_parts_ctg;
}
-int tile::width()
+int tile::width() const
{
return m_width;
}
-int tile::height()
+int tile::height() const
{
return m_height;
}
@@ -484,3 +497,19 @@ void tile::get_bounding_box(int &x0, int &y0, int &w, int &h)
w = x1 - x0 + 1;
h = y1 - y0 + 1;
}
+
+void tile::add_variation(int colour, int idx)
+{
+ assert(colour >= 0);
+ assert(colour < MAX_COLOUR);
+ m_variations[colour] = idx;
+}
+
+bool tile::get_variation(int colour, int &idx)
+{
+ if (m_variations[colour] == -1)
+ return (false);
+
+ idx = m_variations[colour];
+ return (true);
+}
diff --git a/crawl-ref/source/rltiles/tool/tile.h b/crawl-ref/source/rltiles/tool/tile.h
index b14e14d100..7381763ead 100644
--- a/crawl-ref/source/rltiles/tool/tile.h
+++ b/crawl-ref/source/rltiles/tool/tile.h
@@ -3,6 +3,7 @@
#include "tile_colour.h"
#include <string>
+#include <vector>
class tile
{
@@ -30,25 +31,32 @@ public:
void replace_colour(tile_colour &find, tile_colour &replace);
void fill(const tile_colour &col);
- const std::string &filename();
- const std::string &enumname();
- const std::string &parts_ctg();
- int width();
- int height();
+ const std::string &filename() const;
+ int enumcount() const;
+ const std::string &enumname(int idx) const;
+ void add_enumname(const std::string &name);
+ const std::string &parts_ctg() const;
+ int width() const;
+ int height() const;
bool shrink();
void set_shrink(bool new_shrink);
void get_bounding_box(int &x0, int &y0, int &w, int &h);
tile_colour &get_pixel(unsigned int x, unsigned int y);
+
+ void add_variation(int colour, int idx);
+ bool get_variation(int colour, int &idx);
protected:
int m_width;
int m_height;
std::string m_filename;
- std::string m_enumname;
+ std::vector<std::string> m_enumname;
std::string m_parts_ctg;
tile_colour *m_pixels;
bool m_shrink;
+
+ int m_variations[MAX_COLOUR];
};
#endif
diff --git a/crawl-ref/source/rltiles/tool/tile_colour.cc b/crawl-ref/source/rltiles/tool/tile_colour.cc
index f1969f37be..2f098b387b 100644
--- a/crawl-ref/source/rltiles/tool/tile_colour.cc
+++ b/crawl-ref/source/rltiles/tool/tile_colour.cc
@@ -28,6 +28,226 @@ const tile_colour &tile_colour::operator=(const tile_colour &rhs)
return (*this);
}
+unsigned char &tile_colour::operator[](int idx)
+{
+ assert(idx >= 0 && idx <= 4);
+ switch (idx)
+ {
+ default:
+ case 0: return r;
+ case 1: return g;
+ case 2: return b;
+ case 3: return a;
+ }
+}
+
+unsigned char tile_colour::operator[](int idx) const
+{
+ assert(idx >= 0 && idx <= 4);
+ switch (idx)
+ {
+ default:
+ case 0: return r;
+ case 1: return g;
+ case 2: return b;
+ case 3: return a;
+ }
+}
+
+int tile_colour::get_hue() const
+{
+ int max_rgb = get_max_rgb();
+ int min_rgb = get_min_rgb();
+
+ if (max_rgb == min_rgb)
+ return (0);
+
+ int diff = max_rgb - min_rgb;
+
+ if (max_rgb == r)
+ {
+ return ((60 * (g - b)) / diff + 360) % 360;
+ }
+ else if (max_rgb == g)
+ {
+ return (60 * (b - r)) / diff + 120;
+ }
+ else // if (max_rgb == b)
+ {
+ return (60 * (r - g)) / diff + 240;
+ }
+}
+
+int tile_colour::get_max_rgb() const
+{
+ int max_rgb = std::max(std::max(r, g), b);
+ return (max_rgb);
+}
+
+int tile_colour::get_min_rgb() const
+{
+ int min_rgb = std::min(std::min(r, g), b);
+ return (min_rgb);
+}
+
+void tile_colour::set_hue(int h)
+{
+ set_from_hue(h, get_min_rgb(), get_max_rgb());
+}
+
+void tile_colour::set_from_hue(int h, int min_rgb, int max_rgb)
+{
+ // http://en.wikipedia.org/wiki/HSL_and_HSV
+ // H is passed in
+ // S = diff / max or 0 if max == 0
+ // V = max / 255
+
+ int v = max_rgb;
+ int s = max_rgb - min_rgb;
+
+ float f = ((float)h / 60.0f) - (int)(h / 60);
+
+ // When calculating P, Q, T, also convert to 0..255 range.
+ int p = v - s;
+ int q = v - f * s;
+ int t = v - (1.0f - f) * s;
+
+ // Sanity bounds.
+ q = std::max(std::min(q, 255), 0);
+ t = std::max(std::min(t, 255), 0);
+
+ int h_idx = (h / 60) % 6;
+
+ switch (h_idx)
+ {
+ default:
+ case 0:
+ r = static_cast<unsigned char>(v);
+ g = static_cast<unsigned char>(t);
+ b = static_cast<unsigned char>(p);
+ break;
+ case 1:
+ r = static_cast<unsigned char>(q);
+ g = static_cast<unsigned char>(v);
+ b = static_cast<unsigned char>(p);
+ break;
+ case 2:
+ r = static_cast<unsigned char>(p);
+ g = static_cast<unsigned char>(v);
+ b = static_cast<unsigned char>(t);
+ break;
+ case 3:
+ r = static_cast<unsigned char>(p);
+ g = static_cast<unsigned char>(q);
+ b = static_cast<unsigned char>(v);
+ break;
+ case 4:
+ r = static_cast<unsigned char>(t);
+ g = static_cast<unsigned char>(p);
+ b = static_cast<unsigned char>(v);
+ break;
+ case 5:
+ r = static_cast<unsigned char>(v);
+ g = static_cast<unsigned char>(p);
+ b = static_cast<unsigned char>(q);
+ break;
+ }
+}
+
+void tile_colour::desaturate()
+{
+ set_from_hue(get_hue(), get_max_rgb(), get_max_rgb());
+}
+
+float tile_colour::get_lum() const
+{
+ return ((get_min_rgb() + get_max_rgb()) / (255 * 2.0f));
+}
+
+float tile_colour::get_sat() const
+{
+ int min_rgb = get_min_rgb();
+ int max_rgb = get_max_rgb();
+ int sum = min_rgb + max_rgb;
+
+ float sat;
+ if (sum == 0)
+ sat = 0;
+ else if (sum > 255)
+ sat = (max_rgb - min_rgb) / (float)(255*2 - min_rgb - max_rgb);
+ else
+ sat = (max_rgb - min_rgb) / (float)(min_rgb + max_rgb);
+
+ return (sat);
+}
+
+void tile_colour::set_from_hsl(int hue, float sat, float lum)
+{
+ float q;
+ if (lum < 0.5f)
+ q = lum * (1 + sat);
+ else
+ q = lum + sat - (lum * sat);
+
+ float p = 2 * lum - q;
+
+ for (int i = 0; i < 3; ++i)
+ {
+ int h = hue + (1 - i) * 120;
+ if (h < 0)
+ h += 360;
+ if (h >= 360)
+ h -= 360;
+
+ float val;
+
+ if (h < 60)
+ val = p + (q - p) * h / 60.0f;
+ else if (h < 180)
+ val = q;
+ else if (h < 240)
+ val = p + (q - p) * (4 - h / 60.0f);
+ else
+ val = p;
+
+ int final = val * 255;
+ final = std::max(0, std::min(255, final));
+ (*this)[i] = static_cast<unsigned char>(final);
+ }
+}
+
+void tile_colour::change_lum(int lum_percent)
+{
+ int min_rgb = get_min_rgb();
+ int max_rgb = get_max_rgb();
+ int hue = get_hue();
+
+ if (min_rgb == max_rgb)
+ {
+ int rgb_change = (lum_percent * 255) / 100;
+
+ min_rgb += rgb_change;
+ max_rgb += rgb_change;
+
+ min_rgb = std::max(0, std::min(255, min_rgb));
+ max_rgb = std::max(0, std::min(255, max_rgb));
+
+ set_from_hue(get_hue(), min_rgb, max_rgb);
+ return;
+ }
+
+ float lum_change = lum_percent / 100.0f;
+ float lum = get_lum() + lum_change;
+
+ if (lum > 1.0f)
+ lum = 1.0f;
+ if (lum < 0.0f)
+ lum = 0.0f;
+
+ float sat = get_sat();
+ set_from_hsl(hue, sat, lum);
+}
+
bool write_png(const char *filename, tile_colour *pixels,
unsigned int width, unsigned int height)
{
diff --git a/crawl-ref/source/rltiles/tool/tile_colour.h b/crawl-ref/source/rltiles/tool/tile_colour.h
index 4c77162b9f..f660c84829 100644
--- a/crawl-ref/source/rltiles/tool/tile_colour.h
+++ b/crawl-ref/source/rltiles/tool/tile_colour.h
@@ -1,6 +1,30 @@
#ifndef TILE_COLOUR_H
#define TILE_COLOUR_H
+enum COLORS
+{
+ BLACK,
+ BLUE,
+ GREEN,
+ CYAN,
+ RED,
+ MAGENTA,
+ BROWN,
+ LIGHTGRAY,
+ LIGHTGREY = LIGHTGRAY,
+ DARKGRAY,
+ DARKGREY = DARKGRAY,
+ LIGHTBLUE,
+ LIGHTGREEN,
+ LIGHTCYAN,
+ LIGHTRED,
+ LIGHTMAGENTA,
+ YELLOW,
+ WHITE,
+ MAX_TERM_COLOUR,
+ MAX_COLOUR = MAX_TERM_COLOUR
+};
+
class tile_colour
{
public:
@@ -12,6 +36,31 @@ public:
bool operator!=(const tile_colour &rhs) const;
const tile_colour &operator=(const tile_colour &rhs);
+ unsigned char &operator[](int idx);
+ unsigned char operator[](int idx) const;
+
+ // Get the HSV/HSL hue, from 0..360.
+ int get_hue() const;
+ // Set the hue, from 0..360.
+ void set_hue(int h);
+ // Change the saturation to 0.
+ void desaturate();
+ // Change the luminance by lum_percent %.
+ void change_lum(int lum_percent);
+
+ int get_max_rgb() const;
+ int get_min_rgb() const;
+
+ // Set the color from HSV. hue is 0..360. min_rgb and max_rgb are 0..255.
+ void set_from_hue(int hue, int min_rgb, int max_rgb);
+
+ // Set the color from HSL. hue is 0..360. sat and lum are 0..1.
+ void set_from_hsl(int hue, float sat, float lum);
+ // Get the HSL saturation, from 0..1.
+ float get_sat() const;
+ // Get the HSL luminance, from 0..1.
+ float get_lum() const;
+
unsigned char r;
unsigned char g;
unsigned char b;
diff --git a/crawl-ref/source/rltiles/tool/tile_list_processor.cc b/crawl-ref/source/rltiles/tool/tile_list_processor.cc
index 091d195fca..dfd8385296 100644
--- a/crawl-ref/source/rltiles/tool/tile_list_processor.cc
+++ b/crawl-ref/source/rltiles/tool/tile_list_processor.cc
@@ -17,7 +17,9 @@ tile_list_processor::tile_list_processor() :
m_composing(false),
m_shrink(true),
m_prefix("TILE"),
- m_start_value("0")
+ m_start_value("0"),
+ m_variation_idx(-1),
+ m_variation_col(-1)
{
}
@@ -150,6 +152,73 @@ static void eat_comments(char *&text)
}
}
+static const std::string colour_list[16] =
+{
+ "black", "blue", "green", "cyan", "red", "magenta", "brown",
+ "lightgrey", "darkgrey", "lightblue", "lightgreen", "lightcyan",
+ "lightred", "lightmagenta", "yellow", "white"
+};
+
+static int str_to_colour(std::string colour)
+{
+ if (colour.empty())
+ return (0);
+
+ for (unsigned int c = 0; c < colour.size(); c++)
+ colour[c] = std::tolower(colour[c]);
+
+ for (int i = 0; i < 16; ++i)
+ {
+ if (colour == colour_list[i])
+ return (i);
+ }
+
+ // Check for alternate spellings.
+ if (colour == "lightgray")
+ return (7);
+ else if (colour == "darkgray")
+ return (8);
+
+ return (0);
+}
+
+void tile_list_processor::recolour(tile &img)
+{
+ for (int y = 0; y < img.height(); ++y)
+ for (int x = 0; x < img.width(); ++x)
+ {
+ tile_colour &col = img.get_pixel(x, y);
+ tile_colour orig = col;
+ for (palette_list::iterator iter = m_palette.begin();
+ iter != m_palette.end(); ++iter)
+ {
+ if (orig == iter->first)
+ col = iter->second;
+ }
+
+ for (hue_list::iterator iter = m_hues.begin();
+ iter != m_hues.end(); ++iter)
+ {
+ if (orig.get_hue() == iter->first)
+ col.set_hue(iter->second);
+ }
+
+ for (desat_list::iterator iter = m_desat.begin();
+ iter != m_desat.end(); ++iter)
+ {
+ if (orig.get_hue() == *iter)
+ col.desaturate();
+ }
+
+ for (lum_list::iterator iter = m_lum.begin();
+ iter != m_lum.end(); ++iter)
+ {
+ if (orig.get_hue() == iter->first)
+ col.change_lum(iter->second);
+ }
+ }
+}
+
bool tile_list_processor::process_line(char *read_line, const char *list_file,
int line)
{
@@ -254,6 +323,8 @@ bool tile_list_processor::process_line(char *read_line, const char *list_file,
if (m_rim)
img.add_rim(tile_colour::black);
+ recolour(img);
+
if (!m_compose.compose(img))
{
fprintf(stderr, "Error (%s:%d): failed composing '%s'"
@@ -270,6 +341,8 @@ bool tile_list_processor::process_line(char *read_line, const char *list_file,
"'%s'.\n", list_file, line, m_args[1]);
return (false);
}
+
+ recolour(m_compose);
}
}
else if (strcmp(arg, "corpse") == 0)
@@ -409,6 +482,133 @@ bool tile_list_processor::process_line(char *read_line, const char *list_file,
if (m_args.size() > 2)
m_include = m_args[2];
}
+ else if (strcmp(arg, "pal") == 0)
+ {
+ // rgb (optional a) = rgb (optional a)
+ tile_colour cols[2] = { tile_colour::black, tile_colour::black };
+ int col_idx = 0;
+ int comp_idx = 0;
+
+ for (size_t i = 1; i < m_args.size(); ++i)
+ {
+ if (strcmp(m_args[i], "="))
+ {
+ if (comp_idx > 3)
+ {
+ fprintf(stderr, "Error (%s:%d): "
+ "Must be R G B (A) = R G B (A).\n",
+ list_file, line);
+ return (false);
+ }
+
+ int val = atoi(m_args[i]);
+ if (val < 0 || val > 255)
+ {
+ fprintf(stderr,
+ "Error (%s:%d): Arg %d must be 0-255.\n",
+ list_file, line, i);
+ }
+
+ cols[col_idx][comp_idx++] = static_cast<unsigned char>(val);
+ }
+ else if (col_idx > 0)
+ {
+ fprintf(stderr,
+ "Error (%s:%d): Too many '=' characters.\n",
+ list_file, line);
+ return (false);
+ }
+ else
+ {
+ col_idx++;
+ comp_idx = 0;
+ }
+ }
+
+ m_palette.push_back(palette_entry(cols[0], cols[1]));
+ }
+ else if (strcmp(arg, "hue") == 0)
+ {
+ CHECK_ARG(2);
+ m_hues.push_back(int_pair(atoi(m_args[1]), atoi(m_args[2])));
+ }
+ else if (strcmp(arg, "resetcol") == 0)
+ {
+ CHECK_NO_ARG(1);
+ m_palette.clear();
+ m_hues.clear();
+ m_desat.clear();
+ m_lum.clear();
+ }
+ else if (strcmp(arg, "desat") == 0)
+ {
+ CHECK_ARG(1);
+ CHECK_NO_ARG(2);
+
+ m_desat.push_back(atoi(m_args[1]));
+ }
+ else if (strcmp(arg, "lum") == 0)
+ {
+ CHECK_ARG(2);
+ CHECK_NO_ARG(3);
+
+ m_lum.push_back(int_pair(atoi(m_args[1]), atoi(m_args[2])));
+ }
+ else if (strcmp(arg, "variation") == 0)
+ {
+ CHECK_ARG(2);
+ CHECK_NO_ARG(3);
+
+ int idx = m_page.find(m_args[1]);
+ if (idx == -1)
+ {
+ fprintf(stderr, "Error (%s:%d): invalid tile name '%s'\n",
+ list_file, line, m_args[1]);
+ return (false);
+ }
+
+ int colour = str_to_colour(m_args[2]);
+ if (colour == 0)
+ {
+ fprintf(stderr, "Error (%s:%d): invalid colour '%s'\n",
+ list_file, line, m_args[2]);
+ return (false);
+ }
+
+ m_variation_idx = idx;
+ m_variation_col = colour;
+ }
+ else if (strcmp(arg, "repeat") == 0)
+ {
+ CHECK_ARG(1);
+
+ int idx = m_page.find(m_args[1]);
+ if (idx == -1)
+ {
+ fprintf(stderr, "Error (%s:%d): invalid tile name '%s'\n",
+ list_file, line, m_args[1]);
+ return (false);
+ }
+
+ int cnt = m_page.m_counts[idx];
+
+ for (int i = 0; i < cnt; ++i)
+ {
+ tile img;
+ img.copy(*m_page.m_tiles[idx + i]);
+ recolour(img);
+ add_image(img, (i == 0 && m_args[2]) ? m_args[2] : NULL);
+ }
+
+ if (m_args.size() > 2)
+ {
+ for (int i = 3; i < m_args.size(); ++i)
+ {
+ // Add enums for additional values.
+ m_page.add_synonym(m_args[2], m_args[i]);
+ }
+ }
+ }
else
{
fprintf(stderr, "Error (%s:%d): unknown command '%%%s'\n",
@@ -464,11 +664,19 @@ bool tile_list_processor::process_line(char *read_line, const char *list_file,
img.corpsify();
}
+ recolour(img);
+
if (m_rim && !m_corpsify)
img.add_rim(tile_colour::black);
// Push tile onto tile page.
add_image(img, m_args.size() > 1 ? m_args[1] : NULL);
+
+ for (int i = 2; i < m_args.size(); ++i)
+ {
+ // Add enums for additional values.
+ m_page.add_synonym(m_args[1], m_args[i]);
+ }
}
return (true);
@@ -489,6 +697,12 @@ void tile_list_processor::add_image(tile &img, const char *enumname)
if (m_categories.size() > 0)
m_ctg_counts[m_categories.size()-1]++;
+
+ if (m_variation_idx != -1)
+ {
+ m_page.add_variation(m_last_enum, m_variation_idx, m_variation_col);
+ m_variation_idx = -1;
+ }
}
bool tile_list_processor::write_data()
@@ -560,24 +774,47 @@ bool tile_list_processor::write_data()
for (unsigned int i = 0; i < m_page.m_tiles.size(); i++)
{
- const std::string &enumname = m_page.m_tiles[i]->enumname();
const std::string &parts_ctg = m_page.m_tiles[i]->parts_ctg();
- if (enumname.empty())
+ int enumcount = m_page.m_tiles[i]->enumcount();
+
+ std::string full_enum;
+ if (enumcount == 0)
{
fprintf(fp, " %s_%s_FILLER_%d%s,\n", m_prefix.c_str(),
ucname.c_str(), i, start_val.c_str());
}
else if (parts_ctg.empty())
{
+ const std::string &enumname = m_page.m_tiles[i]->enumname(0);
fprintf(fp, " %s_%s%s,\n", m_prefix.c_str(),
enumname.c_str(), start_val.c_str());
}
else
{
+ const std::string &enumname = m_page.m_tiles[i]->enumname(0);
fprintf(fp, " %s_%s_%s%s,\n", m_prefix.c_str(),
parts_ctg.c_str(), enumname.c_str(), start_val.c_str());
}
+ for (int c = 1; c < enumcount; ++c)
+ {
+ const std::string &basename = m_page.m_tiles[i]->enumname(0);
+ const std::string &enumname = m_page.m_tiles[i]->enumname(c);
+
+ if (parts_ctg.empty())
+ {
+ fprintf(fp, " %s_%s = %s_%s,\n",
+ m_prefix.c_str(), enumname.c_str(),
+ m_prefix.c_str(), basename.c_str());
+ }
+ else
+ {
+ fprintf(fp, " %s_%s_%s = %s_%s_%s,\n",
+ m_prefix.c_str(), parts_ctg.c_str(), enumname.c_str(),
+ m_prefix.c_str(), parts_ctg.c_str(), basename.c_str());
+ }
+ }
+
start_val = "";
if (!parts_ctg.empty())
@@ -597,13 +834,15 @@ bool tile_list_processor::write_data()
fprintf(fp, "int tile_%s_count(unsigned int idx);\n", lcname.c_str());
fprintf(fp, "const char *tile_%s_name(unsigned int idx);\n",
- lcname.c_str());
+ lcname.c_str());
fprintf(fp, "tile_info &tile_%s_info(unsigned int idx);\n",
- lcname.c_str());
+ lcname.c_str());
fprintf(fp, "bool tile_%s_index(const char *str, unsigned int &idx);\n",
- lcname.c_str());
+ lcname.c_str());
fprintf(fp, "bool tile_%s_equal(unsigned int tile, unsigned int idx);\n",
- lcname.c_str());
+ lcname.c_str());
+ fprintf(fp, "unsigned int tile_%s_coloured(unsigned int idx, int col);\n",
+ lcname.c_str());
if (m_categories.size() > 0)
{
@@ -663,11 +902,15 @@ bool tile_list_processor::write_data()
lcname.c_str(), max.c_str(), m_start_value.c_str());
for (unsigned int i = 0; i < m_page.m_tiles.size(); i++)
{
- const std::string &enumname = m_page.m_tiles[i]->enumname();
- if (enumname.empty())
+ if (m_page.m_tiles[i]->enumcount() == 0)
+ {
fprintf(fp, " \"%s_FILLER_%d\",\n", ucname.c_str(), i);
+ }
else
+ {
+ const std::string &enumname = m_page.m_tiles[i]->enumname(0);
fprintf(fp, " \"%s\",\n", enumname.c_str());
+ }
}
fprintf(fp, "};\n\n");
@@ -718,9 +961,9 @@ bool tile_list_processor::write_data()
fprintf(fp, "};\n\n");
}
- fprintf(fp, "\ntypedef std::pair<const char*, int> _tile_pair;\n\n");
+ fprintf(fp, "\ntypedef std::pair<const char*, unsigned int> _name_pair;\n\n");
- fprintf(fp, "_tile_pair %s_map_pairs[] =\n"
+ fprintf(fp, "_name_pair %s_name_pairs[] =\n"
"{\n", lcname.c_str());
typedef std::map<std::string, int> sort_map;
@@ -728,22 +971,22 @@ bool tile_list_processor::write_data()
for (unsigned int i = 0; i < m_page.m_tiles.size(); i++)
{
- const std::string &enumname = m_page.m_tiles[i]->enumname();
- // Filler can't be looked up.
- if (enumname.empty())
- continue;
+ for (int c = 0; c < m_page.m_tiles[i]->enumcount(); ++c)
+ {
+ const std::string &enumname = m_page.m_tiles[i]->enumname(c);
- std::string lcenum = enumname;
- for (unsigned int c = 0; c < enumname.size(); c++)
- lcenum[c] = std::tolower(enumname[c]);
+ std::string lcenum = enumname;
+ for (unsigned int c = 0; c < enumname.size(); c++)
+ lcenum[c] = std::tolower(enumname[c]);
- table.insert(sort_map::value_type(lcenum, i));
+ table.insert(sort_map::value_type(lcenum, i));
+ }
}
sort_map::iterator itor;
for (itor = table.begin(); itor != table.end(); itor++)
{
- fprintf(fp, " _tile_pair(\"%s\", %d + %s),\n",
+ fprintf(fp, " _name_pair(\"%s\", %d + %s),\n",
itor->first.c_str(), itor->second, m_start_value.c_str());
}
@@ -760,29 +1003,12 @@ bool tile_list_processor::write_data()
" for (unsigned int i = 0; i < lc.size(); i++)\n"
" lc[i] = tolower(lc[i]);\n"
"\n"
- " int num_pairs = sizeof(%s_map_pairs) / sizeof(%s_map_pairs[0]);\n"
- "\n"
- " int first = 0;\n"
- " int last = num_pairs - 1;\n"
- "\n"
- " do\n"
- " {\n"
- " int half = (last - first) / 2 + first;\n"
- " int cmp = strcmp(str, %s_map_pairs[half].first);\n"
- " if (cmp < 0)\n"
- " last = half - 1;\n"
- " else if (cmp > 0)\n"
- " first = half + 1;\n"
- " else\n"
- " {\n"
- " idx = %s_map_pairs[half].second;\n"
- " return true;\n"
- " }\n" "\n"
- " } while (first <= last);\n"
- "\n"
- " return false;\n"
- "}\n",
- lcname.c_str(), lcname.c_str(), lcname.c_str(), lcname.c_str(), lcname.c_str());
+ " int num_pairs = sizeof(%s_name_pairs) / sizeof(%s_name_pairs[0]);\n"
+ " bool result = binary_search<const char *, unsigned int>(\n"
+ " lc.c_str(), &%s_name_pairs[0], num_pairs, &strcmp, idx);\n"
+ " return (result);\n"
+ "}\n\n",
+ lcname.c_str(), lcname.c_str(), lcname.c_str(), lcname.c_str());
fprintf(fp,
"bool tile_%s_equal(unsigned int tile, unsigned int idx)\n"
@@ -792,6 +1018,43 @@ bool tile_list_processor::write_data()
"}\n\n",
lcname.c_str(), m_start_value.c_str(), max.c_str(), lcname.c_str());
+ fprintf(fp, "\ntypedef std::pair<tile_variation, unsigned int> _colour_pair;\n\n");
+
+ fprintf(fp,
+ "_colour_pair %s_colour_pairs[] =\n"
+ "{\n"
+ " _colour_pair(tile_variation(0, 0), 0),\n",
+ lcname.c_str());
+
+ for (unsigned int i = 0; i < m_page.m_tiles.size(); i++)
+ {
+ for (int c = 0; c < MAX_COLOUR; ++c)
+ {
+ int var;
+ if (!m_page.m_tiles[i]->get_variation(c, var))
+ continue;
+
+ fprintf(fp,
+ " _colour_pair(tile_variation(%d + %s, %d), %d + %s),\n",
+ i, m_start_value.c_str(), c, var, m_start_value.c_str());
+ }
+ }
+
+ fprintf(fp, "%s", "};\n\n");
+
+ fprintf(fp,
+ "unsigned int tile_%s_coloured(unsigned int idx, int col)\n"
+ "{\n"
+ " int num_pairs = sizeof(%s_colour_pairs) / sizeof(%s_colour_pairs[0]);\n"
+ " tile_variation key(idx, col);\n"
+ " unsigned int found;\n"
+ " bool result = binary_search<tile_variation, unsigned int>(\n"
+ " key, &%s_colour_pairs[0], num_pairs,\n"
+ " &tile_variation::cmp, found);\n"
+ " return (result ? found : idx);\n"
+ "}\n\n",
+ lcname.c_str(), lcname.c_str(), lcname.c_str(), lcname.c_str());
+
fclose(fp);
}
@@ -818,29 +1081,32 @@ bool tile_list_processor::write_data()
fprintf(fp, "<td><img src=\"%s\"/></td>",
m_page.m_tiles[i]->filename().c_str());
- std::string lcenum = m_page.m_tiles[i]->enumname();
- for (unsigned int c = 0; c < lcenum.size(); c++)
- lcenum[c] = std::tolower(lcenum[c]);
-
- fprintf(fp, "<td>%s</td>", lcenum.c_str());
-
- const std::string &parts_ctg = m_page.m_tiles[i]->parts_ctg();
- if (m_page.m_tiles[i]->enumname().empty())
+ if (m_page.m_tiles[i]->enumcount() == 0)
{
- fprintf(fp, "<td></td>");
- }
- else if (parts_ctg.empty())
- {
- fprintf(fp, "<td>%s_%s</td>",
- m_prefix.c_str(),
- m_page.m_tiles[i]->enumname().c_str());
+ fprintf(fp, "<td></td><td></td>");
}
else
{
- fprintf(fp, "<td>%s_%s_%s</td>",
- m_prefix.c_str(),
- parts_ctg.c_str(),
- m_page.m_tiles[i]->enumname().c_str());
+ std::string lcenum = m_page.m_tiles[i]->enumname(0);
+ for (unsigned int c = 0; c < lcenum.size(); c++)
+ lcenum[c] = std::tolower(lcenum[c]);
+
+ fprintf(fp, "<td>%s</td>", lcenum.c_str());
+
+ const std::string &parts_ctg = m_page.m_tiles[i]->parts_ctg();
+ if (parts_ctg.empty())
+ {
+ fprintf(fp, "<td>%s_%s</td>",
+ m_prefix.c_str(),
+ m_page.m_tiles[i]->enumname(0).c_str());
+ }
+ else
+ {
+ fprintf(fp, "<td>%s_%s_%s</td>",
+ m_prefix.c_str(),
+ parts_ctg.c_str(),
+ m_page.m_tiles[i]->enumname(0).c_str());
+ }
}
fprintf(fp, "<td>%s</td>", m_page.m_tiles[i]->filename().c_str());
diff --git a/crawl-ref/source/rltiles/tool/tile_list_processor.h b/crawl-ref/source/rltiles/tool/tile_list_processor.h
index 74b199b5ef..5e95d1815b 100644
--- a/crawl-ref/source/rltiles/tool/tile_list_processor.h
+++ b/crawl-ref/source/rltiles/tool/tile_list_processor.h
@@ -18,6 +18,7 @@ protected:
bool load_image(tile &img, const char *filename);
bool process_line(char *read_line, const char *list_file, int line);
void add_image(tile &img, const char *enumname);
+ void recolour(tile &img);
std::string m_name;
@@ -38,6 +39,22 @@ protected:
std::vector<std::string> m_categories;
std::vector<int> m_ctg_counts;
tile m_compose;
+ int m_variation_idx;
+ int m_variation_col;
+
+ typedef std::pair<tile_colour, tile_colour> palette_entry;
+ typedef std::vector<palette_entry> palette_list;
+ palette_list m_palette;
+
+ typedef std::pair<int, int> int_pair;
+ typedef std::vector<int_pair> hue_list;
+ hue_list m_hues;
+
+ typedef std::vector<int> desat_list;
+ desat_list m_desat;
+
+ typedef std::vector<int_pair> lum_list;
+ lum_list m_lum;
};
#endif
diff --git a/crawl-ref/source/rltiles/tool/tile_page.cc b/crawl-ref/source/rltiles/tool/tile_page.cc
index 67c77db3ea..3c90dcfce8 100644
--- a/crawl-ref/source/rltiles/tool/tile_page.cc
+++ b/crawl-ref/source/rltiles/tool/tile_page.cc
@@ -2,6 +2,7 @@
#include "tile_colour.h"
#include <stdio.h>
#include <string.h>
+#include <cassert>
#include "tile.h"
tile_page::tile_page() : m_width(1024), m_height(0)
@@ -88,6 +89,31 @@ bool tile_page::place_images()
return (true);
}
+int tile_page::find(const std::string &enumname) const
+{
+ for (size_t i = 0; i < m_tiles.size(); ++i)
+ {
+ for (int c = 0; c < m_tiles[i]->enumcount(); ++c)
+ {
+ if (m_tiles[i]->enumname(c) == enumname)
+ return (i);
+ }
+ }
+
+ return (-1);
+}
+
+bool tile_page::add_synonym(const std::string &enumname, const std::string &syn)
+{
+ int idx = find(enumname);
+ if (idx == -1)
+ return (false);
+
+ m_tiles[idx]->add_enumname(syn);
+
+ return (true);
+}
+
bool tile_page::write_image(const char *filename)
{
if (m_width * m_height <= 0)
@@ -123,3 +149,12 @@ bool tile_page::write_image(const char *filename)
delete[] pixels;
return success;
}
+
+void tile_page::add_variation(int var_idx, int base_idx, int colour)
+{
+ assert(var_idx < (2 << 15));
+ assert(base_idx < (2 << 15));
+
+ m_tiles[base_idx]->add_variation(colour, var_idx);
+}
+
diff --git a/crawl-ref/source/rltiles/tool/tile_page.h b/crawl-ref/source/rltiles/tool/tile_page.h
index 9f13651a1d..c63ae43a5a 100644
--- a/crawl-ref/source/rltiles/tool/tile_page.h
+++ b/crawl-ref/source/rltiles/tool/tile_page.h
@@ -2,6 +2,8 @@
#define TILE_PAGE_H
#include <vector>
+#include <string>
+
class tile;
class tile_page
@@ -13,10 +15,15 @@ public:
bool place_images();
bool write_image(const char *filename);
+ int find(const std::string &enumname) const;
+ bool add_synonym(const std::string &enumname, const std::string &syn);
+ void add_variation(int var_idx, int base_idx, int colour);
+
std::vector<tile*> m_tiles;
std::vector<unsigned int> m_counts;
std::vector<int> m_texcoords;
std::vector<int> m_offsets;
+
protected:
int m_width;
int m_height;
diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc
index f6fc5cad9e..d6c3ff577a 100644
--- a/crawl-ref/source/show.cc
+++ b/crawl-ref/source/show.cc
@@ -360,7 +360,8 @@ void show_def::_update_monster(const monsters* mons)
_set_backup(e);
grid(e).cls = SH_MONSTER;
- grid(e).mons = mons->type;
+ grid(e).mons = (!crawl_state.arena && you.misled()) ?
+ mons->get_mislead_type() : mons->type;
grid(e).colour = get_mons_glyph(mons).col;
#ifdef USE_TILE
diff --git a/crawl-ref/source/showsymb.cc b/crawl-ref/source/showsymb.cc
index 1d3c4e7dae..50a6272d41 100644
--- a/crawl-ref/source/showsymb.cc
+++ b/crawl-ref/source/showsymb.cc
@@ -56,6 +56,11 @@ glyph get_show_glyph(show_type object)
static int _get_mons_colour(const monsters *mons)
{
int col = mons->colour;
+ if (!crawl_state.arena && you.misled())
+ {
+ const monsterentry* mdat = get_monster_data(mons->get_mislead_type());
+ col = mdat->colour;
+ }
if (mons->berserk())
col = RED;
@@ -125,7 +130,11 @@ glyph get_item_glyph(const item_def *item)
glyph get_mons_glyph(const monsters *mons)
{
glyph g;
- g.ch = mons_char(mons->type);
+
+ if (!crawl_state.arena && you.misled())
+ g.ch = mons_char(mons->get_mislead_type());
+ else
+ g.ch = mons_char(mons->type);
g.col = _get_mons_colour(mons);
return (g);
}
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index f5f89f44b6..af1a551caa 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -1447,15 +1447,11 @@ static bool _get_mem_list(spell_list &mem_spells,
"You cannot memorise any of the available spells because you "
"are a %s.", lowercase_string(species).c_str());
}
- else if (num_low_levels > 0)
+ else if (num_low_levels > 0 || num_low_xl > 0)
{
- mpr("You do not have enough free spell levels to memorise any of the "
- "available spells.", MSGCH_PROMPT);
- }
- else if (num_low_xl > 0)
- {
- mpr("You aren't experienced enough to memorise any of the "
- "available spells.", MSGCH_PROMPT);
+ // Just because we can't memorise them doesn't mean we don't want to
+ // see what we have available. See FR #235. {due}
+ return (true);
}
else
{
diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h
index 27f1ea2632..3adc30d1d3 100644
--- a/crawl-ref/source/spl-data.h
+++ b/crawl-ref/source/spl-data.h
@@ -2500,93 +2500,145 @@
{
SPELL_FLAME_AMMUNITION, "Flame Ammunition",
- SPTYP_ENCHANTMENT | SPTYP_FIRE,
- SPFLAG_HELPFUL | SPFLAG_BATTLE,
- 3,
- 0,
- -1,-1,
- 0,
- NULL,
- false,
- true
+ SPTYP_ENCHANTMENT | SPTYP_FIRE,
+ SPFLAG_HELPFUL | SPFLAG_BATTLE,
+ 3,
+ 0,
+ -1,-1,
+ 0,
+ NULL,
+ false,
+ true
},
{
SPELL_FROST_AMMUNITION, "Frost Ammunition",
- SPTYP_ENCHANTMENT | SPTYP_ICE,
- SPFLAG_HELPFUL | SPFLAG_BATTLE,
- 3,
- 0,
- -1,-1,
- 0,
- NULL,
- false,
- true
+ SPTYP_ENCHANTMENT | SPTYP_ICE,
+ SPFLAG_HELPFUL | SPFLAG_BATTLE,
+ 3,
+ 0,
+ -1,-1,
+ 0,
+ NULL,
+ false,
+ true
},
{
SPELL_SHOCKING_AMMUNITION, "Shocking Ammunition",
- SPTYP_ENCHANTMENT | SPTYP_AIR,
- SPFLAG_HELPFUL | SPFLAG_BATTLE,
- 5,
- 0,
- -1,-1,
- 0,
- NULL,
- false,
- true
+ SPTYP_ENCHANTMENT | SPTYP_AIR,
+ SPFLAG_HELPFUL | SPFLAG_BATTLE,
+ 5,
+ 0,
+ -1,-1,
+ 0,
+ NULL,
+ false,
+ true
},
{
SPELL_EXPLODING_AMMUNITION, "Exploding Ammunition",
- SPTYP_ENCHANTMENT | SPTYP_FIRE | SPTYP_AIR,
- SPFLAG_HELPFUL | SPFLAG_BATTLE,
- 5,
- 0,
- -1,-1,
- 0,
- NULL,
- false,
- true
+ SPTYP_ENCHANTMENT | SPTYP_FIRE | SPTYP_AIR,
+ SPFLAG_HELPFUL | SPFLAG_BATTLE,
+ 5,
+ 0,
+ -1,-1,
+ 0,
+ NULL,
+ false,
+ true
},
{
SPELL_WARP_AMMUNITION, "Warp Ammunition",
- SPTYP_ENCHANTMENT | SPTYP_TRANSLOCATION,
- SPFLAG_HELPFUL | SPFLAG_BATTLE,
- 5,
- 0,
- -1,-1,
- 0,
- NULL,
- false,
- true
+ SPTYP_ENCHANTMENT | SPTYP_TRANSLOCATION,
+ SPFLAG_HELPFUL | SPFLAG_BATTLE,
+ 5,
+ 0,
+ -1,-1,
+ 0,
+ NULL,
+ false,
+ true
},
{
SPELL_REAPING_AMMUNITION, "Reaping Ammunition",
- SPTYP_ENCHANTMENT | SPTYP_NECROMANCY,
- SPFLAG_HELPFUL | SPFLAG_BATTLE,
- 7,
- 0,
- -1,-1,
- 0,
- NULL,
- false,
- true
+ SPTYP_ENCHANTMENT | SPTYP_NECROMANCY,
+ SPFLAG_HELPFUL | SPFLAG_BATTLE,
+ 7,
+ 0,
+ -1,-1,
+ 0,
+ NULL,
+ false,
+ true
},
{
SPELL_RETURNING_AMMUNITION, "Returning Ammunition",
- SPTYP_ENCHANTMENT | SPTYP_TRANSLOCATION,
- SPFLAG_HELPFUL | SPFLAG_BATTLE,
- 3,
- 0,
- -1,-1,
- 0,
- NULL,
- false,
- true
+ SPTYP_ENCHANTMENT | SPTYP_TRANSLOCATION,
+ SPFLAG_HELPFUL | SPFLAG_BATTLE,
+ 3,
+ 0,
+ -1,-1,
+ 0,
+ NULL,
+ false,
+ true
+},
+
+{
+ SPELL_FAKE_MARA_SUMMON, "Mara Summon",
+ SPTYP_SUMMONING,
+ SPFLAG_MONSTER,
+ 5,
+ 0,
+ -1, -1,
+ 0,
+ NULL,
+ false,
+ false
+},
+
+{
+ SPELL_SUMMON_RAKSHASA, "Summon Rakshasa",
+ SPTYP_SUMMONING,
+ SPFLAG_MONSTER,
+ 5,
+ 0,
+ -1, -1,
+ 0,
+ NULL,
+ false,
+ false
+},
+
+{
+ SPELL_MISLEAD, "Mislead",
+ SPTYP_ENCHANTMENT,
+ SPFLAG_TARGET | SPFLAG_NOT_SELF,
+ 5,
+ 200,
+ LOS_RADIUS, LOS_RADIUS,
+ 0,
+ NULL,
+ false,
+ false
+},
+
+{
+ SPELL_SUMMON_PLAYER_GHOST, "Summon Player Ghost",
+ SPTYP_SUMMONING,
+ SPFLAG_MONSTER,
+ 5,
+ 0,
+ -1, -1,
+ 0,
+ NULL,
+ false,
+ false
},
{
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h
index 33cc24396a..26ecf81233 100644
--- a/crawl-ref/source/tags.h
+++ b/crawl-ref/source/tags.h
@@ -40,7 +40,7 @@ enum tag_file_type // file types supported by tag system
enum tag_major_version
{
TAG_MAJOR_START = 5,
- TAG_MAJOR_VERSION = 10
+ TAG_MAJOR_VERSION = 11
};
// Minor version will be reset to zero when major version changes.
diff --git a/crawl-ref/source/tile2.cc b/crawl-ref/source/tile2.cc
index 62f6955812..c4350791fa 100644
--- a/crawl-ref/source/tile2.cc
+++ b/crawl-ref/source/tile2.cc
@@ -37,7 +37,7 @@ void tile_default_flv(level_area_type lev, branch_type br, tile_flavour &flv)
case 3: flv.wall = TILE_WALL_ZOT_GREEN; break;
case 4: flv.wall = TILE_WALL_ZOT_CYAN; break;
case 5: flv.wall = TILE_WALL_ZOT_YELLOW; break;
- case 6: flv.wall = TILE_WALL_ZOT_GRAY; break;
+ case 6: flv.wall = TILE_WALL_ZOT_WHITE; break;
}
if (one_chance_in(3))
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index ddc0a9013f..725947c13c 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -121,6 +121,8 @@ int tileidx_monster_base(const monsters *mon, bool detected)
bool in_water = feat_is_water(grd(mon->pos()));
int type = mon->type;
+ if (!crawl_state.arena && you.misled())
+ type = mon->get_mislead_type();
// Show only base class for detected monsters.
if (detected)
@@ -1014,6 +1016,12 @@ int tileidx_monster_base(const monsters *mon, bool detected)
case MONS_EROLCHA:
return TILEP_MONS_EROLCHA;
+ // rakshasas ('R')
+ case MONS_MARA:
+ return TILEP_MONS_MARA;
+ case MONS_MARA_FAKE:
+ return TILEP_MONS_MARA_FAKE;
+
// trolls ('T')
case MONS_PURGY:
return TILEP_MONS_PURGY;
@@ -3123,9 +3131,9 @@ int _get_door_offset (int base_tile, bool opened = false,
// Modify wall tile index depending on floor/wall flavour.
static inline void _finalise_tile(unsigned int *tile,
- unsigned char wall_flv,
- unsigned char floor_flv,
- unsigned char special_flv,
+ unsigned int wall_flv,
+ unsigned int floor_flv,
+ unsigned int special_flv,
coord_def gc)
{
int orig = (*tile) & TILE_FLAG_MASK;
@@ -4411,14 +4419,22 @@ void tile_init_flavour(const coord_def &gc)
if (!env.tile_flv(gc).floor)
{
- int floor_rnd = random2(tile_dngn_count(env.tile_default.floor));
- env.tile_flv(gc).floor = env.tile_default.floor + floor_rnd;
+ int floor_base = env.tile_default.floor;
+ int colour = env.grid_colours(gc);
+ if (colour)
+ floor_base = tile_dngn_coloured(floor_base, colour);
+ int floor_rnd = random2(tile_dngn_count(floor_base));
+ env.tile_flv(gc).floor = floor_base + floor_rnd;
}
if (!env.tile_flv(gc).wall)
{
- int wall_rnd = random2(tile_dngn_count(env.tile_default.wall));
- env.tile_flv(gc).wall = env.tile_default.wall + wall_rnd;
+ int wall_base = env.tile_default.wall;
+ int colour = env.grid_colours(gc);
+ if (colour)
+ wall_base = tile_dngn_coloured(wall_base, colour);
+ int wall_rnd = random2(tile_dngn_count(wall_base));
+ env.tile_flv(gc).wall = wall_base + wall_rnd;
}
if (feat_is_door(grd(gc)))
@@ -4884,9 +4900,9 @@ void tile_finish_dngn(unsigned int *tileb, int cx, int cy)
+ coord_def(cx, cy) - crawl_view.vgrdc;
const coord_def gc = view2grid(ep);
- unsigned char wall_flv = 0;
- unsigned char floor_flv = 0;
- unsigned char special_flv = 0;
+ unsigned int wall_flv = 0;
+ unsigned int floor_flv = 0;
+ unsigned int special_flv = 0;
const bool in_bounds = (map_bounds(gc));
if (in_bounds)
diff --git a/crawl-ref/source/tiletex.cc b/crawl-ref/source/tiletex.cc
index ec65f779a1..804408ec0d 100644
--- a/crawl-ref/source/tiletex.cc
+++ b/crawl-ref/source/tiletex.cc
@@ -81,30 +81,29 @@ bool GenericTexture::load_texture(const char *filename,
GLenum texture_format;
if (bpp == 4)
{
- if (new_width != img->w || new_height != img->h)
- {
- SDL_LockSurface(img);
- pixels = new unsigned char[4 * new_width * new_height];
- memset(pixels, 0, 4 * new_width * new_height);
+ // Even if the size is the same, still go through
+ // SDL_GetRGBA to put the image in the right format.
+ SDL_LockSurface(img);
+ pixels = new unsigned char[4 * new_width * new_height];
+ memset(pixels, 0, 4 * new_width * new_height);
- int dest = 0;
- for (int y = 0; y < img->h; y++)
+ int dest = 0;
+ for (int y = 0; y < img->h; y++)
+ {
+ for (int x = 0; x < img->w; x++)
{
- for (int x = 0; x < img->w; x++)
- {
- unsigned char *p = ((unsigned char*)img->pixels
- + y * img->pitch + x * bpp);
- unsigned int pixel = *(unsigned int*)p;
- SDL_GetRGBA(pixel, img->format, &pixels[dest],
- &pixels[dest+1], &pixels[dest+2],
- &pixels[dest+3]);
- dest += 4;
- }
- dest += 4 * (new_width - img->w);
+ unsigned char *p = ((unsigned char*)img->pixels
+ + y * img->pitch + x * bpp);
+ unsigned int pixel = *(unsigned int*)p;
+ SDL_GetRGBA(pixel, img->format, &pixels[dest],
+ &pixels[dest+1], &pixels[dest+2],
+ &pixels[dest+3]);
+ dest += 4;
}
-
- SDL_UnlockSurface(img);
+ dest += 4 * (new_width - img->w);
}
+
+ SDL_UnlockSurface(img);
texture_format = GL_RGBA;
}
else if (bpp == 3)
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 6da7bc6ee0..28b593d97a 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -24,6 +24,7 @@
#include "directn.h"
#include "map_knowledge.h"
#include "exclude.h"
+#include "fight.h"
#include "godabil.h"
#include "itemname.h"
#include "itemprop.h"
@@ -2208,6 +2209,9 @@ static travel_target _prompt_travel_depth(const level_id &id,
bool travel_kill_monster(const monsters * monster)
{
+ if (!wielded_weapon_check(you.weapon(), true))
+ return (false);
+
return (monster->type == MONS_TOADSTOOL);
}