summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-05 11:41:45 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-05 11:41:45 +0000
commitf2fa5bda853c07cca05490f4b6d5d9dd2aec1608 (patch)
treea19c7cc6d57f48dab785c501d4d21648dcf672e3 /crawl-ref/source
parentf79914cddad049fc82f6dd3d4ff9dd34e4246f31 (diff)
downloadcrawl-ref-f2fa5bda853c07cca05490f4b6d5d9dd2aec1608.tar.gz
crawl-ref-f2fa5bda853c07cca05490f4b6d5d9dd2aec1608.zip
More abilities to permamutations.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@575 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/abl-show.cc10
-rw-r--r--crawl-ref/source/mutation.cc74
-rw-r--r--crawl-ref/source/newgame.cc38
-rw-r--r--crawl-ref/source/player.cc30
4 files changed, 76 insertions, 76 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 8202fa0e55..5f57f30b5c 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -1445,10 +1445,8 @@ bool generate_abilities( void )
}
//jmf: alternately put check elsewhere
- if ((you.level_type == LEVEL_DUNGEON
- && (you.species == SP_GNOME || you.mutation[MUT_MAPPING]))
- || (you.level_type == LEVEL_PANDEMONIUM
- && you.mutation[MUT_MAPPING] == 3))
+ if ((you.level_type == LEVEL_DUNGEON && you.mutation[MUT_MAPPING]) ||
+ (you.level_type == LEVEL_PANDEMONIUM && you.mutation[MUT_MAPPING]==3))
{
insert_ability( ABIL_MAPPING );
}
@@ -1906,9 +1904,7 @@ static bool insert_ability( int which_ability )
break;
case ABIL_MAPPING:
- failure = ((you.species == SP_GNOME) ? 20 : 40)
- - 10 * you.mutation[MUT_MAPPING]
- - you.experience_level;
+ failure = 40 - 10 * you.mutation[MUT_MAPPING] - you.experience_level;
break;
case ABIL_BREATHE_FIRE:
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 62b06e3d70..b4e28e416f 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -911,20 +911,6 @@ formatted_string describe_mutations()
have_any = true;
break;
- case SP_SPRIGGAN:
- result += "You can see invisible." EOL;
- result += "You cover the ground extremely quickly." EOL;
- have_any = true;
- break;
-
- case SP_CENTAUR:
- if (!you.mutation[MUT_FAST])
- result += "You cover the ground quickly." EOL;
- else
- result += "You cover the ground extremely quickly." EOL;
- have_any = true;
- break;
-
case SP_NAGA:
// breathe poison replaces spit poison:
if (!you.mutation[MUT_BREATHE_POISON])
@@ -932,8 +918,6 @@ formatted_string describe_mutations()
else
result += "<lightred>You can exhale a cloud of poison.</lightred>" EOL;
- result += "Your system is immune to poisons." EOL;
- result += "You can see invisible." EOL;
// slowness can be overriden
if ( you.mutation[MUT_FAST] )
result += "<lightred>";
@@ -944,11 +928,6 @@ formatted_string describe_mutations()
have_any = true;
break;
- case SP_GNOME:
- result += "You can sense your surroundings." EOL;
- have_any = true;
- break;
-
case SP_TROLL:
result += "Your body regenerates quickly." EOL;
if ( you.mutation[MUT_CLAWS] )
@@ -1100,27 +1079,42 @@ formatted_string describe_mutations()
if (you.species == SP_NAGA &&
(i == MUT_BREATHE_POISON || i == MUT_FAST))
continue;
- if (you.species == SP_CENTAUR && i == MUT_FAST)
- continue;
if (you.species == SP_TROLL && i == MUT_CLAWS)
continue;
+ const char* colourname = "";
// mutation is actually a demonic power
- if (you.demon_pow[i] != 0)
- // enhanced by mutation
- if ( you.demon_pow[i] < you.mutation[i] )
- result += "<lightred>";
- else
- result += "<red>";
+ if ( you.demon_pow[i] )
+ {
+ if ( you.species == SP_DEMONSPAWN )
+ {
+ if ( you.demon_pow[i] < you.mutation[i] )
+ colourname = "lightred";
+ else
+ colourname = "red";
+ }
+ else // innate ability
+ {
+ if ( you.demon_pow[i] < you.mutation[i] )
+ colourname = "lightred";
+ else
+ colourname = "lightblue";
+ }
+ }
+ if ( you.demon_pow[i] )
+ {
+ result += '<';
+ result += colourname;
+ result += '>';
+ }
result += mutation_name(i);
-
- if (you.demon_pow[i] != 0)
- if ( you.demon_pow[i] < you.mutation[i] )
- result += "</lightred>";
- else
- result += "</red>";
-
+ if ( you.demon_pow[i] )
+ {
+ result += "</";
+ result += colourname;
+ result += '>';
+ }
result += EOL;
}
}
@@ -1288,14 +1282,6 @@ bool mutate(int which_mutation, bool failMsg)
}
}
- // gnomes can already sense surroundings
- if (you.species == SP_GNOME && mutat == MUT_MAPPING)
- return false;
-
- // spriggans already run at max speed (centaurs can get a bit faster)
- if (you.species == SP_SPRIGGAN && mutat == MUT_FAST)
- return false;
-
// this might have issues if we allowed it -- bwr
if (you.species == SP_KOBOLD
&& (mutat == MUT_CARNIVOROUS || mutat == MUT_HERBIVOROUS))
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index f20a672835..49501abd59 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -1788,10 +1788,46 @@ static void jobs_stat_init(int which_job)
static void give_basic_mutations(unsigned char speci)
{
- if (speci == SP_MINOTAUR)
+ switch ( speci )
{
+ case SP_MINOTAUR:
you.mutation[MUT_HORNS] = 2;
you.demon_pow[MUT_HORNS] = 2;
+ break;
+ case SP_SPRIGGAN:
+ you.mutation[MUT_ACUTE_VISION] = 1;
+ you.demon_pow[MUT_ACUTE_VISION] = 1;
+ you.mutation[MUT_FAST] = 3;
+ you.demon_pow[MUT_FAST] = 3;
+ break;
+ case SP_CENTAUR:
+ you.mutation[MUT_FAST] = 1;
+ you.demon_pow[MUT_FAST] = 1;
+ break;
+ case SP_NAGA:
+ you.mutation[MUT_ACUTE_VISION] = 1;
+ you.demon_pow[MUT_ACUTE_VISION] = 1;
+ you.mutation[MUT_POISON_RESISTANCE] = 1;
+ you.demon_pow[MUT_POISON_RESISTANCE] = 1;
+ break;
+ case SP_MUMMY:
+ you.mutation[MUT_POISON_RESISTANCE] = 1;
+ you.demon_pow[MUT_POISON_RESISTANCE] = 1;
+ you.mutation[MUT_COLD_RESISTANCE] = 1;
+ you.demon_pow[MUT_COLD_RESISTANCE] = 1;
+ break;
+ case SP_GNOME:
+ you.mutation[MUT_MAPPING] = 2;
+ you.demon_pow[MUT_MAPPING] = 2;
+ break;
+ case SP_GHOUL:
+ you.mutation[MUT_POISON_RESISTANCE] = 1;
+ you.demon_pow[MUT_POISON_RESISTANCE] = 1;
+ you.mutation[MUT_COLD_RESISTANCE] = 1;
+ you.demon_pow[MUT_COLD_RESISTANCE] = 1;
+ break;
+ default:
+ break;
}
}
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 304bb408d2..3b4f44b370 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -966,9 +966,7 @@ int player_res_cold(bool calc_unid)
rc += scan_randarts(RAP_COLD, calc_unid);
// species:
- if (you.species == SP_MUMMY || you.species == SP_GHOUL)
- rc++;
- else if (you.species == SP_WHITE_DRACONIAN && you.experience_level > 17)
+ if (you.species == SP_WHITE_DRACONIAN && you.experience_level > 17)
rc++;
// mutations:
@@ -1144,12 +1142,8 @@ int player_res_poison(bool calc_unid)
rp += scan_randarts(RAP_POISON, calc_unid);
// species:
- if (you.species == SP_MUMMY || you.species == SP_NAGA
- || you.species == SP_GHOUL
- || (you.species == SP_GREEN_DRACONIAN && you.experience_level > 6))
- {
+ if (you.species == SP_GREEN_DRACONIAN && you.experience_level > 6)
rp++;
- }
// mutations:
rp += you.mutation[MUT_POISON_RESISTANCE];
@@ -1400,16 +1394,7 @@ int player_movement_speed(void)
else
{
/* transformations */
- if (!player_is_shapechanged())
- {
- // Centaurs and spriggans are only fast in their regular
- // shape (ie untransformed, blade hands, lich form)
- if (you.species == SP_CENTAUR)
- mv = 8;
- else if (you.species == SP_SPRIGGAN)
- mv = 6;
- }
- else if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER)
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER)
mv = 8;
/* armour */
@@ -1424,8 +1409,9 @@ int player_movement_speed(void)
if (you.duration[DUR_SWIFTNESS] > 0 && !player_in_water())
mv -= (player_is_levitating() ? 4 : 2);
- /* Mutations: -2, -3, -4 */
- if (you.mutation[MUT_FAST] > 0)
+ /* Mutations: -2, -3, -4, unless innate and shapechanged */
+ if (you.mutation[MUT_FAST] > 0 &&
+ (!you.demon_pow[MUT_FAST] || !player_is_shapechanged()))
mv -= (you.mutation[MUT_FAST] + 1);
// Burden
@@ -1984,10 +1970,6 @@ unsigned char player_see_invis(bool calc_unid)
/* armour: (checks head armour only) */
si += player_equip_ego_type( EQ_HELMET, SPARM_SEE_INVISIBLE );
- /* Nagas & Spriggans have good eyesight */
- if (you.species == SP_NAGA || you.species == SP_SPRIGGAN)
- si++;
-
if (you.mutation[MUT_ACUTE_VISION] > 0)
si += you.mutation[MUT_ACUTE_VISION];