Class SpecificRoundEndTrigger

java.lang.Object
megamek.server.trigger.SpecificRoundEndTrigger
All Implemented Interfaces:
Trigger

public final class SpecificRoundEndTrigger extends Object implements Trigger
This Trigger reacts at the end of the specified game round. This is more or less the same as a RoundStartTrigger of the following round, but this can be used to trigger something without actually entering the following round just yet (e.g. ending the game at the end of round 10 instead of at the beginning of round 11). Note that this Trigger can react multiple times!
  • Constructor Details

    • SpecificRoundEndTrigger

      public SpecificRoundEndTrigger(int round)
  • Method Details

    • isTriggered

      public boolean isTriggered(IGame game, TriggerSituation event)
      Description copied from interface: Trigger
      Returns true when this Trigger is triggered, i.e. if the prerequisites for its associated event are deemed to be satisfied. Note that the event is itself responsible for making sure that it only returns true once, if it should only trigger once. If it returns true on multiple occasions, the triggered event may happen multiple times. The given TriggerEvent specifies when at what moment of the game this method is called.
      Specified by:
      isTriggered in interface Trigger
      Parameters:
      game - The game
      event - The type of event that caused the trigger to be called
      Returns:
      True when this Trigger considers itself triggered, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object