Adjust odds calculator
Groups will now engage in combat without needing an excessive advantage over the opposing force - 3:1 or even lower odds will be fine (a Krait assassin will sometimes attack a Cobra III, because of its high armament)
This commit is contained in:
parent
2a973dddd9
commit
2b7df8cce1
@ -2272,7 +2272,7 @@ this._setWeapons = function(ship,level)
|
||||
|
||||
this._setSkill = function(ship,bias)
|
||||
{
|
||||
level += this.$skillLevelBias;
|
||||
bias += this.$skillLevelBias;
|
||||
if (ship.autoWeapons && ship.accuracy < 5 && bias != 0)
|
||||
{
|
||||
// shift skill towards end of accuracy range
|
||||
|
@ -1420,7 +1420,7 @@ PriorityAIController.prototype.conditionCombatOddsTerrible = function()
|
||||
{
|
||||
if (this.getParameter("oolite_flag_surrendersEarly"))
|
||||
{
|
||||
return this.oddsAssessment() < 0.75;
|
||||
return this.oddsAssessment() < 0.65;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1437,20 +1437,20 @@ PriorityAIController.prototype.conditionCombatOddsBad = function()
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.oddsAssessment() < 0.75;
|
||||
return this.oddsAssessment() < 0.65;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PriorityAIController.prototype.conditionCombatOddsGood = function()
|
||||
{
|
||||
return this.oddsAssessment() >= 1.5;
|
||||
return this.oddsAssessment() >= 1.2;
|
||||
}
|
||||
|
||||
|
||||
PriorityAIController.prototype.conditionCombatOddsExcellent = function()
|
||||
{
|
||||
return this.oddsAssessment() >= 5.0;
|
||||
return this.oddsAssessment() >= 2.5;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3746,8 +3746,8 @@ static JSBool ShipThreatAssessment(JSContext *context, uintN argc, jsval *vp)
|
||||
OOJSReportBadArguments(context, @"Ship", @"threatAssessment", argc, OOJS_ARGV, nil, @"boolean");
|
||||
return NO;
|
||||
}
|
||||
// start with 1 per ship
|
||||
double assessment = 1;
|
||||
// start with 2.5 per ship
|
||||
double assessment = 2.5;
|
||||
// +/- 0.1 for speed, larger subtraction for very slow ships
|
||||
GLfloat maxspeed = [thisEnt maxFlightSpeed];
|
||||
assessment += (maxspeed-300)/1000;
|
||||
@ -3801,14 +3801,14 @@ static JSBool ShipThreatAssessment(JSContext *context, uintN argc, jsval *vp)
|
||||
}
|
||||
else
|
||||
{
|
||||
assessment += [thisEnt accuracy]/10;
|
||||
assessment += [thisEnt accuracy]/5;
|
||||
}
|
||||
|
||||
// check lasers
|
||||
OOWeaponType wt = [thisEnt weaponTypeIDForFacing:WEAPON_FACING_FORWARD strict:NO];
|
||||
if (wt == WEAPON_NONE)
|
||||
{
|
||||
assessment -= 1;
|
||||
assessment -= 2.5; // cancel base ship danger
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3850,7 +3850,7 @@ static JSBool ShipThreatAssessment(JSContext *context, uintN argc, jsval *vp)
|
||||
assessment *= 1.5;
|
||||
if ([thisEnt hasRole:@"thargoid-mothership"])
|
||||
{
|
||||
assessment += 2.5;
|
||||
assessment += 5;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -3863,7 +3863,7 @@ static JSBool ShipThreatAssessment(JSContext *context, uintN argc, jsval *vp)
|
||||
else
|
||||
{
|
||||
// and more than one trick if they can mount multiple lasers
|
||||
assessment += 0.75;
|
||||
assessment += 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3898,7 +3898,7 @@ static double ShipThreatAssessmentWeapon(OOWeaponType wt)
|
||||
case WEAPON_PULSE_LASER:
|
||||
return 0;
|
||||
case WEAPON_BEAM_LASER:
|
||||
return 0.33;
|
||||
return 0.5;
|
||||
case WEAPON_MINING_LASER:
|
||||
return -0.5;
|
||||
case WEAPON_MILITARY_LASER:
|
||||
|
Loading…
x
Reference in New Issue
Block a user