Class DamageEffect

java.lang.Object
games.stendhal.server.entity.spell.effect.AbstractEffect
games.stendhal.server.entity.spell.effect.DamageEffect
All Implemented Interfaces:
TurnListener, Effect

public class DamageEffect extends AbstractEffect implements TurnListener
An effect to cause magical damage with a spell Used attributes: - amount: How often will this effect hit a player - atk: for usage of the usual damage calcuation acting as a weapon - lifesteal: percentage of health points healed based on damage done
Author:
madmetzger
  • Constructor Details

    • DamageEffect

      public DamageEffect(Nature nature, int amount, int atk, int def, double lifesteal, int rate, int regen, double modifier)
  • Method Details

    • act

      public void act(Player caster, Entity target)
      Description copied from interface: Effect
      applies the effect
      Specified by:
      act in interface Effect
    • onTurnReached

      public void onTurnReached(int currentTurn)
      Description copied from interface: TurnListener
      This method is called when the turn number is reached.
      Specified by:
      onTurnReached in interface TurnListener
      Parameters:
      currentTurn - current turn number