net.sf.colossus.game.actions
Class AddCreatureAction
java.lang.Object
net.sf.colossus.game.actions.LegionAction
net.sf.colossus.game.actions.AddCreatureAction
- All Implemented Interfaces:
- GameAction, RevealingAction
- Direct Known Subclasses:
- Acquisition, Recruitment, Summoning, SummonUndo
public class AddCreatureAction
- extends LegionAction
- implements RevealingAction
An event modelling the addition of a creature to a legion.
This is meant to be used only as interface or through subclasses.
TODO make abstract once History handles the subclasses properly
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
creatureType
private final CreatureType creatureType
AddCreatureAction
public AddCreatureAction(Legion legion,
CreatureType creatureType)
getAddedCreatureType
public CreatureType getAddedCreatureType()
- The type of creature that was added.
getRevealedCreatures
public CreatureType[] getRevealedCreatures()
- Specified by:
getRevealedCreatures
in interface RevealingAction
getReason
public java.lang.String getReason()
- Returns a string representing the reason for the addition.
TODO remove in favour of using the event hierarchy
TODO should be abstract here, but History still creates instances of this class
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object