From: <gi...@cr...> - 2011-06-02 17:28:13
|
via 9f36181eff05306be8f840e9c95267ef86dc8b95 (commit) from 9d67794091558991c740227c031a9b6ee1d8e597 (commit) ----------------------------------------------------------------------- commit 9f36181eff05306be8f840e9c95267ef86dc8b95 Author: Chris Campbell <chr...@gm...> Date: Thu Jun 2 18:26:30 2011 +0100 Improve Apportation messages The actual behaviour could still probably stand to be improved too - probably rather than refuse to move at all if there's water/lava in the way, items should move up to the edge of it? ----------------------------------------------------------------------- Summary of changes: crawl-ref/source/spl-transloc.cc | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/spl-transloc.cc b/crawl-ref/source/spl-transloc.cc index 10e858c..4fd8856 100644 --- a/crawl-ref/source/spl-transloc.cc +++ b/crawl-ref/source/spl-transloc.cc @@ -780,9 +780,11 @@ bool cast_apportation(int pow, bolt& beam) } // Protect the player from destroying the item. - if (feat_destroys_item(grd(you.pos()), item)) + if (feat_virtually_destroys_item(grd(you.pos()), item) + && !yesno("Really apport while over this terrain?", + false, 'n')) { - mpr("That would be silly while over this terrain!"); + canned_msg(MSG_OK); return (false); } @@ -799,6 +801,7 @@ bool cast_apportation(int pow, bolt& beam) if (item_is_orb(item)) { orb_pickup_noise(where, 30); + mpr("The mass is resisting your pull."); return (true); } else @@ -811,9 +814,6 @@ bool cast_apportation(int pow, bolt& beam) // We need to modify the item *before* we move it, because // move_top_item() might change the location, or merge // with something at our position. - mprf("Yoink! You pull the item%s towards yourself.", - (item.quantity > 1) ? "s" : ""); - if (item_is_orb(item)) { fake_noisy(30, where); @@ -871,13 +871,19 @@ bool cast_apportation(int pow, bolt& beam) dprf("Apport: new spot is %d/%d", new_spot.x, new_spot.y); if (feat_virtually_destroys_item(grd(new_spot), item)) + { + mpr("Not with that terrain in the way!"); return (true); + } } // If power is high enough it'll just come straight to you. else new_spot = you.pos(); // Actually move the item. + mprf("Yoink! You pull the item%s towards yourself.", + (item.quantity > 1) ? "s" : ""); + if (max_units < item.quantity) { if (!copy_item_to_grid(item, new_spot, max_units)) -- Dungeon Crawl Stone Soup |