net.sf.mud4j.effect
Class CharacterEffectDecorator

java.lang.Object
  extended by net.sf.mud4j.effect.CharacterEffectDecorator
All Implemented Interfaces:
Character, Messageable, Damageable, Effectable

public abstract class CharacterEffectDecorator
extends java.lang.Object
implements Character, Effectable

Provide effects as a decorator to a character.

Author:
Matthew Purland

Constructor Summary
CharacterEffectDecorator(Character character)
           
 
Method Summary
 java.util.List<CharacterAbility> getAbilities()
          Get character abilities that the character has.
 DamageBehavior getDamageBehavior()
          Get the defined damage behavior for the damageable entity.
 java.util.List<Item> getItems()
          Get character items that the character has possession of.
 int getLevel()
          Get level of character.
 java.lang.String getName()
          Get the name of the character.
 boolean hasAbility(CharacterAbility ability)
          Determines if the character has an ability.
 boolean hasItem(Item item)
          Does the player have a particular item?
 void message(java.lang.String message)
          Message the character through the provided connection service.
 void setDamageBehavior(DamageBehavior damageBehavior)
          Sets the damage behavior for the damageable object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.mud4j.effect.Effectable
getEffectBehavior, setEffectBehavior
 

Constructor Detail

CharacterEffectDecorator

public CharacterEffectDecorator(Character character)
Method Detail

getAbilities

public java.util.List<CharacterAbility> getAbilities()
Get character abilities that the character has.

Specified by:
getAbilities in interface Character
Returns:
Returns collection of character abilities.

getItems

public java.util.List<Item> getItems()
Get character items that the character has possession of.

Specified by:
getItems in interface Character
Returns:
Returns a list of items that the character has.

getLevel

public int getLevel()
Get level of character.

Specified by:
getLevel in interface Character
Returns:
Returns the level of the character.

getName

public java.lang.String getName()
Get the name of the character.

Specified by:
getName in interface Character
Returns:
Returns the name of the character.

hasAbility

public boolean hasAbility(CharacterAbility ability)
Determines if the character has an ability.

Specified by:
hasAbility in interface Character
Returns:
Returns whether the character has an ability.

hasItem

public boolean hasItem(Item item)
Does the player have a particular item?

Specified by:
hasItem in interface Character
Parameters:
item - Item for which the player might have.
Returns:
Returns if the character has an item.

getDamageBehavior

public DamageBehavior getDamageBehavior()
Get the defined damage behavior for the damageable entity.

Specified by:
getDamageBehavior in interface Damageable
Returns:
Returns the damage behavior for the damageable object.

setDamageBehavior

public void setDamageBehavior(DamageBehavior damageBehavior)
Sets the damage behavior for the damageable object.

Specified by:
setDamageBehavior in interface Damageable

message

public void message(java.lang.String message)
             throws java.io.IOException
Message the character through the provided connection service.

Specified by:
message in interface Messageable
Throws:
java.io.IOException


Copyright © 2006-2007 mud4j. All Rights Reserved.