|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Attack
Defines an ADT for Attacks.
Monster
Field Summary | |
static double |
DAMAGE1
The Damage associated with the first Attack learned (A1) |
static double |
DAMAGE2
The Damage associated with the second Attack learned (A2) |
static double |
DAMAGE3
The Damage associated with the third Attack learned (A3) |
static double |
DAMAGE4
The Damage associated with the fourth Attack learned (A4) |
static double |
DAMAGE5
The Damage associated with the fifth Attack learned (A5) |
static double |
DAMAGE6
The Damage associated with the sixth Attack learned (A6) |
static double |
DAMAGEMULT
The Multiplier to use if the Monster is a weak type against the other Monster |
Constructor Summary | |
Attack(java.lang.String name,
double pow)
Constructs a new Attack with name and power. |
Method Summary | |
boolean |
equals(Attack a)
Compares the Attack to this. |
boolean |
equals(java.lang.Object o)
Compares the Object to this. |
java.lang.String |
getName()
Get the name associated with the Attack. |
double |
getPower()
Gets the power of the Attack |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static double DAMAGE1
public static double DAMAGE2
public static double DAMAGE3
public static double DAMAGE4
public static double DAMAGE5
public static double DAMAGE6
public static final double DAMAGEMULT
Monster
,
Constant Field ValuesConstructor Detail |
public Attack(java.lang.String name, double pow) throws InvalidPowerException
name
- The name of the Attackpow
- the Power of the attack (0<=x<=.5)
InvalidPowerException
- if pow is not this.DAMAGE*Method Detail |
public java.lang.String getName()
public double getPower()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the Object to compare with this
public boolean equals(Attack a)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |