|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--MapObject
|
+--Monster
|
+--GasMon
A class to define the Monsters of type Gas handles the leveling up process and naming of attacks.
Monster,
Serialized Form| Field Summary | |
protected static java.lang.String |
A1
The name of the first attack |
protected static java.lang.String |
A2
The name of the second attack |
protected static java.lang.String |
A3
The name of the third attack |
protected static java.lang.String |
A4
The name of the fourth attack |
protected static java.lang.String |
A5
The name of the fifth attack |
protected static java.lang.String |
A6
The name of the sixth attack |
protected int |
lastAttack
The last attack learned (2 <= x <= 5) |
protected static int |
MAX_EARN_ATTACK_LEVEL
The level at which all attacks have been learned |
protected static int |
START
The number of levels needed before learning a new attack |
| Fields inherited from class Monster |
attacks, attp, battle, defp, EARTH, ELECTRIC, exp, FIRE, GAS, hp, kind, level, maxAtt, MAXATTACKS, maxDef, maxExp, maxHP, maxLevel, MAXLEVEL, name, WATER |
| Fields inherited from class MapObject |
BUILDING, enterable, FLOOR, GRASS, MONSTER, PERSON, PLAYER, REDIRECT, ROCK, TRAINER, type, WALL |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
GasMon()
Construct a Gas Monster with the default values: name is Alligatrix level is two. |
|
GasMon(java.lang.String name)
Constructs a Gas Monster with the name name. |
|
| Method Summary | |
void |
addAttack(java.lang.String att)
Adds the attack specified by its name as parameter att to the Monster if it has less than Monster.MAXATTACKS |
java.lang.String |
getA1()
Returns the name of Attack A1 |
java.lang.String |
getA2()
Returns the name of Attack A2 |
java.lang.String |
getA3()
Returns the name of Attack A3 |
java.lang.String |
getA4()
Returns the name of Attack A4 |
java.lang.String |
getA5()
Returns the name of Attack A5 |
java.lang.String |
getA6()
Returns the name of Attack A6 |
MapObject |
getClone()
Returns a new Gas Monster with the same name as this. |
protected void |
levelUp()
Preforms a level up on the Monster, Adds new Attacks if needed, increases HP, Attack Points, etc. |
void |
setImage(java.awt.Image[] img)
Empty implemntation unneeded as Monsters are only displayed in battle |
protected void |
setMaxLevel(byte nml)
Sets the max level always is START + previousMaxLevel |
boolean |
substituteAttack(Attack removed,
Attack added)
Removes an Attack and adds a new Attack to the end. |
| Methods inherited from class Monster |
equals, equals, finishFight, getAttack, getAttack, getAttacks, getDefense, getExperience, getHP, getKind, getLevel, getMaxAttack, getMaxDefense, getMaxExperience, getMaxHP, getMaxLevel, getName, getNumberOfAttacks, isBattling, paint, setAttack, setBehind, setDefense, setExperience, setHP, setLevel, setMaxAttack, setMaxDefense, setMaxExperience, setMaxHP, setName, startBattle, stopBattle |
| Methods inherited from class MapObject |
canBeEntered, getType |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final int START
protected static final int MAX_EARN_ATTACK_LEVEL
protected static final java.lang.String A1
protected static final java.lang.String A2
protected static final java.lang.String A3
protected static final java.lang.String A4
protected static final java.lang.String A5
protected static final java.lang.String A6
protected int lastAttack
| Constructor Detail |
public GasMon()
public GasMon(java.lang.String name)
name - the name of the Gas Monster| Method Detail |
public void setImage(java.awt.Image[] img)
setImage in class MapObjectimg - the array of images to useprotected void setMaxLevel(byte nml)
nml - the new Max Level
protected void levelUp()
throws AttacksFullException
levelUp in class MonsterAttacksFullException - if this has Monster.MAXATTACKS AttacksMonster,
Attackpublic void addAttack(java.lang.String att)
addAttack in class Monsteratt - the Name of the Attack to addMonster
public boolean substituteAttack(Attack removed,
Attack added)
substituteAttack in class Monsterremoved - the Attack to removeadded - the Attack to add
public java.lang.String getA1()
getA1 in class Monsterpublic java.lang.String getA2()
getA2 in class Monsterpublic java.lang.String getA3()
getA3 in class Monsterpublic java.lang.String getA4()
getA4 in class Monsterpublic java.lang.String getA5()
getA5 in class Monsterpublic java.lang.String getA6()
getA6 in class Monsterpublic MapObject getClone()
getClone in class MapObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||