Package 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
,EditAddCreature
,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
-
-
Field Summary
Fields Modifier and Type Field Description private CreatureType
creatureType
-
Fields inherited from class net.sf.colossus.game.actions.LegionAction
legion
-
-
Constructor Summary
Constructors Constructor Description AddCreatureAction(Legion legion, CreatureType creatureType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreatureType
getAddedCreatureType()
The type of creature that was added.java.lang.String
getReason()
Returns a string representing the reason for the addition.CreatureType[]
getRevealedCreatures()
java.lang.String
toString()
-
Methods inherited from class net.sf.colossus.game.actions.LegionAction
getLegion
-
-
-
-
Field Detail
-
creatureType
private final CreatureType creatureType
-
-
Constructor Detail
-
AddCreatureAction
public AddCreatureAction(Legion legion, CreatureType creatureType)
-
-
Method Detail
-
getAddedCreatureType
public CreatureType getAddedCreatureType()
The type of creature that was added.
-
getRevealedCreatures
public CreatureType[] getRevealedCreatures()
- Specified by:
getRevealedCreatures
in interfaceRevealingAction
-
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 classjava.lang.Object
-
-