/// <summary>
    /// Create a UMeleeCombatSkill.</summary>
    /// <returns>A ScriptableObject</returns>
    GenericCombatSkillData CreateGenericCombatSkill()
    {
        var skill = new GenericCombatSkill(
            id: GetId("MagicSkill"),
            name: _name,
            description: _description,
            cooldownTime: _cooldownTime,
            damage: _damage,
            itemSequence: new int[] { },
            maximumTargets: _maximumTargets,
            range: _range);
        var scriptableSkill = ScriptableObject.CreateInstance <GenericCombatSkillData>();

        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 };
        }