diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-03 15:46:37 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-03 15:46:37 +0000 |
commit | 1fc9790ccc0c20e10cd3c623b93b9eec7fea2f69 (patch) | |
tree | 736159d812aecbcbca764e1b5a445fdd4616b063 | |
parent | 441c4e03e269bfe9a999f5b41f303ad2653c0f69 (diff) | |
download | crawl-ref-1fc9790ccc0c20e10cd3c623b93b9eec7fea2f69.tar.gz crawl-ref-1fc9790ccc0c20e10cd3c623b93b9eec7fea2f69.zip |
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
-rw-r--r-- | crawl-ref/source/item_use.cc | 13 |
1 files 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 ); |