summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-22 11:22:49 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-22 11:22:49 +0000
commitdfebce7241da1ef5b2506cb175b9abf5eb32e533 (patch)
tree8d42712a51b5aa3e107960e4d0e14f8ef48e7c61
parenta0e9510354f540e98f556aec2b655c33651f45d1 (diff)
downloadcrawl-ref-dfebce7241da1ef5b2506cb175b9abf5eb32e533.tar.gz
crawl-ref-dfebce7241da1ef5b2506cb175b9abf5eb32e533.zip
Some more work towards integrating race abilities and mutations:
- Draconian resistances are now mutations. As a side effect, this means that red draconians can't become resistant to cold, for example. I think this is a feature. - Troll metabolism and regeneration is now (partially) a mutation. So now trolls can't get the slow metabolism mutation. It might be better to go with a size system here. - Nagas and centaurs now have deformation as an initial mutation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@691 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/item_use.cc2
-rw-r--r--crawl-ref/source/mutation.cc31
-rw-r--r--crawl-ref/source/mutation.h1
-rw-r--r--crawl-ref/source/newgame.cc21
-rw-r--r--crawl-ref/source/player.cc41
5 files changed, 35 insertions, 61 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index bb7e7dec08..2350e89c6c 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -755,7 +755,7 @@ bool do_wear_armour( int item, bool quiet )
&& (get_helmet_type(invitem) == THELM_CAP
|| get_helmet_type(invitem) == THELM_WIZARD_HAT))
{
- // caps & wiz hats always fit, unless your head's too big (ogres &c)
+ // caps & wiz hats always fit
}
else if (!can_equip( slot ))
{
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 7347db32ca..03174b9b99 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -48,7 +48,6 @@
int how_mutated(void);
char body_covered(void);
-bool perma_mutate(int which_mut, char how_much);
const char* troll_claw_messages[3] = {
"Your claws sharpen.",
@@ -929,7 +928,6 @@ formatted_string describe_mutations()
break;
case SP_TROLL:
- result += "Your body regenerates quickly." EOL;
if ( you.mutation[MUT_CLAWS] )
result += "<lightred>";
result += troll_claw_descrip[you.mutation[MUT_CLAWS]];
@@ -959,6 +957,7 @@ formatted_string describe_mutations()
break;
case SP_KENKU:
+ result += "You cannot wear helmets." EOL;
if (you.experience_level > 4)
{
result += "You can fly";
@@ -983,10 +982,17 @@ formatted_string describe_mutations()
have_any = true;
break;
+ case SP_GREY_DRACONIAN:
+ if (you.experience_level > 6)
+ {
+ result += "Your tail is studded with spikes." EOL;
+ have_any = true;
+ }
+ break;
+
case SP_GREEN_DRACONIAN:
if (you.experience_level > 6)
{
- result += "You are resistant to poison." EOL;
result += "You can breathe poison." EOL;
have_any = true;
}
@@ -998,11 +1004,6 @@ formatted_string describe_mutations()
result += "You can breathe fire." EOL;
have_any = true;
}
- if (you.experience_level > 17)
- {
- result += "You are resistant to fire." EOL;
- have_any = true;
- }
break;
case SP_WHITE_DRACONIAN:
@@ -1011,11 +1012,6 @@ formatted_string describe_mutations()
result += "You can breathe frost." EOL;
have_any = true;
}
- if (you.experience_level > 17)
- {
- result += "You are resistant to cold." EOL;
- have_any = true;
- }
break;
case SP_BLACK_DRACONIAN:
@@ -1024,11 +1020,6 @@ formatted_string describe_mutations()
result += "You can breathe lightning." EOL;
have_any = true;
}
- if (you.experience_level > 17)
- {
- result += "You are resistant to lightning." EOL;
- have_any = true;
- }
break;
case SP_GOLDEN_DRACONIAN:
@@ -1258,12 +1249,8 @@ bool mutate(int which_mutation, bool failMsg)
return false;
}
- // nagas have see invis and res poison and can spit poison
if (you.species == SP_NAGA)
{
- if (mutat == MUT_ACUTE_VISION || mutat == MUT_POISON_RESISTANCE)
- return false;
-
// gdl: spit poison 'upgrades' to breathe poison. Why not..
if (mutat == MUT_SPIT_POISON)
{
diff --git a/crawl-ref/source/mutation.h b/crawl-ref/source/mutation.h
index 6f9e3b7bd7..771db44c6a 100644
--- a/crawl-ref/source/mutation.h
+++ b/crawl-ref/source/mutation.h
@@ -73,5 +73,6 @@ bool give_bad_mutation( bool forceMutation = false, bool failMsg = true );
* *********************************************************************** */
void demonspawn(void);
+bool perma_mutate(int which_mut, char how_much);
#endif
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 516899dc95..8cd0dddab4 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -1761,43 +1761,42 @@ static void give_basic_mutations(unsigned char 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;
+ you.mutation[MUT_DEFORMED] = 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;
+ you.mutation[MUT_DEFORMED] = 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;
+ case SP_TROLL:
+ you.mutation[MUT_REGENERATION] = 2;
+ you.mutation[MUT_FAST_METABOLISM] = 3;
break;
default:
break;
}
+
+ // starting mutations are unremoveable
+ for ( int i = 0; i < NUM_MUTATIONS; ++i )
+ you.demon_pow[i] = you.mutation[i];
}
static void give_basic_knowledge(int which_job)
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 8df05fdbf1..e48b343516 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -682,10 +682,9 @@ int player_regen(void)
if (you.duration[DUR_REGENERATION])
rr += 100;
- /* troll or troll leather -- trolls can't get both */
- if (you.species == SP_TROLL)
- rr += 40;
- else if (player_equip( EQ_BODY_ARMOUR, ARM_TROLL_LEATHER_ARMOUR ))
+ /* troll leather (except for trolls) */
+ if (player_equip( EQ_BODY_ARMOUR, ARM_TROLL_LEATHER_ARMOUR ) &&
+ you.species != SP_TROLL)
rr += 30;
/* fast heal mutation */
@@ -735,7 +734,7 @@ int player_hunger_rate(void)
break;
case SP_TROLL:
- hunger += 6;
+ hunger += 3; // in addition to the +3 for fast metabolism
break;
}
@@ -916,8 +915,6 @@ int player_res_fire(bool calc_unid)
// species:
if (you.species == SP_MUMMY)
rf--;
- else if (you.species == SP_RED_DRACONIAN && you.experience_level > 17)
- rf++;
// mutations:
rf += you.mutation[MUT_HEAT_RESISTANCE];
@@ -976,10 +973,6 @@ int player_res_cold(bool calc_unid)
// randart weapons:
rc += scan_randarts(RAP_COLD, calc_unid);
- // species:
- if (you.species == SP_WHITE_DRACONIAN && you.experience_level > 17)
- rc++;
-
// mutations:
rc += you.mutation[MUT_COLD_RESISTANCE];
@@ -1152,10 +1145,6 @@ int player_res_poison(bool calc_unid)
// randart weapons:
rp += scan_randarts(RAP_POISON, calc_unid);
- // species:
- if (you.species == SP_GREEN_DRACONIAN && you.experience_level > 6)
- rp++;
-
// mutations:
rp += you.mutation[MUT_POISON_RESISTANCE];
@@ -1533,12 +1522,10 @@ int player_AC(void)
AC += ac_value * (15 + you.skills[SK_ARMOUR] + racial_bonus) / 15;
- /* Nagas/Centaurs/the deformed don't fit into body armour very well */
- if ((you.species == SP_NAGA || you.species == SP_CENTAUR
- || you.mutation[MUT_DEFORMED] > 0) && i == EQ_BODY_ARMOUR)
- {
+ /* The deformed don't fit into body armour very well
+ (this includes nagas and centaurs) */
+ if (i == EQ_BODY_ARMOUR && you.mutation[MUT_DEFORMED])
AC -= ac_value / 2;
- }
}
AC += player_equip( EQ_RINGS_PLUS, RING_PROTECTION );
@@ -2470,7 +2457,8 @@ void level_change(void)
case SP_GREEN_DRACONIAN:
mpr("Your scales start taking on a green colour.",
MSGCH_INTRINSIC_GAIN);
- mpr("You feel resistant to poison.", MSGCH_INTRINSIC_GAIN);
+ // green dracos get this at level 7
+ perma_mutate(MUT_POISON_RESISTANCE, 1);
break;
case SP_GOLDEN_DRACONIAN:
@@ -2503,14 +2491,15 @@ void level_change(void)
switch (you.species)
{
case SP_RED_DRACONIAN:
- mpr("You feel resistant to fire.", MSGCH_INTRINSIC_GAIN);
+ perma_mutate(MUT_HEAT_RESISTANCE, 1);
break;
case SP_WHITE_DRACONIAN:
- mpr("You feel resistant to cold.", MSGCH_INTRINSIC_GAIN);
+ perma_mutate(MUT_COLD_RESISTANCE, 1);
break;
case SP_BLACK_DRACONIAN:
- mpr("You feel resistant to electrical energy.",
- MSGCH_INTRINSIC_GAIN);
+ perma_mutate(MUT_SHOCK_RESISTANCE, 1);
+ break;
+ default:
break;
}
}
@@ -2667,8 +2656,6 @@ void level_change(void)
demonspawn();
}
-/*if (you.attribute [ATTR_NUM_DEMONIC_POWERS] == 6 && (you.experience_level == 8 || (you.experience_level < 8 && one_chance_in(3) ) )
- demonspawn(); */
if (!(you.experience_level % 4))
modify_stat(STAT_RANDOM, 1, false);
break;