Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/config.js
var PETRA = function(m) | (function(m) | ||||
{ | { | ||||
m.Config = function(difficulty, behavior) | m.Config = function(difficulty, behavior) | ||||
{ | { | ||||
// 0 is sandbox, 1 is very easy, 2 is easy, 3 is medium, 4 is hard and 5 is very hard. | // 0 is sandbox, 1 is very easy, 2 is easy, 3 is medium, 4 is hard and 5 is very hard. | ||||
this.difficulty = difficulty !== undefined ? difficulty : 3; | this.difficulty = difficulty !== undefined ? difficulty : 3; | ||||
// for instance "balanced", "aggressive" or "defensive" | // for instance "balanced", "aggressive" or "defensive" | ||||
Show All 31 Lines | m.Config = function(difficulty, behavior) | ||||
this.Defense = | this.Defense = | ||||
{ | { | ||||
"defenseRatio": { "ally": 1.4, "neutral": 1.8, "own": 2 }, // ratio of defenders/attackers. | "defenseRatio": { "ally": 1.4, "neutral": 1.8, "own": 2 }, // ratio of defenders/attackers. | ||||
"armyCompactSize": 2000, // squared. Half-diameter of an army. | "armyCompactSize": 2000, // squared. Half-diameter of an army. | ||||
"armyBreakawaySize": 3500, // squared. | "armyBreakawaySize": 3500, // squared. | ||||
"armyMergeSize": 1400 // squared. | "armyMergeSize": 1400 // squared. | ||||
}; | }; | ||||
// Additional buildings that the AI does not yet know when to build | // Additional buildings that the AI does not yet know when to build | ||||
// and that it will try to build on phase 3 when enough resources. | // and that it will try to build on phase 3 when enough resources. | ||||
this.buildings = | this.buildings = | ||||
{ | { | ||||
"default": [], | "default": [], | ||||
"athen": ["structures/{civ}_gymnasion", "structures/{civ}_prytaneion", | "athen": ["structures/{civ}_gymnasion", "structures/{civ}_prytaneion", | ||||
"structures/{civ}_theatron", "structures/{civ}_royal_stoa"], | "structures/{civ}_theatron", "structures/{civ}_royal_stoa"], | ||||
"brit": ["structures/{civ}_rotarymill"], | "brit": ["structures/{civ}_rotarymill"], | ||||
"cart": ["structures/{civ}_embassy_celtic", "structures/{civ}_embassy_iberian", | "cart": ["structures/{civ}_embassy_celtic", "structures/{civ}_embassy_iberian", | ||||
▲ Show 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
m.Config.prototype.Deserialize = function(data) | m.Config.prototype.Deserialize = function(data) | ||||
{ | { | ||||
for (let key in data) | for (let key in data) | ||||
this[key] = data[key]; | this[key] = data[key]; | ||||
}; | }; | ||||
return m; | }(PETRA)); | ||||
}(PETRA); |
Wildfire Games · Phabricator