1 #pragma once 2 3 struct sacrifice_def 4 { 5 ability_type sacrifice; // The ability that executes the sacrifice. 6 mutation_type mutation; // The mutation that will be inflicted. 7 // See also god-abil.cc:sacrifice_vector_map. 8 const char* sacrifice_text; // Format: "sacrifice your hand" 9 // in case of variable sacrifices or sac 10 // hand, this will be extended later 11 const char* milestone_text; // Format: "sacrificed <foo>" 12 // in case of variable sacrifices this will 13 // be extended later 14 int base_piety; // The piety that will be gained, modified 15 // by the skill points in the skill below. 16 skill_type sacrifice_skill; // This skill will be eliminated. 17 const char* sacrifice_vector; // This is used for sacrifices which give 18 // multiple mutations. It is a key into 19 // you.props, yielding a list of mutations 20 // granted by the sacrifice. 21 bool (*valid)(); // Whether the sacrifice is currently an 22 // valid choice for Ru to offer. Only 23 // checks factors specific to this 24 // sacrifice, not general checks. 25 }; 26 27 static const sacrifice_def sac_data[] = 28 { 29 30 { ABIL_RU_SACRIFICE_PURITY, MUT_NON_MUTATION, 31 "corrupt yourself such that", 32 "sacrificed purity", 33 34 0, 35 SK_NONE, 36 PURITY_SAC_KEY, 37 nullptr, 38 }, 39 40 { ABIL_RU_SACRIFICE_WORDS, MUT_READ_SAFETY, 41 "sacrifice your ability to read while threatened", 42 "sacrificed words", 43 44 30, 45 SK_NONE, 46 nullptr, 47 nullptr, 48 }, 49 50 { ABIL_RU_SACRIFICE_DRINK, MUT_DRINK_SAFETY, 51 "sacrifice your ability to drink while threatened", 52 "sacrificed drink", 53 54 30, 55 SK_NONE, 56 nullptr, 57 []() { return !you.has_mutation(MUT_NO_DRINK); }, 58 }, 59 60 { ABIL_RU_SACRIFICE_ESSENCE, MUT_NON_MUTATION, 61 "corrupt yourself such that", 62 "sacrificed essence", 63 64 0, 65 SK_NONE, 66 ESSENCE_SAC_KEY, 67 nullptr, 68 }, 69 70 { ABIL_RU_SACRIFICE_HEALTH, MUT_NON_MUTATION, 71 "corrupt yourself such that", 72 "sacrificed health", 73 74 25, 75 SK_NONE, 76 HEALTH_SAC_KEY, 77 nullptr, 78 }, 79 80 { ABIL_RU_SACRIFICE_STEALTH, MUT_NO_STEALTH, 81 "sacrifice your ability to go unnoticed", 82 "sacrificed stealth", 83 84 15, 85 SK_STEALTH, 86 nullptr, 87 nullptr, 88 }, 89 90 { ABIL_RU_SACRIFICE_ARTIFICE, MUT_NO_ARTIFICE, 91 "sacrifice all use of magical tools", 92 "sacrificed evocations", 93 94 55, 95 SK_EVOCATIONS, 96 nullptr, 97 nullptr, 98 }, 99 100 { ABIL_RU_SACRIFICE_LOVE, MUT_NO_LOVE, 101 "sacrifice your ability to be loved", 102 "sacrificed love", 103 104 40, 105 SK_SUMMONINGS, 106 nullptr, 107 nullptr, 108 }, 109 110 { ABIL_RU_SACRIFICE_COURAGE, MUT_COWARDICE, 111 "sacrifice your courage", 112 "sacrificed courage", 113 114 25, 115 SK_NONE, 116 nullptr, 117 nullptr, 118 }, 119 120 { ABIL_RU_SACRIFICE_ARCANA, MUT_NON_MUTATION, 121 "sacrifice all use of", 122 "sacrificed arcana", 123 124 25, 125 SK_NONE, 126 ARCANA_SAC_KEY, 127 []() { return !_player_sacrificed_arcana(); }, 128 }, 129 130 { ABIL_RU_SACRIFICE_NIMBLENESS, MUT_NO_DODGING, 131 "sacrifice your Dodging skill", 132 "sacrificed dodging", 133 134 30, 135 SK_DODGING, 136 nullptr, 137 nullptr, 138 }, 139 140 { ABIL_RU_SACRIFICE_DURABILITY, MUT_NO_ARMOUR_SKILL, 141 "sacrifice your Armour skill", 142 "sacrificed armour", 143 144 30, 145 SK_ARMOUR, 146 nullptr, 147 nullptr, 148 }, 149 150 { ABIL_RU_SACRIFICE_HAND, MUT_MISSING_HAND, 151 "sacrifice one of your ", 152 "sacrificed a hand", 153 154 65, 155 SK_SHIELDS, 156 nullptr, 157 nullptr, 158 }, 159 160 { ABIL_RU_SACRIFICE_EXPERIENCE, MUT_INEXPERIENCED, 161 "sacrifice your experiences", 162 "sacrificed experience", 163 164 40, 165 SK_NONE, 166 nullptr, 167 []() { return you.experience_level > RU_SAC_XP_LEVELS; } 168 }, 169 170 { ABIL_RU_SACRIFICE_SKILL, MUT_UNSKILLED, 171 "sacrifice your skill", 172 "sacrificed skill", 173 174 30, 175 SK_NONE, 176 nullptr, 177 nullptr, 178 }, 179 180 { ABIL_RU_SACRIFICE_EYE, MUT_MISSING_EYE, 181 "sacrifice an eye", 182 "sacrificed an eye", 183 184 20, 185 SK_NONE, 186 nullptr, 187 nullptr, 188 }, 189 190 { ABIL_RU_SACRIFICE_RESISTANCE, MUT_TEMPERATURE_SENSITIVITY, 191 "sacrifice your resistance to extreme temperatures", 192 "sacrificed resistance", 193 194 50, 195 SK_NONE, 196 nullptr, 197 nullptr, 198 }, 199 }; 200