|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Item | +--MonsterBallItem
Simple class for an Item used to catch Monsters
Monster
,
Item
Field Summary | |
static int |
MASTER
Master MonsterBall subBrand |
static int |
NORMAL
Normal MonsterBall subBrand |
Fields inherited from class Item |
brand, MONSTERBALL, name, number, POTION |
Constructor Summary | |
MonsterBallItem(java.lang.String name,
int subBrand)
Construct a MonsterBallItem based upon name and subBrand. |
Method Summary | |
int |
getSubBrand()
Gets the subBrand of this |
boolean |
useItem(Monster m)
Attempts to use the MonsterBall on the 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 |
public static final int NORMAL
public static final int MASTER
Constructor Detail |
public MonsterBallItem(java.lang.String name, int subBrand)
name
- The name for thissubBrand
- the subBrand as defined aboveMethod Detail |
public int getSubBrand()
getSubBrand
in class Item
MonsterBallItem
,
PotionItem
public boolean useItem(Monster m)
useItem
in class Item
m
- the opposing Monster trying to catch
Player
,
Monster
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |