Class Party
java.lang.Object
Party
One party (force, team, band, or group) of Monsters.
- Since:
- 2016-01-31
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addMonsters
(Monster monster, int count) Add a number of some monster race to this party.boolean
allHaveCondition
(SpecialType condition) Do all members of this party have a given conditon?void
Move dead members to list of fallen.void
Clear out the list of fallen.void
Clear records of attacks taken.get
(int idx) getFallen
(int idx) Make a list of the party's hit points.int
Get max level in the party.Pick a target for melee.double
Get ratio of original party still alive.int
Get total levels in the party.getTopMembers
(int number) Get a list of the top party members.void
Handle all incoming & outgoing monsters.void
healAll()
Heal the party fully.boolean
isLive()
Is this party operational?boolean
Is this party mostly 1st level?boolean
Check if any members are yet un-melee'd.iterator()
Return iterator for the iterable interface.static void
Main test method.void
makeSpecialAttacks
(Party enemy) Make special attacks against an enemy party.void
prepBattle
(Party enemy) Prepare for battle against an enemy.void
Add new monster to our incoming list.void
Add new monster to our outgoing list.random()
Pick a random party member.randomGroup
(int number) Get a random subset of this party.void
Shuffle the list of members.int
size()
int
void
Sort the list of members by increasing level/hit dice.void
Sort the list of members by decreasing level/hit dice.private void
Make all summons possible (add to party).void
Have each member take its turn against an enemy.toString()
Identify this object as a string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
members
List of party members. -
fallen
List of fallen members. -
incoming
List of incoming members. -
outgoing
List of outgoing members.
-
-
Constructor Details
-
Method Details
-
size
public int size() -
get
-
sizeFallen
public int sizeFallen() -
getFallen
-
add
-
isLive
public boolean isLive()Is this party operational? -
clearTimesMeleed
public void clearTimesMeleed()Clear records of attacks taken. -
random
Pick a random party member. -
getRandomMeleeTarget
Pick a target for melee. -
isOpenToMelee
public boolean isOpenToMelee()Check if any members are yet un-melee'd. -
randomGroup
Get a random subset of this party. -
prepBattle
Prepare for battle against an enemy. -
summonAllMinions
private void summonAllMinions()Make all summons possible (add to party). Caution: Must not be recursive. -
addMonsters
Add a number of some monster race to this party. -
makeSpecialAttacks
Make special attacks against an enemy party. -
takeTurn
Have each member take its turn against an enemy. -
bringOutYourDead
public void bringOutYourDead()Move dead members to list of fallen. -
clearFallen
public void clearFallen()Clear out the list of fallen. -
sortMembers
public void sortMembers()Sort the list of members by increasing level/hit dice. -
sortMembersDown
public void sortMembersDown()Sort the list of members by decreasing level/hit dice. -
shuffleMembers
public void shuffleMembers()Shuffle the list of members. -
healAll
public void healAll()Heal the party fully. -
getMaxLevels
public int getMaxLevels()Get max level in the party. -
getSumLevels
public int getSumLevels()Get total levels in the party. -
isModeFirstLevel
public boolean isModeFirstLevel()Is this party mostly 1st level? -
getTopMembers
Get a list of the top party members. -
toString
Identify this object as a string. -
getHitPointList
Make a list of the party's hit points. -
allHaveCondition
Do all members of this party have a given conditon? -
iterator
Return iterator for the iterable interface. -
getRatioLive
public double getRatioLive()Get ratio of original party still alive. -
queueIncoming
Add new monster to our incoming list. -
queueOutgoing
Add new monster to our outgoing list. -
handleMemberChanges
public void handleMemberChanges()Handle all incoming & outgoing monsters. -
main
Main test method.
-