public class Party extends Object
Modifier and Type | Field and Description |
---|---|
(package private) ArrayList<Monster> |
fallen
List of fallen members.
|
(package private) ArrayList<Monster> |
members
List of party members.
|
Constructor and Description |
---|
Party()
Empty constructor
|
Party(ArrayList<Monster> list)
List constructor
|
Party(Monster monster)
Solo party
|
Modifier and Type | Method and Description |
---|---|
void |
add(Monster m) |
void |
bringOutYourDead()
Move dead members to list of fallen.
|
void |
clearFallen()
Clear out the list of fallen.
|
void |
clearTimesMeleed()
Clear records of attacks taken.
|
Monster |
get(int idx) |
Monster |
getFallen(int idx) |
int |
getSumLevels()
Get total levels in the party.
|
void |
healAll()
Heal the party fully.
|
boolean |
isLive() |
boolean |
isOpenToMelee()
Check if any members are yet un-melee'd.
|
void |
makeSpecialAttacks(Party enemy)
Make special attacks against an enemy party.
|
void |
prepBattle(Party enemy)
Prepare for battle against an enemy.
|
Monster |
random()
Pick a random party member.
|
ArrayList<Monster> |
randomGroup(int number)
Get a random subset of this party.
|
Monster |
randomMelee()
Pick a target for melee.
|
void |
shuffleMembers()
Shuffle the list of members.
|
int |
size() |
int |
sizeFallen() |
void |
sortMembers()
Sort the list of members.
|
void |
takeTurn(Party enemy)
Have each member take its turn against an enemy.
|
String |
toString()
Identify this object as a string.
|
Party()
Party(Monster monster)
public boolean isLive()
public int size()
public Monster get(int idx)
public int sizeFallen()
public Monster getFallen(int idx)
public void add(Monster m)
public void clearTimesMeleed()
public Monster random()
public Monster randomMelee()
public boolean isOpenToMelee()
public void prepBattle(Party enemy)
public void makeSpecialAttacks(Party enemy)
public void takeTurn(Party enemy)
public void bringOutYourDead()
public void clearFallen()
public void sortMembers()
public void shuffleMembers()
public void healAll()
public int getSumLevels()