Class PotionItem

java.lang.Object
  |
  +--Item
        |
        +--PotionItem

public class PotionItem
extends Item

Class to define the Potions, HP Up's, Attack Up's, and Defense Up's.

See Also:
Item, People

Field Summary
static int ATTUP
          The Attack Up subBrand Identifier
static int DEFUP
          The Defense Up subBrand Identifier
static int HPUPFULL
          The HP Up full subBrand Identifier
static int HPUPHALF
          The HP Up half subBrand Identifier
static int HPUPTHIRD
          The HP Up third subBrand Identifier
 
Fields inherited from class Item
brand, MONSTERBALL, name, number, POTION
 
Constructor Summary
PotionItem(java.lang.String name, int subBrand)
          Create a new PotionItem with the specified name, and subBrand.
 
Method Summary
 int getSubBrand()
          Returns the type of Item this is.
 boolean useItem(Monster m)
          Use this on the specified Monster
 
Methods inherited from class Item
addItem, equals, equals, getBrand, getItemCount, getName, setItemCount, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HPUPHALF

public static final int HPUPHALF
The HP Up half subBrand Identifier

See Also:
Constant Field Values

DEFUP

public static final int DEFUP
The Defense Up subBrand Identifier

See Also:
Constant Field Values

ATTUP

public static final int ATTUP
The Attack Up subBrand Identifier

See Also:
Constant Field Values

HPUPFULL

public static final int HPUPFULL
The HP Up full subBrand Identifier

See Also:
Constant Field Values

HPUPTHIRD

public static final int HPUPTHIRD
The HP Up third subBrand Identifier

See Also:
Constant Field Values
Constructor Detail

PotionItem

public PotionItem(java.lang.String name,
                  int subBrand)
Create a new PotionItem with the specified name, and subBrand.

Parameters:
name - the name of the Item
subBrand - the type of Item defined above
Method Detail

getSubBrand

public int getSubBrand()
Returns the type of Item this is.

Specified by:
getSubBrand in class Item
Returns:
the type of Item this is.
See Also:
MonsterBallItem, PotionItem

useItem

public boolean useItem(Monster m)
Use this on the specified Monster

Specified by:
useItem in class Item
Parameters:
m - The Monster to use this on, should be the Players Monster.
Returns:
true