Class CustomRecruitBase
java.lang.Object
net.sf.colossus.server.CustomRecruitBase
- All Implemented Interfaces:
ICustomRecruitBase
Base class to implement custom recruiting functions
(i.e. anything that is not a-number-of-creature to another creature)
- Author:
- Romain Dolbeau
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final List<CustomRecruitBase> private static final Loggerprivate static GameServerSide -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final voidstatic final voidprotected final voidprotected abstract voidchangeOfTurn(int newActivePlayer) Bookkeeping function, called once after every player turn.static final voideveryoneAdvanceTurn(int newActivePlayer) abstract List<CreatureType> List all creatures that can recruit in this terrain in a special way.abstract List<CreatureType> List all creatures that can be recruited in this terrain in a special way.protected final intgetCount(CreatureType type) protected final intgetDeadCount(CreatureType type) abstract List<CreatureType> List creatures that can recruit in this terrain in a special way now.abstract List<CreatureType> List creatures that can be recruited in this terrain in a special way now.protected voidstatic final voidabstract intnumberOfRecruiterNeeded(CreatureType recruiter, CreatureType recruit, MasterHex hex) Number of recruiters needed to get a recruit in a special way in this terrain now.static final voidreset()static final voidprotected abstract voidReset, called at the beginning of a game.protected final voidsetCount(CreatureType type, int newCount, boolean reset) static final void
-
Field Details
-
LOGGER
-
allPlayers
-
allCaretakerInfo
-
serverGame
-
allCustomRecruitBase
-
-
Constructor Details
-
CustomRecruitBase
public CustomRecruitBase()
-
-
Method Details
-
reset
public static final void reset() -
resetAllInstances
public static final void resetAllInstances() -
initCustomVariant
protected void initCustomVariant() -
initCustomVariantForAllCRBs
public static final void initCustomVariantForAllCRBs() -
everyoneAdvanceTurn
public static final void everyoneAdvanceTurn(int newActivePlayer) -
addPlayerClientSide
-
addCaretakerClientSide
-
setGame
-
setCount
-
adjustAvailableCount
-
getCount
-
getDeadCount
-
getAllPossibleSpecialRecruiters
List all creatures that can recruit in this terrain in a special way.- Specified by:
getAllPossibleSpecialRecruitersin interfaceICustomRecruitBase
-
getAllPossibleSpecialRecruits
List all creatures that can be recruited in this terrain in a special way.- Specified by:
getAllPossibleSpecialRecruitsin interfaceICustomRecruitBase
-
getPossibleSpecialRecruiters
List creatures that can recruit in this terrain in a special way now.- Specified by:
getPossibleSpecialRecruitersin interfaceICustomRecruitBase- Parameters:
hex- The specific MasterHex considered for recruiting.- Returns:
- A List of possible special Recruiters in this hex.
-
getPossibleSpecialRecruits
List creatures that can be recruited in this terrain in a special way now.- Specified by:
getPossibleSpecialRecruitsin interfaceICustomRecruitBase- Parameters:
hex- The specific MasterHex considered for recruiting (for an example, see getPossibleSpecialRecruits() in BalrogRecruitment.java in Balrog variant directory)- Returns:
- A List of possible special Recruits in this hex.
-
numberOfRecruiterNeeded
public abstract int numberOfRecruiterNeeded(CreatureType recruiter, CreatureType recruit, MasterHex hex) Number of recruiters needed to get a recruit in a special way in this terrain now.- Specified by:
numberOfRecruiterNeededin interfaceICustomRecruitBase
-
changeOfTurn
protected abstract void changeOfTurn(int newActivePlayer) Bookkeeping function, called once after every player turn. Protected as it should only be called from everyoneAdvanceTurn(). -
resetInstance
protected abstract void resetInstance()Reset, called at the beginning of a game.
-