HomeWildfire Games

Petra: Improve relic capturing

Description

Petra: Improve relic capturing

Patch by Sandarac

Summary: As suggested in D333, Petra should prioritize capturing gaia relics that are within its territory.

Reviewed By: mimo

Differential Revision: https://code.wildfiregames.com/D532

Details

Committed
mimoMay 23 2017, 7:22 PM
Reviewer
mimo
Differential Revision
D532: Petra: Improve relic capturing
Parents
rP19643: Fix a typo in the Punjab (2) skirmish map in rP14042.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 1925
Build 3051: Post-Commit BuildJenkins

Event Timeline

mimo added inline comments.May 23 2017, 7:35 PM
/ps/trunk/binaries/data/mods/public/simulation/ai/petra/gameTypeManager.js
240

oups just after commit, i noticed there is still a potential case to take into account: in principle, gaia could capture one of our relic? so we should add here
if (evt.to === 0 && ent.hasClass("Relic")) this.targetedGaiaRelics.add(evt.entity);

do you agree?

Sandarac added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/ai/petra/gameTypeManager.js
240

No, because targetedGaiaRelics is only for gaia relics that have an attack plan currently targeting them. A relic is added to targetedGaiaRelics wherever an attack plan is assigned to a gaia relic.