Replace Gozag's gold lust with gold distraction (dpeg).
authorSteve Melenchuk <smelenchuk@gmail.com>
Wed, 7 May 2014 00:23:48 +0000 (18:23 -0600)
committerSteve Melenchuk <smelenchuk@gmail.com>
Thu, 8 May 2014 00:23:34 +0000 (18:23 -0600)
For every fresh pile of gold in LOS of a monster when they're acting,
they have a 5% chance of doing nothing that turn.

crawl-ref/source/godpassive.cc
crawl-ref/source/godpassive.h
crawl-ref/source/hiscores.cc
crawl-ref/source/mon-act.cc
crawl-ref/source/output.cc
crawl-ref/source/player.cc
crawl-ref/source/status.cc
crawl-ref/source/status.h

index 691f879..08fc64e 100644 (file)
@@ -662,14 +662,14 @@ int ash_skill_boost(skill_type sk, int scale)
     return min(level, 27 * scale);
 }
 
-int gozag_gold_bonus()
+int gozag_gold_in_los(actor *who)
 {
     if (!you_worship(GOD_GOZAG) || player_under_penance())
         return 0;
 
     int gold_count = 0;
 
-    for (radius_iterator ri(you.pos(), LOS_RADIUS, C_ROUND, LOS_DEFAULT);
+    for (radius_iterator ri(who->pos(), LOS_RADIUS, C_ROUND, LOS_DEFAULT);
          ri; ++ri)
     {
         for (stack_iterator j(*ri); j; ++j)
index 431a598..12d7f69 100644 (file)
@@ -32,7 +32,7 @@ int ash_detect_portals(bool all);
 monster_type ash_monster_tier(const monster *mon);
 int ash_skill_boost(skill_type sk, int scale);
 map<skill_type, int8_t> ash_get_boosted_skills(eq_type type);
-int gozag_gold_bonus();
+int gozag_gold_in_los(actor* who);
 int qazlal_sh_boost(int piety = you.piety);
 void qazlal_storm_clouds();
 void qazlal_element_adapt(beam_type flavour, int strength);
index cc6d61b..26c0a16 100644 (file)
@@ -1605,7 +1605,9 @@ void scorefile_entry::init(time_t dt)
         STATUS_MAGIC_SAPPED,
         DUR_PORTAL_PROJECTILE,
         DUR_NO_POTIONS,
+#if TAG_MAJOR_VERSION == 34
         STATUS_GOLDEN,
+#endif
         STATUS_BRIBE,
         DUR_QAZLAL_FIRE_RES,
         DUR_QAZLAL_COLD_RES,
index f6a0f1e..e78f6f2 100644 (file)
@@ -2065,6 +2065,19 @@ void handle_monster_move(monster* mons)
         return;
     }
 
+    const int gold = gozag_gold_in_los(mons);
+    if (gold > 0)
+    {
+        for (int i = 0; i < gold; i++)
+            if (one_chance_in(20))
+            {
+                simple_monster_message(mons,
+                                       " is distracted by the nearby gold.");
+                mons->speed_increment -= non_move_energy;
+                return;
+            }
+    }
+
     if (crawl_state.disables[DIS_MON_ACT] && _unfriendly_or_insane(mons))
     {
         mons->speed_increment -= non_move_energy;
index cd293d8..88f646b 100644 (file)
@@ -1051,7 +1051,9 @@ static void _get_status_lights(vector<status_light>& out)
         DUR_BRILLIANCE,
         DUR_MIGHT,
         DUR_NO_POTIONS,
+#if TAG_MAJOR_VERSION == 34
         STATUS_GOLDEN,
+#endif
         STATUS_BRIBE,
         DUR_QAZLAL_FIRE_RES,
         DUR_QAZLAL_COLD_RES,
@@ -2554,7 +2556,9 @@ static string _status_mut_abilities(int sw)
         DUR_DRAGON_CALL,
         DUR_ABJURATION_AURA,
         DUR_NO_POTIONS,
+#if TAG_MAJOR_VERSION == 34
         STATUS_GOLDEN,
+#endif
         STATUS_BRIBE,
         DUR_QAZLAL_FIRE_RES,
         DUR_QAZLAL_COLD_RES,
index a10a1ce..57ee115 100644 (file)
@@ -4318,7 +4318,9 @@ void display_char_status()
         STATUS_MAGIC_SAPPED,
         DUR_PORTAL_PROJECTILE,
         DUR_NO_POTIONS,
+#if TAG_MAJOR_VERSION == 34
         STATUS_GOLDEN,
+#endif
         STATUS_BRIBE,
         DUR_QAZLAL_FIRE_RES,
         DUR_QAZLAL_COLD_RES,
@@ -6565,8 +6567,6 @@ int player::skill(skill_type sk, int scale, bool real) const
     if (is_useless_skill(sk))
         return 0;
 
-    const int gold_bonus = gozag_gold_bonus();
-
     // skills[sk] might not be updated yet if this is in the middle of
     // skill training, so make sure to use the correct value.
     // This duplicates code in check_skill_level_change(), unfortunately.
@@ -6590,8 +6590,6 @@ int player::skill(skill_type sk, int scale, bool real) const
     int level = actual_skill * scale + get_skill_progress(sk, actual_skill, skill_points[sk], scale);
     if (real)
         return level;
-    if (gold_bonus)
-        level = min(level + gold_bonus * scale, 27 * scale);
     if (duration[DUR_HEROISM] && sk <= SK_LAST_MUNDANE)
         level = min(level + 5 * scale, 27 * scale);
     if (penance[GOD_ASHENZARI])
index 3c732b2..e445571 100644 (file)
@@ -697,26 +697,6 @@ bool fill_status_info(int status, status_info* inf)
         }
         break;
 
-    case STATUS_GOLDEN:
-    {
-        const int gold_bonus = gozag_gold_bonus();
-
-        if (gold_bonus == 0)
-            break;
-
-        inf->light_colour = (gold_bonus >= 5) ? WHITE :
-                            (gold_bonus >= 3) ? LIGHTBLUE
-                                              : BLUE;
-
-        inf->light_text = "Gold";
-        inf->short_text = "gold lust";
-        inf->long_text =
-            make_stringf("Your skills are %senhanced by your lust for gold.",
-                         gold_bonus >= 5 ? "greatly " :
-                         gold_bonus <  3 ? "slightly " : "");
-        break;
-    }
-
     case STATUS_BRIBE:
     {
         int bribe = 0;
index c8b4d4f..ad7a1f1 100644 (file)
@@ -42,7 +42,9 @@ enum status_type
     STATUS_ELIXIR,
     STATUS_INVISIBLE,
     STATUS_MAGIC_SAPPED,
+#if TAG_MAJOR_VERSION == 34
     STATUS_GOLDEN,
+#endif
     STATUS_BRIBE,
     STATUS_LAST_STATUS = STATUS_BRIBE
 };