Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/headquarters.js
Show First 20 Lines • Show All 515 Lines • ▼ Show 20 Lines | if (ent && ent.decaying() && ent.isOwn(PlayerID)) | ||||
{ | { | ||||
if (gameState.isPlayerAlly(i) || !capture[i]) | if (gameState.isPlayerAlly(i) || !capture[i]) | ||||
continue; | continue; | ||||
decayToGaia = false; | decayToGaia = false; | ||||
break; | break; | ||||
} | } | ||||
if (decayToGaia) | if (decayToGaia) | ||||
continue; | continue; | ||||
let ratioMax = 0.70 + randFloat(0., 0.1); | let ratioMax = 0.70 + randFloat(0.0, 0.1); | ||||
for (let evt of events.Attacked) | for (let evt of events.Attacked) | ||||
{ | { | ||||
if (ent.id() != evt.target) | if (ent.id() != evt.target) | ||||
continue; | continue; | ||||
ratioMax = 0.85 + randFloat(0., 0.1); | ratioMax = 0.85 + randFloat(0.0, 0.1); | ||||
Krinkle: Intentional, to see that it gets spotted by Coala. Will fix in a minute. | |||||
break; | break; | ||||
} | } | ||||
if (captureRatio > ratioMax) | if (captureRatio > ratioMax) | ||||
continue; | continue; | ||||
ent.destroy(); | ent.destroy(); | ||||
} | } | ||||
this.decayingStructures.delete(entId); | this.decayingStructures.delete(entId); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,359 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Intentional, to see that it gets spotted by Coala. Will fix in a minute.