﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace Omnikron13.TheQuest {
    public class Buff : QuestObject {
        protected Stats stats;
        protected ScriptsDictionary scripts;

        public Stats Stats {
            get {
                return stats;
            }
        }
        public ScriptsDictionary Scripts {
            get {
                return scripts;
            }
        }

        public Buff(string file, int mode = LoadID) : base(file, mode) {
        }

        override protected void Deserialise(JObject json) {
            base.Deserialise(json);
            stats = new TheQuest.Stats(json["stats"]);
            scripts = new ScriptsDictionary(json["scripts"]);
        }

        override protected string GetPath(string id) {
            return "data\\buffs\\" + id + ".buff";
        }
    }
}

