Interface CombatSpell

  • All Superinterfaces:
    java.lang.Cloneable, java.lang.Comparable<java.lang.Object>, Identifiable, Unique
    All Known Implementing Classes:
    MagellanCombatSpellImpl

    public interface CombatSpell
    extends Identifiable
    A class representing a combat spell set for a certain unit. It links a unit with a certain spell and contains information at which level the unit wants to cast the spell.
    • Method Detail

      • getSpell

        Spell getSpell()
        Get the actuell spell to be cast in combat.
        Returns:
        the spell to be cast.
      • setSpell

        void setSpell​(Spell spell)
        Specify the actual spell of this CombatSpell.
        Parameters:
        spell - the spell that shall be cast in combat.
      • getUnit

        Unit getUnit()
        Retrieve the unit that has this combat spell set as a combat spell.
        Returns:
        the casting unit.
      • setUnit

        void setUnit​(Unit unit)
        Sets the unit which has this combat spell set as a combat spell.
        Parameters:
        unit - the casting unit.
      • getCastingLevel

        int getCastingLevel()
        Gets the level at which the unit wants to cast this spell.
        Returns:
        the level of the spell to be casted.
      • setCastingLevel

        void setCastingLevel​(int castingLevel)
        Sets a level at which the unit wants to cast this spell.
        Parameters:
        castingLevel - this value must be greater than 0 and not greater than the unit's magic skill level.
      • toString

        java.lang.String toString()
        Returns a String representation of this combat spell.
        Overrides:
        toString in class java.lang.Object
        Returns:
        combat spell object as string.