/// <summary>
    /// Create a PassiveMagicSkillData.</summary>
    /// <returns>A ScriptableObject</returns>
    PassiveMagicSkillData CreatePassiveMagicSkill()
    {
        var skill = new PassiveMagicSkill(
            id: GetId("MagicSkill"),
            name: _name,
            description: _description,
            cooldownTime: _cooldownTime,
            cost: _cost,
            itemSequence: new int[] { },
            duration: _duration,
            modifierValue: _modifierValue,
            modifiedAttributeName: _modifiedAttributeName
            );
        var scriptableSkill = ScriptableObject.CreateInstance <PassiveMagicSkillData>();

        scriptableSkill.Skill = skill;
        return(scriptableSkill);
    }
Example #2
0
        private void InitSkillDatabase()
        {
            MagicSkill passiveMagicSkill = new PassiveMagicSkill(id: 0,
                                                                 name: "ShadowStrength",
                                                                 description: "A +10 Buff to the user's strength.",
                                                                 cost: 10,
                                                                 duration: 10,
                                                                 cooldownTime: 5,
                                                                 modifierValue: 10,
                                                                 modifiedAttributeName: "Body",
                                                                 itemSequence: new int[] {});
            CombatSkill meleeSkill = new GenericCombatSkill(id: 0,
                                                            name: "SwordFighting",
                                                            description: "How to wield a sword.",
                                                            cooldownTime: 1,
                                                            damage: 1,
                                                            maximumTargets: 1,
                                                            range: 1,
                                                            itemSequence: new int[] {});

            SkillDatabase.CombatSkills = new CombatSkill[] { meleeSkill };
            SkillDatabase.MagicSkills  = new MagicSkill[] { passiveMagicSkill };
        }