Exemplo n.º 1
0
        public static EffectSpell buildEffectSpell(ObjectJSON effect)
        {
            EffectSpell output = new EffectSpell();

            output.affectAlly   = effect.getBoolArray("affectAlly");
            output.affectEnemy  = effect.getBoolArray("affectEnemy");
            output.affectSelf   = effect.getBoolArray("affectSelf");
            output.affectCell   = effect.getBoolArray("affectCell");
            output.minArea      = effect.getIntArray("minArea");
            output.maxArea      = effect.getIntArray("maxArea");
            output.areaType     = SpellData.stringToRangeAreaType(effect.getStringArray("areaType"));
            output.quickHandler = buildEffectHandler(effect.getObjectJSON("quickHandler"));
            output.slowHandler  = buildEffectHandler(effect.getObjectJSON("slowHandler"));
            output.conditions   = buildEffectConditions(effect.getArrayJSON("conditions"));
            return(output);
        }
Exemplo n.º 2
0
        public static SpellData buildSpell(ObjectJSON spell)
        {
            SpellData output = new SpellData();

            output.id          = spell.getString("id");
            output.name        = spell.getString("name");
            output.iconPath    = spell.getString("iconPath");
            output.description = spell.getStringArray("description");
            output.cost        = spell.getIntArray("cost");
            output.cooldown    = spell.getIntArray("cooldown");
            output.minRange    = spell.getIntArray("minRange");
            output.maxRange    = spell.getIntArray("maxRange");
            output.rangeType   = SpellData.stringToRangeAreaType(spell.getStringArray("rangeType"));
            output.priority    = spell.getIntArray("priority");
            output.effects     = buildEffectSpells(spell.getArrayJSON("effects"));
            return(output);
        }