all retaliatory effects scale with difficulty
This commit is contained in:
1 parent
445becda36
commit
94e09eb044
17 files changed
+54
-19
No files matched your search
@@ -17,6 +17,8 @@ using CalamityMod.Items.Armor.Aerospec;
|
||||
using CalamityMod.Items.Armor.Daedalus;
|
||||
using CalamityMod.Items.Armor.Demonshade;
|
||||
using CalamityMod.Items.Armor.Empyrean;
|
||||
using CalamityMod.Items.Armor.GodSlayer;
|
||||
using CalamityMod.Items.Armor.Hydrothermic;
|
||||
using CalamityMod.Items.Armor.LunicCorps;
|
||||
using CalamityMod.Items.Armor.Reaver;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
@@ -1196,7 +1198,7 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 pushVel = Utils.DirectionTo(Player.Center, npc.Center) * 7;
|
||||
if (!npc.dontTakeDamage)
|
||||
{
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(40);
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(CrawCarapace.ThornsDamage);
|
||||
Projectile revenge = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, 0f, Player.whoAmI, npc.whoAmI, pushVel.X, pushVel.Y);
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.NPCHit33 with { Volume = 0.5f }, Player.Center);
|
||||
@@ -1221,7 +1223,7 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 pushVel = Utils.DirectionTo(Player.Center, npc.Center) * 15;
|
||||
if (!npc.dontTakeDamage)
|
||||
{
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(250);
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(Baroclaw.ThornsDamage);
|
||||
Projectile revenge = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, -1f, Player.whoAmI, npc.whoAmI, pushVel.X, pushVel.Y);
|
||||
|
||||
npc.AddBuff(ModContent.BuffType<ArmorCrunch>(), 900);
|
||||
@@ -1256,8 +1258,8 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 pushVel = Utils.DirectionTo(Player.Center, npc.Center) * 22;
|
||||
if (!npc.dontTakeDamage)
|
||||
{
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(350);
|
||||
Projectile revenge = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, -1, Player.whoAmI, npc.whoAmI, pushVel.X, pushVel.Y);
|
||||
int onHitDamage = (int)Player.GetBestClassDamage().ApplyTo(TheAbsorber.ThornsDamage);
|
||||
Projectile revenge = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, -1f, Player.whoAmI, npc.whoAmI, pushVel.X, pushVel.Y);
|
||||
|
||||
npc.AddBuff(ModContent.BuffType<AbsorberAffliction>(), 900);
|
||||
}
|
||||
@@ -2527,10 +2529,9 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_OnHurt(hurtInfo.DamageSource, AerospecBreastplate.FeatherEntitySourceContext);
|
||||
int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(AerospecBreastplate.SetBonusFeatherDamage);
|
||||
for (int n = 0; n < 4; n++)
|
||||
{
|
||||
int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(AerospecBreastplate.SetBonusFeatherDamage);
|
||||
|
||||
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 20f, ModContent.ProjectileType<StickyFeatherAero>(), featherDamage, 1f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
@@ -2539,8 +2540,8 @@ namespace CalamityMod.CalPlayer
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<HideofAstrumDeus>()));
|
||||
SoundEngine.PlaySound(SoundID.Item74, Player.Center);
|
||||
|
||||
int blazeDamage = (int)Player.GetBestClassDamage().ApplyTo(25);
|
||||
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(320);
|
||||
int blazeDamage = (int)Player.GetBestClassDamage().ApplyTo(HideofAstrumDeus.BlazeDamage);
|
||||
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(HideofAstrumDeus.StarDamage);
|
||||
|
||||
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, 0f, ModContent.ProjectileType<HideOfAstrumDeusExplosion>(), blazeDamage, 5f, Player.whoAmI, 0f, 1f);
|
||||
for (int n = 0; n < 12; n++)
|
||||
@@ -2556,8 +2557,7 @@ namespace CalamityMod.CalPlayer
|
||||
int projAmount = (rampartOfDeities ? 12 : 6);
|
||||
for (int n = 0; n < projAmount; n++)
|
||||
{
|
||||
int baseDamage = 130 * (Main.masterMode ? 3 : Main.expertMode ? 2 : 1);
|
||||
int deificProjDamage = (int)Player.GetBestClassDamage().ApplyTo(baseDamage);
|
||||
int deificProjDamage = (int)Player.GetBestClassDamage().ApplyTo(DeificAmulet.StarDamage);
|
||||
|
||||
Projectile onHitProj = Main.projectile[Projectile.NewProjectile(source, Player.Center, new Vector2(0,-15).RotatedBy(MathHelper.TwoPi/projAmount*n), ModContent.ProjectileType<AstralStar>(), deificProjDamage, 4f, Player.whoAmI)];
|
||||
if (onHitProj.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -2594,7 +2594,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<RottenBrain>()));
|
||||
int effectStrength = amalgam ? 3 : aBrain ? 2 : 1;
|
||||
int effectDamage = amalgam ? 400 : aBrain ? 35 : 15;
|
||||
int effectDamage = amalgam ? TheAmalgam.NimbusDamage : aBrain ? AmalgamatedBrain.NimbusDamage : RottenBrain.NimbusDamage;
|
||||
effectDamage = (int)Player.GetBestClassDamage().ApplyTo(effectDamage);
|
||||
|
||||
Vector2 spawnerVelocity = -Vector2.UnitY.RotatedByRandom(MathHelper.Pi / 40f) * 12.5f;
|
||||
@@ -2628,7 +2628,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (hurtInfo.Damage > 0)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item74, Player.Center);
|
||||
int eDamage = (int)Player.GetBestClassDamage().ApplyTo(230);
|
||||
int eDamage = (int)Player.GetBestClassDamage().ApplyTo(HydrothermicArmor.BlazeDamage);
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
Projectile.NewProjectile(fuckYouBitch, Player.Center, Vector2.Zero, ModContent.ProjectileType<DeepseaBlaze>(), eDamage, 1f, Player.whoAmI, 0f, 0f);
|
||||
@@ -2665,7 +2665,7 @@ namespace CalamityMod.CalPlayer
|
||||
double startAngle = Math.Atan2(Player.velocity.X, Player.velocity.Y) - spread / 2;
|
||||
double deltaAngle = spread / 8f;
|
||||
double offsetAngle;
|
||||
int shrapnelDamage = Player.CalcIntDamage<MeleeDamageClass>(675);
|
||||
int shrapnelDamage = Player.CalcIntDamage<MeleeDamageClass>(GodSlayerHeadMelee.DartDamage);
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
@@ -2685,7 +2685,7 @@ namespace CalamityMod.CalPlayer
|
||||
var source = Player.GetSource_OnHurt(hurtInfo.DamageSource, DemonshadeHelm.ShadowScytheEntitySourceContext);
|
||||
for (int l = 0; l < 2; l++)
|
||||
{
|
||||
int shadowbeamDamage = (int)Player.GetBestClassDamage().ApplyTo(300);
|
||||
int shadowbeamDamage = (int)Player.GetBestClassDamage().ApplyTo(DemonshadeHelm.BeamDamage);
|
||||
|
||||
Projectile beam = CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 22f, ProjectileID.ShadowBeamFriendly, shadowbeamDamage, 7f, Player.whoAmI);
|
||||
if (beam.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -2697,7 +2697,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
for (int l = 0; l < 5; l++)
|
||||
{
|
||||
int scytheDamage = (int)Player.GetBestClassDamage().ApplyTo(500);
|
||||
int scytheDamage = (int)Player.GetBestClassDamage().ApplyTo(DemonshadeHelm.ScytheDamage);
|
||||
|
||||
Projectile scythe = CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 22f, ProjectileID.DemonScythe, scytheDamage, 7f, Player.whoAmI);
|
||||
if (scythe.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class AmalgamatedBrain : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int NimbusDamage => CalamityUtils.ScaleWithDifficulty(18);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 34;
|
||||
|
||||
@@ -9,6 +9,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class Baroclaw : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int ThornsDamage => CalamityUtils.ScaleWithDifficulty(125);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 40;
|
||||
|
||||
@@ -8,6 +8,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class CrawCarapace : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int ThornsDamage => CalamityUtils.ScaleWithDifficulty(20);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 28;
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static readonly int MaxBonusIFrames = 30;
|
||||
public static int StarDamage => CalamityUtils.ScaleWithDifficulty(130);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
|
||||
@@ -9,6 +9,10 @@ namespace CalamityMod.Items.Accessories
|
||||
public class HideofAstrumDeus : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int BlazeDamage => CalamityUtils.ScaleWithDifficulty(25);
|
||||
public static int StarDamage => CalamityUtils.ScaleWithDifficulty(160);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 26;
|
||||
|
||||
@@ -8,6 +8,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class InkBomb : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int InkDamage => CalamityUtils.ScaleWithDifficulty(16);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 22;
|
||||
|
||||
@@ -9,6 +9,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class RottenBrain : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int NimbusDamage => CalamityUtils.ScaleWithDifficulty(8);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 34;
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public static float MoveSpeedBoost = 0.12f;
|
||||
public static float JumpSpeedBoost = 0.6f; // Both 12% so we only need just one in the tooltip
|
||||
public static int ThornsDamage => CalamityUtils.ScaleWithDifficulty(175);
|
||||
public static float ThornsBoost = 3.5f;
|
||||
public static int AuraLifetime = 1800;
|
||||
public static int AuraRegenBoost = 4;
|
||||
|
||||
@@ -16,6 +16,9 @@ namespace CalamityMod.Items.Accessories
|
||||
public class TheAmalgam : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int NimbusDamage => CalamityUtils.ScaleWithDifficulty(200);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(9, 6));
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
|
||||
// Common Set Bonus
|
||||
public static int SetBonusHurtDamageThreshold = 25;
|
||||
public static int SetBonusFeatherDamage = 30;
|
||||
public static int SetBonusFeatherDamage => CalamityUtils.ScaleWithDifficulty(15);
|
||||
public static float SetBonusFallSpeed = 15f;
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor.Daedalus
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RangedDamageBoost.ToPercent(), RangedCritBoost);
|
||||
|
||||
// Set Bonus
|
||||
public static int ShardDamage = 60;
|
||||
public static int ShardDamage => CalamityUtils.ScaleWithDifficulty(30);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace CalamityMod.Items.Armor.Demonshade
|
||||
internal static string ShadowScytheEntitySourceContext => "SetBonus_Calamity_Demonshade";
|
||||
|
||||
public static int DevilDamage = 1000;
|
||||
public static int BeamDamage => CalamityUtils.ScaleWithDifficulty(300);
|
||||
public static int ScytheDamage => CalamityUtils.ScaleWithDifficulty(500);
|
||||
public static float MultDamageBoost = 0.5f;
|
||||
public static double MultDamageTakenBoost = 0.25D;
|
||||
|
||||
|
||||
@@ -13,6 +13,10 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
public class GodSlayerHeadMelee : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
|
||||
// Set Bonus
|
||||
public static int DartDamage => CalamityUtils.ScaleWithDifficulty(350);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace CalamityMod.Items.Armor.Hydrothermic
|
||||
public static float DamageBoost = 0.13f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent());
|
||||
|
||||
// Common Set Bonus
|
||||
public static int BlazeDamage => CalamityUtils.ScaleWithDifficulty(115);
|
||||
public static float InfernoHealthThreshold = 0.5f;
|
||||
public static int InfernoHitRate = 30;
|
||||
public static int InfernoDamage = 50;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
SoundEngine.PlaySound(SoundID.NPCHit25, Projectile.Center);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(32);
|
||||
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(InkBomb.InkDamage);
|
||||
|
||||
int inkID = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(2f, 2f), ModContent.ProjectileType<InkCloud>(), damage, 7, Projectile.owner, Main.rand.Next(3) + 1);
|
||||
Main.projectile[inkID].timeLeft += Main.rand.Next(-15, 15 + 1);
|
||||
|
||||
@@ -211,12 +211,15 @@ namespace CalamityMod
|
||||
list.Add(type);
|
||||
}
|
||||
|
||||
public static int ScaleWithDifficulty(this int value) => value * (Main.masterMode ? 3 : Main.expertMode ? 2 : 1);
|
||||
|
||||
public static int SecondsToFrames(int seconds) => seconds * 60;
|
||||
public static int SecondsToFrames(float seconds) => (int)MathF.Round(seconds * 60);
|
||||
public static int MinutesToFrames(int minutes) => minutes * 3600;
|
||||
|
||||
public static bool WithinBounds(this int index, int cap) => index >= 0 && index < cap;
|
||||
|
||||
/// <summary>
|
||||
/// Clamps the distance between vectors via normalization.
|
||||
/// </summary>
|
||||
/// <param name="start">The starting point.</param>
|
||||
|
||||
Reference in new issue
Block a user