creature_ptr->dis_to_a += creature_ptr->lev / 2 + 5;
}
- creature_ptr->slow_digest = TRUE;
creature_ptr->resist_fear = TRUE;
if (creature_ptr->lev > 19)
creature_ptr->resist_pois = TRUE;
case RACE_HALF_TROLL:
if (creature_ptr->lev > 14) {
creature_ptr->regenerate = TRUE;
- if (creature_ptr->pclass == CLASS_WARRIOR || creature_ptr->pclass == CLASS_BERSERKER) {
- creature_ptr->slow_digest = TRUE;
- /* Let's not make Regeneration
- * a disadvantage for the poor warriors who can
- * never learn a spell that satisfies hunger (actually
- * neither can rogues, but half-trolls are not
- * supposed to play rogues) */
- }
}
break;
case RACE_AMBERITE:
creature_ptr->resist_fire = TRUE;
break;
case RACE_GOLEM:
- creature_ptr->slow_digest = TRUE;
creature_ptr->resist_pois = TRUE;
break;
case RACE_SKELETON:
break;
case RACE_ZOMBIE:
creature_ptr->resist_neth = TRUE;
- creature_ptr->resist_pois = TRUE;
creature_ptr->slow_digest = TRUE;
if (creature_ptr->lev > 4)
creature_ptr->resist_cold = TRUE;
case RACE_SPECTRE:
creature_ptr->resist_neth = TRUE;
creature_ptr->resist_pois = TRUE;
- creature_ptr->slow_digest = TRUE;
creature_ptr->resist_cold = TRUE;
creature_ptr->pass_wall = TRUE;
break;
creature_ptr->resist_conf = TRUE;
break;
case RACE_ANDROID:
- creature_ptr->slow_digest = TRUE;
creature_ptr->resist_pois = TRUE;
break;
case RACE_MERFOLK:
}
if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
- creature_ptr->slow_digest = TRUE;
- creature_ptr->regenerate = TRUE;
+ creature_ptr->levitation = TRUE;
}
if (creature_ptr->magicdef) {
- creature_ptr->levitation = TRUE;
}
if (creature_ptr->riding) {
o_ptr = &creature_ptr->inventory_list[i];
if (!o_ptr->k_idx)
continue;
-
object_flags(creature_ptr, o_ptr, flgs);
if (have_flag(flgs, TR_LEVITATION))
creature_ptr->levitation = TRUE;
creature_ptr->can_swim = TRUE;
}
}
+
+void have_slow_digest(player_type *creature_ptr)
+{
+ object_type *o_ptr;
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
+ creature_ptr->slow_digest = FALSE;
+
+ if (creature_ptr->pclass == CLASS_NINJA) {
+ creature_ptr->slow_digest = TRUE;
+ }
+
+ if (creature_ptr->lev > 14 && !creature_ptr->mimic_form && creature_ptr->prace == RACE_HALF_TROLL) {
+ if (creature_ptr->pclass == CLASS_WARRIOR || creature_ptr->pclass == CLASS_BERSERKER) {
+ creature_ptr->slow_digest = TRUE;
+ /* Let's not make Regeneration
+ * a disadvantage for the poor warriors who can
+ * never learn a spell that satisfies hunger (actually
+ * neither can rogues, but half-trolls are not
+ * supposed to play rogues) */
+ }
+ }
+
+ if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
+ creature_ptr->slow_digest = TRUE;
+ }
+
+ if (!creature_ptr->mimic_form
+ && (creature_ptr->prace == RACE_GOLEM || creature_ptr->prace == RACE_ZOMBIE || creature_ptr->prace == RACE_SPECTRE
+ || creature_ptr->prace == RACE_ANDROID)) {
+ creature_ptr->slow_digest = TRUE;
+ }
+
+ for (int i = INVEN_RARM; i < INVEN_TOTAL; i++) {
+ o_ptr = &creature_ptr->inventory_list[i];
+ if (!o_ptr->k_idx)
+ continue;
+ object_flags(creature_ptr, o_ptr, flgs);
+ if (have_flag(flgs, TR_SLOW_DIGEST))
+ creature_ptr->slow_digest = TRUE;
+ }
+}
void have_sustain_chr(player_type *creature_ptr);
void have_levitation(player_type *creature_ptr);
void have_can_swim(player_type *creature_ptr);
+void have_slow_digest(player_type *creature_ptr);
creature_ptr->cursed = 0L;
creature_ptr->impact[0] = FALSE;
creature_ptr->impact[1] = FALSE;
- creature_ptr->slow_digest = FALSE;
creature_ptr->regenerate = FALSE;
creature_ptr->resist_acid = FALSE;
creature_ptr->resist_elec = FALSE;
have_sustain_chr(creature_ptr);
have_levitation(creature_ptr);
have_can_swim(creature_ptr);
+ have_slow_digest(creature_ptr);
calc_race_status(creature_ptr);
void calc_timelimit_status(player_type *creature_ptr)
{
if (creature_ptr->ult_res || (creature_ptr->special_defense & KATA_MUSOU)) {
- creature_ptr->slow_digest = TRUE;
creature_ptr->regenerate = TRUE;
creature_ptr->lite = TRUE;
creature_ptr->resist_acid = TRUE;
creature_ptr->cursed |= TRC_FAST_DIGEST;
if (have_flag(flgs, TR_SLOW_REGEN))
creature_ptr->cursed |= TRC_SLOW_REGEN;
- if (have_flag(flgs, TR_SLOW_DIGEST))
- creature_ptr->slow_digest = TRUE;
if (have_flag(flgs, TR_REGEN))
creature_ptr->regenerate = TRUE;