public static void Postfix(CharacterStats __instance, ref float __result, ref Character ___m_character)
        {
            Character character = ___m_character;
            Weapon    weapon    = (character != null) ? character.CurrentWeapon : null;
            bool      flag      = weapon == null;

            if (!flag)
            {
                CustomBehaviourFormulas.PostAmplifySpeed(weapon, ref __result);
            }
        }
        public static void Prefix(CharacterStats __instance, ref DamageList _damages, ref Character ___m_character)
        {
            Character character = ___m_character;
            Weapon    weapon    = (character != null) ? character.CurrentWeapon : null;
            bool      flag      = weapon == null;

            if (!flag)
            {
                CustomBehaviourFormulas.PreAmplifyDamage(weapon, ref _damages);
            }
        }
Beispiel #3
0
        // Token: 0x0600000D RID: 13 RVA: 0x00002438 File Offset: 0x00000638
        public static void PostAmplifySpeed(Weapon weapon, ref float result)
        {
            bool flag = weapon == null;

            if (!flag)
            {
                bool flag2 = BehaviourManager.IsBastardMode(weapon);
                if (flag2)
                {
                    result += CustomBehaviourFormulas.GetBastardSpeedBonus(weapon);
                }
                bool flag3 = WeaponManager.Speeds.ContainsKey(weapon.Type) && WeaponManager.Speeds.ContainsKey(BehaviourManager.GetCurrentAnimationType(weapon));
                if (flag3)
                {
                    result *= WeaponManager.Speeds[BehaviourManager.GetCurrentAnimationType(weapon)] / WeaponManager.Speeds[weapon.Type];
                }
            }
        }
Beispiel #4
0
        // Token: 0x0600000F RID: 15 RVA: 0x000024CC File Offset: 0x000006CC
        public static void PreAmplifyDamage(Weapon weapon, ref DamageList _list)
        {
            bool flag = weapon == null;

            if (!flag)
            {
                bool flag2 = BehaviourManager.IsHolyWeaponMode(weapon);
                if (flag2)
                {
                    float holyWeaponConvertionRate = CustomBehaviourFormulas.GetHolyWeaponConvertionRate(weapon);
                    float totalDamage = _list.TotalDamage;
                    _list *= 1f - holyWeaponConvertionRate;
                    _list.Add(new DamageType(CustomBehaviourFormulas.GetHolyDamageType(), totalDamage * holyWeaponConvertionRate));
                }
                bool flag3 = BehaviourManager.IsBastardMode(weapon);
                if (flag3)
                {
                    _list *= 1f + CustomBehaviourFormulas.GetBastardDamageBonus(weapon);
                }
            }
        }