Example #1
0
 private bool CheckAttackSpeed(UnitLoader attacker, UnitLoader defender)
 {
     if (attacker.CombatStatistics().attackSpeed > defender.CombatStatistics().attackSpeed + 5)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #2
0
    private bool CritRoll(UnitLoader unit)
    {
        int roll = Random.Range(0, 99);

        if (roll > unit.CombatStatistics().crit)
        {
            return(false);
        }

        else
        {
            return(true);
        }
    }
Example #3
0
 private int Critical(UnitLoader attacker, UnitLoader defender)
 {
     return(attacker.CombatStatistics().attack * 2 - defender.CombatStatistics().protection);
 }
Example #4
0
 public int Hit(UnitLoader attacker, UnitLoader defender)
 {
     return(attacker.CombatStatistics().attack - defender.CombatStatistics().protection);
 }