Example #1
0
 /// <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);
 }
Example #2
0
 /// <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);
 }
Example #3
0
 /// <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);
 }
Example #4
0
 /// <summary>Do something when the effect first hits.</summary>
 /// <param name="target">Unit that is affected.</param>
 public virtual void OnHit(CombatUnitStats target)
 {
 }
Example #5
0
 ///<summary>Apply currentHealth from combatUnit to worldUnit.</summary>
 public void TransferNewStats(CombatUnitStats newStats)
 {
     this.CurrentHealth = newStats.CurrentHealth;
     // other stats ...
 }
Example #6
0
 ///<summary>After combat, clean up class.</summary>
 public void OnCombatEnd()
 {
     worldStats.TransferNewStats(combatStats);
     combatStats.OnCombatEnd();
     combatStats = null;
 }