Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/entityExtend.js
var PETRA = function(m) | var PETRA = function(m) | ||||
{ | { | ||||
/** returns true if this unit should be considered as a siege unit */ | |||||
m.isSiegeUnit = function(ent) | |||||
{ | |||||
return ent.hasClass("Siege") || (ent.hasClass("Elephant") && ent.hasClass("Champion")); | |||||
}; | |||||
/** returns some sort of DPS * health factor. If you specify a class, it'll use the modifiers against that class too. */ | /** returns some sort of DPS * health factor. If you specify a class, it'll use the modifiers against that class too. */ | ||||
m.getMaxStrength = function(ent, againstClass) | m.getMaxStrength = function(ent, againstClass) | ||||
{ | { | ||||
let strength = 0; | let strength = 0; | ||||
let attackTypes = ent.attackTypes(); | let attackTypes = ent.attackTypes(); | ||||
if (!attackTypes) | if (!attackTypes) | ||||
return strength; | return strength; | ||||
▲ Show 20 Lines • Show All 303 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator