//skill at fight vs defender float FightScore(Critter defender) { float off = GetThreatScore(); float def = defender.GetdefenseThreat(); float killProb = (off - def) / (2 * (off + def)); killProb += .5f; return killProb; }
public float GetHunterThreat(Critter defender) { float ratio = 0; float attackerScore = GetThreatScore(); float defenderScore = defender.GetdefenseThreat(); ratio = (attackerScore * .5f) / defenderScore; ratio *= AptitudeCheck(defender); if(ratio < 0){ ratio = 0; } if(ratio > 1){ ratio = 1; } return ratio; }