Add two new Ru sacrifices: resistance and eye
[crawl.git] / crawl-ref / source / sacrifice-data.h
index 3dc2faa..48b8f26 100644 (file)
@@ -15,6 +15,10 @@ struct sacrifice_def
                                     // multiple mutations. It is a key into
                                     // you.props, yielding a list of mutations
                                     // granted by the sacrifice.
+    bool (*valid)();                // Whether the sacrifice is currently an
+                                    // valid choice for Ru to offer. Only
+                                    // checks factors specific to this
+                                    // sacrifice, not general checks.
 };
 
 static const sacrifice_def sac_data[] =
@@ -26,25 +30,28 @@ static const sacrifice_def sac_data[] =
 
   0,
   SK_NONE,
-  "current_purity_sacrifice",
+  PURITY_SAC_KEY,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_WORDS, MUT_NO_READ,
-  "your ability to read while threatened",
+  "sacrifice your ability to read while threatened",
   "sacrificed words",
 
-  28,
+  30,
   SK_NONE,
   nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_DRINK, MUT_NO_DRINK,
-  "your ability to drink while threatened",
+  "sacrifice your ability to drink while threatened",
   "sacrificed drink",
 
-  28,
+  30,
   SK_NONE,
   nullptr,
+  []() { return you.species != SP_MUMMY; },
 },
 
 { ABIL_RU_SACRIFICE_ESSENCE, MUT_NON_MUTATION,
@@ -53,7 +60,8 @@ static const sacrifice_def sac_data[] =
 
   0,
   SK_NONE,
-  "current_essence_sacrifice",
+  ESSENCE_SAC_KEY,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_HEALTH, MUT_NON_MUTATION,
@@ -62,7 +70,8 @@ static const sacrifice_def sac_data[] =
 
   20,
   SK_NONE,
-  "current_health_sacrifice",
+  HEALTH_SAC_KEY,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_STEALTH, MUT_NO_STEALTH,
@@ -72,6 +81,7 @@ static const sacrifice_def sac_data[] =
   15,
   SK_STEALTH,
   nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_ARTIFICE, MUT_NO_ARTIFICE,
@@ -81,6 +91,7 @@ static const sacrifice_def sac_data[] =
   70,
   SK_EVOCATIONS,
   nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_LOVE, MUT_NO_LOVE,
@@ -90,6 +101,7 @@ static const sacrifice_def sac_data[] =
   22,
   SK_NONE,
   nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_COURAGE, MUT_COWARDICE,
@@ -99,6 +111,7 @@ static const sacrifice_def sac_data[] =
   25,
   SK_NONE,
   nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_ARCANA, MUT_NON_MUTATION,
@@ -107,25 +120,28 @@ static const sacrifice_def sac_data[] =
 
   25,
   SK_NONE,
-  "current_arcane_sacrifices",
+  ARCANA_SAC_KEY,
+  []() { return !_player_sacrificed_arcana(); },
 },
 
 { ABIL_RU_SACRIFICE_NIMBLENESS, MUT_NO_DODGING,
-  "sacrifice your ability to dodge",
+  "sacrifice your Dodging skill",
   "sacrificed dodging",
 
-  28,
+  30,
   SK_DODGING,
   nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_DURABILITY, MUT_NO_ARMOUR,
-  "sacrifice your ability to wear armour well",
+  "sacrifice your Armour skill",
   "sacrificed armour",
 
-  28,
+  30,
   SK_ARMOUR,
   nullptr,
+  []() { return you_can_wear(EQ_BODY_ARMOUR) != MB_FALSE; },
 },
 
 { ABIL_RU_SACRIFICE_HAND, MUT_MISSING_HAND,
@@ -135,5 +151,46 @@ static const sacrifice_def sac_data[] =
   70,
   SK_SHIELDS,
   nullptr,
+  nullptr,
+},
+
+{ ABIL_RU_SACRIFICE_EXPERIENCE, MUT_INEXPERIENCED,
+  "sacrifice your experiences",
+  "sacrificed experience",
+
+  28,
+  SK_NONE,
+  nullptr,
+  []() { return you.experience_level > RU_SAC_XP_LEVELS; }
+},
+
+{ ABIL_RU_SACRIFICE_SKILL, MUT_UNSKILLED,
+  "sacrifice your skill",
+  "sacrificed skill",
+
+  35,
+  SK_NONE,
+  nullptr,
+  nullptr,
+},
+
+{ ABIL_RU_SACRIFICE_EYE, MUT_MISSING_EYE,
+  "sacrifice an eye",
+  "sacrificed an eye",
+
+  45,
+  SK_NONE,
+  nullptr,
+  nullptr,
+},
+
+{ ABIL_RU_SACRIFICE_RESISTANCE, MUT_TEMPERATURE_SENSITIVITY,
+  "sacrifice your resistance to extreme temperatures",
+  "sacrificed resistance",
+
+  70,
+  SK_NONE,
+  nullptr,
+  nullptr,
 },
 };