Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007564 [DCSS] Patches major have not tried 2013-09-17 17:49 2013-09-18 05:50
Reporter chris View Status public  
Assigned To elliptic
Priority normal Resolution done  
Status closed   Product Branch 0.16 ancient branch
Summary 0007564: Buff Beogh, Trog, and Okawaru
Description Generally try to use piety_breakpoints in more places instead of hardcoding numbers close to, or matching, their numeric values.

Five commits in this patchset:
* Use piety_breakpoint in gift code
* Buff Beogh (orcish weapons are 6 piety better)
* Buff Beogh: orcish armour is better {+ follow-up}
* Buff Trog and Oka: gifts can happen earlier

Raw file at http://bpaste.net/raw/voaEG3h6C1Ut4pzTeiSX/ [^]
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0024044)
Galefury (updater)
2013-09-17 17:54

Good commit messages.
(0024045)
chris (updater)
2013-09-17 18:03

Two more changes that should not conflict with others:

From b26f975bd346fcec295be4fae6123ca5e9adda0c Mon Sep 17 00:00:00 2001
From: Chris Oelmueller <chris.oelmueller@gmail.com>
Date: Thu, 5 Sep 2013 05:29:57 +0200
Subject: Use piety_breakpoint 100 in gifting code

This is a factual change from 101 to 100 for consistency reasons.
---
 crawl-ref/source/religion.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index d26f80f..a6d080f 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2673,7 +2673,7 @@ static void _gain_piety_point()
     {
         if (you.piety >= MAX_PIETY
             || you.piety > 150 && one_chance_in(3)
-            || you.piety > 100 && one_chance_in(3))
+            || you.piety >= piety_breakpoint(3) && one_chance_in(3))
         {
             do_god_gift();
             return;
-- 
1.8.4


From 1abd72d849667311039ae8b0256dd697fa7cdd51 Mon Sep 17 00:00:00 2001
From: Chris Oelmueller <chris.oelmueller@gmail.com>
Date: Thu, 5 Sep 2013 05:30:02 +0200
Subject: Use piety_breakpoint 30 in good god code

This is the first legit > comparison as opposed to >= which breakpoints
usually compare to. Anything that should be done?
---
 crawl-ref/source/hints.cc    | 2 +-
 crawl-ref/source/religion.cc | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/crawl-ref/source/hints.cc b/crawl-ref/source/hints.cc
index 084749c..d56e789 100644
--- a/crawl-ref/source/hints.cc
+++ b/crawl-ref/source/hints.cc
@@ -2538,7 +2538,7 @@ void learned_something_new(hints_event_type seen_what, coord_def gc)
                             " didn't mind your converting to " << new_god_name
                          << ". ";
 
-                    if (old_piety > 30)
+                    if (old_piety > piety_breakpoint(0))
                         text << "You even kept some of your piety! ";
 
                     text << "Note that this kind of alliance only exists "
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index a6d080f..ac62d16 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -3709,8 +3709,8 @@ void god_pitch(god_type which_god)
             mpr("Unknown good god.", MSGCH_ERROR);
         }
         // Give a piety bonus when switching between good gods.
-        if (old_piety > 30)
-            gain_piety(old_piety - 30, 2, true, false);
+        if (old_piety > piety_breakpoint(0))
+            gain_piety(old_piety - piety_breakpoint(0), 2, true, false);
     }
 
     // Warn if a good god is starting wrath now.
-- 
1.8.4
(0024046)
chris (updater)
2013-09-17 18:06

And another.
From 29c77163328059d0fdf6ec1d8452bf48bffa6552 Mon Sep 17 00:00:00 2001
From: Chris Oelmueller <chris.oelmueller@gmail.com>
Date: Thu, 5 Sep 2013 05:29:56 +0200
Subject: Use piety_breakpoint 100 in miscast code

---
 crawl-ref/source/spl-cast.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index d91cb9d..fd787ca 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -1317,7 +1317,8 @@ spret_type your_spells(spell_type spell, int powc,
 
         if (you_worship(GOD_SIF_MUNA)
             && !player_under_penance()
-            && you.piety >= 100 && x_chance_in_y(you.piety + 1, 150))
+            && you.piety >= piety_breakpoint(3)
+            && x_chance_in_y(you.piety + 1, 150))
         {
             canned_msg(MSG_NOTHING_HAPPENS);
             return SPRET_FAIL;
-- 
1.8.4
(0024047)
elliptic (developer)
2013-09-18 01:55

Pushed, thanks.

- Issue History
Date Modified Username Field Change
2013-09-17 17:49 chris New Issue
2013-09-17 17:54 Galefury Note Added: 0024044
2013-09-17 18:03 chris Note Added: 0024045
2013-09-17 18:06 chris Note Added: 0024046
2013-09-18 01:55 elliptic Note Added: 0024047
2013-09-18 01:55 elliptic Status new => resolved
2013-09-18 01:55 elliptic Fixed in Branch => 0.13 development branch
2013-09-18 01:55 elliptic Resolution open => done
2013-09-18 01:55 elliptic Assigned To => elliptic
2013-09-18 05:50 chris Status resolved => closed


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