コード例 #1
0
        /// <summary>
        /// Returns the animation numbers for pre-battle animations
        /// </summary>
        public static List <int> pre_battle_animation_value(Animation_Setup_Data battler, int offset)
        {
            offset += ATTACK_ANIM_OFFSET;
            switch (battler.Class_Id)
            {
                #region 61: Dragon Master
            case 61:
                if (battler.Swoop_Activated)
                {
                    return(offset.list_add(new List <int> {
                        23
                    }));
                }
                break;
                #endregion
            }

            var anim_set = animation_set(battler);
            if (anim_set != null)
            {
                return(offset.list_add(anim_set.PreFight));
            }

            return(new List <int>());
        }
コード例 #2
0
        public static Battle_Animation_Association_Data animation_set(Animation_Setup_Data battler)
        {
            if (Animation_Battler_Data != null)
            {
                return(Animation_Battler_Data.animation_set(battler.Key, battler.Gender));
            }

            return(null);
        }
コード例 #3
0
        public static List <int> dance_return_animation_value(Animation_Setup_Data battler, int offset)
        {
            offset += ATTACK_ANIM_OFFSET;
            switch (battler.Class_Id)
            {
            }

            var anim_set = animation_set(battler);

            if (anim_set != null)
            {
                return(offset.list_add(anim_set.DanceReturn));
            }

            return(new List <int>());
        }
コード例 #4
0
        /// <summary>
        /// Returns the animation numbers for avoid return animations
        /// </summary>
        public static List <int> avoid_return_animation_value(Animation_Setup_Data battler, int offset)
        {
            switch (battler.Class_Id)
            {
            }

            var anim_set = animation_set(battler);

            if (anim_set != null)
            {
                return(offset.list_add(anim_set.AvoidReturn));
            }

            return(offset.list_add(new List <int> {
                AVOID_RETURN_ANIM
            }));
        }
コード例 #5
0
        /// <summary>
        /// Returns the animation numbers for idle animations
        /// </summary>
        public static List <int> idle_animation_value(Animation_Setup_Data battler, int offset)
        {
            switch (battler.Class_Id)
            {
            }

            var anim_set = animation_set(battler);

            if (anim_set != null)
            {
                return(offset.list_add(anim_set.Idle));
            }

            return(offset.list_add(new List <int> {
                IDLE_ANIM
            }));
        }
コード例 #6
0
        public static List <int> refresh_animation_value(Animation_Setup_Data battler, int offset, int ring_id)
        {
            switch (ring_id)
            {
            case 91:     // Deus's Geas
                return(offset.list_add(new List <int>()
                {
                    7
                }));

            case 92:     // Mulciber's Iron
                return(offset.list_add(new List <int>()
                {
                    8
                }));

            case 93:     // Set's Litany
                return(offset.list_add(new List <int>()
                {
                    9
                }));

            case 94:     // Mot's Mercy
                return(offset.list_add(new List <int>()
                {
                    10
                }));

            case 95:     // El's Passage
                return(offset.list_add(new List <int>()
                {
                    11
                }));

            default:     // No Ring
                return(offset.list_add(new List <int>()
                {
                    6
                }));
            }
            return(new List <int>());
        }
コード例 #7
0
        // Returns the animation numbers of the given class as it starts to attack
        public static List <int> attack_animation_value(Animation_Setup_Data battler, int offset, bool crit, bool hit)
        {
            offset += ATTACK_ANIM_OFFSET;
            switch (battler.Class_Id)
            {
                #region 51: Swordmaster
            case 51:
                // Astra
                if (battler.Astra_Activated)
                {
                    if (battler.Astra_Missed)
                    {
                        return(offset.list_add(new List <int>()
                        {
                            17, 41
                        }));
                    }
                    else
                    {
                        switch (battler.Astra_Count)
                        {
                        case 4:
                            return(offset.list_add(new List <int>()
                            {
                                17, 18, crit ? 32 : 19
                            }));

                        case 3:
                            return(offset.list_add(new List <int>()
                            {
                                crit ? 34 : 22
                            }));

                        case 2:
                            return(offset.list_add(new List <int>()
                            {
                                crit ? 36 : 25
                            }));

                        case 1:
                            return(offset.list_add(new List <int>()
                            {
                                crit ? 38 : 28
                            }));

                        default:
                            return(offset.list_add(new List <int>()
                            {
                                crit ? 40 : 31
                            }));
                        }
                    }
                }
                break;
                #endregion
            }

            var anim_set = animation_set(battler);
            if (anim_set != null)
            {
                AttackAnims anim = AttackAnims.Attack;
                // Hit
                anim |= AttackAnims.HitDefined;
                if (hit)
                {
                    anim |= AttackAnims.Hit;
                }
                // Crit
                anim |= AttackAnims.CritDefined;
                if (crit)
                {
                    anim |= AttackAnims.Crit;
                }
                // Skill
                anim |= AttackAnims.SkillDefined;
                if (battler.Skill)
                {
                    anim |= AttackAnims.SkillActive;
                }
                var attack = anim_set.attack_animation(battler.anim_type, battler.Distance, anim);
                return(offset.list_add(attack));
            }

            return(new List <int>());
        }
コード例 #8
0
        /// <summary>
        /// Returns the animation numbers for gethit animations
        /// </summary>
        public static List <int> get_hit_animation_value(Animation_Setup_Data battler, int offset, bool crit)
        {
            if (false) //Debug
            {
                switch (battler.Class_Id)
                {
                    #region 25: Brigand
                case 25:
                    #endregion
                    if (!battler.Equipped)
                    {
                        return(offset.list_add(new List <int> {
                            IDLE_ANIM
                        }));
                    }
                    break;

                    #region 44: Sorcerer
                case 44:
                    #endregion
                    if (battler.Gender % 2 == 1)
                    {
                        return(offset.list_add(new List <int> {
                            IDLE_ANIM
                        }));
                    }
                    break;

                    #region classes without throw axe or unarmed frames
                    #endregion
                    if (!battler.Equipped || battler.Weapon_Thrown)
                    {
                        return(offset.list_add(new List <int> {
                            IDLE_ANIM
                        }));
                    }
                    break;

                    #region classes without throw axe frames
                    #endregion
                    #region 24: Fighter
                case 24:
                    #endregion
                    if (battler.Weapon_Thrown)
                    {
                        return(offset.list_add(new List <int> {
                            IDLE_ANIM
                        }));
                    }
                    break;
                }
            }

            var anim_set = animation_set(battler);
            if (anim_set != null)
            {
                if (!crit)
                {
                    return(offset.list_add(anim_set.GetHit));
                }
                else
                {
                    return(offset.list_add(anim_set.get_crit));
                }
            }

            return(offset.list_add(new List <int> {
                crit?GET_CRIT_ANIM: GET_HIT_ANIM
            }));
        }
コード例 #9
0
        // Returns the animation numbers of the given class as it returns after attack
        public static List <int> return_animation_value(Animation_Setup_Data battler, int offset, bool crit, bool hit, bool no_damage)
        {
            offset += ATTACK_ANIM_OFFSET;
            switch (battler.Class_Id)
            {
                #region 51: Swordmaster
            case 51:
                // Astra
                if (battler.Astra_Activated && battler.Astra_Count > 0)
                {
                    switch (battler.Astra_Count)
                    {
                    case 4:
                        return(offset.list_add(new List <int>()
                        {
                            21
                        }));

                    case 3:
                        return(offset.list_add(new List <int>()
                        {
                            24
                        }));

                    case 2:
                        return(offset.list_add(new List <int>()
                        {
                            27
                        }));

                    default:
                        return(offset.list_add(new List <int>()
                        {
                            30
                        }));
                    }
                }
                break;
                #endregion
            }

            var anim_set = animation_set(battler);
            if (anim_set != null)
            {
                AttackAnims anim = AttackAnims.Return;
                // Hit
                anim |= AttackAnims.HitDefined;
                if (hit)
                {
                    anim |= AttackAnims.Hit;
                }
                // Crit
                anim |= AttackAnims.CritDefined;
                if (crit)
                {
                    anim |= AttackAnims.Crit;
                }
                // No Damage
                anim |= AttackAnims.DamageDefined;
                if (!no_damage)
                {
                    anim |= AttackAnims.CausedDamage;
                }
                // Skill
                anim |= AttackAnims.SkillDefined;
                if (battler.Skill)
                {
                    anim |= AttackAnims.SkillActive;
                }
                return(offset.list_add(anim_set.attack_animation(battler.anim_type, battler.Distance, anim)));
            }

            return(new List <int>());
        }