• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision11a36fd0e91eab68d85213aecb9f5e012f78ff8c (tree)
Time2019-02-07 23:37:10
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

#38935 [Fix] hit_chance() が、reli値の負や0を想定していなかった不具合を修正。 / Fix hit_chance() for when reli has minus and zero value.

Change Summary

Incremental Difference

--- a/src/melee1.c
+++ b/src/melee1.c
@@ -49,7 +49,7 @@ bool test_hit_norm(HIT_RELIABILITY chance, ARMOUR_CLASS ac, bool visible)
4949 PERCENTAGE hit_chance(HIT_RELIABILITY reli, ARMOUR_CLASS ac)
5050 {
5151 PERCENTAGE chance = 5, chance_left = 90;
52-
52+ if (reli <= 0) return 5;
5353 if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance_left = (chance_left * 19 + 9) / 20;
5454 chance += (100 - ((ac * 75) / reli)) * chance_left / 100;
5555
Show on old repository browser