summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/item_use.cc13
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 );