public override void End() { base.End(); // Refresh head texture after effect ends DaggerfallUI.RefreshLargeHUDHeadTexture(); }
public override void Resume(EntityEffectManager.EffectSaveData_v1 effectData, EntityEffectManager manager, DaggerfallEntityBehaviour caster = null) { base.Resume(effectData, manager, caster); // Refresh head texture after effect resumes DaggerfallUI.RefreshLargeHUDHeadTexture(); }
public override void Start(EntityEffectManager manager, DaggerfallEntityBehaviour caster = null) { base.Start(manager, caster); // Create compound lycanthrope race from birth race CreateCompoundRace(); // Get infection type from stage one disease // Note: Classic save import will start this effect and set correct type after load LycanthropyInfection infection = (LycanthropyInfection)GameManager.Instance.PlayerEffectManager.FindIncumbentEffect <LycanthropyInfection>(); if (infection != null) { infectionType = infection.InfectionType; } // Considered sated on first start UpdateSatiation(); // Our transformation is complete - cure everything on player (including stage one disease) GameManager.Instance.PlayerEffectManager.CureAll(); // Refresh head texture after effect starts DaggerfallUI.RefreshLargeHUDHeadTexture(); }
public override void Start(EntityEffectManager manager, DaggerfallEntityBehaviour caster = null) { base.Start(manager, caster); // Create compound vampire race from birth race CreateCompoundRace(); // Get vampire clan from stage one disease // Otherwise start as Lyrezi by default if no infection found // Note: Classic save import will start this effect and set correct clan after load VampirismInfection infection = (VampirismInfection)GameManager.Instance.PlayerEffectManager.FindIncumbentEffect <VampirismInfection>(); if (infection != null) { vampireClan = infection.InfectionVampireClan; } // Considered well fed on first start UpdateSatiation(); // Our dark transformation is complete - cure everything on player (including stage one disease) GameManager.Instance.PlayerEffectManager.CureAll(); // Refresh head texture after effect starts DaggerfallUI.RefreshLargeHUDHeadTexture(); }
public virtual void MorphSelf(bool forceMorph = false) { // Do transformation between forms if (!isTransformed) { // Observe 24 hour cooldown on shapechange into beast form unless a full moon is forcing change // Player can always cast to exit beast form or with no restrictions while wearing Hircine's Ring if (!CanCastMorphSelf() && !forceMorph) { string canOnlyCastOncePerDay = TextManager.Instance.GetLocalizedText("canOnlyCastOncePerDay"); DaggerfallUI.MessageBox(canOnlyCastOncePerDay); return; } isTransformed = true; // Unequip any items held in hands GameManager.Instance.PlayerEntity.ItemEquipTable.UnequipItem(EquipSlots.RightHand); GameManager.Instance.PlayerEntity.ItemEquipTable.UnequipItem(EquipSlots.LeftHand); // Set race name based on infection type if (infectionType == LycanthropyTypes.Werewolf) { compoundRace.Name = TextManager.Instance.GetLocalizedText("werewolf"); } else if (infectionType == LycanthropyTypes.Wereboar) { compoundRace.Name = TextManager.Instance.GetLocalizedText("wereboar"); } else { compoundRace.Name = GameManager.Instance.PlayerEntity.BirthRaceTemplate.Name; } // Initialise move sound timer InitMoveSoundTimer(); } else { isTransformed = false; // Restore birth race name compoundRace.Name = GameManager.Instance.PlayerEntity.BirthRaceTemplate.Name; } // Classic heals player to full each time they transform // Not sure if intentional and definitely exploitable during full moons // One of those cases where implementing like classic and open to review later GameManager.Instance.PlayerEntity.CurrentHealth = GameManager.Instance.PlayerEntity.MaxHealth; // Store time whenever cast lastCastMorphSelf = DaggerfallUnity.Instance.WorldTime.DaggerfallDateTime.ToClassicDaggerfallTime(); // Refresh head texture after transform DaggerfallUI.RefreshLargeHUDHeadTexture(); }
public override void End() { base.End(); // Get peered entity gameobject DaggerfallEntityBehaviour entityBehaviour = GetPeeredEntityBehaviour(manager); if (!entityBehaviour) { return; } // Remove player metal immunity entityBehaviour.Entity.MinMetalToHit = WeaponMaterialTypes.Iron; // Refresh head texture after effect ends DaggerfallUI.RefreshLargeHUDHeadTexture(); }