diff options
-rw-r--r-- | crawl-ref/source/acr.cc | 48 | ||||
-rw-r--r-- | crawl-ref/source/debug.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/decks.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/describe.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/direct.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/effects.cc | 38 | ||||
-rw-r--r-- | crawl-ref/source/effects.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/enum.h | 5 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/itemname.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/itemprop.h | 5 | ||||
-rw-r--r-- | crawl-ref/source/items.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/makeitem.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/mstuff2.cc | 34 | ||||
-rw-r--r-- | crawl-ref/source/mutation.cc | 41 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/shopping.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/traps.cc | 18 |
20 files changed, 173 insertions, 72 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 322dc850cb..c52b723e25 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -3577,8 +3577,45 @@ static void do_berserk_no_combat_penalty(void) } // end do_berserk_no_combat_penalty() -// Called when the player moves by walking/running. Also calls -// attack function and trap function etc when necessary. +static void drift_player(int move_x, int move_y) +{ + int drift_dir = -1; + int okay_dirs = 0; + + for (int i = 0; i < 8; i++) + { + const coord_def drift_delta = Compass[i]; + const coord_def new_pos = you.pos() + drift_delta; + const unsigned short targ_monst = mgrd(new_pos); + + if (you.can_pass_through(new_pos) + && !is_grid_dangerous(grd(new_pos)) + && (targ_monst == NON_MONSTER || + mons_is_submerged(&menv[targ_monst]))) + { + if (one_chance_in(++okay_dirs)) + drift_dir = i; + } + } + + if (okay_dirs > 0) + { + const coord_def drift_delta = Compass[drift_dir]; + const coord_def new_pos = you.pos() + drift_delta; + + if (drift_delta == coord_def(-move_x, -move_y)) + mpr("You drift backwards."); + else if (drift_delta == coord_def(move_x, move_y)) + mpr("You drift forwards."); + else + mpr("You drift."); + + move_player_to_grid(new_pos.x, new_pos.y, true, true, false); + } +} + +// Called when the player moves by walking/running. Also calls attack +// function etc when necessary. static void move_player(int move_x, int move_y) { bool attacking = false; @@ -3683,12 +3720,19 @@ static void move_player(int move_x, int move_y) you.time_taken /= 10; move_player_to_grid(targ_x, targ_y, true, false, swap); + if (you.mutation[MUT_DRIFTING] + && (random2(100) <= you.mutation[MUT_DRIFTING] * 5) ) + { + drift_player(move_x, move_y); + } + move_x = 0; move_y = 0; you.turn_is_over = true; // item_check( false ); request_autopickup(); + } // BCR - Easy doors single move diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 07e26b7dad..598702147d 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -1814,7 +1814,7 @@ static const char *mutation_type_names[] = { "horns", "strong stiff", "flexible weak", - "lost", + "scream", "clarity", "berserk", "deterioration", @@ -1845,7 +1845,7 @@ static const char *mutation_type_names[] = { "big wings", "blue marks", "green marks", - "", + "drifting", "", "", "", diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index bfd196c69d..2801839ee8 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -1772,7 +1772,7 @@ static void helix_card(int power, deck_rarity_type rarity) { mutation_type bad_mutations[] = { MUT_FAST_METABOLISM, MUT_WEAK, MUT_DOPEY, MUT_CLUMSY, - MUT_TELEPORT, MUT_DEFORMED, MUT_LOST, MUT_DETERIORATION, + MUT_TELEPORT, MUT_DEFORMED, MUT_SCREAM, MUT_DETERIORATION, MUT_BLURRY_VISION, MUT_FRAIL }; diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 89a43389fe..10b89729ea 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -366,7 +366,7 @@ static void randart_descrip( std::string &description, const item_def &item ) static const char *trap_names[] = { "dart", "arrow", "spear", "axe", - "teleport", "amnesia", "blade", + "teleport", "alarm", "blade", "bolt", "net", "zot", "needle", "shaft" }; @@ -2405,11 +2405,6 @@ static std::string describe_scroll( const item_def &item ) "of one who reads it. "; break; - case SCR_FORGETFULNESS: - description += "This scroll induces " - "an irritating disorientation. "; - break; - case SCR_ACQUIREMENT: description += "This wonderful scroll causes the " "creation of a valuable item to " diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc index 4315930792..a05d27bdf4 100644 --- a/crawl-ref/source/direct.cc +++ b/crawl-ref/source/direct.cc @@ -1479,8 +1479,8 @@ std::string raw_feature_description(dungeon_feature_type grid, return ("axe trap"); case TRAP_TELEPORT: return ("teleportation trap"); - case TRAP_AMNESIA: - return ("amnesia trap"); + case TRAP_ALARM: + return ("alarm trap"); case TRAP_BLADE: return ("blade trap"); case TRAP_BOLT: diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index d2e05fcb30..17116e79f2 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -2015,7 +2015,7 @@ static trap_type random_trap_for_level(int level_number) if (one_chance_in(20)) type = TRAP_TELEPORT; if (one_chance_in(40)) - type = TRAP_AMNESIA; + type = TRAP_ALARM; return (type); } diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 931f61498f..5b8761cd37 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1687,18 +1687,12 @@ bool recharge_wand(void) return (true); } // end recharge_wand() -void yell(void) +void yell(bool force) { bool targ_prev = false; int mons_targd = MHITNOT; struct dist targ; - if (silenced(you.x_pos, you.y_pos) || you.cannot_speak()) - { - mpr("You are unable to make a sound!"); - return; - } - const std::string shout_verb = you.shout_verb(); std::string cap_shout = shout_verb; cap_shout[0] = toupper(cap_shout[0]); @@ -1710,6 +1704,36 @@ void yell(void) noise_level = 18; else if (shout_verb == "hiss") noise_level = 8; + else if (shout_verb == "squeak") + noise_level = 4; + else if (shout_verb == "__NONE") + noise_level = 0; + + if (silenced(you.x_pos, you.y_pos) || you.cannot_speak()) + noise_level = 0; + + if (noise_level == 0) + { + if (force) + { + if (shout_verb == "__NONE") + mpr("You must scream but have no lips!"); + else + mprf("A %s rips itself from your lips, but you make no sound!", + shout_verb.c_str()); + } + else + mpr("You are unable to make a sound!"); + + return; + } + + if (force) + { + mprf("A %s rips itself from your lips!", shout_verb.c_str()); + noisy( noise_level, you.x_pos, you.y_pos ); + return; + } mpr("What do you say?", MSGCH_PROMPT); mprf(" ! - %s", cap_shout.c_str()); diff --git a/crawl-ref/source/effects.h b/crawl-ref/source/effects.h index 3c3d741816..de4c71841a 100644 --- a/crawl-ref/source/effects.h +++ b/crawl-ref/source/effects.h @@ -92,7 +92,7 @@ void mons_direct_effect(struct bolt &pbolt, int i); /* *********************************************************************** * called from: acr * *********************************************************************** */ -void yell(void); +void yell(bool force = false); // last updated 12may2000 {dlb} diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index fad1046349..0f19033534 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1980,7 +1980,7 @@ enum mutation_type MUT_HORNS, MUT_STRONG_STIFF, MUT_FLEXIBLE_WEAK, - MUT_LOST, // 35 + MUT_SCREAM, // 35 MUT_CLARITY, MUT_BERSERK, MUT_DETERIORATION, @@ -2011,6 +2011,7 @@ enum mutation_type MUT_BIG_WINGS, MUT_BLUE_MARKS, // 64 - decorative, as in "mark of the devil" MUT_GREEN_MARKS, // 65 + MUT_DRIFTING, MUT_RED_SCALES = 70, // 70 MUT_NACREOUS_SCALES, MUT_GREY2_SCALES, @@ -2499,7 +2500,7 @@ enum trap_type // env.trap_type[] TRAP_SPEAR, TRAP_AXE, TRAP_TELEPORT, - TRAP_AMNESIA, // 5 + TRAP_ALARM, // 5 TRAP_BLADE, TRAP_BOLT, TRAP_NET, diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 6ae8789bb0..8de97f4e69 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -3714,12 +3714,6 @@ void read_scroll(void) } break; - case SCR_FORGETFULNESS: - mpr("You feel momentarily disoriented."); - if (!wearing_amulet(AMU_CLARITY)) - forget_map(50 + random2(50)); - break; - case SCR_MAGIC_MAPPING: if (you.level_type == LEVEL_PANDEMONIUM) { diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index 20cea75f1c..5b8792a5d3 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -532,7 +532,6 @@ static const char* scroll_type_name(int scrolltype) case SCR_BLINKING: return "blinking"; case SCR_PAPER: return "paper"; case SCR_MAGIC_MAPPING: return "magic mapping"; - case SCR_FORGETFULNESS: return "forgetfulness"; case SCR_ACQUIREMENT: return "acquirement"; case SCR_ENCHANT_WEAPON_II: return "enchant weapon II"; case SCR_VORPALISE_WEAPON: return "vorpalise weapon"; diff --git a/crawl-ref/source/itemprop.h b/crawl-ref/source/itemprop.h index c9e037dc14..8e49e6c198 100644 --- a/crawl-ref/source/itemprop.h +++ b/crawl-ref/source/itemprop.h @@ -310,11 +310,10 @@ enum scroll_type SCR_BLINKING, SCR_PAPER, // 15 SCR_MAGIC_MAPPING, - SCR_FORGETFULNESS, SCR_ACQUIREMENT, SCR_ENCHANT_WEAPON_II, - SCR_VORPALISE_WEAPON, // 20 - SCR_RECHARGING, + SCR_VORPALISE_WEAPON, + SCR_RECHARGING, // 20 SCR_ENCHANT_WEAPON_III, NUM_SCROLLS }; diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index d14aa7ebd3..268f47cac2 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -2655,10 +2655,11 @@ void handle_time( long time_delta ) // jmf: moved huge thing to religion.cc handle_god_time(); - // If the player has the lost mutation forget portions of the map - if (you.mutation[MUT_LOST] && !wearing_amulet(AMU_CLARITY) && - (random2(100) <= you.mutation[MUT_LOST] * 5) ) - forget_map(5 + random2(you.mutation[MUT_LOST] * 10)); + if (you.mutation[MUT_SCREAM] + && (random2(100) <= you.mutation[MUT_SCREAM] * 5) ) + { + yell(true); + } // Update all of the corpses and food chunks on the floor update_corpses(time_delta); diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 75e6e33508..70808ca83e 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -2530,8 +2530,8 @@ int items( int allow_uniques, // not just true-false, (temp_rand > 464) ? SCR_FEAR : // 3.26% (temp_rand > 434) ? SCR_NOISE : // 3.26% (temp_rand > 404) ? SCR_MAGIC_MAPPING : // 3.26% - (temp_rand > 374) ? SCR_FORGETFULNESS : // 3.26% - (temp_rand > 344) ? SCR_RANDOM_USELESSNESS :// 3.26% + //(temp_rand > 374) ? SCR_FORGETFULNESS : // 3.26% + (temp_rand > 344) ? SCR_RANDOM_USELESSNESS :// 6.52% (temp_rand > 314) ? SCR_CURSE_WEAPON : // 3.26% (temp_rand > 284) ? SCR_CURSE_ARMOUR : // 3.26% (temp_rand > 254) ? SCR_RECHARGING : // 3.26% diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index 0d3e6f288b..aa6adb931a 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -145,13 +145,33 @@ void mons_trap(struct monsters *monster) case TRAP_TELEPORT: monster_teleport(monster, true); break; - // amnesia traps do not affect monsters (yet) and - // only monsters of normal+ IQ will direct a msg - // to the player - also, *never* revealed: {dlb} - case TRAP_AMNESIA: - if (mons_intel(monster->type) > I_ANIMAL) - simple_monster_message(monster, - " seems momentarily disoriented."); + // alarm trap aren't set off by hostile monsters, because that would + // be way too nasty for the player. + case TRAP_ALARM: + if (!mons_friendly(monster) || silenced(monster->x, monster->y)) + { + if (trapKnown && you.can_see(monster) + && !silenced(you.x_pos, you.y_pos)) + { + mpr("The alarm trap makes no noise."); + } + return; + } + + noisy(12, monster->x, monster->y); + + if (!silenced(you.x_pos, you.y_pos)) + { + if (monsterNearby) + { + mpr("You hear a blaring wail!", MSGCH_SOUND); + if (you.can_see(monster)) + revealTrap = true; + } + else + mpr("You hear a distant blaring wail!", MSGCH_SOUND); + } + break; // blade traps sometimes fail to trigger altogether, // resulting in an "early return" from this f(x) for diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index 0eca7d0cfe..befe0be844 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -191,9 +191,9 @@ const char *mutation_descrip[][3] = { "Your muscles are very flexible (Dex +2), but weak (Str -2).", "Your muscles are extremely flexible (Dex +3), but weak (Str -3)."}, - {"You occasionally forget where you are.", - "You sometimes forget where you are.", - "You frequently forget where you are."}, + {"You occasionally scream uncontrollably.", + "You sometimes scream uncontrollably.", + "You frequently scream uncontrollably."}, {"You possess an exceptional clarity of mind.", "You possess an unnatural clarity of mind.", @@ -279,7 +279,9 @@ const char *mutation_descrip[][3] = { "There are several green sigils on your chest and abdomen.", "Your chest, abdomen and neck are covered in intricate, arcane green writing."}, - {"", "", ""}, + {"You occasionally drift when moving.", + "You sometimes drift when moving.", + "You frequently drift when moving."}, {"", "", ""}, {"", "", ""}, {"", "", ""}, @@ -460,8 +462,8 @@ const char *gain_mutation[][3] = { {"Your muscles feel sore.", "Your muscles feel sore.", "Your muscles feel sore."}, - {"Your muscles feel loose.", "Your muscles feel loose.", - "Your muscles feel loose."}, + {"You feel the urge to scream.", "You feel the urge to scream.", + "You feel the urge to scream."}, {"You feel a little disoriented.", "You feel a little disoriented.", "Where the Hells are you?"}, @@ -526,7 +528,9 @@ const char *gain_mutation[][3] = { {"Your chest itches.", "Your chest and abdomen itch.", "Your chest, abdomen and neck itch."}, - {"", "", ""}, + {"Your movements feel uncertain.", + "Your movements feel even more uncertian.", + "Your movements feel even more uncertian."}, {"", "", ""}, {"", "", ""}, {"", "", ""}, @@ -686,8 +690,8 @@ const char *lose_mutation[][3] = { {"Your muscles feel sore.", "Your muscles feel sore.", "Your muscles feel sore."}, - {"You feel less disoriented.", "You feel less disoriented.", - "You feel less disoriented."}, + {"Your urge to scream disappears.", "Your urge to scream lessens.", + "Your urge to scream lessens."}, {"Your thinking seems confused.", "Your thinking seems confused.", "Your thinking seems confused."}, @@ -742,7 +746,9 @@ const char *lose_mutation[][3] = { // 65 {"", "", ""}, - {"", "", ""}, + {"Your movements feel completely certain again.", + "Your movements feel more certain.", + "Your movements feel more certain."}, {"", "", ""}, {"", "", ""}, {"", "", ""}, @@ -844,7 +850,7 @@ static const mutation_def mutation_defs[] = { { MUT_HORNS, 7, 3 }, { MUT_STRONG_STIFF, 10, 3 }, { MUT_FLEXIBLE_WEAK, 10, 3 }, - { MUT_LOST, 6, 3 }, + { MUT_SCREAM, 6, 3 }, { MUT_CLARITY, 6, 1 }, { MUT_BERSERK, 7, 3 }, { MUT_DETERIORATION, 10, 3 }, @@ -878,10 +884,12 @@ static const mutation_def mutation_defs[] = { { MUT_STINGER, 0, 3 }, { MUT_BIG_WINGS, 0, 3 }, { MUT_BLUE_MARKS, 0, 3 }, + +// 65 { MUT_GREEN_MARKS, 0, 3 }, + { MUT_DRIFTING, 3, 3 }, - // Four placeholders: - { RANDOM_MUTATION, 0, 3 }, + // Three placeholders: { RANDOM_MUTATION, 0, 3 }, { RANDOM_MUTATION, 0, 3 }, { RANDOM_MUTATION, 0, 3 }, @@ -1268,7 +1276,7 @@ static int calc_mutation_amusement_value(mutation_type which_mutation) case MUT_BREATHE_FLAMES: case MUT_BLINK: case MUT_HORNS: - case MUT_LOST: + case MUT_SCREAM: case MUT_BERSERK: case MUT_DETERIORATION: case MUT_BLURRY_VISION: @@ -1281,6 +1289,7 @@ static int calc_mutation_amusement_value(mutation_type which_mutation) case MUT_BIG_WINGS: case MUT_BLUE_MARKS: case MUT_GREEN_MARKS: + case MUT_DRIFTING: amusement *= 2; // funny! break; @@ -1390,7 +1399,7 @@ bool mutate(mutation_type which_mutation, bool failMsg, bool force_mutation, case 1: mutat = MUT_DOPEY; break; case 2: mutat = MUT_CLUMSY; break; case 3: mutat = MUT_DEFORMED; break; - case 4: mutat = MUT_LOST; break; + case 4: mutat = MUT_SCREAM; break; case 5: mutat = MUT_DETERIORATION; break; case 6: mutat = MUT_BLURRY_VISION; break; case 7: mutat = MUT_FRAIL; break; @@ -2376,7 +2385,7 @@ bool give_bad_mutation(bool forceMutation, bool failMsg) (temp_rand == 6) ? MUT_CLUMSY : (temp_rand == 5) ? MUT_TELEPORT : (temp_rand == 4) ? MUT_DEFORMED : - (temp_rand == 3) ? MUT_LOST : + (temp_rand == 3) ? MUT_SCREAM : (temp_rand == 2) ? MUT_DETERIORATION : (temp_rand == 1) ? MUT_BLURRY_VISION : MUT_FRAIL); diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 27b9a16a17..cf601eb4a1 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1949,10 +1949,10 @@ std::string status_mut_abilities() Str_change -= level; Dex_change += level; break; - case MUT_LOST: + case MUT_SCREAM: if (have_any) text += ", "; - snprintf(info, INFO_SIZE, "forgetfulness %d", level); + snprintf(info, INFO_SIZE, "screaming %d", level); text += info; have_any = true; break; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 6d7e083a11..77a94ded67 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5540,11 +5540,19 @@ std::string player::shout_verb() const switch (transform) { case TRAN_DRAGON: + case TRAN_SERPENT_OF_HELL: return "roar"; case TRAN_SPIDER: return "hiss"; + case TRAN_BAT: + return "squeak"; + case TRAN_AIR: + return "__NONE"; default: - return "yell"; + if (you.mutation[MUT_SCREAM]) + return "scream"; + else + return "yell"; } } diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 8b7f000c5e..5397844e43 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -1260,7 +1260,6 @@ unsigned int item_value( item_def item, bool ident ) break; case SCR_CURSE_ARMOUR: case SCR_CURSE_WEAPON: - case SCR_FORGETFULNESS: case SCR_PAPER: case SCR_IMMOLATION: valued++; diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index 4de5def889..2773566b34 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -356,10 +356,18 @@ void handle_traps(trap_type trt, int i, bool trap_known) you_teleport_now( true ); break; - case TRAP_AMNESIA: - mpr("You feel momentarily disoriented."); - if (!wearing_amulet(AMU_CLARITY)) - forget_map(random2avg(100, 2)); + case TRAP_ALARM: + if (silenced(you.x_pos, you.y_pos)) + { + if (trap_known) + mpr("The alarm is silenced."); + else + grd[you.x_pos][you.y_pos] = DNGN_UNDISCOVERED_TRAP; + return; + } + + noisy(12, you.x_pos, you.y_pos, "An alarm trap emits a blaring wail!"); + break; case TRAP_BLADE: @@ -837,7 +845,7 @@ dungeon_feature_type trap_category(trap_type type) return (DNGN_TRAP_NATURAL); case TRAP_TELEPORT: - case TRAP_AMNESIA: + case TRAP_ALARM: case TRAP_ZOT: return (DNGN_TRAP_MAGICAL); |