Differential D1159 Diff 4831 ps/trunk/binaries/data/mods/public/simulation/ai/petra/attackManager.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/ai/petra/attackManager.js
Show All 24 Lines | |||||
m.AttackManager.prototype.init = function(gameState) | m.AttackManager.prototype.init = function(gameState) | ||||
{ | { | ||||
this.outOfPlan = gameState.getOwnUnits().filter(API3.Filters.byMetadata(PlayerID, "plan", -1)); | this.outOfPlan = gameState.getOwnUnits().filter(API3.Filters.byMetadata(PlayerID, "plan", -1)); | ||||
this.outOfPlan.registerUpdates(); | this.outOfPlan.registerUpdates(); | ||||
}; | }; | ||||
m.AttackManager.prototype.setRushes = function(allowed) | m.AttackManager.prototype.setRushes = function(allowed) | ||||
{ | { | ||||
if (this.Config.personality.aggressive > 0.8 && allowed > 2) | if (this.Config.personality.aggressive > this.Config.personalityCut.strong && allowed > 2) | ||||
{ | { | ||||
this.maxRushes = 3; | this.maxRushes = 3; | ||||
this.rushSize = [ 16, 20, 24 ]; | this.rushSize = [ 16, 20, 24 ]; | ||||
} | } | ||||
else if (this.Config.personality.aggressive > 0.6 && allowed > 1) | else if (this.Config.personality.aggressive > this.Config.personalityCut.medium && allowed > 1) | ||||
{ | { | ||||
this.maxRushes = 2; | this.maxRushes = 2; | ||||
this.rushSize = [ 18, 22 ]; | this.rushSize = [ 18, 22 ]; | ||||
} | } | ||||
else if (this.Config.personality.aggressive > 0.3 && allowed > 0) | else if (this.Config.personality.aggressive > this.Config.personalityCut.weak && allowed > 0) | ||||
{ | { | ||||
this.maxRushes = 1; | this.maxRushes = 1; | ||||
this.rushSize = [ 20 ]; | this.rushSize = [ 20 ]; | ||||
} | } | ||||
}; | }; | ||||
m.AttackManager.prototype.checkEvents = function(gameState, events) | m.AttackManager.prototype.checkEvents = function(gameState, events) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 727 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator