[OTJ] Implement Luxurious Locomotive

This commit is contained in:
theelk801 2024-03-30 21:39:45 -04:00
parent 8e68dfebe8
commit 6e750492b2
4 changed files with 89 additions and 2 deletions

View file

@ -72,8 +72,9 @@ public class CrewAbility extends SimpleActivatedAbility {
@Override
public String getRule() {
return "Crew " + value + " <i>(Tap any number of creatures you control with total power "
+ value + " or more: This Vehicle becomes an artifact creature until end of turn.)</i>";
return "Crew " + value + (this.maxActivationsPerTurn == 1 ? ". Activate only once each turn." : "") +
" <i>(Tap any number of creatures you control with total power " + value +
" or more: This Vehicle becomes an artifact creature until end of turn.)</i>";
}
}

View file

@ -43,4 +43,13 @@ public class CrewedVehicleWatcher extends Watcher {
.stream()
.anyMatch(mor -> mor.refersTo(crewer, game));
}
public static int getCrewCount(Permanent vehicle, Game game) {
return game
.getState()
.getWatcher(CrewedVehicleWatcher.class)
.crewMap
.getOrDefault(new MageObjectReference(vehicle, game), Collections.emptySet())
.size();
}
}