summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-07 12:38:16 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-07 12:38:16 +0000
commit673859ea2ec2512b37ce1c74a0ea9c0412f43282 (patch)
tree19f7e8a04569323d06a547ae28c4a5a7179a1f49 /crawl-ref
parent167ae03b160a0ccadd7934b2bfe557d491f1cb1f (diff)
downloadcrawl-ref-673859ea2ec2512b37ce1c74a0ea9c0412f43282.tar.gz
crawl-ref-673859ea2ec2512b37ce1c74a0ea9c0412f43282.zip
Fix 2012088: Monsters "following" you from the Abyss to the wrong level.
A few fixes to starting equipment and skills. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6440 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/dat/database/wpnnoise.txt2
-rw-r--r--crawl-ref/source/files.cc12
-rw-r--r--crawl-ref/source/makeitem.cc4
-rw-r--r--crawl-ref/source/newgame.cc13
-rw-r--r--crawl-ref/source/religion.cc2
5 files changed, 19 insertions, 14 deletions
diff --git a/crawl-ref/source/dat/database/wpnnoise.txt b/crawl-ref/source/dat/database/wpnnoise.txt
index 3821aa06f4..a61a5df8fa 100644
--- a/crawl-ref/source/dat/database/wpnnoise.txt
+++ b/crawl-ref/source/dat/database/wpnnoise.txt
@@ -595,4 +595,4 @@ quiet
silent
boring
-%%%% \ No newline at end of file
+%%%%
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index dc9b4e8149..c906a36123 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -931,16 +931,20 @@ static bool _grab_follower_at(const coord_def &pos)
if (!fmenv || !fmenv->alive())
return (false);
- // monster has to be already tagged in order to follow:
+ // Monster has to be already tagged in order to follow.
if (!testbits( fmenv->flags, MF_TAKING_STAIRS ))
return (false);
+ level_id dest = level_id::current();
+ if (you.char_direction == GDT_GAME_START)
+ dest.depth = 1;
+
#if DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS, "%s is following to %s.",
fmenv->name(DESC_CAP_THE, true).c_str(),
- level_id::current().describe().c_str());
+ dest.describe().c_str());
#endif
- fmenv->set_transit(level_id::current());
+ fmenv->set_transit(dest);
fmenv->destroy_inventory();
monster_cleanup(fmenv);
return (true);
@@ -1727,7 +1731,7 @@ static bool _get_and_validate_version(FILE *restoreFile, char &major, char &mino
return (false);
}
- if (minor > TAG_MINOR_VERSION)
+ if (minor > TAG_MINOR_VERSION)
{
*reason = make_stringf("Minor version mismatch: %d (want <= %d).",
minor, TAG_MINOR_VERSION);
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index c27a6bf7a3..d9a177a2e7 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -893,7 +893,7 @@ static bool _try_make_weapon_artefact(item_def& item, int force_type,
int item_level)
{
if (item.sub_type != WPN_CLUB && item_level > 2
- && x_chance_in_y(101 + (item_level * 3), 4000))
+ && x_chance_in_y(101 + item_level * 3, 4000))
{
// Make a randart or unrandart.
@@ -945,7 +945,7 @@ static bool _try_make_weapon_artefact(item_def& item, int force_type,
// If it isn't an artefact yet, try to make a fixed artefact.
if (item_level > 6
&& one_chance_in(12)
- && x_chance_in_y(31 + (item_level * 3), 3000))
+ && x_chance_in_y(31 + item_level * 3, 3000))
{
#ifdef DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS, "Making fixed artefact.");
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 3cb3d5a3d3..294439d6d5 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -239,8 +239,8 @@ static job_type new_jobs_order[] = {
JOB_MONK, JOB_BERSERKER,
// religious professions (incl. Berserker above)
JOB_PALADIN, JOB_PRIEST,
- JOB_CHAOS_KNIGHT, JOB_DEATH_KNIGHT,
- JOB_HEALER, JOB_CRUSADER,
+ JOB_HEALER, JOB_CHAOS_KNIGHT,
+ JOB_DEATH_KNIGHT, JOB_CRUSADER,
// general and niche spellcasters (incl. Crusader above)
JOB_REAVER, JOB_WIZARD,
JOB_CONJURER, JOB_ENCHANTER,
@@ -4564,7 +4564,6 @@ bool _give_items_skills()
you.skills[SK_FIGHTING] = 2;
you.skills[SK_ARMOUR] = 1;
you.skills[SK_DODGING] = 1;
- you.skills[SK_STEALTH] = 1;
weap_skill = 2;
break;
@@ -4642,7 +4641,7 @@ bool _give_items_skills()
you.skills[SK_TRANSLOCATIONS] = 1;
// The other two schools depend on the chosen book.
- switch (you.inv[2].sub_type)
+ switch (you.inv[3].sub_type)
{
case BOOK_MINOR_MAGIC_I:
you.skills[SK_CONJURATIONS] = 1;
@@ -4694,7 +4693,7 @@ bool _give_items_skills()
you.skills[SK_EVOCATIONS] = 1;
}
else
- you.skills[SK_THROWING] = 1;
+ you.skills[SK_DARTS] = 1;
you.skills[SK_ENCHANTMENTS] = 4;
you.skills[SK_SPELLCASTING] = 1;
@@ -4749,6 +4748,7 @@ bool _give_items_skills()
you.skills[SK_DODGING] = 2;
you.skills[SK_SPELLCASTING] = 2;
you.skills[SK_TRANSLOCATIONS] = 3;
+ you.skills[SK_DARTS] = 1;
weap_skill = 3;
break;
@@ -4835,6 +4835,7 @@ bool _give_items_skills()
{
_newgame_make_item(1, EQ_NONE, OBJ_WEAPONS, WPN_SLING);
_newgame_make_item(4, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_ROBE);
+ you.skills[SK_SLINGS] = 1;
}
you.skills[SK_TRANSMIGRATION] = 1;
@@ -4884,7 +4885,7 @@ bool _give_items_skills()
if (you.species == SP_SPRIGGAN)
{
- _make_rod(you.inv[0], STAFF_STRIKING);
+ _make_rod(you.inv[1], STAFF_STRIKING);
you.skills[SK_EVOCATIONS] = 1;
}
else
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 6835875cf9..f07b656b95 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1000,7 +1000,7 @@ static void _give_nemelex_gift()
// Nemelex will give at least one gift early.
if (you.num_gifts[GOD_NEMELEX_XOBEH] == 0
&& x_chance_in_y(you.piety + 1, piety_breakpoint(1))
- || x_chance_in_y(you.piety + 1, MAX_PIETY) && one_chance_in(3)
+ || one_chance_in(3) && x_chance_in_y(you.piety + 1, MAX_PIETY)
&& !you.attribute[ATTR_CARD_COUNTDOWN])
{
misc_item_type gift_type;