Example #1
0
    public Ability(Item item, float damage, float critDamage, float critChance, float range, int cooldown, Ability_Type type, Func <Unit, Unit, Ability, bool> callback)
    {
        this.name         = item.name;
        this.description  = item.description;
        this.ID           = item.ID;
        this.actionPoints = item.actionPoints;
        if (mesh != null)
        {
            this.mesh = item.mesh;
        }
        if (icon != null)
        {
            this.icon = item.icon;
        }

        this.damage      = damage;
        this.critChance  = critChance;
        this.critDamage  = critDamage;
        this.abilityType = type;
        this.range       = range;
        this.cooldown    = cooldown;

        this.callback = callback;
    }
Example #2
0
    public static Skill Get_Skill(Ability_Type skill_num)
    {
        Skill skill = skills.Find(x => x.ability_type.Equals((int)skill_num));

        return(skill);
    }
Example #3
0
    public static float Get_Skill_Val(Ability_Type skill_num)
    {
        Skill skill = skills.Find(x => x.ability_type.Equals((int)skill_num));

        return(skill == null ? 0 : skill.f_total);
    }
Example #4
0
    public static void Set_Player_Stat(Ability_Type skill_Type)
    {
        Debug.Log("이거냐?????");
        switch (skill_Type)
        {
        case Ability_Type.add_atk_speed:
            int_Atk_Speed = 100 + Skill_s.Get_Skill_Val(Ability_Type.add_atk_speed)
                            + (Use_skill_1 ? (int)Skill_s.Get_Skill_Val(Ability_Type.skill_atk_speed) : 0);
            break;

        case Ability_Type.add_speed:
            int_Speed = 100 + Skill_s.Get_Skill_Val(Ability_Type.add_speed)
                        + (Use_skill_2 ? (int)Skill_s.Get_Skill_Val(Ability_Type.skill_speed) : 0);

            int_Top_Scroll_Speed = -int_Speed / 90.0f;
            int_Btm_Scroll_Speed = -int_Speed / 60.0f;

            break;

        case Ability_Type.add_critical_damege:
            int_Critical_Damege = 5 + Skill_s.Get_Skill_Val(Ability_Type.add_critical_damege);

            break;

        case Ability_Type.add_critical_percent:
            int_Critical_Percent = 1 + Skill_s.Get_Skill_Val(Ability_Type.add_critical_percent);

            break;

        case Ability_Type.add_level:
            int_Lv = BackEndDataManager.instance.Character_Data.int_character_Lv + (int)Skill_s.Get_Skill_Val(Ability_Type.add_level);

            float skill_atk = Use_skill_0 ? Skill_s.Get_Skill_Val(Ability_Type.skill_atk) : 0;


            int_Base_Atk = 100 + (100 / 20) * (int_Lv - 1);
            BigInteger int_Upgrade = (int_Base_Atk * BackEndDataManager.instance.Character_Data.Int_Upgrade_Lv * 5) / 100;
            int_Total_Atk = int_Base_Atk + int_Upgrade + (int)Skill_s.Get_Skill_Val(Ability_Type.add_atk) + (int_Base_Atk * (int)skill_atk) / 100;

            int_Hp = 2000 + (2000 / 20) * ((BigInteger)int_Lv - 1);
            UiManager.instance.Set_Character_Lv();
            UiManager.instance.Set_Buy_Lv();
            break;

        case Ability_Type.add_atk:

            skill_atk = Use_skill_0 ? Skill_s.Get_Skill_Val(Ability_Type.skill_atk) : 0;


            int_Base_Atk  = 100 + (100 / 20) * (int_Lv - 1);
            int_Upgrade   = (int_Base_Atk * BackEndDataManager.instance.Character_Data.Int_Upgrade_Lv * 5) / 100;
            int_Total_Atk = int_Base_Atk + int_Upgrade + (int)Skill_s.Get_Skill_Val(Ability_Type.add_atk) + (int_Base_Atk * (int)skill_atk) / 100;

            break;

        default:
            break;
        }

        UiManager.instance.Set_Character_Stat();
    }