triplea-maps / over_the_top

TripleA Map WWI inspired by Great War, Age of Tribes, Civil War, and of course A&A
0 stars 0 forks source link

Normal trains should be able to capture or remove undefended trains #6

Open jdimeo opened 3 years ago

jdimeo commented 3 years ago

Ideally, undefended trains would be capturable like trenches during combat move since they are infrastructure. But if they can't be captured they should be able to "push out" enemy trains blocking their path without a fight (or always lose if there is an armored train)

jdimeo commented 3 years ago

Using isInfrastructure for trains would be an elegant/easy way of solving this (so normal combat if armored trains are present, immediate capture of railguns and trains if not), but I found on line 545 of BattleTracker:

    // This could be NULL if unowned water
    final TerritoryAttachment ta = TerritoryAttachment.get(territory);
    if (ta == null) {
      // TODO: allow capture/destroy of infrastructure on unowned water
      return;
    }