Viewing Issue Advanced Details Jump to Notes ] Wiki ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007565 [DCSS] Patches major have not tried 2013-09-18 05:48 2013-09-20 14:42
Reporter chris View Status public  
Assigned To elliptic
Priority normal Resolution done Local or Remote Local
Status closed   Operating System Windows
Projection none   Console or Tiles Tiles
ETA none Fixed in Branch 0.13 ancient branch Product Branch 0.16 ancient branch
  Product Version
Summary 0007565: Nerf Trog, Kiku and Sif | New piety_breakpoint at 160
Description Following up on 0007564 - Generally try to use piety_breakpoints in more places instead of hardcoding numbers close to, or matching, their numeric values.

* Let godprayer messages and ^ description coincide with piety ranks
* Add new piety_breakpoint at 160 {code is a hack, suggestions/fixes welcome}
* Change checks for piety 161 to new piety_breakpoint(5) = 160
* Sif/Kiku miscast protection: Reduce chance {2 commits}
* Use piety_breakpoint in lots of code {4 commits}
* Trog protection from passing out: guaranteed at piety 160 (was: 150)
* Piety requirements for gifting: 151 -> 160 {this is nowhere near as intrusive as it sounds}

Patch overview at http://bpaste.net/show/VOqkuwqX2ue2Sh5I45Mi/ [^]
Raw patchset at http://bpaste.net/raw/VOqkuwqX2ue2Sh5I45Mi/ [^]
Steps To Reproduce
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0024048)
chris (updater)
2013-09-18 06:32
edited on: 2013-09-18 06:34

After discussing the message changes, here's a small update that hopefully doesn't conflict. Any suggestions welcome on how that new message could or should look like.

Note that these two commits have not been tested yet.

From 494b13c04da7035cb1d46b92092daba5383949f3 Mon Sep 17 00:00:00 2001
From: Chris Oelmueller <chris.oelmueller@gmail.com>
Date: Wed, 18 Sep 2013 06:28:50 +0200
Subject: Subject: Remove own god-related messages for piety 1-5

This did not happen particularly often anyways and 5 is not a breakpoint.
Right now there is a rather large gap between 120 and 200, it could be
a good idea to add another step here. As the text for current 120 sounds
rather impressive and players are maybe accustomed to seeing those
messages as the final ones, I'd suggest to move this to 160 and find
some new wording for the then-empty 120, i.e. piety_breakpoint(4).
---
 crawl-ref/source/describe.cc  |  5 ++---
 crawl-ref/source/godprayer.cc | 10 ++++------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index fcdfc2d..e1eeed1 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -3964,9 +3964,8 @@ static string _describe_favour(god_type which_god)
            (you.piety > 100) ? "A shining star in the eyes of " + godname + ".&qu
ot; :
            (you.piety >  75) ? "A rising star in the eyes of " + godname + ".&quo
t; :
            (you.piety >  50) ? uppercase_first(godname) + " is most pleased with you."
 :
-           (you.piety >  30) ? uppercase_first(godname) + " is pleased with you." :
-           (you.piety >   5) ? uppercase_first(godname) + " is noncommittal."
-                             : "You are beneath notice.";
+           (you.piety >  30) ? uppercase_first(godname) + " is pleased with you."
+                             : uppercase_first(godname) + " is noncommittal.";
 }
 
 static string _religion_help(god_type god)
diff --git a/crawl-ref/source/godprayer.cc b/crawl-ref/source/godprayer.cc
index 46a47a8..b6e5752 100644
--- a/crawl-ref/source/godprayer.cc
+++ b/crawl-ref/source/godprayer.cc
@@ -72,9 +72,8 @@ string god_prayer_reaction()
         (you.piety > 100) ? "extremely pleased with you" :
         (you.piety >  75) ? "greatly pleased with you" :
         (you.piety >  50) ? "most pleased with you" :
-        (you.piety >  30) ? "pleased with you" :
-        (you.piety >   5) ? "noncommittal"
-                          : "displeased";
+        (you.piety >  30) ? "pleased with you"
+                          : "noncommittal";
     result += ".";
 
     return result;
@@ -478,9 +477,8 @@ static bool _zin_donate_gold()
             (estimated_piety > 100) ? "extremely pleased with you" :
             (estimated_piety >  75) ? "greatly pleased with you" :
             (estimated_piety >  50) ? "most pleased with you" :
-            (estimated_piety >  30) ? "pleased with you" :
-            (estimated_piety >   5) ? "noncommittal"
-                                    : "displeased";
+            (estimated_piety >  30) ? "pleased with you"
+                                    : "noncommittal";
         result += (donation >= 30 && you.piety <= 160) ? "!" : "."
;;
 
         mpr(result.c_str());
-- 
1.8.4


From 40897fb3ea033d5b5c3a4688ba77ffbabd22e7f4 Mon Sep 17 00:00:00 2001
From: Chris Oelmueller <chris.oelmueller@gmail.com>
Date: Wed, 18 Sep 2013 06:34:10 +0200
Subject: Use piety_breakpoint for godprayer message and ^ description

---
 crawl-ref/source/describe.cc  | 12 ++++++------
 crawl-ref/source/godprayer.cc | 26 +++++++++++++-------------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index e1eeed1..4e59d0c 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -3960,12 +3960,12 @@ static string _describe_favour(god_type which_god)
         return uppercase_first(describe_xom_favour());
 
     const string godname = god_name(which_god);
-    return (you.piety > 120) ? "A prized avatar of " + godname + ".":
-           (you.piety > 100) ? "A shining star in the eyes of " + godname + ".&qu
ot; :
-           (you.piety >  75) ? "A rising star in the eyes of " + godname + ".&quo
t; :
-           (you.piety >  50) ? uppercase_first(godname) + " is most pleased with you."
 :
-           (you.piety >  30) ? uppercase_first(godname) + " is pleased with you."
-                             : uppercase_first(godname) + " is noncommittal.";
+    return (you.piety >= piety_breakpoint(4)) ? "A prized avatar of " + godname + &quo
t;." :
+           (you.piety >= piety_breakpoint(3)) ? "A shining star in the eyes of " + god
name + "." :
+           (you.piety >= piety_breakpoint(2)) ? "A rising star in the eyes of " + godn
ame + "." :
+           (you.piety >= piety_breakpoint(1)) ? uppercase_first(godname) + " is most please
d with you." :
+           (you.piety >= piety_breakpoint(0)) ? uppercase_first(godname) + " is pleased wit
h you."
+                                              : uppercase_first(godname) + " is noncommittal.&
quot;;
 }
 
 static string _religion_help(god_type god)
diff --git a/crawl-ref/source/godprayer.cc b/crawl-ref/source/godprayer.cc
index b6e5752..ea93c17 100644
--- a/crawl-ref/source/godprayer.cc
+++ b/crawl-ref/source/godprayer.cc
@@ -68,12 +68,12 @@ string god_prayer_reaction()
     else
         result += " is ";
     result +=
-        (you.piety > 120) ? "exalted by your worship" :
-        (you.piety > 100) ? "extremely pleased with you" :
-        (you.piety >  75) ? "greatly pleased with you" :
-        (you.piety >  50) ? "most pleased with you" :
-        (you.piety >  30) ? "pleased with you"
-                          : "noncommittal";
+        (you.piety >= piety_breakpoint(4)) ? "exalted by your worship" :
+        (you.piety >= piety_breakpoint(3)) ? "extremely pleased with you" :
+        (you.piety >= piety_breakpoint(2)) ? "greatly pleased with you" :
+        (you.piety >= piety_breakpoint(1)) ? "most pleased with you" :
+        (you.piety >= piety_breakpoint(0)) ? "pleased with you"
+                                           : "noncommittal";
     result += ".";
 
     return result;
@@ -473,13 +473,13 @@ static bool _zin_donate_gold()
     {
         string result = "You feel that " + god_name(GOD_ZIN) + " will soon be "
;
         result +=
-            (estimated_piety > 120) ? "exalted by your worship" :
-            (estimated_piety > 100) ? "extremely pleased with you" :
-            (estimated_piety >  75) ? "greatly pleased with you" :
-            (estimated_piety >  50) ? "most pleased with you" :
-            (estimated_piety >  30) ? "pleased with you"
-                                    : "noncommittal";
-        result += (donation >= 30 && you.piety <= 160) ? "!" : "."
;;
+            (estimated_piety >= piety_breakpoint(4)) ? "exalted by your worship" :
+            (estimated_piety >= piety_breakpoint(3)) ? "extremely pleased with you" :

+            (estimated_piety >= piety_breakpoint(2)) ? "greatly pleased with you" :
+            (estimated_piety >= piety_breakpoint(1)) ? "most pleased with you" :
+            (estimated_piety >= piety_breakpoint(0)) ? "pleased with you"
+                                                     : "noncommittal";
+        result += (donation >= 30 && you.piety < piety_breakpoint(5)) ? "!"
 : ".";
 
         mpr(result.c_str());
     }
-- 
1.8.4


(0024061)
elliptic (developer)
2013-09-20 07:50

Pushed (with a couple fixes and new piety level messages), thanks!

- Issue History
Date Modified Username Field Change
2013-09-18 05:48 chris New Issue
2013-09-18 06:32 chris Note Added: 0024048
2013-09-18 06:34 chris Note Edited: 0024048
2013-09-20 07:50 elliptic Note Added: 0024061
2013-09-20 07:50 elliptic Status new => resolved
2013-09-20 07:50 elliptic Fixed in Branch => 0.13 development branch
2013-09-20 07:50 elliptic Resolution open => done
2013-09-20 07:50 elliptic Assigned To => elliptic
2013-09-20 14:42 chris Status resolved => closed


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker