private void onCharacterSkillActivated(CharacterInstance character, SkillType skillType, float buildupTime, SkillExecutionStats executionStats) { if (character.IsPrimaryPlayerCharacter) { for (int i = 0; i < this.sm_postSkillUsePerks[SkillType.NONE].Count; i++) { PerkType perkType = this.sm_postSkillUsePerks[0][i]; List <KeyValuePair <PerkInstance, BuffSource> > perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(character, perkType); for (int k = 0; k < perkInstancesOfType.Count; k++) { KeyValuePair <PerkInstance, BuffSource> pair = perkInstancesOfType[k]; PerkInstance key = pair.Key; KeyValuePair <PerkInstance, BuffSource> pair2 = perkInstancesOfType[k]; BuffSource source = pair2.Value; GameLogic.Binder.BuffSystem.startBuffFromPerk(character, perkType, ConfigPerks.SHARED_DATA[perkType].DurationSeconds, (double)key.Modifier, source, null); } } for (int j = 0; j < ConfigSkills.ACTIVE_HERO_SKILLS.Count; j++) { if (skillType == ((SkillType)ConfigSkills.ACTIVE_HERO_SKILLS[j])) { for (int m = 0; m < this.sm_postSkillUsePerks[skillType].Count; m++) { PerkType type2 = this.sm_postSkillUsePerks[skillType][m]; List <KeyValuePair <PerkInstance, BuffSource> > list2 = CharacterStatModifierUtil.GetPerkInstancesOfType(character, type2); for (int n = 0; n < list2.Count; n++) { KeyValuePair <PerkInstance, BuffSource> pair3 = list2[n]; PerkInstance instance2 = pair3.Key; KeyValuePair <PerkInstance, BuffSource> pair4 = list2[n]; BuffSource source2 = pair4.Value; GameLogic.Binder.BuffSystem.startBuffFromPerk(character, type2, ConfigPerks.SHARED_DATA[type2].DurationSeconds, (double)instance2.Modifier, source2, null); } } } } if ((skillType == SkillType.Leap) && (character.getPerkInstanceCount(PerkType.SkillUpgradeLeap3) > 0)) { character.NextAttackIsGuaranteedCritical = true; } if (GameLogic.Binder.GameState.ActiveDungeon.hasDungeonModifier(DungeonModifierType.HeroPostSkillIncreasedSkillDamage)) { Buff buff2 = new Buff(); buff2.BaseStat1 = BaseStatProperty.SkillDamage; buff2.Modifier = ConfigDungeonModifiers.HeroPostSkillIncreasedSkillDamage.Modifier; buff2.DurationSeconds = ConfigDungeonModifiers.HeroPostSkillIncreasedSkillDamage.BuffDurationSeconds; BuffSource source3 = new BuffSource(); source3.Object = ConfigDungeonModifiers.HeroPostSkillIncreasedSkillDamage.BuffSource; buff2.Source = source3; buff2.HudSprite = "sprite_knight_player_256"; buff2.HudShowStacked = true; buff2.HudHideTimer = true; Buff buff = buff2; GameLogic.Binder.BuffSystem.startBuff(character, buff); } } }
private void onCharacterKilled(CharacterInstance killedCharacter, CharacterInstance killer, bool critted, SkillType fromSkill) { if (killer != null) { ActiveDungeon activeDungeon = GameLogic.Binder.GameState.ActiveDungeon; CharacterInstance primaryPlayerCharacter = activeDungeon.PrimaryPlayerCharacter; if (killedCharacter.IsSupport && (primaryPlayerCharacter.getPerkInstanceCount(PerkType.SummonCoinExplosion) > 0)) { float num = primaryPlayerCharacter.OwningPlayer.ActiveCharacter.getGenericModifierForPerkType(PerkType.SummonCoinExplosion); double amountPerDrop = Math.Max((double)1.0, (double)((App.Binder.ConfigMeta.MinionCoinDropCurve(activeDungeon.Floor) * num) * App.Binder.ConfigMeta.COIN_GAIN_CONTROLLER)); int dropCount = ConfigPerks.CoinExplosion.DropCountMinMax.getRandom(); Vector3 centerWorldPos = !killedCharacter.IsDead ? killedCharacter.PhysicsBody.Transform.position : killedCharacter.PositionAtTimeOfDeath; GameLogic.Binder.LootSystem.triggerResourceExplosion(ResourceType.Coin, centerWorldPos, amountPerDrop, dropCount, "TRACKING_ID_GAMEPLAY_LOOT_GAIN"); } List <KeyValuePair <PerkInstance, BuffSource> > perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(primaryPlayerCharacter, PerkType.SummonCritterOnKill); for (int i = 0; i < perkInstancesOfType.Count; i++) { KeyValuePair <PerkInstance, BuffSource> pair = perkInstancesOfType[i]; float modifier = pair.Key.Modifier; if (UnityEngine.Random.Range((float)0f, (float)1f) <= modifier) { GameLogic.Binder.CharacterSpawningSystem.summonSupportCritters(primaryPlayerCharacter, 1, new Vector3?(killedCharacter.PositionAtTimeOfDeath)); } } if (killer.IsPrimaryPlayerCharacter) { perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(primaryPlayerCharacter, PerkType.KillArmor); for (int j = 0; j < perkInstancesOfType.Count; j++) { KeyValuePair <PerkInstance, BuffSource> pair2 = perkInstancesOfType[j]; KeyValuePair <PerkInstance, BuffSource> pair3 = perkInstancesOfType[j]; GameLogic.Binder.BuffSystem.startBuffFromPerk(primaryPlayerCharacter, PerkType.KillArmor, ConfigPerks.SHARED_DATA[PerkType.KillArmor].DurationSeconds, (double)pair2.Key.Modifier, pair3.Value, null); } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(primaryPlayerCharacter, PerkType.KillAttackSpeed); for (int k = 0; k < perkInstancesOfType.Count; k++) { KeyValuePair <PerkInstance, BuffSource> pair4 = perkInstancesOfType[k]; KeyValuePair <PerkInstance, BuffSource> pair5 = perkInstancesOfType[k]; GameLogic.Binder.BuffSystem.startBuffFromPerk(primaryPlayerCharacter, PerkType.KillAttackSpeed, ConfigPerks.SHARED_DATA[PerkType.KillAttackSpeed].DurationSeconds, (double)pair4.Key.Modifier, pair5.Value, null); } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(primaryPlayerCharacter, PerkType.KillDamage); for (int m = 0; m < perkInstancesOfType.Count; m++) { KeyValuePair <PerkInstance, BuffSource> pair6 = perkInstancesOfType[m]; KeyValuePair <PerkInstance, BuffSource> pair7 = perkInstancesOfType[m]; GameLogic.Binder.BuffSystem.startBuffFromPerk(primaryPlayerCharacter, PerkType.KillDamage, ConfigPerks.SHARED_DATA[PerkType.KillDamage].DurationSeconds, (double)pair6.Key.Modifier, pair7.Value, null); } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(primaryPlayerCharacter, PerkType.KillCritChance); for (int n = 0; n < perkInstancesOfType.Count; n++) { KeyValuePair <PerkInstance, BuffSource> pair8 = perkInstancesOfType[n]; KeyValuePair <PerkInstance, BuffSource> pair9 = perkInstancesOfType[n]; GameLogic.Binder.BuffSystem.startBuffFromPerk(primaryPlayerCharacter, PerkType.KillCritChance, ConfigPerks.SHARED_DATA[PerkType.KillCritChance].DurationSeconds, (double)pair8.Key.Modifier, pair9.Value, null); } } } }
private void onMultikillBonusGranted(Player player, int killCount, double coinAmount) { CharacterInstance activeCharacter = player.ActiveCharacter; List <KeyValuePair <PerkInstance, BuffSource> > perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.MultikillShield); for (int i = 0; i < perkInstancesOfType.Count; i++) { KeyValuePair <PerkInstance, BuffSource> pair = perkInstancesOfType[i]; KeyValuePair <PerkInstance, BuffSource> pair2 = perkInstancesOfType[i]; this.startOrRefreshBuffFromPerk(activeCharacter, PerkType.MultikillShield, ConfigPerks.SHARED_DATA[PerkType.MultikillShield].DurationSeconds, (double)pair.Key.Modifier, pair2.Value, null); } }
private void grantMultikillReward(int killCount) { ActiveDungeon activeDungeon = GameLogic.Binder.GameState.ActiveDungeon; if (!activeDungeon.isTutorialDungeon()) { Player player = GameLogic.Binder.GameState.Player; double baseAmount = App.Binder.ConfigMeta.MultikillCoinGainCurve(killCount, activeDungeon.Floor); baseAmount = CharacterStatModifierUtil.ApplyCoinBonuses(player.ActiveCharacter, GameLogic.CharacterType.UNSPECIFIED, baseAmount, false); CmdGainResources.ExecuteStatic(player, ResourceType.Coin, baseAmount, true, "TRACKING_ID_GAMEPLAY_LOOT_GAIN", null); GameLogic.Binder.EventBus.MultikillBonusGranted(player, killCount, baseAmount); } }
private static void ApplyRunestoneBuffs(CharacterInstance source, CharacterInstance target) { List <KeyValuePair <PerkInstance, BuffSource> > perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(source, PerkType.SkillUpgradeOmnislash4); for (int i = 0; i < perkInstancesOfType.Count; i++) { KeyValuePair <PerkInstance, BuffSource> pair = perkInstancesOfType[i]; KeyValuePair <PerkInstance, BuffSource> pair2 = perkInstancesOfType[i]; GameLogic.Binder.BuffSystem.startOrRefreshBuffFromPerk(target, PerkType.SkillUpgradeOmnislash4, ConfigPerks.SHARED_DATA[PerkType.SkillUpgradeOmnislash4].DurationSeconds, pair.Key.Modifier * source.SkillDamage(true), pair2.Value, source); } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(source, PerkType.SkillUpgradeOmnislash1); for (int j = 0; j < perkInstancesOfType.Count; j++) { KeyValuePair <PerkInstance, BuffSource> pair3 = perkInstancesOfType[j]; KeyValuePair <PerkInstance, BuffSource> pair4 = perkInstancesOfType[j]; GameLogic.Binder.BuffSystem.startOrRefreshBuffFromPerk(target, PerkType.SkillUpgradeOmnislash1, ConfigPerks.SHARED_DATA[PerkType.SkillUpgradeOmnislash1].DurationSeconds, (double)pair3.Key.Modifier, pair4.Value, source); } }
private void onCharacterRevived(CharacterInstance character) { if (character.IsPrimaryPlayerCharacter) { List <KeyValuePair <PerkInstance, BuffSource> > perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(character, PerkType.ReviveArmor); for (int i = 0; i < perkInstancesOfType.Count; i++) { KeyValuePair <PerkInstance, BuffSource> pair = perkInstancesOfType[i]; KeyValuePair <PerkInstance, BuffSource> pair2 = perkInstancesOfType[i]; GameLogic.Binder.BuffSystem.startBuffFromPerk(character, PerkType.ReviveArmor, ConfigPerks.SHARED_DATA[PerkType.ReviveArmor].DurationSeconds, (double)pair.Key.Modifier, pair2.Value, null); } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(character, PerkType.ReviveDamage); for (int j = 0; j < perkInstancesOfType.Count; j++) { KeyValuePair <PerkInstance, BuffSource> pair3 = perkInstancesOfType[j]; KeyValuePair <PerkInstance, BuffSource> pair4 = perkInstancesOfType[j]; GameLogic.Binder.BuffSystem.startBuffFromPerk(character, PerkType.ReviveDamage, ConfigPerks.SHARED_DATA[PerkType.ReviveDamage].DurationSeconds, (double)pair3.Key.Modifier, pair4.Value, null); } } }
public static double CalculateTotalDamage(CharacterInstance c, out float baseTotalDamageMultiplier, out float baseTotalDamageMultiplierIncreasePerExtraTarget, out int numExtraTargets, out int slashCount, out double baseDamage, out double bonusDamage) { numExtraTargets = 0; baseTotalDamageMultiplier = ConfigSkills.Omnislash.TotalDamageMultiplier; baseTotalDamageMultiplierIncreasePerExtraTarget = ConfigSkills.Omnislash.TotalDamageMultiplierIncreasePerExtraTarget; slashCount = ConfigSkills.Omnislash.SlashCount + numExtraTargets; if (c.IsPet) { baseDamage = c.OwningPlayer.ActiveCharacter.DamagePerHit(false); bonusDamage = 0.0; return(baseDamage); } float num = baseTotalDamageMultiplier + (baseTotalDamageMultiplierIncreasePerExtraTarget * ((float)numExtraTargets)); baseDamage = MathUtil.ClampMin(c.SkillDamage(true), 1.0) * num; double num2 = CharacterStatModifierUtil.ApplySkillTypeDamageBonuses(c, SkillType.Omnislash, baseDamage); bonusDamage = num2 - baseDamage; return(num2); }
protected void FixedUpdate() { ActiveDungeon activeDungeon = GameLogic.Binder.GameState.ActiveDungeon; if ((activeDungeon != null) && (activeDungeon.CurrentGameplayState == GameplayState.ACTION)) { CharacterInstance primaryPlayerCharacter = activeDungeon.PrimaryPlayerCharacter; if (!primaryPlayerCharacter.IsDead) { float num = Time.deltaTime * Time.timeScale; if (primaryPlayerCharacter.getPerkInstanceCount(PerkType.PassiveDamage) > 0) { List <KeyValuePair <PerkInstance, BuffSource> > perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(primaryPlayerCharacter, PerkType.PassiveDamage); for (int i = 0; i < perkInstancesOfType.Count; i++) { KeyValuePair <PerkInstance, BuffSource> pair = perkInstancesOfType[i]; PerkInstance key = pair.Key; key.Timer -= num; if (key.Timer <= 0f) { List <CharacterInstance> list2 = activeDungeon.ActiveRoom.getEnemyCharactersWithinRadius(primaryPlayerCharacter.PhysicsBody.Transform.position, ConfigPerks.MassDamageDeflection.Radius, primaryPlayerCharacter); for (int j = 0; j < list2.Count; j++) { CharacterInstance targetCharacter = list2[j]; double baseAmount = targetCharacter.MaxLife(false) * primaryPlayerCharacter.getGenericModifierForPerkType(PerkType.PassiveDamage); CmdDealDamageToCharacter.ExecuteStatic(primaryPlayerCharacter, targetCharacter, baseAmount, false, DamageType.Magic, SkillType.NONE); } key.Timer = ConfigPerks.PassiveDamage.Interval; } } } } } }
private void onPrimaryHeroDealtDamage(CharacterInstance sourceCharacter, CharacterInstance targetCharacter, Vector3 worldPos, double amount, bool critted, bool damageReduced, DamageType damageType, SkillType fromSkill) { Buff buff3; ActiveDungeon activeDungeon = GameLogic.Binder.GameState.ActiveDungeon; List <KeyValuePair <PerkInstance, BuffSource> > perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(targetCharacter, PerkType.WoundedArmor); for (int i = 0; i < perkInstancesOfType.Count; i++) { KeyValuePair <PerkInstance, BuffSource> pair = perkInstancesOfType[i]; KeyValuePair <PerkInstance, BuffSource> pair2 = perkInstancesOfType[i]; GameLogic.Binder.BuffSystem.startBuffFromPerk(targetCharacter, PerkType.WoundedArmor, ConfigPerks.SHARED_DATA[PerkType.WoundedArmor].DurationSeconds, (double)pair.Key.Modifier, pair2.Value, null); } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(targetCharacter, PerkType.WoundedAttackSpeed); for (int j = 0; j < perkInstancesOfType.Count; j++) { KeyValuePair <PerkInstance, BuffSource> pair3 = perkInstancesOfType[j]; KeyValuePair <PerkInstance, BuffSource> pair4 = perkInstancesOfType[j]; GameLogic.Binder.BuffSystem.startBuffFromPerk(targetCharacter, PerkType.WoundedAttackSpeed, ConfigPerks.SHARED_DATA[PerkType.WoundedAttackSpeed].DurationSeconds, (double)pair3.Key.Modifier, pair4.Value, null); } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(targetCharacter, PerkType.WoundedDamage); for (int k = 0; k < perkInstancesOfType.Count; k++) { KeyValuePair <PerkInstance, BuffSource> pair5 = perkInstancesOfType[k]; KeyValuePair <PerkInstance, BuffSource> pair6 = perkInstancesOfType[k]; GameLogic.Binder.BuffSystem.startBuffFromPerk(targetCharacter, PerkType.WoundedDamage, ConfigPerks.SHARED_DATA[PerkType.WoundedDamage].DurationSeconds, (double)pair5.Key.Modifier, pair6.Value, null); } if ((sourceCharacter != null) && (damageType == DamageType.Ranged)) { float num4 = targetCharacter.getGenericModifierForPerkType(PerkType.RangedDamageDeflection); if (num4 > 0f) { double baseAmount = MathUtil.Clamp(Math.Round((double)(amount * num4)), 0.0, double.MaxValue); if (baseAmount > 0.0) { CmdDealDamageToCharacter.ExecuteStatic(targetCharacter, sourceCharacter, baseAmount, false, damageType, SkillType.NONE); } } } if (sourceCharacter != null) { float num6 = targetCharacter.getGenericModifierForPerkType(PerkType.DamageDeflection); if (num6 > 0f) { double num7 = MathUtil.Clamp(Math.Round((double)(amount * num6)), 0.0, double.MaxValue); if (num7 > 0.0) { CmdDealDamageToCharacter.ExecuteStatic(targetCharacter, sourceCharacter, num7, false, damageType, SkillType.NONE); } } } float num8 = targetCharacter.getGenericModifierForPerkType(PerkType.MassDamageDeflection); if (num8 > 0f) { double num9 = MathUtil.Clamp(Math.Round((double)(amount * num8)), 0.0, double.MaxValue); if (num9 > 0.0) { List <CharacterInstance> list2 = activeDungeon.ActiveRoom.getEnemyCharactersWithinRadius(targetCharacter.PhysicsBody.Transform.position, ConfigPerks.MassDamageDeflection.Radius, targetCharacter); for (int m = 0; m < list2.Count; m++) { CmdDealDamageToCharacter.ExecuteStatic(targetCharacter, list2[m], num9, false, damageType, SkillType.NONE); } } } if ((sourceCharacter != null) && activeDungeon.hasDungeonModifier(DungeonModifierType.MonsterStun)) { float num11 = !sourceCharacter.IsBoss ? ConfigDungeonModifiers.MonsterStun.MinionProcChance : ConfigDungeonModifiers.MonsterStun.BossProcChance; if (UnityEngine.Random.Range((float)0f, (float)1f) <= num11) { float num12 = !sourceCharacter.IsBoss ? ConfigDungeonModifiers.MonsterStun.MinionBuffDurationSeconds : ConfigDungeonModifiers.MonsterStun.BossBuffDurationSeconds; buff3 = new Buff(); buff3.Stuns = true; buff3.DurationSeconds = num12; Buff buff = buff3; GameLogic.Binder.BuffSystem.startBuff(targetCharacter, buff); } } if ((sourceCharacter != null) && activeDungeon.hasDungeonModifier(DungeonModifierType.MonsterFreeze)) { float num13 = !sourceCharacter.IsBoss ? ConfigDungeonModifiers.MonsterFreeze.MinionProcChance : ConfigDungeonModifiers.MonsterFreeze.BossProcChance; if (UnityEngine.Random.Range((float)0f, (float)1f) <= num13) { float num14 = !sourceCharacter.IsBoss ? ConfigDungeonModifiers.MonsterFreeze.MinionBuffDurationSeconds : ConfigDungeonModifiers.MonsterFreeze.BossBuffDurationSeconds; buff3 = new Buff(); BuffSource source = new BuffSource(); source.Object = ConfigDungeonModifiers.MODIFIERS[DungeonModifierType.MonsterFreeze]; buff3.Source = source; buff3.BaseStat1 = BaseStatProperty.AttacksPerSecond; buff3.BaseStat2 = BaseStatProperty.MovementSpeed; buff3.Modifier = ConfigPerks.GlobalFrostEffect.SpeedModifier; buff3.DurationSeconds = num14; Buff buff2 = buff3; GameLogic.Binder.BuffSystem.startBuff(targetCharacter, buff2); } } }
public float getDuration(ICharacterStatModifier target) { return(CharacterStatModifierUtil.ApplyFrenzyDurationBonuses(target, App.Binder.ConfigMeta.FRENZY_TIMER_MAX_SECONDS)); }
private void refreshAuraBuffs() { ActiveDungeon activeDungeon = GameLogic.Binder.GameState.ActiveDungeon; Room activeRoom = activeDungeon.ActiveRoom; Player player = GameLogic.Binder.GameState.Player; CharacterInstance activeCharacter = player.ActiveCharacter; List <KeyValuePair <PerkInstance, BuffSource> > perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.AuraIce); if (perkInstancesOfType.Count > 0) { List <CharacterInstance> list2 = activeDungeon.ActiveRoom.getEnemyCharactersWithinRadius(activeCharacter.PhysicsBody.Transform.position, ConfigPerks.AuraIce.AuraRadius, activeCharacter); for (int num2 = 0; num2 < list2.Count; num2++) { CharacterInstance c = list2[num2]; for (int num3 = 0; num3 < perkInstancesOfType.Count; num3++) { KeyValuePair <PerkInstance, BuffSource> pair = perkInstancesOfType[num3]; KeyValuePair <PerkInstance, BuffSource> pair2 = perkInstancesOfType[num3]; this.startOrRefreshBuffFromPerk(c, PerkType.AuraIce, 1f, (double)pair.Key.Modifier, pair2.Value, null); } } } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.AuraDamageBonus); if (perkInstancesOfType.Count > 0) { List <CharacterInstance> list3 = activeDungeon.ActiveRoom.getEnemyCharactersWithinRadius(activeCharacter.PhysicsBody.Transform.position, ConfigPerks.AuraDamageBonus.AuraRadius, activeCharacter); if (list3.Count > 0) { for (int num4 = 0; num4 < perkInstancesOfType.Count; num4++) { KeyValuePair <PerkInstance, BuffSource> pair3 = perkInstancesOfType[num4]; KeyValuePair <PerkInstance, BuffSource> pair4 = perkInstancesOfType[num4]; this.startOrRefreshBuffFromPerk(activeCharacter, PerkType.AuraDamageBonus, 1f, (double)(pair3.Key.Modifier * list3.Count), pair4.Value, null); } } } if (activeCharacter.CurrentHpNormalized <= ConfigPerks.SHARED_DATA[PerkType.AuraLowHpArmor].Threshold) { perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.AuraLowHpArmor); for (int num5 = 0; num5 < perkInstancesOfType.Count; num5++) { KeyValuePair <PerkInstance, BuffSource> pair5 = perkInstancesOfType[num5]; KeyValuePair <PerkInstance, BuffSource> pair6 = perkInstancesOfType[num5]; this.startOrRefreshBuffFromPerk(activeCharacter, PerkType.AuraLowHpArmor, 1f, (double)pair5.Key.Modifier, pair6.Value, null); } } if (activeCharacter.CurrentHpNormalized <= ConfigPerks.SHARED_DATA[PerkType.AuraLowHpAttackSpeed].Threshold) { perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.AuraLowHpAttackSpeed); for (int num6 = 0; num6 < perkInstancesOfType.Count; num6++) { KeyValuePair <PerkInstance, BuffSource> pair7 = perkInstancesOfType[num6]; KeyValuePair <PerkInstance, BuffSource> pair8 = perkInstancesOfType[num6]; this.startOrRefreshBuffFromPerk(activeCharacter, PerkType.AuraLowHpAttackSpeed, 1f, (double)pair7.Key.Modifier, pair8.Value, null); } } if (activeCharacter.CurrentHpNormalized <= ConfigPerks.SHARED_DATA[PerkType.AuraLowHpDamage].Threshold) { perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.AuraLowHpDamage); for (int num7 = 0; num7 < perkInstancesOfType.Count; num7++) { KeyValuePair <PerkInstance, BuffSource> pair9 = perkInstancesOfType[num7]; KeyValuePair <PerkInstance, BuffSource> pair10 = perkInstancesOfType[num7]; this.startOrRefreshBuffFromPerk(activeCharacter, PerkType.AuraLowHpDamage, 1f, (double)pair9.Key.Modifier, pair10.Value, null); } } if (activeCharacter.CurrentHpNormalized <= ConfigPerks.SHARED_DATA[PerkType.AuraLowHpDodge].Threshold) { perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.AuraLowHpDodge); for (int num8 = 0; num8 < perkInstancesOfType.Count; num8++) { KeyValuePair <PerkInstance, BuffSource> pair11 = perkInstancesOfType[num8]; KeyValuePair <PerkInstance, BuffSource> pair12 = perkInstancesOfType[num8]; this.startOrRefreshBuffFromPerk(activeCharacter, PerkType.AuraLowHpDodge, 1f, (double)pair11.Key.Modifier, pair12.Value, null); } } if (activeCharacter.CurrentHpNormalized == 1f) { perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.AuraFullHpDamage); for (int num9 = 0; num9 < perkInstancesOfType.Count; num9++) { KeyValuePair <PerkInstance, BuffSource> pair13 = perkInstancesOfType[num9]; KeyValuePair <PerkInstance, BuffSource> pair14 = perkInstancesOfType[num9]; this.startOrRefreshBuffFromPerk(activeCharacter, PerkType.AuraFullHpDamage, 1f, (double)pair13.Key.Modifier, pair14.Value, null); } } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.AllyBonusAttacksPerSecond); for (int i = 0; i < perkInstancesOfType.Count; i++) { for (int num11 = 0; num11 < activeDungeon.ActiveRoom.ActiveCharacters.Count; num11++) { CharacterInstance instance3 = activeDungeon.ActiveRoom.ActiveCharacters[num11]; if (instance3.IsSupport && !instance3.IsDead) { KeyValuePair <PerkInstance, BuffSource> pair15 = perkInstancesOfType[i]; KeyValuePair <PerkInstance, BuffSource> pair16 = perkInstancesOfType[i]; this.startOrRefreshBuffFromPerk(instance3, PerkType.AllyBonusAttacksPerSecond, 1f, (double)pair15.Key.Modifier, pair16.Value, null); } } } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.AllyBonusDamage); for (int j = 0; j < perkInstancesOfType.Count; j++) { for (int num13 = 0; num13 < activeDungeon.ActiveRoom.ActiveCharacters.Count; num13++) { CharacterInstance instance4 = activeDungeon.ActiveRoom.ActiveCharacters[num13]; if (instance4.IsSupport && !instance4.IsDead) { KeyValuePair <PerkInstance, BuffSource> pair17 = perkInstancesOfType[j]; KeyValuePair <PerkInstance, BuffSource> pair18 = perkInstancesOfType[j]; this.startOrRefreshBuffFromPerk(instance4, PerkType.AllyBonusDamage, 1f, (double)pair17.Key.Modifier, pair18.Value, null); } } } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.AllyBonusSpeed); for (int k = 0; k < perkInstancesOfType.Count; k++) { for (int num15 = 0; num15 < activeDungeon.ActiveRoom.ActiveCharacters.Count; num15++) { CharacterInstance instance5 = activeDungeon.ActiveRoom.ActiveCharacters[num15]; if (instance5.IsSupport && !instance5.IsDead) { KeyValuePair <PerkInstance, BuffSource> pair19 = perkInstancesOfType[k]; KeyValuePair <PerkInstance, BuffSource> pair20 = perkInstancesOfType[k]; this.startOrRefreshBuffFromPerk(instance5, PerkType.AllyBonusSpeed, 1f, (double)pair19.Key.Modifier, pair20.Value, null); } } } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(activeCharacter, PerkType.PetBonusDamage); for (int m = 0; m < perkInstancesOfType.Count; m++) { for (int num17 = 0; num17 < activeDungeon.ActiveRoom.ActiveCharacters.Count; num17++) { CharacterInstance instance6 = activeDungeon.ActiveRoom.ActiveCharacters[num17]; if (instance6.IsPet && !instance6.IsDead) { KeyValuePair <PerkInstance, BuffSource> pair21 = perkInstancesOfType[m]; KeyValuePair <PerkInstance, BuffSource> pair22 = perkInstancesOfType[m]; this.startOrRefreshBuffFromPerk(instance6, PerkType.PetBonusDamage, 1f, (double)pair21.Key.Modifier, pair22.Value, null); } } } for (int n = 0; n < activeRoom.ActiveCharacters.Count; n++) { CharacterInstance source = activeRoom.ActiveCharacters[n]; if (!source.IsDead && (source.IsBoss && (Vector3.Distance(Vector3Extensions.ToXzVector3(source.PhysicsBody.Transform.position), Vector3Extensions.ToXzVector3(activeCharacter.PhysicsBody.Transform.position)) <= ((ConfigPerks.BossAuras.Radius + activeCharacter.Radius) + source.Radius)))) { perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(source, PerkType.BossAuraIce); for (int num19 = 0; num19 < perkInstancesOfType.Count; num19++) { KeyValuePair <PerkInstance, BuffSource> pair23 = perkInstancesOfType[num19]; KeyValuePair <PerkInstance, BuffSource> pair24 = perkInstancesOfType[num19]; this.startOrRefreshBuffFromPerk(activeCharacter, PerkType.BossAuraIce, 1f, (double)pair23.Key.Modifier, pair24.Value, source); } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(source, PerkType.BossAuraCooldownSlow); for (int num20 = 0; num20 < perkInstancesOfType.Count; num20++) { KeyValuePair <PerkInstance, BuffSource> pair25 = perkInstancesOfType[num20]; KeyValuePair <PerkInstance, BuffSource> pair26 = perkInstancesOfType[num20]; this.startOrRefreshBuffFromPerk(activeCharacter, PerkType.BossAuraCooldownSlow, 1f, (double)pair25.Key.Modifier, pair26.Value, source); } perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(source, PerkType.BossAuraDamageOverTime); for (int num21 = 0; num21 < perkInstancesOfType.Count; num21++) { KeyValuePair <PerkInstance, BuffSource> pair27 = perkInstancesOfType[num21]; KeyValuePair <PerkInstance, BuffSource> pair28 = perkInstancesOfType[num21]; this.startOrRefreshBuffFromPerk(source, PerkType.BossAuraDamageOverTime, 1f, (double)pair27.Key.Modifier, pair28.Value, source); } } } sm_tempCandidateList.Clear(); PetInstance instance8 = player.Pets.getSelectedPetInstance(); if (((instance8 != null) && (instance8.SpawnedCharacterInstance != null)) && !instance8.SpawnedCharacterInstance.IsDead) { sm_tempCandidateList.Add(instance8.SpawnedCharacterInstance); } for (int num22 = 0; num22 < sm_tempCandidateList.Count; num22++) { CharacterInstance instance9 = sm_tempCandidateList[num22]; perkInstancesOfType = CharacterStatModifierUtil.GetPerkInstancesOfType(instance9, PerkType.AuraDamageBonus); for (int num23 = 0; num23 < perkInstancesOfType.Count; num23++) { KeyValuePair <PerkInstance, BuffSource> pair29 = perkInstancesOfType[num23]; KeyValuePair <PerkInstance, BuffSource> pair30 = perkInstancesOfType[num23]; this.startOrRefreshBuffFromPerk(instance9, PerkType.AuraDamageBonus, 1f, (double)pair29.Key.Modifier, pair30.Value, null); KeyValuePair <PerkInstance, BuffSource> pair31 = perkInstancesOfType[num23]; KeyValuePair <PerkInstance, BuffSource> pair32 = perkInstancesOfType[num23]; this.startOrRefreshBuffFromPerk(activeCharacter, PerkType.AuraDamageBonus, 1f, (double)pair31.Key.Modifier, pair32.Value, null); } } }