Attached Files |
gr_petr_stat_loss_paren.patch [^] (1,106 bytes) 2013-06-01 04:37 [Show Content] [Hide Content]From 599ff2c94bb3194721d4512f63b2dccffa604897 Mon Sep 17 00:00:00 2001
From: Ed Gonzalez <ed.gonzalez3@gmail.com>
Date: Fri, 31 May 2013 18:44:33 -0700
Subject: [PATCH 1/1] Added parentheses to gargoyle petrify-stat-loss.
Now their stat loss is based off of maximum damage reduced in a single
hit, instead of the unreduced size of the largest single hit.
There were missing parentheses resulting in no-op arithmetic.
---
crawl-ref/source/ouch.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 56c67e4..c887462 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -1149,7 +1149,7 @@ void ouch(int dam, int death_source, kill_method_type death_type,
if (you.species == SP_GARGOYLE && (you.petrified() || you.petrifying()))
{
you.gargoyle_damage_reduction =
- max(you.gargoyle_damage_reduction, dam + 1 / 2);
+ max(you.gargoyle_damage_reduction, (dam + 1) / 2);
dam /= 2;
}
else if (you.petrified())
--
1.7.10.4
|