diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-08 22:08:18 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-08 22:08:18 +0000 |
commit | b33d384a7fcbfdf0d8b48607819f303dafa54512 (patch) | |
tree | f437439b158b4a2565fe7378e6c5e613cb7b2db8 /crawl-ref/source/spl-cast.cc | |
parent | 7e7c3ba3780f9daf9268bafcc488566bc2f21f93 (diff) | |
download | crawl-ref-b33d384a7fcbfdf0d8b48607819f303dafa54512.tar.gz crawl-ref-b33d384a7fcbfdf0d8b48607819f303dafa54512.zip |
Modify Portal Projectile to use the quiver interface, so you can now
choose your projectiles and are no longer prompted when "firing through"
friendlies. (FR 1816789)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5615 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index eb1feb86ed..fa9acad1a2 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -932,7 +932,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) // there are others that do their own that will be missed by this // (and thus will not properly ESC without cost because of it). // Hopefully, those will eventually be fixed. -- bwr - if (flags & SPFLAG_TARGETING_MASK) + if ((flags & SPFLAG_TARGETING_MASK) && spell != SPELL_PORTAL_PROJECTILE) { targ_mode_type targ = (testbits(flags, SPFLAG_HELPFUL) ? TARG_FRIEND : TARG_ENEMY); @@ -943,25 +943,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) testbits( flags, SPFLAG_DIR ) ? DIR_DIR : DIR_NONE); const char *prompt = get_spell_target_prompt(spell); - if (spell == SPELL_PORTAL_PROJECTILE) - { - const item_def* item; - int idx; - you.m_quiver->get_desired_item(&item, &idx); - if ( item == NULL ) - { - mpr("No suitable missiles."); - return (SPRET_ABORT); - } - else if ( idx == -1 ) - { - mpr("No missiles left."); - return SPRET_ABORT; - } - mprf(MSGCH_PROMPT, "Where do you want to aim %s?", - you.inv[idx].name(DESC_NOCAP_YOUR).c_str()); - } - else if (spell == SPELL_EVAPORATE) + if (spell == SPELL_EVAPORATE) { potion = prompt_invent_item( "Throw which potion?", MT_INVLIST, OBJ_POTIONS ); @@ -1999,7 +1981,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) break; case SPELL_PORTAL_PROJECTILE: - if ( !cast_portal_projectile(powc, beam) ) + if (!cast_portal_projectile(powc)) return SPRET_ABORT; break; |