jurpe.system
Class TurnEffect

java.lang.Object
  extended by jurpe.system.TurnEffect

public class TurnEffect
extends java.lang.Object

Turn effect is a modifier for an attribute of a character that has the duration of n turns. A turn effect is appliable to a PC.

Author:
Alessio Saltarin

Constructor Summary
TurnEffect(PC affected, EffectType et, int mod, short turns)
          Contruct a new Turn Effect
 
Method Summary
 void apply()
          Apply turn effect to affected PC
 PC getAffectedPC()
          Get PC affected by this turn effect
 EffectType getEffectType()
          Get Effect type of this Turn Effect
 int getModifier()
          Return the numeric modifier for this effect
 boolean isValid()
          If this turn effect is still in action (valid).
 void remove()
          Remove turn effect to affected PC
 java.lang.String toString()
          Long description of this turn effect
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TurnEffect

public TurnEffect(PC affected,
                  EffectType et,
                  int mod,
                  short turns)
Contruct a new Turn Effect

Parameters:
affected - affected PC
et - type of effect (modify which attribute, ie: DX)
mod - modifier (ie: 2 is HT+2)
turns - total number of turns the effect is valid
Method Detail

getEffectType

public EffectType getEffectType()
Get Effect type of this Turn Effect

Returns:
EffectType of this effect

getModifier

public int getModifier()
Return the numeric modifier for this effect

Returns:
numeric modifier for this effect

isValid

public boolean isValid()
If this turn effect is still in action (valid).

Returns:
true if this turn effect is valid

apply

public void apply()
Apply turn effect to affected PC


remove

public void remove()
Remove turn effect to affected PC


toString

public java.lang.String toString()
Long description of this turn effect

Overrides:
toString in class java.lang.Object
Returns:
description of turn effect

getAffectedPC

public PC getAffectedPC()
Get PC affected by this turn effect

Returns:
PC affected

Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net