Differential D1890 Diff 8255 ps/trunk/binaries/data/mods/public/maps/random/jebel_barkal_triggers.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/maps/random/jebel_barkal_triggers.js
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | |||||
var scaleByMapSize = (min, max) => min + (max - min) * (TriggerHelper.GetMapSizeTiles() - 128) / (512 - 128); | var scaleByMapSize = (min, max) => min + (max - min) * (TriggerHelper.GetMapSizeTiles() - 128) / (512 - 128); | ||||
/** | /** | ||||
* Defensive Infantry units patrol along the paths of the city. | * Defensive Infantry units patrol along the paths of the city. | ||||
*/ | */ | ||||
var jebelBarkal_cityPatrolGroup_count = time => TriggerHelper.GetMapSizeTiles() > 192 ? scaleByTime(time, 3, scaleByMapSize(3, 10)) : 0; | var jebelBarkal_cityPatrolGroup_count = time => TriggerHelper.GetMapSizeTiles() > 192 ? scaleByTime(time, 3, scaleByMapSize(3, 10)) : 0; | ||||
var jebelBarkal_cityPatrolGroup_interval = time => scaleByTime(time, 5, 3); | var jebelBarkal_cityPatrolGroup_interval = time => scaleByTime(time, 5, 3); | ||||
var jebelBarkal_cityPatrolGroup_balancing = { | var jebelBarkal_cityPatrolGroup_balancing = { | ||||
"buildingClasses": ["Wonder", "Temple", "CivCentre", "Fortress", "Barracks+!Stables", "Embassy"], | "buildingClasses": ["Wonder", "Temple", "CivCentre", "Fortress", "Barracks", "Embassy"], | ||||
"unitCount": time => Math.min(20, scaleByTime(time, 10, 45)), | "unitCount": time => Math.min(20, scaleByTime(time, 10, 45)), | ||||
"unitComposition": (time, heroes) => [ | "unitComposition": (time, heroes) => [ | ||||
{ | { | ||||
"templates": jebelBarkal_templates.champion_infantry_melee, | "templates": jebelBarkal_templates.champion_infantry_melee, | ||||
"frequency": scaleByTime(time, 0, 2) | "frequency": scaleByTime(time, 0, 2) | ||||
}, | }, | ||||
{ | { | ||||
"templates": jebelBarkal_templates.champion_infantry_ranged, | "templates": jebelBarkal_templates.champion_infantry_ranged, | ||||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
var jebelBarkal_buildingGarrison = difficulty => [ | var jebelBarkal_buildingGarrison = difficulty => [ | ||||
{ | { | ||||
"buildingClasses": ["Wonder", "Temple", "CivCentre", "Fortress"], | "buildingClasses": ["Wonder", "Temple", "CivCentre", "Fortress"], | ||||
"unitTemplates": jebelBarkal_templates.champions, | "unitTemplates": jebelBarkal_templates.champions, | ||||
"capacityRatio": 1 | "capacityRatio": 1 | ||||
}, | }, | ||||
{ | { | ||||
"buildingClasses": ["Barracks+!Stables", "Embassy"], | "buildingClasses": ["Barracks", "Embassy"], | ||||
"unitTemplates": [...jebelBarkal_templates.citizenSoldiers, ...jebelBarkal_templates.champions], | "unitTemplates": [...jebelBarkal_templates.citizenSoldiers, ...jebelBarkal_templates.champions], | ||||
"capacityRatio": 1 | "capacityRatio": 1 | ||||
}, | }, | ||||
{ | { | ||||
"buildingClasses": ["DefenseTower"], | "buildingClasses": ["DefenseTower"], | ||||
"unitTemplates": jebelBarkal_templates.champion_infantry, | "unitTemplates": jebelBarkal_templates.champion_infantry, | ||||
"capacityRatio": 1 | "capacityRatio": 1 | ||||
}, | }, | ||||
{ | { | ||||
"buildingClasses": ["ElephantStables"], | "buildingClasses": ["ElephantStable"], | ||||
"unitTemplates": jebelBarkal_templates.elephants, | "unitTemplates": jebelBarkal_templates.elephants, | ||||
"capacityRatio": 1 | "capacityRatio": 1 | ||||
}, | }, | ||||
{ | { | ||||
"buildingClasses": ["Stables"], | "buildingClasses": ["Stable"], | ||||
"unitTemplates": jebelBarkal_templates.champion_cavalry, | "unitTemplates": jebelBarkal_templates.champion_cavalry, | ||||
"capacityRatio": 1 | "capacityRatio": 1 | ||||
}, | }, | ||||
{ | { | ||||
"buildingClasses": ["House"], | "buildingClasses": ["House"], | ||||
"unitTemplates": [...jebelBarkal_templates.females, ...jebelBarkal_templates.healers], | "unitTemplates": [...jebelBarkal_templates.females, ...jebelBarkal_templates.healers], | ||||
"capacityRatio": 0.5 | "capacityRatio": 0.5 | ||||
▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | "unitComposition": (time, heroes) => [ | ||||
"templates": jebelBarkal_templates.citizenSoldiers, | "templates": jebelBarkal_templates.citizenSoldiers, | ||||
"frequency": scaleByTime(time, 1, 0) | "frequency": scaleByTime(time, 1, 0) | ||||
} | } | ||||
], | ], | ||||
"formations": jebelBarkal_formations, | "formations": jebelBarkal_formations, | ||||
"targetClasses": () => "Unit+!Ship" | "targetClasses": () => "Unit+!Ship" | ||||
}, | }, | ||||
{ | { | ||||
"buildingClasses": ["Stables"], | "buildingClasses": ["Stable"], | ||||
"unitCount": time => Math.min(30, scaleByTime(time, 0, 80)), | "unitCount": time => Math.min(30, scaleByTime(time, 0, 80)), | ||||
"unitComposition": (time, heroes) => [ | "unitComposition": (time, heroes) => [ | ||||
{ | { | ||||
"templates": jebelBarkal_templates.citizenSoldier_cavalry_melee, | "templates": jebelBarkal_templates.citizenSoldier_cavalry_melee, | ||||
"frequency": scaleByTime(time, 2, 0) | "frequency": scaleByTime(time, 2, 0) | ||||
}, | }, | ||||
{ | { | ||||
"templates": jebelBarkal_templates.champion_cavalry_melee, | "templates": jebelBarkal_templates.champion_cavalry_melee, | ||||
"frequency": scaleByTime(time, 0, 1) | "frequency": scaleByTime(time, 0, 1) | ||||
} | } | ||||
], | ], | ||||
"formations": jebelBarkal_formations, | "formations": jebelBarkal_formations, | ||||
"targetClasses": () => "Unit+!Ship" | "targetClasses": () => "Unit+!Ship" | ||||
}, | }, | ||||
{ | { | ||||
"buildingClasses": ["Barracks+!Stables", "Embassy"], | "buildingClasses": ["Barracks", "Embassy"], | ||||
"unitCount": time => Math.min(35, scaleByTime(time, 0, 70)), | "unitCount": time => Math.min(35, scaleByTime(time, 0, 70)), | ||||
"unitComposition": (time, heroes) => [ | "unitComposition": (time, heroes) => [ | ||||
{ | { | ||||
"templates": jebelBarkal_templates.citizenSoldier_infantry, | "templates": jebelBarkal_templates.citizenSoldier_infantry, | ||||
"frequency": 1 | "frequency": 1 | ||||
} | } | ||||
], | ], | ||||
"formations": jebelBarkal_formations, | "formations": jebelBarkal_formations, | ||||
"targetClasses": () => "Unit+!Ship" | "targetClasses": () => "Unit+!Ship" | ||||
}, | }, | ||||
{ | { | ||||
"buildingClasses": ["ElephantStables", "Wonder"], | "buildingClasses": ["ElephantStable", "Wonder"], | ||||
"unitCount": time => scaleByTime(time, 1, 14), | "unitCount": time => scaleByTime(time, 1, 14), | ||||
"unitComposition": (time, heroes) => [ | "unitComposition": (time, heroes) => [ | ||||
{ | { | ||||
"templates": jebelBarkal_templates.elephants, | "templates": jebelBarkal_templates.elephants, | ||||
"frequency": 1 | "frequency": 1 | ||||
} | } | ||||
], | ], | ||||
"formations": [], | "formations": [], | ||||
▲ Show 20 Lines • Show All 290 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator