Changeset View
Standalone View
binaries/data/mods/public/maps/random/danubius_triggers.js
// Ships respawn every few minutes, attack the closest warships, then patrol the sea. | // Ships respawn every few minutes, attack the closest warships, then patrol the sea. | ||||
// To prevent unlimited spawning of ships, no more than the amount of ships intended at a given time are spawned. | // To prevent unlimited spawning of ships, no more than the amount of ships intended at a given time are spawned. | ||||
// Ships are filled or refilled with new units. | // Ships are filled or refilled with new units. | ||||
// The number ships, number of units per ship, as well as ratio of siege engines, champion and heroes | // The number ships, number of units per ship, as well as ratio of siege engines, champion and heroes | ||||
Sandarac: `The number ships` -> `The number of ships`. | |||||
Not Done Inline ActionsFixed in rP19705 elexis: Fixed in rP19705 | |||||
// increases with time, while keeping an individual and randomized composition for each ship. | // increases with time, while keeping an individual and randomized composition for each ship. | ||||
// Each hero exists at most once per map. | // Each hero exists at most once per map. | ||||
// Every few minutes, equal amount of ships unload units at the sides of the river unless | // Every few minutes, equal amount of ships unload units at the sides of the river unless | ||||
// one side of the river was wiped from players. | // one side of the river was wiped from players. | ||||
// Siege engines attack defensive structures, units attack units then patrol that side of the river. | // Siege engines attack defensive structures, units attack units then patrol that side of the river. | ||||
const showDebugLog = false; | const showDebugLog = false; | ||||
Done Inline Actionsfalse, as FeXoR mentioned. Sandarac: false, as FeXoR mentioned. | |||||
var shipTemplate = "gaul_ship_trireme"; | var shipTemplate = "gaul_ship_trireme"; | ||||
var siegeTemplate = "gaul_mechanical_siege_ram"; | var siegeTemplate = "gaul_mechanical_siege_ram"; | ||||
var heroTemplates = [ | var heroTemplates = [ | ||||
"gaul_hero_britomartus", | "gaul_hero_britomartus", | ||||
"gaul_hero_vercingetorix", | "gaul_hero_vercingetorix", | ||||
"gaul_hero_brennus" | "gaul_hero_brennus" | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Notice if gaia becomes too strong, players will just turtle and try to outlast the players on the other side. | * Notice if gaia becomes too strong, players will just turtle and try to outlast the players on the other side. | ||||
* However we want interaction and fights between the teams. | * However we want interaction and fights between the teams. | ||||
* This can be accomplished by not wiping out players buildings entirely. | * This can be accomplished by not wiping out players buildings entirely. | ||||
*/ | */ | ||||
/** | /** | ||||
* Time in minutes between two consecutive waves spawned from the gaia civic centers, if they still exist. | |||||
*/ | |||||
var ccAttackerInterval = t => randFloat(6, 8); | |||||
/** | |||||
* Number of attackers spawned at a civic center at t minutes ingame time. | |||||
*/ | |||||
var ccAttackerCount = t => Math.min(20, Math.max(0, Math.round(t * 1.5))); | |||||
Done Inline ActionsExtra space. Sandarac: Extra space. | |||||
/** | |||||
* Time between two consecutive waves. | * Time between two consecutive waves. | ||||
*/ | */ | ||||
var shipRespawnTime = () => randFloat(8, 10); | var shipRespawnTime = () => randFloat(8, 10); | ||||
Not Done Inline ActionsRemoving the balancing changes again. Had hoped to get it in quicker (testing only one patch affecting teh balancing), but that's not the case. Going for cleaner diffs. elexis: Removing the balancing changes again. Had hoped to get it in quicker (testing only one patch… | |||||
Not Done Inline ActionsOkay. Sandarac: Okay. | |||||
/** | /** | ||||
* Limit of ships on the map when spawning them. | * Limit of ships on the map when spawning them. | ||||
* Have at least two ships, so that both sides will be visited. | * Have at least two ships, so that both sides will be visited. | ||||
*/ | */ | ||||
var shipCount = (t, numPlayers) => Math.max(2, Math.round(Math.min(1.5, t / 10) * numPlayers)); | var shipCount = (t, numPlayers) => Math.max(2, Math.round(Math.min(1.5, t / 10) * numPlayers)); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
var triggerPointShipSpawn = "A"; | var triggerPointShipSpawn = "A"; | ||||
var triggerPointShipPatrol = "B"; | var triggerPointShipPatrol = "B"; | ||||
var triggerPointUngarrisonLeft = "C"; | var triggerPointUngarrisonLeft = "C"; | ||||
var triggerPointUngarrisonRight = "D"; | var triggerPointUngarrisonRight = "D"; | ||||
var triggerPointLandPatrolLeft = "E"; | var triggerPointLandPatrolLeft = "E"; | ||||
var triggerPointLandPatrolRight = "F"; | var triggerPointLandPatrolRight = "F"; | ||||
var triggerPointCCAttackerPatrolLeft = "G"; | |||||
var triggerPointCCAttackerPatrolRight = "H"; | |||||
/** | /** | ||||
* Which playerID to use for the opposing gallic reinforcements. | * Which playerID to use for the opposing gallic reinforcements. | ||||
*/ | */ | ||||
var gaulPlayer = 0; | var gaulPlayer = 0; | ||||
Trigger.prototype.debugLog = function(txt) | Trigger.prototype.debugLog = function(txt) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | for (let template in unitCounts) | ||||
for (let newEnt of TriggerHelper.SpawnUnits(gaiaEnt, "units/" + template, unitCounts[template], gaulPlayer)) | for (let newEnt of TriggerHelper.SpawnUnits(gaiaEnt, "units/" + template, unitCounts[template], gaulPlayer)) | ||||
Engine.QueryInterface(gaiaEnt, IID_GarrisonHolder).Garrison(newEnt); | Engine.QueryInterface(gaiaEnt, IID_GarrisonHolder).Garrison(newEnt); | ||||
} | } | ||||
}; | }; | ||||
/** | /** | ||||
* Spawn units of the template at each gaia Civic Center and set them to defensive. | * Spawn units of the template at each gaia Civic Center and set them to defensive. | ||||
*/ | */ | ||||
Trigger.prototype.SpawnCCDefenders = function(gaiaEnts) | Trigger.prototype.SpawnInitialCCDefenders = function(gaiaEnts) | ||||
{ | { | ||||
this.debugLog("To defend CCs, spawning " + uneval(ccDefenders)); | this.debugLog("To defend CCs, spawning " + uneval(ccDefenders)); | ||||
for (let gaiaEnt of gaiaEnts) | for (let gaiaEnt of gaiaEnts) | ||||
{ | { | ||||
let cmpIdentity = Engine.QueryInterface(gaiaEnt, IID_Identity); | let cmpIdentity = Engine.QueryInterface(gaiaEnt, IID_Identity); | ||||
if (!cmpIdentity || !cmpIdentity.HasClass("CivCentre")) | if (!cmpIdentity || !cmpIdentity.HasClass("CivCentre")) | ||||
continue; | continue; | ||||
this.civicCenters.push(gaiaEnt); | |||||
for (let ccDefender of ccDefenders) | for (let ccDefender of ccDefenders) | ||||
for (let ent of TriggerHelper.SpawnUnits(gaiaEnt, ccDefender.template, ccDefender.count, gaulPlayer)) | for (let ent of TriggerHelper.SpawnUnits(gaiaEnt, ccDefender.template, ccDefender.count, gaulPlayer)) | ||||
Engine.QueryInterface(ent, IID_UnitAI).SwitchToStance("defensive"); | Engine.QueryInterface(ent, IID_UnitAI).SwitchToStance("defensive"); | ||||
} | } | ||||
}; | }; | ||||
Trigger.prototype.SpawnCCAttackers = function() | |||||
{ | |||||
let time = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer).GetTime() / 60 / 1000; | |||||
let mapSize = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain).GetTilesPerSide() * 4; | |||||
Done Inline ActionsWe now do this exact line twice in this file (refs D577). Sandarac: We now do this exact line twice in this file (refs D577). | |||||
Not Done Inline ActionsThanks for the patch elexis: Thanks for the patch | |||||
for (let gaiaCC of this.civicCenters) | |||||
{ | |||||
let toSpawn = this.GetAttackerComposition(ccAttackerCount(time), false); | |||||
this.debugLog("Spawning civic center attackers at " + gaiaCC + ": " + uneval(toSpawn)); | |||||
let ccAttackers = []; | |||||
for (let spawn of toSpawn) | |||||
{ | |||||
let ents = TriggerHelper.SpawnUnits(gaiaCC, "units/" + spawn.template, spawn.count, gaulPlayer); | |||||
if (spawn.hero && ents[0]) | |||||
this.heroes.push({ "template": spawn.template, "ent": ents[0] }); | |||||
ccAttackers = ccAttackers.concat(ents); | |||||
} | |||||
let patrolPointRef = Engine.QueryInterface(gaiaCC, IID_Position).GetPosition2D().x < mapSize / 2 ? | |||||
triggerPointCCAttackerPatrolLeft : | |||||
triggerPointCCAttackerPatrolRight; | |||||
this.AttackAndPatrol(ccAttackers, unitTargetClass, patrolPointRef, "CCAttackers", false); | |||||
} | |||||
if (this.civicCenters.length) | |||||
this.DoAfterDelay(ccAttackerInterval() * 60 * 1000, "SpawnCCAttackers", {}); | |||||
}; | |||||
/** | /** | ||||
* Remember most Humans present at the beginning of the match (before spawning any unit) and | * Remember most Humans present at the beginning of the match (before spawning any unit) and | ||||
* make them defensive. | * make them defensive. | ||||
*/ | */ | ||||
Trigger.prototype.StartCelticRitual = function(gaiaEnts) | Trigger.prototype.StartCelticRitual = function(gaiaEnts) | ||||
{ | { | ||||
for (let ent of gaiaEnts) | for (let ent of gaiaEnts) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | Trigger.prototype.SpawnShips = function() | ||||
this.DoAfterDelay(shipRespawnTime() * 60 * 1000, "SpawnShips", {}); | this.DoAfterDelay(shipRespawnTime() * 60 * 1000, "SpawnShips", {}); | ||||
let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); | let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); | ||||
cmpTimer.CancelTimer(this.fillShipsTimer); | cmpTimer.CancelTimer(this.fillShipsTimer); | ||||
this.FillShips(); | this.FillShips(); | ||||
}; | }; | ||||
Trigger.prototype.FillShips = function() | Trigger.prototype.GetAttackerComposition = function(attackerCount, addSiege) | ||||
{ | { | ||||
let time = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer).GetTime() / 60 / 1000; | let time = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer).GetTime() / 60 / 1000; | ||||
let attackerCount = attackersPerShip(time); | |||||
for (let ship of this.ships) | |||||
{ | |||||
let cmpGarrisonHolder = Engine.QueryInterface(ship, IID_GarrisonHolder); | |||||
if (!cmpGarrisonHolder) | |||||
continue; | |||||
let remainder = Math.max(0, attackerCount - cmpGarrisonHolder.GetEntities().length); | |||||
let toSpawn = []; | let toSpawn = []; | ||||
let remainder = attackerCount; | |||||
let siegeCount = Math.round(siegeRatio(time) * remainder); | let siegeCount = addSiege ? Math.round(siegeRatio(time) * remainder) : 0; | ||||
if (siegeCount) | if (siegeCount) | ||||
toSpawn.push({ "template": siegeTemplate, "count": siegeCount }); | toSpawn.push({ "template": siegeTemplate, "count": siegeCount }); | ||||
remainder -= siegeCount; | remainder -= siegeCount; | ||||
let heroTemplate = pickRandom(heroTemplates.filter(hTemp => this.heroes.every(hero => hTemp != hero.template))); | let heroTemplate = pickRandom(heroTemplates.filter(hTemp => this.heroes.every(hero => hTemp != hero.template))); | ||||
if (heroTemplate && remainder && randBool(heroProbability(time))) | if (heroTemplate && remainder && randBool(heroProbability(time))) | ||||
{ | { | ||||
toSpawn.push({ "template": heroTemplate, "count": 1, "hero": true }); | toSpawn.push({ "template": heroTemplate, "count": 1, "hero": true }); | ||||
--remainder; | --remainder; | ||||
} | } | ||||
let healerCount = Math.round(healerRatio(time) * remainder); | let healerCount = Math.round(healerRatio(time) * remainder); | ||||
if (healerCount) | if (healerCount) | ||||
toSpawn.push({ "template": healerTemplate, "count": healerCount }); | toSpawn.push({ "template": healerTemplate, "count": healerCount }); | ||||
remainder -= healerCount; | remainder -= healerCount; | ||||
let championCount = Math.round(championRatio(time) * remainder); | let championCount = Math.round(championRatio(time) * remainder); | ||||
let championTemplateCounts = this.RandomAttackerTemplates(championTemplates, championCount); | let championTemplateCounts = this.RandomAttackerTemplates(championTemplates, championCount); | ||||
for (let template in championTemplateCounts) | for (let template in championTemplateCounts) | ||||
Not Done Inline ActionsThis block and the next are very similar, but they are in the current version, fine I guess. Sandarac: This block and the next are very similar, but they are in the current version, fine I guess. | |||||
{ | { | ||||
let count = championTemplateCounts[template]; | let count = championTemplateCounts[template]; | ||||
toSpawn.push({ "template": template, "count": count }); | toSpawn.push({ "template": template, "count": count }); | ||||
championCount -= count; | championCount -= count; | ||||
remainder -= count; | remainder -= count; | ||||
} | } | ||||
let citizenTemplateCounts = this.RandomAttackerTemplates(citizenTemplates, remainder); | let citizenTemplateCounts = this.RandomAttackerTemplates(citizenTemplates, remainder); | ||||
for (let template in citizenTemplateCounts) | for (let template in citizenTemplateCounts) | ||||
{ | { | ||||
let count = citizenTemplateCounts[template]; | let count = citizenTemplateCounts[template]; | ||||
toSpawn.push({ "template": template, "count": count }); | toSpawn.push({ "template": template, "count": count }); | ||||
remainder -= count; | remainder -= count; | ||||
} | } | ||||
this.debugLog("Filling ship " + ship + " with " + uneval(toSpawn)); | |||||
if (remainder != 0) | if (remainder != 0) | ||||
warn("Didn't spawn as many attackers as were intended (" + remainder + " remaining)"); | warn("Didn't spawn as many attackers as were intended (" + remainder + " remaining)"); | ||||
Done Inline ActionsNot sure if this and the other warn in this file should actually be warns, may be better to use debugLog. Sandarac: Not sure if this and the other `warn` in this file should actually be warns, may be better to… | |||||
Not Done Inline ActionsThey should, because it would be an actual error in the code if the code logic doesn't do what it intends. Hence could even make this an error(). elexis: They should, because it would be an actual error in the code if the code logic doesn't do what… | |||||
Not Done Inline ActionsAlright. Sandarac: Alright. | |||||
return toSpawn; | |||||
}; | |||||
Trigger.prototype.FillShips = function() | |||||
{ | |||||
let time = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer).GetTime() / 60 / 1000; | |||||
Not Done Inline ActionsNew function? Sandarac: New function? | |||||
Not Done Inline ActionsGetAttackerComposition has been split from FillShips so that it can be reused for the civic center attackers. elexis: `GetAttackerComposition` has been split from `FillShips` so that it can be reused for the civic… | |||||
for (let ship of this.ships) | |||||
{ | |||||
let cmpGarrisonHolder = Engine.QueryInterface(ship, IID_GarrisonHolder); | |||||
if (!cmpGarrisonHolder) | |||||
continue; | |||||
let toSpawn = this.GetAttackerComposition(Math.max(0, attackersPerShip(time) - cmpGarrisonHolder.GetEntities().length), true); | |||||
this.debugLog("Filling ship " + ship + " with " + uneval(toSpawn)); | |||||
for (let spawn of toSpawn) | for (let spawn of toSpawn) | ||||
{ | { | ||||
// Don't use TriggerHelper.SpawnUnits here because that is too slow, | // Don't use TriggerHelper.SpawnUnits here because that is too slow, | ||||
// needlessly trying all spawn points near the ships footprint which all fail | // needlessly trying all spawn points near the ships footprint which all fail | ||||
for (let i = 0; i < spawn.count; ++i) | for (let i = 0; i < spawn.count; ++i) | ||||
{ | { | ||||
let ent = Engine.AddEntity("units/" + spawn.template); | let ent = Engine.AddEntity("units/" + spawn.template); | ||||
Engine.QueryInterface(ent, IID_Ownership).SetOwner(gaulPlayer); | Engine.QueryInterface(ent, IID_Ownership).SetOwner(gaulPlayer); | ||||
if (spawn.hero) | if (spawn.hero) | ||||
this.heroes.push({ "template": spawn.template, "ent": ent }); | this.heroes.push({ "template": spawn.template, "ent": ent }); | ||||
cmpGarrisonHolder.Garrison(ent); | cmpGarrisonHolder.Garrison(ent); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
this.fillShipsTimer = this.DoAfterDelay(shipFillInterval() * 60 * 1000, "FillShips", {}); | this.fillShipsTimer = this.DoAfterDelay(shipFillInterval() * 60 * 1000, "FillShips", {}); | ||||
}; | }; | ||||
/** | /** | ||||
* Attack the closest enemy ships around, then patrol the sea. | * Attack the closest enemy ships around, then patrol the sea. | ||||
*/ | */ | ||||
Trigger.prototype.AttackAndPatrol = function(attackers, targetClass, triggerPointRef, debugName) | Trigger.prototype.AttackAndPatrol = function(attackers, targetClass, triggerPointRef, debugName, attack = true) | ||||
{ | { | ||||
if (!attackers.length) | if (!attackers.length) | ||||
return; | return; | ||||
let allTargets = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager).GetNonGaiaEntities().filter(ent => { | let allTargets = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager).GetNonGaiaEntities().filter(ent => { | ||||
let cmpIdentity = Engine.QueryInterface(ent, IID_Identity); | let cmpIdentity = Engine.QueryInterface(ent, IID_Identity); | ||||
return cmpIdentity && MatchesClassList(cmpIdentity.GetClassesList(), targetClass); | return cmpIdentity && MatchesClassList(cmpIdentity.GetClassesList(), targetClass); | ||||
}); | }); | ||||
let targets = allTargets.sort((ent1, ent2) => | let targets = allTargets.sort((ent1, ent2) => | ||||
DistanceBetweenEntities(attackers[0], ent1) - DistanceBetweenEntities(attackers[0], ent2)).slice(0, targetCount); | DistanceBetweenEntities(attackers[0], ent1) - DistanceBetweenEntities(attackers[0], ent2)).slice(0, targetCount); | ||||
this.debugLog(debugName + " " + uneval(attackers) + " attack " + uneval(targets)); | this.debugLog(debugName + " " + uneval(attackers) + " attack " + uneval(targets)); | ||||
ProcessCommand(gaulPlayer, { | ProcessCommand(gaulPlayer, { | ||||
Done Inline ActionsWhy was this removed? Sandarac: Why was this removed? | |||||
Not Done Inline ActionsCommitted in rP19705 That was mentioned somewhere above in the description. It was a terrible decision in fact. The violent stance makes rams that just attacked the CC and got attacked by a spearman attack that spearman and all other units attacking it instead of finishing the job. The stance also makes ships stick to the shoreline more often (when being hit by a tower) instead of moving on with shiplife. elexis: Committed in rP19705
That was mentioned somewhere above in the description. It was a terrible… | |||||
"type": "stance", | "type": "stance", | ||||
"entities": attackers, | "entities": attackers, | ||||
"name": "violent", | "name": "violent", | ||||
"queued": true | "queued": true | ||||
}); | }); | ||||
if (attack) | |||||
for (let target of targets) | for (let target of targets) | ||||
ProcessCommand(gaulPlayer, { | ProcessCommand(gaulPlayer, { | ||||
"type": "attack", | "type": "attack", | ||||
"entities": attackers, | "entities": attackers, | ||||
"target": target, | "target": target, | ||||
"queued": true, | "queued": true, | ||||
"allowCapture": false | "allowCapture": false | ||||
}); | }); | ||||
let patrolTargets = shuffleArray(this.GetTriggerPoints(triggerPointRef)).slice(0, patrolCount); | let patrolTargets = shuffleArray(this.GetTriggerPoints(triggerPointRef)).slice(0, patrolCount); | ||||
this.debugLog(debugName + " " + uneval(attackers) + " patrol to " + uneval(patrolTargets)); | this.debugLog(debugName + " " + uneval(attackers) + " patrol to " + uneval(patrolTargets)); | ||||
for (let patrolTarget of patrolTargets) | for (let patrolTarget of patrolTargets) | ||||
{ | { | ||||
let pos = Engine.QueryInterface(patrolTarget, IID_Position).GetPosition2D(); | let pos = Engine.QueryInterface(patrolTarget, IID_Position).GetPosition2D(); | ||||
ProcessCommand(gaulPlayer, { | ProcessCommand(gaulPlayer, { | ||||
▲ Show 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | Trigger.prototype.DanubiusOwnershipChange = function(data) | ||||
let ritualIdx = this.ritualEnts.indexOf(data.entity); | let ritualIdx = this.ritualEnts.indexOf(data.entity); | ||||
if (ritualIdx != -1) | if (ritualIdx != -1) | ||||
this.ritualEnts.splice(ritualIdx, 1); | this.ritualEnts.splice(ritualIdx, 1); | ||||
let heroIdx = this.heroes.findIndex(hero => hero.ent == data.entity); | let heroIdx = this.heroes.findIndex(hero => hero.ent == data.entity); | ||||
if (ritualIdx != -1) | if (ritualIdx != -1) | ||||
this.heroes.splice(heroIdx, 1); | this.heroes.splice(heroIdx, 1); | ||||
let ccIdx = this.civicCenters.indexOf(data.entity); | |||||
Done Inline ActionsVars like this make me wonder if a Set should be used. Sandarac: Vars like this make me wonder if a Set should be used. | |||||
Not Done Inline ActionsNever used a Map nor Set and don't really want to. Once we have sm45, we can use array.includes(value). elexis: Never used a Map nor Set and don't really want to. Once we have sm45, we can use `array. | |||||
if (ccIdx != -1) | |||||
{ | |||||
this.debugLog("Gaia civic center " + data.entity + " destroyed"); | |||||
this.civicCenters.splice(ccIdx, 1); | |||||
} | |||||
}; | }; | ||||
{ | { | ||||
let cmpTrigger = Engine.QueryInterface(SYSTEM_ENTITY, IID_Trigger); | let cmpTrigger = Engine.QueryInterface(SYSTEM_ENTITY, IID_Trigger); | ||||
let gaiaEnts = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager).GetEntitiesByPlayer(0); | let gaiaEnts = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager).GetEntitiesByPlayer(0); | ||||
cmpTrigger.ritualEnts = []; | cmpTrigger.ritualEnts = []; | ||||
// To prevent spawning more than the limits, track IDs of current entities | // To prevent spawning more than the limits, track IDs of current entities | ||||
cmpTrigger.ships = []; | cmpTrigger.ships = []; | ||||
cmpTrigger.heroes = []; | cmpTrigger.heroes = []; | ||||
// Remember gaia CCs to spawn attackers from | |||||
cmpTrigger.civicCenters = []; | |||||
// Maps from gaia ship entity ID to ungarrison trigger point entity ID and land patrol triggerpoint name | // Maps from gaia ship entity ID to ungarrison trigger point entity ID and land patrol triggerpoint name | ||||
cmpTrigger.shipTarget = {}; | cmpTrigger.shipTarget = {}; | ||||
cmpTrigger.fillShipsTimer = undefined; | cmpTrigger.fillShipsTimer = undefined; | ||||
cmpTrigger.StartCelticRitual(gaiaEnts); | cmpTrigger.StartCelticRitual(gaiaEnts); | ||||
cmpTrigger.GarrisonAllGallicBuildings(gaiaEnts); | cmpTrigger.GarrisonAllGallicBuildings(gaiaEnts); | ||||
cmpTrigger.SpawnCCDefenders(gaiaEnts); | cmpTrigger.SpawnInitialCCDefenders(gaiaEnts); | ||||
cmpTrigger.SpawnCCAttackers(gaiaEnts); | |||||
cmpTrigger.SpawnShips(); | cmpTrigger.SpawnShips(); | ||||
cmpTrigger.DoAfterDelay(shipUngarrisonInterval() * 60 * 1000, "UngarrisonShipsOrder", {}); | cmpTrigger.DoAfterDelay(shipUngarrisonInterval() * 60 * 1000, "UngarrisonShipsOrder", {}); | ||||
cmpTrigger.DoRepeatedly(5 * 1000, "CheckShipRange", {}); | cmpTrigger.DoRepeatedly(5 * 1000, "CheckShipRange", {}); | ||||
cmpTrigger.RegisterTrigger("OnOwnershipChanged", "DanubiusOwnershipChange", { "enabled": true }); | cmpTrigger.RegisterTrigger("OnOwnershipChanged", "DanubiusOwnershipChange", { "enabled": true }); | ||||
} | } |
The number ships -> The number of ships.