Add two new Ru sacrifices: resistance and eye
[crawl.git] / crawl-ref / source / sacrifice-data.h
index 0baa39c..48b8f26 100644 (file)
@@ -1,3 +1,26 @@
+struct sacrifice_def
+{
+    ability_type  sacrifice;        // The ability that executes the sacrifice.
+    mutation_type mutation;         // The mutation that will be inflicted.
+    const char*   sacrifice_text;   // Format: "sacrifice your hand"
+                                    // in case of variable sacrifices or sac
+                                    // hand, this will be extended later
+    const char*   milestone_text;   // Format: "sacrificed <foo>"
+                                    // in case of variable sacrifices this will
+                                    // be extended later
+    int           base_piety;       // The piety that will be gained, modified
+                                    // by the skill points in the skill below.
+    skill_type    sacrifice_skill;  // This skill will be eliminated.
+    const char*   sacrifice_vector; // This is used for sacrifices which give
+                                    // 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[] =
 {
 
@@ -7,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,
-  false,
+  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,
-  false,
+  nullptr,
+  []() { return you.species != SP_MUMMY; },
 },
 
 { ABIL_RU_SACRIFICE_ESSENCE, MUT_NON_MUTATION,
@@ -34,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,
@@ -43,34 +70,38 @@ static const sacrifice_def sac_data[] =
 
   20,
   SK_NONE,
-  "current_health_sacrifice",
+  HEALTH_SAC_KEY,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_STEALTH, MUT_NO_STEALTH,
   "sacrifice your ability to go unnoticed",
   "sacrificed stealth",
 
-  20,
+  15,
   SK_STEALTH,
-  false,
+  nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_ARTIFICE, MUT_NO_ARTIFICE,
   "sacrifice all use of magical tools",
   "sacrificed evocations",
 
-  60,
+  70,
   SK_EVOCATIONS,
-  false,
+  nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_LOVE, MUT_NO_LOVE,
   "sacrifice your ability to be loved",
   "sacrificed love",
 
-  20,
+  22,
   SK_NONE,
-  false,
+  nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_COURAGE, MUT_COWARDICE,
@@ -79,42 +110,87 @@ static const sacrifice_def sac_data[] =
 
   25,
   SK_NONE,
-  false,
+  nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_ARCANA, MUT_NON_MUTATION,
-  "Ru asks you to sacrifice all use of",
+  "sacrifice all use of",
   "sacrificed arcana",
 
   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",
 
-  20,
+  30,
   SK_DODGING,
-  false,
+  nullptr,
+  nullptr,
 },
 
 { ABIL_RU_SACRIFICE_DURABILITY, MUT_NO_ARMOUR,
-  "sacrifice your ability to wear armour well",
+  "sacrifice your Armour skill",
   "sacrificed armour",
 
-  20,
+  30,
   SK_ARMOUR,
-  false,
+  nullptr,
+  []() { return you_can_wear(EQ_BODY_ARMOUR) != MB_FALSE; },
 },
 
 { ABIL_RU_SACRIFICE_HAND, MUT_MISSING_HAND,
-  "sacrifice one of your",
+  "sacrifice one of your ",
   "sacrificed a hand",
 
   70,
   SK_SHIELDS,
-  false,
+  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,
 },
 };