Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/ai/petra/defenseArmy.js
Show First 20 Lines • Show All 487 Lines • ▼ Show 20 Lines | if (ent.hasClass("Structure")) | ||||
else // small strength used only when we try to recover capture points | else // small strength used only when we try to recover capture points | ||||
entStrength = 2; | entStrength = 2; | ||||
} | } | ||||
else | else | ||||
entStrength = PETRA.getMaxStrength(ent, this.Config.debug, this.Config.DamageTypeImportance); | entStrength = PETRA.getMaxStrength(ent, this.Config.debug, this.Config.DamageTypeImportance); | ||||
// TODO adapt the getMaxStrength function for animals. | // TODO adapt the getMaxStrength function for animals. | ||||
// For the time being, just increase it for elephants as the returned value is too small. | // For the time being, just increase it for elephants as the returned value is too small. | ||||
if (ent.hasClass("Animal") && ent.hasClass("Elephant")) | if (ent.hasClasses(["Animal+Elephant"])) | ||||
entStrength *= 3; | entStrength *= 3; | ||||
if (remove) | if (remove) | ||||
entStrength *= -1; | entStrength *= -1; | ||||
if (isOwn) | if (isOwn) | ||||
this.ownStrength += entStrength; | this.ownStrength += entStrength; | ||||
else | else | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator