summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/acr.cc10
-rw-r--r--crawl-ref/source/beam.cc2
-rw-r--r--crawl-ref/source/debug.cc8
-rw-r--r--crawl-ref/source/enum.h8
-rw-r--r--crawl-ref/source/fight.cc5
-rw-r--r--crawl-ref/source/food.cc1
-rw-r--r--crawl-ref/source/item_use.cc2
-rw-r--r--crawl-ref/source/items.cc5
-rw-r--r--crawl-ref/source/mutation.cc115
-rw-r--r--crawl-ref/source/newgame.cc1
-rw-r--r--crawl-ref/source/output.cc47
-rw-r--r--crawl-ref/source/player.cc15
-rw-r--r--crawl-ref/source/skills2.cc4
13 files changed, 161 insertions, 62 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index c6f72ef6dd..aee9c4f90b 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1227,6 +1227,7 @@ static bool cmd_is_repeatable(command_type cmd, bool is_again = false)
of round */
bool apply_berserk_penalty = false;
+static void drift_player(int move_x, int move_y);
/*
* This function handles the player's input. It's called from main(),
* from inside an endless loop.
@@ -1291,6 +1292,13 @@ static void input()
crawl_state.cancel_cmd_repeat("Cannot move, cancelling command "
"repetition.");
+ // may sleep walk
+ if (!you.paralysed() && you.mutation[MUT_DRIFTING]
+ && (random2(100) <= you.mutation[MUT_DRIFTING] * 5) )
+ {
+ drift_player(0, 0);
+ }
+
world_reacts();
return;
}
@@ -3606,7 +3614,7 @@ static void do_berserk_no_combat_penalty(void)
} // end do_berserk_no_combat_penalty()
-static void drift_player(int move_x, int move_y)
+void drift_player(int move_x, int move_y)
{
int drift_dir = -1;
int okay_dirs = 0;
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 9c54dc65e5..be1542defe 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -1221,8 +1221,6 @@ static void zappy( zap_type z_type, int power, bolt &pbolt )
break;
} // end of switch
- pbolt.hit += you.mutation[MUT_EXTRA_EYES] * 2;
-
if ( wearing_amulet(AMU_INACCURACY) )
{
pbolt.hit -= 5;
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index bf4beb8a9c..c06df78603 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -1854,10 +1854,10 @@ static const char *mutation_type_names[] = {
"green marks",
"drifting",
"saprovorous",
- "extra eyes",
- "",
- "",
- "",
+ "shaggy fur",
+ "high mp",
+ "low mp",
+ "sleepiness",
"",
// from here on scales
"red scales",
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 4fd367f028..2595d53732 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2014,9 +2014,13 @@ enum mutation_type
MUT_BIG_WINGS, // 65
MUT_BLUE_MARKS, // decorative, as in "mark of the devil"
MUT_GREEN_MARKS,
- MUT_DRIFTING,
+ MUT_DRIFTING, // new in 0.4
MUT_SAPROVOROUS,
- MUT_EXTRA_EYES, // new in 0.4 -- 70
+ MUT_SHAGGY_FUR, // new in 0.4 -- 70
+ MUT_HIGH_MAGIC, // new in 0.4
+ MUT_LOW_MAGIC, // new in 0.4
+ MUT_SLEEPINESS, // new in 0.4
+
// several types of scales (affect AC and sometimes more)
MUT_RED_SCALES = 75, // 75
MUT_NACREOUS_SCALES,
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 12f4a370b1..072cbe0bbd 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -176,8 +176,7 @@ static int calc_your_to_hit_unarmed(int uattack = UNAT_NO_ATTACK,
int your_to_hit;
your_to_hit = 13 + you.dex / 2 + you.skills[SK_UNARMED_COMBAT] / 2
- + you.skills[SK_FIGHTING] / 5
- + 2 * you.mutation[MUT_EXTRA_EYES];
+ + you.skills[SK_FIGHTING] / 5;
if (wearing_amulet(AMU_INACCURACY))
your_to_hit -= 5;
@@ -2365,8 +2364,6 @@ int melee_attack::player_to_hit(bool random_factor)
if (water_attack)
your_to_hit += 5;
- your_to_hit += you.mutation[MUT_EXTRA_EYES] * 2;
-
if (wearing_amulet(AMU_INACCURACY))
your_to_hit -= 5;
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 58f887e91d..7ab07cd9c7 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -571,6 +571,7 @@ static bool food_change(bool suppress_message)
case HS_STARVING:
mpr("You are starving!", MSGCH_FOOD);
learned_something_new(TUT_YOU_STARVING);
+ you.check_awaken(500);
break;
case HS_HUNGRY:
mpr("You are feeling hungry.", MSGCH_FOOD);
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 8113033a6b..4854d0fcb3 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1708,8 +1708,6 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
ammoHitBonus = item.plus;
ammoDamBonus = item.plus2;
- ammoHitBonus += you.mutation[MUT_EXTRA_EYES];
-
// CALCULATIONS FOR LAUNCHED WEAPONS
if (projected == LRET_LAUNCHED)
{
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index c0dc3cf054..f0b055b05b 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2678,6 +2678,11 @@ void handle_time( long time_delta )
{
yell(true);
}
+ else if (you.mutation[MUT_SLEEPINESS]
+ && random2(100) < you.mutation[MUT_SLEEPINESS] * 5)
+ {
+ you.put_to_sleep();
+ }
// Update all of the corpses and food chunks on the floor
update_corpses(time_delta);
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index ef9756e7d8..f794bdd5cf 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -226,7 +226,8 @@ const char *mutation_descrip[][3] = {
"You are somewhat resistant to both further mutation and mutation removal.",
"Your current mutations are irrevocably fixed, and you can mutate no more."},
- {"You are frail (-10 percent hp).", "You are very frail (-20 percent hp).",
+ {"You are frail (-10 percent hp).",
+ "You are very frail (-20 percent hp).",
"You are extremely frail (-30 percent hp)."},
{"You are robust (+10 percent hp).",
@@ -302,13 +303,22 @@ const char *mutation_descrip[][3] = {
"You thrive on rotten meat."},
// 70
- {"You have a third eye on your forehead.",
- "You have two additional eyes on your forehead.",
- "You have three additional eyes on your forehead."},
+ {"You are covered in fur.",
+ "You are covered in thick fur.",
+ "Your thick and shaggy fur keeps you warm."},
+
+ {"You have an increased reservoir of magic (+10 percent mp).",
+ "You have an strongly increased reservoir of magic (+20 percent mp).",
+ "You have an extremely increased reservoir of magic (+30 percent mp)."},
- {"", "", ""},
- {"", "", ""},
- {"", "", ""},
+ {"Your magical capacity is low (-10 percent mp).",
+ "Your magical capacity is very low (-20 percent mp).",
+ "Your magical capacity is extremy low (-30 percent mp)."},
+
+ {"You occasionally fall asleep.",
+ "You sometimes fall asleep.",
+ "You frequently fall asleep."},
+
{"", "", ""},
// 75
@@ -375,7 +385,7 @@ const char *mutation_descrip[][3] = {
{"You are partially covered in patterned scales (AC + 1).",
"You are mostly covered in patterned scales (AC + 2).",
- "You are completely covered in patterned scales (AC + 3)."},
+ "You are completely covered in patterned scales (AC + 3)."}
};
/*
@@ -563,13 +573,18 @@ const char *gain_mutation[][3] = {
{"", "", ""},
// 70
- {"You sprout an extra eye.",
- "You sprout another eye.",
- "You sprout another eye."},
+ {"Fur sprouts all over your body.",
+ "Your fur grows into a thick mane.",
+ "Your thick fur grows shaggy and warm."},
+
+ {"You feel more energetic.", "You feel more energetic.",
+ "You feel more energetic."},
- {"", "", ""},
- {"", "", ""},
- {"", "", ""},
+ {"You feel less energetic.", "You feel less energetic.",
+ "You feel less energetic."},
+
+ {"You feel a bit tired.", "You feel drowsy.", "You feel really drowsy."},
+
{"", "", ""},
// 75
@@ -622,7 +637,7 @@ const char *gain_mutation[][3] = {
"Iridescent scales cover you completely."},
{"Patterned scales grow over part of your body.",
"Patterned scales spread over more of your body.",
- "Patterned scales cover you completely."},
+ "Patterned scales cover you completely."}
};
const char *lose_mutation[][3] = {
@@ -794,13 +809,18 @@ const char *lose_mutation[][3] = {
{"", "", ""},
// 70
- {"Your extra eye disappears.",
- "One of your extra eyes disappears.",
- "One of your extra eyes disappears."},
+ {"You shed all your fur.",
+ "Your thick fur recedes somewhat.",
+ "Your shaggy fur recedes somewhat."},
- {"", "", ""},
- {"", "", ""},
- {"", "", ""},
+ {"You feel less energetic.", "You feel less energetic.",
+ "You feel less energetic."},
+
+ {"You feel more energetic.", "You feel more energetic.",
+ "You feel more energetic."},
+
+ {"You feel wide awake.", "You feel more awake.", "You feel more awake."},
+
{"", "", ""},
// 75
@@ -858,7 +878,7 @@ const char *lose_mutation[][3] = {
{"Your patterned scales disappear.",
"Your patterned scales recede somewhat.",
- "Your patterned scales recede somewhat."},
+ "Your patterned scales recede somewhat."}
};
/* mutation definitions:
@@ -946,13 +966,14 @@ static const mutation_def mutation_defs[] = {
{ MUT_BLUE_MARKS, 0, 3 }, // used by evil gods to mark followers
{ MUT_GREEN_MARKS, 0, 3 },
- { MUT_DRIFTING, 3, 3 },
+ { MUT_DRIFTING, 2, 3 },
{ MUT_SAPROVOROUS, 0, 3 }, // species-dependent innate mutation
- { MUT_EXTRA_EYES, 1, 3 },
- { RANDOM_MUTATION, 0, 3 },
- { RANDOM_MUTATION, 0, 3 },
- { RANDOM_MUTATION, 0, 3 },
+// 70
+ { MUT_SHAGGY_FUR, 2, 3 },
+ { MUT_HIGH_MAGIC, 1, 3 },
+ { MUT_LOW_MAGIC, 9, 3 },
+ { MUT_SLEEPINESS, 3, 3 },
{ RANDOM_MUTATION, 0, 3 },
// 75 -- scales of various colours and effects
@@ -972,7 +993,7 @@ static const mutation_def mutation_defs[] = {
{ MUT_INDIGO_SCALES, 2, 3 },
{ MUT_RED2_SCALES, 1, 3 },
{ MUT_IRIDESCENT_SCALES, 1, 3 },
- { MUT_PATTERNED_SCALES, 1, 3 },
+ { MUT_PATTERNED_SCALES, 1, 3 }
};
#ifdef DEBUG_DIAGNOSTICS
@@ -1354,6 +1375,7 @@ static int calc_mutation_amusement_value(mutation_type which_mutation)
case MUT_DETERIORATION:
case MUT_BLURRY_VISION:
case MUT_FRAIL:
+ case MUT_LOW_MAGIC:
case MUT_CLAWS:
case MUT_FANGS:
case MUT_HOOVES:
@@ -1365,7 +1387,6 @@ static int calc_mutation_amusement_value(mutation_type which_mutation)
case MUT_BLUE_MARKS:
case MUT_GREEN_MARKS:
case MUT_DRIFTING:
- case MUT_EXTRA_EYES:
amusement *= 2; // funny!
break;
@@ -1737,10 +1758,6 @@ bool mutate(mutation_type which_mutation, bool failMsg, bool force_mutation,
}
break;
- case MUT_EXTRA_EYES:
- mpr(gain_mutation[mutat][you.mutation[mutat]], MSGCH_MUTATION);
- break;
-
case MUT_STRONG_STIFF:
if (you.mutation[MUT_FLEXIBLE_WEAK] > 0)
{
@@ -1789,6 +1806,32 @@ bool mutate(mutation_type which_mutation, bool failMsg, bool force_mutation,
take_note(Note(NOTE_GET_MUTATION, mutat, you.mutation[mutat]));
return true;
+ case MUT_LOW_MAGIC:
+ if (you.mutation[MUT_HIGH_MAGIC] > 0)
+ {
+ delete_mutation(MUT_HIGH_MAGIC);
+ return true;
+ }
+ mpr(gain_mutation[mutat][you.mutation[mutat]], MSGCH_MUTATION);
+ you.mutation[mutat]++;
+ calc_mp();
+ /* special-case check */
+ take_note(Note(NOTE_GET_MUTATION, mutat, you.mutation[mutat]));
+ return true;
+
+ case MUT_HIGH_MAGIC:
+ if (you.mutation[MUT_LOW_MAGIC] > 0)
+ {
+ delete_mutation(MUT_LOW_MAGIC);
+ return true;
+ }
+ mpr(gain_mutation[mutat][you.mutation[mutat]], MSGCH_MUTATION);
+ you.mutation[mutat]++;
+ calc_mp();
+ /* special-case check */
+ take_note(Note(NOTE_GET_MUTATION, mutat, you.mutation[mutat]));
+ return true;
+
case MUT_BLACK_SCALES:
case MUT_BONEY_PLATES:
modify_stat(STAT_DEXTERITY, -1, true, "gaining a mutation");
@@ -1941,6 +1984,7 @@ bool delete_mutation(mutation_type which_mutation, bool force)
break;
case MUT_FRAIL:
+ case MUT_ROBUST:
mpr(lose_mutation[mutat][0], MSGCH_MUTATION);
if (you.mutation[mutat] > 0)
you.mutation[mutat]--;
@@ -1949,11 +1993,12 @@ bool delete_mutation(mutation_type which_mutation, bool force)
take_note(Note(NOTE_LOSE_MUTATION, mutat, you.mutation[mutat]));
return true;
- case MUT_ROBUST:
+ case MUT_LOW_MAGIC:
+ case MUT_HIGH_MAGIC:
mpr(lose_mutation[mutat][0], MSGCH_MUTATION);
if (you.mutation[mutat] > 0)
you.mutation[mutat]--;
- calc_hp();
+ calc_mp();
/* special-case check */
take_note(Note(NOTE_LOSE_MUTATION, mutat, you.mutation[mutat]));
return true;
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index ac2f204805..0a78efbf2a 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -1946,6 +1946,7 @@ static void give_basic_mutations(species_type speci)
you.mutation[MUT_REGENERATION] = 2;
you.mutation[MUT_FAST_METABOLISM] = 3;
you.mutation[MUT_SAPROVOROUS] = 2;
+ you.mutation[MUT_SHAGGY_FUR] = 1;
break;
case SP_KOBOLD:
you.mutation[MUT_SAPROVOROUS] = 2;
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 465640177a..47eb274478 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -1363,8 +1363,11 @@ std::string status_mut_abilities()
if (you.duration[DUR_CONF])
text += "confused, ";
+ // how exactly did you get to show the status?
if (you.duration[DUR_PARALYSIS])
text += "paralysed, ";
+ if (you.duration[DUR_SLEEP])
+ text += "sleeping, ";
if (you.duration[DUR_EXHAUSTED])
text += "exhausted, ";
@@ -1945,6 +1948,36 @@ std::string status_mut_abilities()
text += info;
have_any = true;
break;
+ case MUT_LOW_MAGIC:
+ if (have_any)
+ text += ", ";
+ snprintf(info, INFO_SIZE, "-%d%% mp", level*10);
+ text += info;
+ have_any = true;
+ break;
+ case MUT_HIGH_MAGIC:
+ if (have_any)
+ text += ", ";
+ snprintf(info, INFO_SIZE, "+%d mp%%", level*10);
+ text += info;
+ have_any = true;
+ break;
+ case MUT_DRIFTING:
+ if (have_any)
+ text += ", ";
+ snprintf(info, INFO_SIZE, "drifting %d", level);
+ text += info;
+ have_any = true;
+ break;
+ case MUT_SLEEPINESS:
+ if (have_any)
+ text += ", ";
+ snprintf(info, INFO_SIZE, "sleepiness %d", level);
+ text += info;
+ have_any = true;
+ break;
+
+ /* demonspawn mutations */
case MUT_TORMENT_RESISTANCE:
if (have_any)
text += ", ";
@@ -2036,6 +2069,7 @@ std::string status_mut_abilities()
text += "invoke powers of Tartarus";
have_any = true;
break;
+ /* end of demonspawn mutations */
case MUT_CLAWS:
if (have_any)
text += ", ";
@@ -2101,16 +2135,8 @@ std::string status_mut_abilities()
text += info;
have_any = true;
break;
- case MUT_EXTRA_EYES:
- if (have_any)
- text += ", ";
- snprintf(info, INFO_SIZE, "%d extra eye%s",
- level, level > 1? "s" : "");
- text += info;
- have_any = true;
- break;
- // scales -> calculate sum of AC bonus
+ // scales etc. -> calculate sum of AC bonus
case MUT_RED_SCALES:
AC_change += level;
if (level == 3)
@@ -2177,6 +2203,9 @@ std::string status_mut_abilities()
case MUT_PATTERNED_SCALES:
AC_change += level;
break;
+ case MUT_SHAGGY_FUR:
+ AC_change += level;
+ break;
default: break;
}
}
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index a56f8e51a5..68a9b48d8d 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1099,6 +1099,9 @@ int player_res_cold(bool calc_unid)
// mutations:
rc += you.mutation[MUT_COLD_RESISTANCE];
+
+ if (you.mutation[MUT_SHAGGY_FUR] == 3)
+ rc++;
if (you.duration[DUR_FIRE_SHIELD])
rc -= 2;
@@ -1783,6 +1786,7 @@ int player_AC(void)
AC += 100 * you.mutation[MUT_IRIDESCENT_SCALES];
AC += 100 * you.mutation[MUT_PATTERNED_SCALES];
AC += 100 * you.mutation[MUT_BLUE_SCALES];
+ AC += 100 * you.mutation[MUT_SHAGGY_FUR];
// these gives: +1, +3, +5
if (you.mutation[MUT_GREEN_SCALES] > 0)
@@ -3457,9 +3461,12 @@ void display_char_status()
if (you.duration[DUR_BEHELD])
mpr( "You are beheld." );
+ // how exactly did you get to show the status?
if (you.duration[DUR_PARALYSIS])
mpr( "You are paralysed." );
-
+ if (you.duration[DUR_SLEEP])
+ mpr( "You are asleep." );
+
if (you.duration[DUR_EXHAUSTED])
mpr( "You are exhausted." );
@@ -4750,6 +4757,7 @@ bool confuse_player( int amount, bool resistable )
if (you.duration[DUR_CONF] > old_value)
{
// XXX: which message channel for this message?
+ you.check_awaken(500);
mprf("You are %sconfused.", (old_value > 0) ? "more " : "" );
learned_something_new(TUT_YOU_ENCHANTED);
@@ -5481,7 +5489,7 @@ bool player::cannot_speak() const
if (silenced(x_pos, y_pos))
return (true);
- if (you.duration[DUR_PARALYSIS])
+ if (you.duration[DUR_PARALYSIS]) // we allow talking during sleep ;)
return (true);
// No transform that prevents the player from speaking yet.
@@ -6127,7 +6135,7 @@ void player::moveto(const coord_def &c)
bool player::asleep() const
{
- return duration[DUR_SLEEP] > 0;
+ return (duration[DUR_SLEEP] > 0);
}
bool player::cannot_act() const
@@ -6152,6 +6160,7 @@ void player::put_to_sleep(int)
return;
mpr("You fall asleep.");
+ stop_delay();
you.flash_colour = DARKGREY;
viewwindow(true, false);
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index bb3ea4b4d2..6cff23559f 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -2243,6 +2243,10 @@ int calc_mp(bool real_mp)
if (!real_mp)
you.max_magic_points += player_magical_power();
+ // analogous to ROBUST/FRAIL
+ you.max_magic_points *= (10 + you.mutation[MUT_HIGH_MAGIC] - you.mutation[MUT_LOW_MAGIC]);
+ you.max_magic_points /= 10;
+
if (you.max_magic_points > 50)
you.max_magic_points = 50 + ((you.max_magic_points - 50) / 2);