summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-23 12:03:41 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-23 12:03:41 +0000
commitd3e93c074746027e209a67a247c7a0be78c5f40e (patch)
treefdcb4fc3520eaebe070455e4a30c67e1cabfe777 /crawl-ref
parent25178bf21218cca469f1b05c0634c8e0c2bc2a41 (diff)
downloadcrawl-ref-d3e93c074746027e209a67a247c7a0be78c5f40e.tar.gz
crawl-ref-d3e93c074746027e209a67a247c7a0be78c5f40e.zip
Backport r10380, and also backport flavour messages for entering Zot.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10381 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/docs/changelog.txt7
-rw-r--r--crawl-ref/source/acr.cc24
-rw-r--r--crawl-ref/source/misc.cc48
-rw-r--r--crawl-ref/source/rltiles/tool/main.cc1
-rw-r--r--crawl-ref/source/rltiles/tool/tile_page.cc3
-rw-r--r--crawl-ref/source/spells3.cc14
-rw-r--r--crawl-ref/source/spl-data.h2
-rw-r--r--crawl-ref/source/tilesdl.cc20
-rw-r--r--crawl-ref/source/xom.cc19
9 files changed, 112 insertions, 26 deletions
diff --git a/crawl-ref/docs/changelog.txt b/crawl-ref/docs/changelog.txt
index 0197381d2b..25f7a0268a 100644
--- a/crawl-ref/docs/changelog.txt
+++ b/crawl-ref/docs/changelog.txt
@@ -5,6 +5,7 @@ Disclaimer: These are merely the highlights, not an exhaustive list of changes.
* Improved performance for the Tiles version.
* Fixed crashes related to giant spores.
+* Fixed Summon Horrible Thing sometimes hanging or crashing.
* Fixed monsters refusing to enter or attack into grids on the map edge.
* Fixed minivaults not being placed.
* Fixed inconvenient electrical eels in entry vaults.
@@ -12,12 +13,17 @@ Disclaimer: These are merely the highlights, not an exhaustive list of changes.
* Fixed erroneous "blocked line of fire" warnings.
* Fixed missing items in Tiles inventory menus.
* Fixed Xom's repel stairs effect moving shops.
+* Fixed Xom gifts not being destroyed in deep water.
* Fixed magic mapping not showing altars/gates in the Tiles version.
* Fixed AltGr not being recognized in Windows Tiles version.
* Fixed misbehaviour for temporary weapon brands and throwing.
* Fixed Blade Hands not counting as slicing while wearing melded gloves.
* Fixed certain incorporeal monsters flying instead of levitating.
+* Staff of earth damage is reduced by AC.
+* The elemental staves' melee effects cost 2 mp again.
* Once entered, the gate to Zot remains open even without carrying runes.
+* Add some fancy messaging when opening the gate to Zot.
+* Prompt before moving when confused and next to lava or deep water.
* Check some abilities' requirements before rolling the success check.
* Consider armour properties in fatal stat loss check before transforming.
* Really allow uniques to retain their spells when polymorphed.
@@ -28,6 +34,7 @@ Disclaimer: These are merely the highlights, not an exhaustive list of changes.
* Prompt before allowing TSO/Lugonu to bless your weapon.
* Vampiric Draining/Drain Life deal damage to summons again, but don't heal.
* Wielding stones for Sandblast now guarantees a range of 2.
+* Change Portal Projectile range to full LOS.
* Turn autopickup back on if you gain see invisible, even temporarily.
* Polymorph other always polymorphs shapeshifters whose form isn't magic immune.
* Troll hide and armour count as light armour.
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 61cc957ebf..9318b863ee 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -3666,6 +3666,30 @@ static void _move_player(coord_def move)
// When confused, sometimes make a random move
if (you.confused())
{
+ dungeon_feature_type dangerous = DNGN_FLOOR;
+ for (adjacent_iterator ai(you.pos(), false); ai; ++ai)
+ {
+ if (is_grid_dangerous(grd(*ai))
+ && (dangerous == DNGN_FLOOR || grd(*ai) == DNGN_LAVA))
+ {
+ dangerous = grd(*ai);
+ }
+ }
+ if (dangerous != DNGN_FLOOR)
+ {
+ std::string prompt = "Are you sure you want to move while confused "
+ "and next to ";
+ prompt += (dangerous == DNGN_LAVA ? "lava"
+ : "deep water");
+ prompt += "? ";
+
+ if (!yesno(prompt.c_str(), false, 'n'))
+ {
+ canned_msg(MSG_OK);
+ return;
+ }
+ }
+
if (!one_chance_in(3))
{
move.x = random2(3) - 1;
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 3c9da6d905..ab1c3915b2 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -69,6 +69,7 @@ REVISION("$Rev$");
#include "shopping.h"
#include "skills.h"
#include "skills2.h"
+#include "spells1.h"
#include "spells3.h"
#include "stash.h"
#include "state.h"
@@ -1481,13 +1482,16 @@ static int runes_in_pack(std::vector<int> &runes)
for (int i = 0; i < ENDOFPACK; i++)
{
- if (is_valid_item( you.inv[i] )
+ if (is_valid_item(you.inv[i])
&& you.inv[i].base_type == OBJ_MISCELLANY
&& you.inv[i].sub_type == MISC_RUNE_OF_ZOT)
{
num_runes += you.inv[i].quantity;
- for (int q = 1; runes.size() < 3 && q < you.inv[i].quantity; ++q)
- runes.push_back(you.inv[i].plus);
+ for (int q = 1;
+ runes.size() < 3 && q <= you.inv[i].quantity; ++q)
+ {
+ runes.push_back(i);
+ }
}
}
@@ -2140,17 +2144,45 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
switch (NUMBER_OF_RUNES_NEEDED)
{
case 1:
- mpr("You need a Rune to enter this place.");
+ mpr("You need a rune to enter this place.");
break;
default:
- mprf( "You need at least %d Runes to enter this place.",
- NUMBER_OF_RUNES_NEEDED );
+ mprf("You need at least %d runes to enter this place.",
+ NUMBER_OF_RUNES_NEEDED);
}
return;
}
- // TODO: This needs a better message!
- mpr("The gate opens wide!");
+ ASSERT(runes.size() >= 3);
+
+ mprf("You insert %s into the lock.",
+ you.inv[runes[0]].name(DESC_NOCAP_THE).c_str());
+#ifdef USE_TILE
+ tiles.add_overlay(you.pos(), tileidx_zap(GREEN));
+ update_screen();
+#else
+ you.flash_colour = LIGHTGREEN;
+ viewwindow(true, false);
+#endif
+ mpr("The lock glows an eerie green colour!");
+ more();
+
+ mprf("You insert %s into the lock.",
+ you.inv[runes[1]].name(DESC_NOCAP_THE).c_str());
+ big_cloud(CLOUD_PURP_SMOKE, KC_YOU, you.pos(), 20, 7 + random2(7));
+ viewwindow(true, false);
+ mpr("Heavy smoke blows from the lock!");
+ more();
+
+ mprf("You insert %s into the lock.",
+ you.inv[runes[2]].name(DESC_NOCAP_THE).c_str());
+
+ if (silenced(you.pos()))
+ mpr("The gate opens wide!");
+ else
+ mpr("With a loud hiss the gate opens wide!");
+ more();
+
you.opened_zot = true;
}
diff --git a/crawl-ref/source/rltiles/tool/main.cc b/crawl-ref/source/rltiles/tool/main.cc
index 8b4b60ce43..c94e2d17a2 100644
--- a/crawl-ref/source/rltiles/tool/main.cc
+++ b/crawl-ref/source/rltiles/tool/main.cc
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include "tile_list_processor.h"
int main(int argc, char **argv)
diff --git a/crawl-ref/source/rltiles/tool/tile_page.cc b/crawl-ref/source/rltiles/tool/tile_page.cc
index 22e475348e..aac5115f7f 100644
--- a/crawl-ref/source/rltiles/tool/tile_page.cc
+++ b/crawl-ref/source/rltiles/tool/tile_page.cc
@@ -1,5 +1,6 @@
#include "tile_page.h"
#include "tile_colour.h"
+#include <stdio.h>
#include <string.h>
#include "tile.h"
@@ -82,7 +83,7 @@ bool tile_page::place_images()
m_texcoords.push_back(ycur);
m_texcoords.push_back(xcur + tilew);
m_texcoords.push_back(ycur + tileh);
-
+
// Only add downwards, stretching out xmax as we go.
xmax = std::max(xmax, xcur + (int)tilew);
xcur = xmin;
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 895c6c87bf..8740fae83d 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -603,11 +603,11 @@ bool cast_summon_horrible_things(int pow, god_type god)
// No more than 8 summons.
how_many_small = std::min(8, how_many_small);
- how_many_big = std::min(8, how_many_big);
+ how_many_big = std::min(8, how_many_big);
int count = 0;
- while (how_many_big > 0)
+ while (how_many_big-- > 0)
{
const int monster =
create_monster(
@@ -619,13 +619,11 @@ bool cast_summon_horrible_things(int pow, god_type god)
if (monster != -1)
{
count++;
- how_many_big--;
-
player_angers_monster(&menv[monster]);
}
}
- while (how_many_small > 0)
+ while (how_many_small-- > 0)
{
const int monster =
create_monster(
@@ -637,8 +635,6 @@ bool cast_summon_horrible_things(int pow, god_type god)
if (monster != -1)
{
count++;
- how_many_small--;
-
player_angers_monster(&menv[monster]);
}
}
@@ -875,7 +871,7 @@ static bool _raise_remains(const coord_def &pos, int corps, beh_type beha,
const int monster = create_monster(
mgen_data(mon, beha,
- 0, 0, a, hitting,
+ 0, 0, pos, hitting,
0, god,
zombie_type, number));
@@ -889,7 +885,7 @@ static bool _raise_remains(const coord_def &pos, int corps, beh_type beha,
if (is_named_corpse(item))
name_zombie(&menv[monster], monnum, get_corpse_name(item));
- equip_undead(a, corps, monster, monnum);
+ equip_undead(pos, corps, monster, monnum);
destroy_item(corps);
diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h
index 4673bda710..577eae8c6b 100644
--- a/crawl-ref/source/spl-data.h
+++ b/crawl-ref/source/spl-data.h
@@ -2192,7 +2192,7 @@
SPFLAG_TARGET | SPFLAG_BATTLE,
2,
50,
- 4, 8,
+ LOS_RADIUS, LOS_RADIUS,
0,
NULL,
false,
diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc
index b93bd66495..b72930ac35 100644
--- a/crawl-ref/source/tilesdl.cc
+++ b/crawl-ref/source/tilesdl.cc
@@ -148,7 +148,6 @@ void TilesFramework::shutdown()
delete m_region_inv;
delete m_region_crt;
delete m_region_menu;
- delete m_region_title;
m_region_tile = NULL;
m_region_stat = NULL;
@@ -157,7 +156,12 @@ void TilesFramework::shutdown()
m_region_inv = NULL;
m_region_crt = NULL;
m_region_menu = NULL;
- m_region_title = NULL;
+
+ if (m_region_title)
+ {
+ delete m_region_title;
+ m_region_title = NULL;
+ }
for (unsigned int i = 0; i < LAYER_MAX; i++)
m_layers[i].m_regions.clear();
@@ -180,6 +184,9 @@ void TilesFramework::draw_title()
mouse_control mc(MOUSE_MODE_MORE);
getch();
+
+ delete m_region_title;
+ m_region_title = NULL;
}
void TilesFramework::calculate_default_options()
@@ -331,8 +338,6 @@ bool TilesFramework::initialise()
m_region_crt = new CRTRegion(m_fonts[crt_font].font);
m_region_menu = new MenuRegion(&m_image, m_fonts[crt_font].font);
- m_region_title = new TitleRegion(m_windowsz.x, m_windowsz.y);
-
m_layers[LAYER_NORMAL].m_regions.push_back(m_region_map);
m_layers[LAYER_NORMAL].m_regions.push_back(m_region_tile);
m_layers[LAYER_NORMAL].m_regions.push_back(m_region_inv);
@@ -342,7 +347,12 @@ bool TilesFramework::initialise()
m_layers[LAYER_CRT].m_regions.push_back(m_region_crt);
m_layers[LAYER_CRT].m_regions.push_back(m_region_menu);
- m_layers[LAYER_TITLE].m_regions.push_back(m_region_title);
+ // Only initialize title region if we'll actually want to draw it.
+ if (Options.tile_title_screen)
+ {
+ m_region_title = new TitleRegion(m_windowsz.x, m_windowsz.y);
+ m_layers[LAYER_TITLE].m_regions.push_back(m_region_title);
+ }
cgotoxy(1, 1, GOTO_CRT);
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index ee26016165..39533c4d4f 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -575,6 +575,16 @@ static void _xom_make_item(object_class_type base, int subtype, int power)
items(true, base, subtype, true, power, MAKE_ITEM_RANDOM_RACE,
0, 0, GOD_XOM);
+ if (grid_destroys_items(grd(you.pos())))
+ {
+ if (!silenced(you.pos()))
+ mprf(MSGCH_SOUND, grid_item_destruction_message(grd(you.pos())));
+
+ simple_god_message(" snickers.", GOD_XOM);
+ destroy_item(thing_created, true);
+ thing_created = NON_ITEM;
+ }
+
if (thing_created == NON_ITEM)
{
god_speaks(GOD_XOM, "\"No, never mind.\"");
@@ -597,6 +607,9 @@ static void _xom_make_item(object_class_type base, int subtype, int power)
static void _xom_acquirement(object_class_type force_class)
{
+ if (grid_destroys_items(grd(you.pos())))
+ return;
+
god_acting gdact(GOD_XOM);
int item_index = NON_ITEM;
@@ -1689,7 +1702,8 @@ static bool _xom_is_good(int sever, int tension)
if (one_chance_in(10))
break;
}
- while (x_chance_in_y(3, 4) || player_in_a_dangerous_place());
+ while (x_chance_in_y(3, 4) || count > 7 + random2(5)
+ || player_in_a_dangerous_place());
maybe_update_stashes();
// Take a note.
@@ -2708,7 +2722,8 @@ static bool _xom_is_bad(int sever, int tension)
you_teleport_now(false);
more();
}
- while (x_chance_in_y(3, 4) && !player_in_a_dangerous_place());
+ while (count > 7 + random2(5)
+ || x_chance_in_y(3, 4) && !player_in_a_dangerous_place());
badness = player_in_a_dangerous_place() ? 3 : 1;
maybe_update_stashes();