Announcement

Collapse
No announcement yet.

Limiting Unit Movement By Terrain

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Limiting Unit Movement By Terrain

    Is it possible to limit a unit's movement ability to exclusive terrain types? For example, if you create snow-troops, these units would not be able to move at all through deserts.

    One could then actually envision a series of "promotions" available to units that would expand their movement capabilities. For example, Elephant archers might be limited initially to Jungles, Grasslands and Plains but, by earning a promotion, gain access to forests, hills and, eventually, mountains. This would allow Hanibal to surprise Rome by sending his Elephants over the Alps.

  • #2
    I would expect this to be in CvGameUtils.py if it were there at all, but I haven't figured out the SelectionList functions yet - cannotSelectionListMove() looks like your only hope, but doesn't specify a unit.

    Comment

    Working...
    X