Search in sources :

Example 1 with SpellSchool

use of com.lilithsthrone.game.combat.SpellSchool in project liliths-throne-public by Innoxia.

the class GameCharacter method getOffensiveSpells.

/**
 * Base spells, modified by primary weapon SpellSchool.
 */
public List<Spell> getOffensiveSpells() {
    SpellSchool school = SpellSchool.DEFAULT;
    if (getMainWeapon() != null) {
        school = getMainWeapon().getSpellSchool();
    }
    List<Spell> tempListSpells = new ArrayList<>();
    for (Spell s : Spell.getSpellsFromSchoolMap().get(school)) {
        if (s.getType() == SpellType.OFFENSIVE) {
            tempListSpells.add(s);
        }
    }
    return tempListSpells;
}
Also used : SpellSchool(com.lilithsthrone.game.combat.SpellSchool) ArrayList(java.util.ArrayList) Spell(com.lilithsthrone.game.combat.Spell)

Example 2 with SpellSchool

use of com.lilithsthrone.game.combat.SpellSchool in project liliths-throne-public by Innoxia.

the class GameCharacter method getDefensiveSpells.

/**
 * Base spells, modified by secondary weapon SpellSchool.
 */
public List<Spell> getDefensiveSpells() {
    SpellSchool school = SpellSchool.DEFAULT;
    if (getOffhandWeapon() != null) {
        school = getOffhandWeapon().getSpellSchool();
    }
    List<Spell> tempListSpells = new ArrayList<>();
    for (Spell s : Spell.getSpellsFromSchoolMap().get(school)) {
        if (s.getType() == SpellType.DEFENSIVE) {
            tempListSpells.add(s);
        }
    }
    return tempListSpells;
}
Also used : SpellSchool(com.lilithsthrone.game.combat.SpellSchool) ArrayList(java.util.ArrayList) Spell(com.lilithsthrone.game.combat.Spell)

Aggregations

Spell (com.lilithsthrone.game.combat.Spell)2 SpellSchool (com.lilithsthrone.game.combat.SpellSchool)2 ArrayList (java.util.ArrayList)2