Enable 6.A.5 and 6.A.7
This commit is contained in:
parent
1a44021e00
commit
128f5a4230
@ -194,6 +194,21 @@ public class MovementPhaseAdjudicator : IPhaseAdjudicator
|
||||
// unit can move to the destination.
|
||||
List<SupportMoveOrder> supportMoveOrders = unitOrders.OfType<SupportMoveOrder>().ToList();
|
||||
|
||||
// Trivial check: armies cannot move to water and fleets cannot move to land.
|
||||
AdjudicatorHelpers.InvalidateIfNotMatching(
|
||||
order => (order.Target.Type == UnitType.Army && order.Location.Type == LocationType.Land)
|
||||
|| (order.Target.Type == UnitType.Fleet && order.Location.Type == LocationType.Water),
|
||||
ValidationReason.IllegalDestinationType,
|
||||
ref supportMoveOrders,
|
||||
ref validationResults);
|
||||
|
||||
// Trivial check: a unit cannot move to where it already is.
|
||||
AdjudicatorHelpers.InvalidateIfNotMatching(
|
||||
order => !(order.Location.Key == order.Target.Location && order.Season == order.Unit.Season),
|
||||
ValidationReason.DestinationMatchesOrigin,
|
||||
ref supportMoveOrders,
|
||||
ref validationResults);
|
||||
|
||||
// Support-move orders are invalid if the unit supports a move to any location in its own
|
||||
// province.
|
||||
AdjudicatorHelpers.InvalidateIfNotMatching(
|
||||
|
@ -1,9 +1,6 @@
|
||||
# 6.A.5. TEST CASE, MOVE TO OWN SECTOR WITH CONVOY
|
||||
# Moving to the same sector is still illegal with convoy (2023 rulebook, page 7, "Note: An Army can move across water provinces from one coastal province to another...").
|
||||
|
||||
# TODO convoy order parsing
|
||||
#test:skip
|
||||
|
||||
unit England F North Sea
|
||||
unit England A Yorkshire
|
||||
unit England A Liverpool
|
||||
|
@ -1,9 +1,6 @@
|
||||
# 6.A.7. TEST CASE, ONLY ARMIES CAN BE CONVOYED
|
||||
# A fleet cannot be convoyed.
|
||||
|
||||
# TODO convoy order parsing
|
||||
#test:skip
|
||||
|
||||
unit England F London
|
||||
unit England F North Sea
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user