public static void Postfix(ref Weapon weapon, ref float __result)
        {
            Character ownerCharacter = null;
            bool      flag;

            if (weapon != null && weapon.IsEquipped)
            {
                ownerCharacter = weapon.OwnerCharacter;
                flag           = (ownerCharacter != null);
            }
            else
            {
                flag = false;
            }
            bool flag2 = flag;

            if (flag2)
            {
                bool flag3 = SkillRequirements.CanAddBonusBastardWeaponSpeed(ownerCharacter);
                if (flag3)
                {
                    __result += 0.1f;
                }
            }
        }
Esempio n. 2
0
        public static void Postfix(Weapon __instance, ref float __result)
        {
            Character ownerCharacter = null;
            bool      flag;

            if (__instance.IsEquipped)
            {
                ownerCharacter = __instance.OwnerCharacter;
                flag           = (ownerCharacter != null);
            }
            else
            {
                flag = false;
            }
            bool flag2 = flag;

            if (flag2)
            {
                bool flag3 = SkillRequirements.CanReduceWeaponAttackStaminaCost(ownerCharacter);
                if (flag3)
                {
                    __result *= 1f - JuggernautFormulas.GetRuthlessAttackStaminaCostReduction(ownerCharacter);
                }
            }
        }
        public static void Postfix(Character __instance, ref DamageList __result, Weapon _weapon, DamageList _damage, Vector3 _hitDir, Vector3 _hitPoint, float _angle, float _angleDir, Character _dealerChar, float _knockBack, bool _hitInventory)
        {
            bool flag = SkillRequirements.CanEnrageFromDamage(__instance) && __result.TotalDamage > 0f;

            if (flag)
            {
                __instance.StatusEffectMngr.AddStatusEffectBuildUp(ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Rage"), _damage.TotalDamage, __instance);
            }
            bool flag2 = SkillRequirements.CanTerrify((_weapon != null) ? _weapon.OwnerCharacter : null) && __result.TotalDamage > 0f;

            if (flag2)
            {
                List <Character> list = new List <Character>();
                CharacterManager.Instance.FindCharactersInRange(__instance.CenterPosition, 7f, ref list);
                list = (from c in list
                        where c.Faction == __instance.Faction
                        select c).ToList <Character>();
                foreach (Character character in list)
                {
                    StatusEffectManager statusEffectMngr = character.StatusEffectMngr;
                    bool flag3 = statusEffectMngr != null;
                    if (flag3)
                    {
                        bool flag4 = statusEffectMngr.HasStatusEffect("Confusion");
                        statusEffectMngr.AddStatusEffectBuildUp(ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Confusion"), Mathf.Clamp(__result.TotalDamage, 0f, 20f), character);
                        bool flag5 = !flag4 && statusEffectMngr.HasStatusEffect("Confusion");
                        if (flag5)
                        {
                            CasualStagger.Stagger(character);
                        }
                    }
                }
            }
        }
        public static void Postfix(CharacterEquipment __instance, ref float __result)
        {
            Character character = At.GetValue(typeof(CharacterEquipment), __instance, "m_character") as Character;
            bool      flag      = character != null && SkillRequirements.CanAddProtectionToImpactResistance(character);

            if (flag)
            {
                __result += __instance.GetEquipmentDamageProtection(DamageType.Types.Physical);
            }
        }
        public static void Postfix(CharacterEquipment __instance, ref float __result, ref DamageType.Types _type)
        {
            Character character = At.GetValue(typeof(CharacterEquipment), __instance, "m_character") as Character;
            bool      flag      = character != null;

            if (flag)
            {
                bool flag2 = (SkillRequirements.CanAddProtectionToPhysicalResistance(character) && _type == DamageType.Types.Physical) || SkillRequirements.CanAddProtectionToAnyDamageResistance(character);
                if (flag2)
                {
                    __result += __instance.GetEquipmentDamageProtection(DamageType.Types.Physical);
                }
            }
        }
Esempio n. 6
0
        public static void Prefix(CharacterEquipment __instance, out Tuple <float?, Stat, Character> __state)
        {
            __state = null;
            Character character = At.GetValue(typeof(CharacterEquipment), __instance, "m_character") as Character;
            bool      flag      = character != null && SkillRequirements.CanReduceMoveSpeedArmorPenalty(character);

            if (flag)
            {
                CharacterStats stats = character.Stats;
                Stat           stat  = At.GetValue(typeof(CharacterStats), stats, "m_equipementPenalties") as Stat;
                bool           flag2 = stat != null;
                if (flag2)
                {
                    __state = new Tuple <float?, Stat, Character>(new float?(stat.CurrentValue), stat, character);
                    At.SetValue <float>(__state.Item1.Value * JuggernautFormulas.GetUnyieldingMovementSpeedForgivenes(character), typeof(Stat), stat, "m_currentValue");
                }
            }
        }
        // Token: 0x06000014 RID: 20 RVA: 0x00002988 File Offset: 0x00000B88
        public static void StaticActivate(HordeBreakerEffect effect, Character defender, Character offender, object[] _infos, Effect instance)
        {
            bool flag = SkillRequirements.Careful(offender) && defender.StatusEffectMngr.HasStatusEffect("Confusion");

            if (flag)
            {
                defender.AutoKnock(true, Vector3.zero);
            }
            else
            {
                CasualStagger.Stagger(defender);
            }
            bool flag2 = SkillRequirements.Vengeful(offender) && defender.StatusEffectMngr.HasStatusEffect("Pain");

            if (flag2)
            {
                Debug.Log("SLOW");
                defender.StatusEffectMngr.AddStatusEffect(ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Slow Down"), offender);
            }
        }
        public static void Postfix(CharacterStats __instance, ref DamageList _damages)
        {
            Character character = At.GetValue(typeof(CharacterStats), __instance, "m_character") as Character;
            bool      flag      = character != null;

            if (flag)
            {
                bool flag2 = SkillRequirements.CanAddBonusRageDamage(character);
                if (flag2)
                {
                    _damages *= 1f + JuggernautFormulas.GetRuthlessDamageBonus(character);
                }
                bool flag3 = SkillRequirements.CanConvertToRawDamage(character);
                if (flag3)
                {
                    float totalDamage            = _damages.TotalDamage;
                    float ruthlessRawDamageRatio = JuggernautFormulas.GetRuthlessRawDamageRatio(character);
                    _damages *= 1f - ruthlessRawDamageRatio;
                    _damages.Add(new DamageType(DamageType.Types.Raw, totalDamage * ruthlessRawDamageRatio));
                }
            }
        }
Esempio n. 9
0
        // Token: 0x06000012 RID: 18 RVA: 0x0000287C File Offset: 0x00000A7C
        protected override void ActivateLocally(Character _affectedCharacter, object[] _infos)
        {
            List <Character> list = new List <Character>();

            CharacterManager.Instance.FindCharactersInRange(_affectedCharacter.CenterPosition, 20f, ref list);
            list = (from c in list
                    where c.Faction != _affectedCharacter.Faction
                    select c).ToList <Character>();
            foreach (Character character in list)
            {
                bool flag = SkillRequirements.Careful(_affectedCharacter);
                if (flag)
                {
                    character.StatusEffectMngr.AddStatusEffect(ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Confusion"), _affectedCharacter);
                }
                bool flag2 = SkillRequirements.Vengeful(_affectedCharacter);
                if (flag2)
                {
                    character.StatusEffectMngr.AddStatusEffect(ResourcesPrefabManager.Instance.GetStatusEffectPrefab("Pain"), _affectedCharacter);
                }
                CasualStagger.Stagger(character);
            }
        }
Esempio n. 10
0
 // Token: 0x06000025 RID: 37 RVA: 0x00002CA4 File Offset: 0x00000EA4
 public static bool CanAddBonusBastardWeaponSpeed(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502015));
 }
Esempio n. 11
0
 // Token: 0x06000024 RID: 36 RVA: 0x00002C84 File Offset: 0x00000E84
 public static bool CanAddProtectionToAnyDamageResistance(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502021));
 }
Esempio n. 12
0
 // Token: 0x06000021 RID: 33 RVA: 0x00002C24 File Offset: 0x00000E24
 public static bool CanParryCancelnimations(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502019));
 }
Esempio n. 13
0
 // Token: 0x06000020 RID: 32 RVA: 0x00002C04 File Offset: 0x00000E04
 public static bool Vengeful(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502020));
 }
Esempio n. 14
0
 // Token: 0x0600002E RID: 46 RVA: 0x00002E1C File Offset: 0x0000101C
 public static bool ApplyRuthlessSize(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502022));
 }
Esempio n. 15
0
 // Token: 0x0600002D RID: 45 RVA: 0x00002DEC File Offset: 0x00000FEC
 public static bool CanTerrify(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502022) && SkillRequirements.SafeHasSkillKnowledge(character, 2502019));
 }
Esempio n. 16
0
 // Token: 0x0600002A RID: 42 RVA: 0x00002D64 File Offset: 0x00000F64
 public static bool ShouldPurgeAllExceptRageGivenEnraged(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502022) && SkillRequirements.Vengeful(character));
 }
Esempio n. 17
0
 // Token: 0x06000029 RID: 41 RVA: 0x00002D34 File Offset: 0x00000F34
 public static bool CanReduceWeaponAttackStaminaCost(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502022) && SkillRequirements.Enraged(character) && SkillRequirements.Vengeful(character));
 }
        public static bool Prefix(StatusEffectManager __instance, ref StatusEffect _statusEffect)
        {
            StatusEffect statusEffect  = _statusEffect;
            IList <Tag>  inheritedTags = statusEffect.InheritedTags;
            Character    character     = null;
            bool         flag;

            if (statusEffect != null && statusEffect.HasMatch(TagSourceManager.Boon))
            {
                character = (At.GetValue(typeof(StatusEffectManager), __instance, "m_character") as Character);
                flag      = (character != null);
            }
            else
            {
                flag = false;
            }
            bool flag2 = flag;

            if (flag2)
            {
                bool?flag3 = null;
                bool flag4 = SkillRequirements.ShouldPurgeAllExceptRageGivenEnraged(character) && (SkillRequirements.Enraged(character) || SkillRequirements.IsRageEffect(statusEffect));
                if (flag4)
                {
                    flag3 = new bool?(false);
                }
                bool flag5 = SkillRequirements.ShouldPurgeOnlyRageGivenDisciplined(character) && (SkillRequirements.Disciplined(character) || SkillRequirements.IsDisciplineEffect(statusEffect));
                if (flag5)
                {
                    flag3 = new bool?(true);
                }
                bool flag6 = flag3 != null;
                if (flag6)
                {
                    bool?flag8;
                    foreach (StatusEffect statusEffect2 in __instance.Statuses)
                    {
                        bool flag9;
                        if (statusEffect2.HasMatch(TagSourceManager.Boon))
                        {
                            bool flag7 = SkillRequirements.IsRageEffect(statusEffect2);
                            flag8 = flag3;
                            flag9 = (flag7 == flag8.GetValueOrDefault() & flag8 != null);
                        }
                        else
                        {
                            flag9 = false;
                        }
                        bool flag10 = flag9;
                        if (flag10)
                        {
                            statusEffect2.IncreaseAge(Convert.ToInt32(statusEffect2.RemainingLifespan));
                        }
                    }
                    bool flag11 = SkillRequirements.IsRageEffect(statusEffect);
                    flag8 = flag3;
                    bool flag12 = flag11 == flag8.GetValueOrDefault() & flag8 != null;
                    if (flag12)
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
Esempio n. 19
0
 // Token: 0x06000027 RID: 39 RVA: 0x00002CE4 File Offset: 0x00000EE4
 public static bool CanEnrageFromDamage(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502020));
 }
 // Token: 0x0600000E RID: 14 RVA: 0x000026A0 File Offset: 0x000008A0
 public static float GetRuthlessBodySize(Character character)
 {
     return(SkillRequirements.ApplyRuthlessSize(character) ? 1.1f : 1f);
 }
        public static bool Prefix(Character __instance, ref bool _active)
        {
            bool isAI = __instance.IsAI;
            bool result;

            if (isAI)
            {
                result = true;
            }
            else
            {
                bool flag = !__instance.IsPhotonPlayerLocal || __instance.Sheathing || __instance.PreparingToSleep || __instance.Dodging || __instance.CurrentSpellCast == Character.SpellCastType.Flamethrower || __instance.CurrentSpellCast == Character.SpellCastType.PushKick;
                if (flag)
                {
                    result = true;
                }
                else
                {
                    bool flag2 = !_active || (__instance.InLocomotion && __instance.NextIsLocomotion);
                    if (flag2)
                    {
                        result = true;
                    }
                    else
                    {
                        bool flag3 = __instance.ShieldEquipped || __instance.CurrentWeapon == null || !SkillRequirements.CanParryCancelnimations(__instance);
                        if (flag3)
                        {
                            result = true;
                        }
                        else
                        {
                            int  num   = (int)At.GetValue(typeof(Character), __instance, "m_dodgeAllowedInAction");
                            bool flag4 = num > 0 && __instance.NextAtkAllowed > 0;
                            if (flag4)
                            {
                                __instance.photonView.RPC("SendBlockStateTrivial", 0, new object[]
                                {
                                    true
                                });
                                __instance.StealthInput(false);
                                result = false;
                            }
                            else
                            {
                                result = true;
                            }
                        }
                    }
                }
            }
            return(result);
        }
Esempio n. 22
0
 // Token: 0x06000028 RID: 40 RVA: 0x00002D04 File Offset: 0x00000F04
 public static bool CanAddBonusRageDamage(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502022) && SkillRequirements.Enraged(character) && SkillRequirements.Vengeful(character));
 }
Esempio n. 23
0
 // Token: 0x0600002C RID: 44 RVA: 0x00002DBC File Offset: 0x00000FBC
 public static bool CanReduceStaminaCostArmorPenalty(Character character)
 {
     return(SkillRequirements.SafeHasSkillKnowledge(character, 2502022) && SkillRequirements.SafeHasSkillKnowledge(character, 2502019));
 }