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);
                        }
                    }
                }
            }
        }
Example #2
0
        // Token: 0x06000026 RID: 38 RVA: 0x00003C9C File Offset: 0x00001E9C
        public static void StaticActivate(Character character, object[] _infos, Effect instance)
        {
            float localRangeSquared = 100f;
            Dictionary <Character, float> dictionary = new Dictionary <Character, float>();
            List <Character> list = new List <Character>();

            CharacterManager.Instance.FindCharactersInRange(character.CenterPosition, CelestialSurge.range + 10f, ref list);
            list = (from c in list
                    where c.Faction != character.Faction
                    select c).ToList <Character>();
            using (IEnumerator <Character> enumerator = (from c in list
                                                         where c.StatusEffectMngr.HasStatusEffect("Radiating")
                                                         select c).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    Character chr = enumerator.Current;
                    float     num = CelestialSurge.AmpDamage(character, Radiating.sumTicks(chr.StatusEffectMngr.GetStatusEffectOfName("Radiating").RemainingLifespan) + 40f, DamageType.Types.Electric);
                    IEnumerable <Character> source = list;

                    foreach (Character character2 in source.Where(c => (c.transform.position - chr.transform.position).sqrMagnitude <= localRangeSquared))
                    {
                        bool flag = !character2.Invincible;
                        if (flag)
                        {
                            float num2;
                            dictionary[character2] = (dictionary.TryGetValue(character2, out num2) ? num2 : 0f) + num;
                        }
                    }
                }
            }
            foreach (KeyValuePair <Character, float> keyValuePair in dictionary)
            {
                DamageList damageList = new DamageList(DamageType.Types.Electric, keyValuePair.Value);
                keyValuePair.Key.Stats.GetMitigatedDamage(null, ref damageList);
                keyValuePair.Key.Stats.ReceiveDamage(damageList.TotalDamage);
                bool flag2 = damageList.TotalDamage > 55f;
                if (flag2)
                {
                    keyValuePair.Key.AutoKnock(true, Vector3.zero);
                }
                else
                {
                    CasualStagger.Stagger(keyValuePair.Key);
                }
            }
        }
        // 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);
            }
        }
Example #4
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);
            }
        }