internal void UpdateSoulStoneLifeRegen() { if (player.honey) { player.lifeRegen += HONEY_BASE_LIFE_REGEN * HoneyRegenMultiplier - HONEY_BASE_LIFE_REGEN; } if (!player.immune) { CapacityCurse4Applied = false; MoonLordEffectApplied = false; } if (Focus != null) { if (Focus.IsCapacity()) { if (SkeletronPrimeEffect && player.ownedProjectileCounts[ModContent.ProjectileType <FriendlyDungeonGuardianPrime>()] <= 0 && player.statLife <= player.statLifeMax2 / 2) { Projectile.NewProjectile(player.Center, new Vector2(0, 0), ModContent.ProjectileType <FriendlyDungeonGuardianPrime>(), 99, 4, player.whoAmI); } if (GolemEffect && player.ownedProjectileCounts[ModContent.ProjectileType <FriendlyGolemProj>()] <= 0 && player.statLife <= player.statLifeMax2 / 2) { Projectile.NewProjectile(player.Center, new Vector2(0, 0), ModContent.ProjectileType <FriendlyGolemProj>(), 0, 4, player.whoAmI); } if (MoonLordEffect && player.ownedProjectileCounts[ModContent.ProjectileType <FriendlyTrueEyeProj>()] <= 0 && player.statLife <= player.statLifeMax2 / 2) { Projectile.NewProjectile(player.Center, new Vector2(0, 0), ModContent.ProjectileType <FriendlyTrueEyeProj>(), (int)(150 * GetGlobalDamage()), 4, player.whoAmI); } } } }
internal void SoulStoneHitByNPC(NPC npc, ref int damage, ref bool crit) { if (Focus == null) { return; } if (Focus.IsCapacity()) { CapacityHitByNPC(npc, ref damage, ref crit); } if (SteamTrainEffect && !player.HasBuff(ModContent.BuffType <SteamTrainSoulCooldownBuff>()) && Focus.IsCapacity()) { player.AddBuff(ModContent.BuffType <SteamTrainSoulCooldownBuff>(), 90 * Constants.TICKS_PER_SECONDS); player.immune = true; player.immuneTime = 2 * 60; } if (EvilBossEffect && !player.HasBuff(ModContent.BuffType <EvilBossCooldownBuff>()) && Focus.IsUtility()) { player.AddBuff(ModContent.BuffType <EvilBossCooldownBuff>(), 120 * Constants.TICKS_PER_SECONDS); player.immune = true; player.immuneTime = 2 * 60; } if (KingSlimeStomp && player.velocity.Y > 4) { player.ApplyDamageToNPC(npc, player.statDefense + damage + 4, 4f, 0, false); } }
internal void SoulStonePostHurt(bool pvp, bool quiet, double damage, int hitDirection, bool crit) { if (Focus == null) { return; } if (MobilityCurse2) { player.AddBuff(ModContent.BuffType <MobilityCurseBuff>(), 4 * Constants.TICKS_PER_SECONDS); } if (TenacityCurse2) { player.AddBuff(ModContent.BuffType <TenacityCurseBuff>(), 4 * Constants.TICKS_PER_SECONDS); } /*if (QueenBeeEffect && Focus.IsTenacity()) * { * if(player.HasBuff(BuffID.Poisoned)) * { * player.buffImmune[BuffID.Poisoned] = true; * player.statLife += 10; * } * * if (player.HasBuff(BuffID.Venom)) * { * player.buffImmune[BuffID.Venom] = true; * player.statLife += 10; * } * }*/ if (DefenseCounter > 0) { DefenseCounter = 0; } if (Focus.IsCapacity()) { CapacityPostHurt(pvp, quiet, damage, hitDirection, crit); } }
internal bool SoulStonePreHurt(bool pvp, bool quiet, ref int damage, ref int hitDirection, ref bool crit, ref bool customDamage, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource) { if (CancelNoKnockback) { player.noKnockback = false; } if (Focus == null) { return(true); } if (Focus.IsCapacity()) { CapacityPreHurt(pvp, quiet, ref damage, ref hitDirection, ref crit, ref customDamage, ref playSound, ref genGore, ref damageSource); } if (Focus.IsMobility()) { if (SkeletronEffect && Main.rand.Next(25) == 0) { player.immune = true; player.immuneTime = 2 * 60; return(false); } if (MoonLordEffect) { int mobChance = 60; mobChance -= (int)(Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y)); if (mobChance < 3) { mobChance = 3; } if (Main.rand.Next(mobChance) == 0) { player.immune = true; player.immuneTime = 2 * 60; return(false); } } } if (DestroyerEffect && !DestroyerCooldown && damage >= 50 && damage > player.statLife) { player.AddBuff(ModContent.BuffType <DestroyerSoulCooldownBuff>(), 90 * Constants.TICKS_PER_SECONDS); player.immune = true; player.immuneTime = 2 * 60; return(false); } if (Focus.IsVitality()) { if (SteamTrainEffect && !player.HasBuff(ModContent.BuffType <SteamTrainSoulCooldownBuff>())) { if (player.statLife < player.statLifeMax2) { player.statLife = player.statLifeMax2; player.AddBuff(ModContent.BuffType <SteamTrainSoulCooldownBuff>(), 150 * Constants.TICKS_PER_SECONDS); player.immune = true; player.immuneTime = 2 * 60; return(false); } } if (MoonLordEffect && player.statLifeMax2 > 100 && damage >= player.statLife) { MoonLordLifeMult *= .5f; player.statLifeMax2 = (int)(MoonLordLifeMult * player.statLifeMax2); player.statLife = player.statLifeMax2; player.AddBuff(ModContent.BuffType <MoonLordSoulCooldownBuff>(), 90 * Constants.TICKS_PER_SECONDS); player.immune = true; player.immuneTime = 2 * 60; return(false); } } if (MoonLordEffect && !player.HasBuff(ModContent.BuffType <MoonLordSoulCooldownBuff>()) && Focus.IsTenacity()) { player.AddBuff(ModContent.BuffType <MoonLordSoulCooldownBuff>(), 30 * Constants.TICKS_PER_SECONDS); player.immune = true; player.immuneTime = 2 * 60; return(false); } return(true); }