diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-07 11:58:54 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-07 11:58:54 +0000 |
commit | 167ae03b160a0ccadd7934b2bfe557d491f1cb1f (patch) | |
tree | c1ee0ef626b416c5eee0f62082da72cb9f4137c3 /crawl-ref/source/item_use.cc | |
parent | 33dc7cedd5a65d3bd1ce8eff9006e4517a3390dd (diff) | |
download | crawl-ref-167ae03b160a0ccadd7934b2bfe557d491f1cb1f.tar.gz crawl-ref-167ae03b160a0ccadd7934b2bfe557d491f1cb1f.zip |
Another clean up, and add some new weapon speech.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 568645fc89..af14f7570b 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2242,7 +2242,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, { if (!teleport && !item_ident(you.inv[throw_2], ISFLAG_KNOW_PLUSES) - && random2(100) < shoot_skill) + && x_chance_in_y(shoot_skill, 100)) { set_ident_flags( item, ISFLAG_KNOW_PLUSES ); set_ident_flags( you.inv[throw_2], ISFLAG_KNOW_PLUSES ); @@ -2251,7 +2251,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 (!teleport && random2(100) < shoot_skill) + else if (!teleport && x_chance_in_y(shoot_skill, 100)) { item_def& weapon = you.inv[you.equip[EQ_WEAPON]]; set_ident_flags(weapon, ISFLAG_KNOW_PLUSES); @@ -2414,7 +2414,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, // ID check if (!teleport && !item_ident(you.inv[throw_2], ISFLAG_KNOW_PLUSES) - && random2(100) < you.skills[SK_THROWING]) + && x_chance_in_y(you.skills[SK_THROWING], 100)) { set_ident_flags( item, ISFLAG_KNOW_PLUSES ); set_ident_flags( you.inv[throw_2], ISFLAG_KNOW_PLUSES ); @@ -3936,7 +3936,7 @@ bool enchant_weapon( enchant_stat_type which_stat, bool quiet, item_def &wpn ) // Even if not affected, it may be uncursed. if (!is_enchantable_weapon(wpn, false) - || enchant_level >= 4 && random2(9) < enchant_level) + || enchant_level >= 4 && x_chance_in_y(enchant_level, 9)) { if (is_cursed) { @@ -4060,7 +4060,7 @@ bool enchant_armour( int &ac_change, bool quiet, item_def &arm ) // Even if not affected, it may be uncursed. if (!is_enchantable_armour(arm, false) - || arm.plus >= 3 && random2(8) < arm.plus) + || arm.plus >= 3 && x_chance_in_y(arm.plus, 8)) { if (is_cursed) { |