/// <summary>Do something when the unit is about to use any defense.</summary> /// <param name="target">Unit that is affected.</param> /// <returns>Target is allowed to procede with it's defensive ability?</returns> public virtual bool OnDefend(CombatUnitStats target) { return(true); }
/// <summary>Do something when the unit is about to use any attack.</summary> /// <param name="target">Unit that is affected.</param> /// <returns>Target is allowed to procede with it's attack?</returns> public virtual bool OnAttack(CombatUnitStats target) { return(true); }
/// <summary>Do something on any round of the effect duration. Use "turnCount" to apply effects at specific rounds. Please call "Base Function" when overwriting this method.</summary> /// <param name="target">Unit that is affected.</param> /// <returns>Target is allowed to procede with it's turn?</returns> public virtual bool OnAnyRound(CombatUnitStats target) { turnCount++; return(true); }
/// <summary>Do something when the effect first hits.</summary> /// <param name="target">Unit that is affected.</param> public virtual void OnHit(CombatUnitStats target) { }
///<summary>Apply currentHealth from combatUnit to worldUnit.</summary> public void TransferNewStats(CombatUnitStats newStats) { this.CurrentHealth = newStats.CurrentHealth; // other stats ... }
///<summary>After combat, clean up class.</summary> public void OnCombatEnd() { worldStats.TransferNewStats(combatStats); combatStats.OnCombatEnd(); combatStats = null; }