new public static SlowSpellAction fromJSON(ObjectJSON json) { SlowSpellAction output = new SlowSpellAction(); output.entityId = json.getInt("entityId"); output.spellId = json.getString("spellId"); output.targetCellId = json.getInt("targetCellId"); return(output); }
public static Action fromJSON(ObjectJSON json) { switch (json.getString("class")) { case "QuickSpellAction": return(QuickSpellAction.fromJSON(json)); case "MovementAction": return(MovementAction.fromJSON(json)); case "SlowSpellAction": return(SlowSpellAction.fromJSON(json)); default: return(null); } }