コード例 #1
0
 public override void TakeDamage(int damage, Player performingPlayer, bool isHeroic, StationLocation?stationLocation)
 {
     base.TakeDamage(damage, performingPlayer, isHeroic, stationLocation);
     if (stationLocation != null)
     {
         CurrentStations.Remove(stationLocation.Value);
     }
 }
コード例 #2
0
 private void MoveToNewStation(StationLocation?newStation)
 {
     if (CurrentStations.Count != 1)
     {
         throw new InvalidOperationException("Cannot move a threat that exists in more than 1 zone.");
     }
     if (!newStation.HasValue)
     {
         throw new InvalidOperationException("Moved wrongly.");
     }
     CurrentStations.Remove(CurrentStation);
     CurrentStations.Add(newStation.Value);
 }