public class MOB extends java.lang.Object implements Attributes
| Modifier and Type | Field and Description |
|---|---|
protected int |
armor
The armor rating of the mob
|
protected int |
damage
The amount of damage the MOB has taken
|
protected DiceType |
damageDie
the type of damage die used if the mob successfully strikes the target
|
protected int |
hitModifier
The hitModifier of the MOB.
|
protected int |
maxHP
the maxHP of the mob
|
| Constructor and Description |
|---|
MOB(java.lang.String name,
int hp,
int armor,
int hitModifier,
DiceType damageDie)
The basic constructor for the mob.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDamage(int damage)
Adds damage to the mobs overall damage.
|
MOB |
copy()
Copies the mob to a new mob.
|
int |
getArmor()
Gets the armor attribute value, often between 8-20 for a D20 system, but not fixed.
|
int |
getDamage()
Gets the amount of damage the MOB has taken.
|
DiceType |
getDamageDie()
Gets the Damage Die Type
|
int |
getHitModifier()
Modifier to apply to "to hit" roles before calculate hits
|
int |
getHP()
Essentially returns the current HPs of the MOB.
|
int |
getMaxHP()
Gets the maximum hit points attribute.
|
java.lang.String |
getName()
Returns the generic name of the MOB
|
void |
resetDamage()
Resets the damage taken to 0.
|
java.lang.String |
toString()
Builds a MOB Card for easy printing of the stats.
|
protected int hitModifier
protected int armor
protected int maxHP
protected int damage
protected DiceType damageDie
public MOB(java.lang.String name,
int hp,
int armor,
int hitModifier,
DiceType damageDie)
name - name of the mobhp - maxHP of the mobarmor - armor of the mobhitModifier - hitModifier of the MOBdamageDie - damageDiepublic int getHitModifier()
AttributesgetHitModifier in interface Attributespublic int getArmor()
AttributesgetArmor in interface Attributespublic int getMaxHP()
AttributesgetMaxHP in interface Attributespublic int getDamage()
public java.lang.String getName()
public void addDamage(int damage)
damage - the amount to add in whole numberspublic int getHP()
public void resetDamage()
public DiceType getDamageDie()
AttributesgetDamageDie in interface Attributespublic java.lang.String toString()
toString in class java.lang.Objectpublic MOB copy()