public static SkillDescriptor Create(SkillKey key)
        {
            switch (key)
            {
                case SkillKey.None1:
                case SkillKey.None2:
                case SkillKey.None3:
                case SkillKey.None4:
                    return delegate { return "invalid skill: " + key; };

                case SkillKey.ArcherReload:
                case SkillKey.PaladinDefense:
                case SkillKey.PaladinPurification:
                case SkillKey.PaladinMassDefense:
                    return data => data.DescriptionFormat;

                case SkillKey.WarriorAttack:
                case SkillKey.WarriorStrongAttack:
                case SkillKey.WizardFireBolt:
                case SkillKey.WizardFireBall:
                case SkillKey.ArcherSnipe:
                case SkillKey.ThiefAssassination:
                    return data =>
                    {
                        var args = new AttackSkillArguments(data.Arguments);
                        return args.Describe(data.DescriptionFormat);
                    };

                case SkillKey.WizardIceBolt:
                case SkillKey.WizardIceSpear:
                case SkillKey.ThiefSandAttack:
                case SkillKey.ThiefPoisonAttack:
                    return data =>
                    {
                        var args = data.Arguments.ToObject<AttackAndGrantStatusConditionArguments>();
                        return args.Describe(data.DescriptionFormat);
                    };

                case SkillKey.PaladinBash:
                case SkillKey.ThiefStab:
                    return data =>
                    {
                        var args = data.Arguments.ToObject<AttackAndTestStunArguments>();
                        return args.Describe(data.DescriptionFormat);
                    };

                case SkillKey.WizardLighteningBolt:
                case SkillKey.WizardLightening:
                    return data =>
                    {
                        var args = data.Arguments.ToObject<Battle.WizardLighteningBoltArguments>();
                        return args.Describe(data.DescriptionFormat);
                    };

                case SkillKey.ArcherEvadeShot:
                    return data =>
                    {
                        var args = data.Arguments.ToObject<Battle.ArcherEvadeShotArguments>();
                        return args.Describe(data.DescriptionFormat);
                    };

                case SkillKey.ArcherWeakPointAttack:
                    return data =>
                    {
                        var args = data.Arguments.ToObject<Battle.ArcherWeakPointArguments>();
                        return args.Describe(data.DescriptionFormat);
                    };

                case SkillKey.MonkEquility:
                    return data =>
                    {
                        var args = data.Arguments.ToObject<Battle.MonkEquilityArguments>();
                        return args.Describe(data.DescriptionFormat);
                    };

                case SkillKey.WarriorEvasion:
                case SkillKey.WarriorHeal:
                case SkillKey.ArcherArrowRain:
                case SkillKey.PaladinMassHeal:
                case SkillKey.PaladinBigMassHeal:
                case SkillKey.MonkHeal:
                case SkillKey.MonkSacrifice:
                case SkillKey.MonkRevenge:
                case SkillKey.MonkRecovery:
                case SkillKey.ThiefEvade:
                    return data => data.DescriptionFormat.Text.Replace(data.Arguments);
            }

            Debug.LogError(LogMessages.EnumUndefined(key));
            return delegate { return "undefined descriptor for " + key; };
        }
Exemplo n.º 2
0
 public AttackSkillActor(SkillBalanceData data, Battle context, Character owner)
     : base(data, context, owner)
 {
     Arguments = new AttackSkillArguments(data.Arguments);
 }