diff --git a/Assemblies/Vampire.dll b/Assemblies/Vampire.dll index d6842f3..74135e4 100644 Binary files a/Assemblies/Vampire.dll and b/Assemblies/Vampire.dll differ diff --git a/Source/Vampires/Components/CompVampire.cs b/Source/Vampires/Components/CompVampire.cs index ade80b4..945202f 100644 --- a/Source/Vampires/Components/CompVampire.cs +++ b/Source/Vampires/Components/CompVampire.cs @@ -478,9 +478,7 @@ public void InitializeVampirism(Pawn newSire, BloodlineDef newBloodline = null, bool firstVampire = false) { //Log.Message("Init"); - AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x is HediffVampirism_VampGiver); - AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Malnutrition); - AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x is Hediff_Addiction); + VampireGen.RemoveMortalHediffs(AbilityUser); VampireGen.TryGiveVampirismHediff(AbilityUser, newGeneration, newBloodline, newSire, firstVampire); if (!firstVampire) { @@ -516,6 +514,8 @@ public void InitializeVampirism(Pawn newSire, BloodlineDef newBloodline = null, this.Blood.CurBloodPoints = this.Blood.MaxBloodPoints; } + + public override void CompTick() { base.CompTick(); diff --git a/Source/Vampires/Disciplines/Vampirism/DisciplineEffect_VampiricHealing.cs b/Source/Vampires/Disciplines/Vampirism/DisciplineEffect_VampiricHealing.cs index 734fe44..b04c8f7 100644 --- a/Source/Vampires/Disciplines/Vampirism/DisciplineEffect_VampiricHealing.cs +++ b/Source/Vampires/Disciplines/Vampirism/DisciplineEffect_VampiricHealing.cs @@ -7,6 +7,7 @@ public class DisciplineEffect_VampiricHealing : Verb_UseAbilityPawnEffect public override void Effect(Pawn target) { base.Effect(target); + VampireGen.RemoveMortalHediffs(target); VampireUtility.Heal(target); } } diff --git a/Source/Vampires/Utilities/VampireGen.cs b/Source/Vampires/Utilities/VampireGen.cs index 34704a6..44024ee 100644 --- a/Source/Vampires/Utilities/VampireGen.cs +++ b/Source/Vampires/Utilities/VampireGen.cs @@ -100,6 +100,32 @@ public static Pawn GenerateVampire(int generation, BloodlineDef bloodline, Pawn //TryGiveVampirismHediff(pawn, generation, bloodline, sire, firstVampire); return pawn; } + + /// + /// It's best to clear all of these when a vampire is initialized. + /// + public static void RemoveMortalHediffs(Pawn AbilityUser) + { + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x is HediffVampirism_VampGiver); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Malnutrition); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x is Hediff_Addiction); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.BadBack); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Asthma); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Cataract); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Carcinoma); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Flu); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.FoodPoisoning); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Frail); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Heatstroke); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Hypothermia); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Hangover); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Plague); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Blindness); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.Malaria); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.ResurrectionPsychosis); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.ResurrectionSickness); + AbilityUser.health.hediffSet.hediffs.RemoveAll(x => x.def == HediffDefOf.WoundInfection); + } } }