diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-03 16:42:26 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-03 16:42:26 +0000 |
commit | 5b06a0470b38bfd19c8b00063d7107be6fb7ca71 (patch) | |
tree | 6d1fa831459d4042138ad0581af5bfc85daa72d1 /crawl-ref/source | |
parent | 94fc8284e019e8157bb8862a0429be6060adae27 (diff) | |
download | crawl-ref-5b06a0470b38bfd19c8b00063d7107be6fb7ca71.tar.gz crawl-ref-5b06a0470b38bfd19c8b00063d7107be6fb7ca71.zip |
[FR 1733318] Draconian ghosts (non-grey, xl >= 7) get a draining breath
attack. The message ("John Doe's ghost breathes.") may have to be
tweaked, ghosts being undead etc. The chance for a ghost actually
breathing increases with its experience (1/2 at xl 7, 2/3 at xl 8,
3/4 at xl 9, and so forth).
[FR 1826165] !restore ability also resets DUR_BREATH_WEAPON, so it becomes more
useful to draconians and demonspawn with hellfire. To make up for
it, the breath weapon durations might have to increased.
They're currently:
3 + random2(5) for Spit Poison
3 + random2(5) + random2(30 - xp) for Hellfire
3 + random2(4) + random2(30 - xp)/2 for Breath Weapons
[Bug 1879466] The step into lava/deep water safety prompt bails out unless
the player answers "yes".
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3510 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/debug.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/it_use2.cc | 15 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/mstuff2.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 15 |
5 files changed, 46 insertions, 8 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 441b4105bc..468c3e501c 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -474,7 +474,7 @@ void create_spec_monster_name(int x, int y) ghost.name = "John Doe"; char input_str[80]; - mpr( "Make player ghost which species? ", MSGCH_PROMPT ); + mpr( "Make player ghost which species? (case-sensitive) ", MSGCH_PROMPT ); get_input_line( input_str, sizeof( input_str ) ); int sp_id = get_species_by_abbrev(input_str); @@ -502,6 +502,7 @@ void create_spec_monster_name(int x, int y) class_id = JOB_FIGHTER; } ghost.job = static_cast<job_type>(class_id); + ghost.xl = 7; mon.set_ghost(ghost); diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc index daa3f14ab9..754f3f436e 100644 --- a/crawl-ref/source/it_use2.cc +++ b/crawl-ref/source/it_use2.cc @@ -268,11 +268,20 @@ bool potion_effect( potion_type pot_eff, int pow ) break; case POT_RESTORE_ABILITIES: - // give a message if restore_stat doesn't - if (!restore_stat(STAT_ALL, false)) + { + bool nothing_happens = true; + if (you.duration[DUR_BREATH_WEAPON]) + { + mpr("You have got your breath back.", MSGCH_RECOVERY); + you.duration[DUR_BREATH_WEAPON] = 0; + nothing_happens = false; + } + + // give a message if no message otherwise + if (!restore_stat(STAT_ALL, false) && nothing_happens) mpr( "You feel refreshed." ); break; - + } case POT_BERSERK_RAGE: if (you.species == SP_VAMPIRE) { diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 78f0cb843d..1a87ea13a6 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2852,6 +2852,19 @@ static bool handle_special_ability(monsters *monster, bolt & beem) } break; + case MONS_PLAYER_GHOST: + { + const ghost_demon &ghost = *(monster->ghost); + + if (ghost.species < SP_RED_DRACONIAN + || ghost.species == SP_GREY_DRACONIAN + || ghost.species >= SP_BASE_DRACONIAN + || ghost.xl < 7 + || one_chance_in(ghost.xl - 5)) + { + break; + } + } // dragon breath weapon: case MONS_DRAGON: case MONS_HELL_HOUND: diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index 20e87d6951..3ee102096f 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -1070,6 +1070,14 @@ void setup_dragon(struct monsters *monster, struct bolt &pbolt) pbolt.aux_source = "blast of chilling breath"; scaling = 65; break; + + case MONS_PLAYER_GHOST: // draconians only + pbolt.name += "blast of negative energy"; + pbolt.flavour = BEAM_NEG; + pbolt.colour = DARKGREY; + pbolt.aux_source = "blast of draining breath"; + scaling = 65; + break; default: DEBUGSTR("Bad monster class in setup_dragon()"); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 5b74319324..e38d6bcb75 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -34,6 +34,7 @@ #include "externs.h" #include "branch.h" +#include "cio.h" #include "clua.h" #include "delay.h" #include "dgnevent.h" @@ -190,10 +191,14 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, if (stepped && !force && !you.duration[DUR_CONF]) { - bool okay = yesno( "Do you really want to step there?", - false, 'n' ); - - if (!okay) + mprf(MSGCH_PROMPT, + "Do you really want to step into the %s? " + "(Confirm with \"yes\".) ", + (new_grid == DNGN_LAVA ? "lava" : "deep water")); + + char buf[10]; + if (cancelable_get_line(buf, sizeof buf) + || strcasecmp(buf, "yes")) { canned_msg(MSG_OK); return (false); @@ -3765,12 +3770,14 @@ int str_to_species(const std::string &species) if (species.empty()) return SP_HUMAN; + // first look for full name (e.g. Green Draconian) for (int i = SP_HUMAN; i < NUM_SPECIES; ++i) { if (species == species_name(static_cast<species_type>(i), 10)) return (i); } + // nothing found, try again with plain name for (int i = SP_HUMAN; i < NUM_SPECIES; ++i) { if (species == species_name(static_cast<species_type>(i), 1)) |