예제 #1
0
        public static Skill Get(SkillSheet.Row skillRow, int power, int chance)
        {
            switch (skillRow.SkillType)
            {
            case SkillType.Attack:
                switch (skillRow.SkillCategory)
                {
                case SkillCategory.NormalAttack:
                    return(new NormalAttack(skillRow, power, chance));

                case SkillCategory.DoubleAttack:
                    return(new DoubleAttack(skillRow, power, chance));

                case SkillCategory.BlowAttack:
                    return(new BlowAttack(skillRow, power, chance));

                case SkillCategory.AreaAttack:
                    return(new AreaAttack(skillRow, power, chance));

                default:
                    return(new NormalAttack(skillRow, power, chance));
                }

            case SkillType.Heal:
                return(new HealSkill(skillRow, power, chance));

            // todo: 코드상에서 버프와 디버프를 버프로 함께 구분하고 있는데, 고도화 될 수록 디버프를 구분해주게 될 것으로 보임.
            case SkillType.Buff:
            case SkillType.Debuff:
                return(new BuffSkill(skillRow, power, chance));
            }

            throw new UnexpectedOperationException(
                      $"{skillRow.Id}, {skillRow.SkillType}, {skillRow.SkillTargetType}, {skillRow.SkillCategory}");
        }
예제 #2
0
        public static string GetLocalizedName(this SkillSheet.Row row)
        {
            if (row is null)
            {
                throw new System.ArgumentNullException(nameof(row));
            }

            return(L10nManager.Localize($"SKILL_NAME_{row.Id}"));
        }
예제 #3
0
 public HealSkill(SkillSheet.Row skillRow, int power, int chance) : base(skillRow, power, chance)
 {
 }
예제 #4
0
파일: Skill.cs 프로젝트: x86chi/lib9c
 protected Skill(SkillSheet.Row skillRow, int power, int chance)
 {
     SkillRow = skillRow;
     Power    = power;
     Chance   = chance;
 }
예제 #5
0
 protected AttackSkill(SkillSheet.Row skillRow, int power, int chance) : base(skillRow, power, chance)
 {
 }
예제 #6
0
 public AreaAttack(SkillSheet.Row skillRow, int power, int chance) : base(skillRow, power, chance)
 {
 }
예제 #7
0
 public static Sprite GetIcon(this SkillSheet.Row row)
 {
     return(SpriteHelper.GetSkillIcon(row.Id));
 }