// Token: 0x06000041 RID: 65 RVA: 0x000048C0 File Offset: 0x00002AC0 protected override void ActivateLocally(Character character, object[] _infos) { float num = 15f; object value = At.GetValue(typeof(Effect), this, "m_parentStatusEffect"); StatusEffect parent = value as StatusEffect; bool flag = parent != null; if (flag) { float num2 = num - parent.RemainingLifespan; float damage = Radiating.AmpDamage(parent.SourceCharacter, 15f * Convert.ToSingle(Math.Exp((double)(-(double)num2 / 10f))) / Radiating.normalize(), DamageType.Types.Electric); List <Character> list = new List <Character>(); CharacterManager.Instance.FindCharactersInRange(character.CenterPosition, 10f, ref list); IEnumerable <Character> source = list; foreach (Character character2 in source.Where(x => x.Faction != parent.SourceCharacter.Faction)) { bool flag2 = !character2.Invincible; if (flag2) { DamageList damageList = new DamageList(DamageType.Types.Electric, damage); character2.Stats.GetMitigatedDamage(null, ref damageList); character2.Stats.ReceiveDamage(damageList.TotalDamage); } } } else { Debug.Log("Radiating Effect had not parent Status Effect"); } }
// Token: 0x06000031 RID: 49 RVA: 0x000041FC File Offset: 0x000023FC public static StatusEffect MakeRadiatingPrefab() { StatusEffect statusEffect = TinyEffectManager.MakeStatusEffectPrefab("Radiating", "Radiating", "Damages you and your nearby allies.", 15f, 1f, StatusEffectFamily.StackBehaviors.Override, "Doom", true, 134.ToString(), null, "com.ehaugw.templarclass"); EffectSignature statusEffectSignature = statusEffect.StatusEffectSignature; Radiating radiating = TinyEffectManager.MakeFreshObject("Effects", true, true, statusEffectSignature.transform).AddComponent <Radiating>(); radiating.UseOnce = false; statusEffectSignature.Effects = new List <Effect> { radiating }; statusEffect.OverrideIcon = CustomTextures.CreateSprite(SL.Packs["Templar"].Texture2D["radiatingIcon"], 0); return(statusEffect); }
// 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); } } }
public static void Prefix(StatusEffectManager __instance, StatusEffect _statusEffect, out StatusData __state) { __state = null; bool flag = _statusEffect.IdentifierName == Templar.Instance.radiatingInstance.IdentifierName && __instance.HasStatusEffect(_statusEffect.IdentifierName); if (flag) { __state = _statusEffect.StatusData; _statusEffect.StatusData = new StatusData(__state); float remainingLifespan = __instance.GetStatusEffectOfName(_statusEffect.IdentifierName).RemainingLifespan; float num = (_statusEffect.RemainingLifespan != 0f) ? _statusEffect.RemainingLifespan : _statusEffect.StartLifespan; float num2 = Radiating.sumTicks(remainingLifespan); float num3 = Radiating.sumTicks(num); num = Radiating.sumToRemain(num2 + num3); _statusEffect.StatusData.LifeSpan = num; } }