From 1fc9790ccc0c20e10cd3c623b93b9eec7fea2f69 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sat, 3 Nov 2007 15:46:37 +0000 Subject: Trunk->0.3 merge (2704): Disallow id on portaled projectiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2735 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/item_use.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index d280ff5309..b3985a3c3b 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1792,7 +1792,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, case SK_SLINGS: { // Slings are really easy to learn because they're not - // really all that good, and its harder to get ammo anyways. + // really all that good, and it's harder to get ammo anyways. exercise(SK_SLINGS, 1 + random2avg(3, 2)); // Sling bullets are designed for slinging and easier to aim. @@ -1958,10 +1958,12 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, * ammo of fire and weapons of frost don't work together, * and vice versa */ - // ID check + // ID check. Can't ID off teleported projectiles, uh, because + // it's too weird. Also it messes up the messages. if (item_ident(you.inv[you.equip[EQ_WEAPON]], ISFLAG_KNOW_PLUSES)) { - if ( !item_ident(you.inv[throw_2], ISFLAG_KNOW_PLUSES) && + if ( !teleport && + !item_ident(you.inv[throw_2], ISFLAG_KNOW_PLUSES) && random2(100) < shoot_skill ) { set_ident_flags( item, ISFLAG_KNOW_PLUSES ); @@ -1970,7 +1972,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, you.inv[throw_2].name(DESC_NOCAP_A).c_str()); } } - else if (random2(100) < shoot_skill) + else if (!teleport && random2(100) < shoot_skill) { item_def& weapon = you.inv[you.equip[EQ_WEAPON]]; set_ident_flags(weapon, ISFLAG_KNOW_PLUSES); @@ -2105,7 +2107,8 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, exercise(SK_THROWING, 1); // ID check - if ( !item_ident(you.inv[throw_2], ISFLAG_KNOW_PLUSES) && + if ( !teleport && + !item_ident(you.inv[throw_2], ISFLAG_KNOW_PLUSES) && random2(100) < you.skills[SK_THROWING] ) { set_ident_flags( item, ISFLAG_KNOW_PLUSES ); -- cgit v1.2.3-54-g00ecf