This commit is contained in:
mountaindrew10 committed 2023-12-09 07:56:33 -06:00
commit ca0171ce58
72 files changed
+360 -552

No files matched your search

+12 -21
View File
@@ -2736,9 +2736,7 @@ namespace CalamityMod.CalPlayer
{
Projectile proj = Main.projectile[projIndex];
float start = 360f / angelAmt;
int damage = proj.damage / 10;
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(proj.damage / 10);
Projectile.NewProjectile(source, new Vector2((int)(Player.Center.X + (Math.Sin(projIndex * start) * 300)), (int)(Player.Center.Y + (Math.Cos(projIndex * start) * 300))), Vector2.Zero, ModContent.ProjectileType<AngelicAllianceArchangel>(), damage, proj.knockBack / 10f, Player.whoAmI, Main.rand.Next(180), projIndex * start);
Player.statLife += 2;
@@ -2752,9 +2750,7 @@ namespace CalamityMod.CalPlayer
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<Items.Accessories.SandCloak>()));
rogueStealth -= rogueStealthMax * 0.1f;
int damage = 7;
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(7);
int veil = Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<SandCloakVeil>(), damage, 8, Player.whoAmI);
Main.projectile[veil].Center = Player.Center;
@@ -2890,8 +2886,7 @@ namespace CalamityMod.CalPlayer
double offsetAngle;
int damage = (int)(Player.GetTotalDamage<RangedDamageClass>().ApplyTo(300f));
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
if (Player.whoAmI == Main.myPlayer)
{
@@ -2987,8 +2982,7 @@ namespace CalamityMod.CalPlayer
// To compute Forbidden Circlet tornado damage, create a fake stat modifier on the spot which combines both classes.
StatModifier forbidden = Player.GetTotalDamage<SummonDamageClass>().CombineWith(Player.GetDamage<RogueDamageClass>());
int damage = (int)forbidden.ApplyTo(ForbiddenCirclet.tornadoBaseDmg);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
float kBack = Player.GetTotalKnockback<SummonDamageClass>().ApplyTo(ForbiddenCirclet.tornadoBaseKB);
@@ -3418,9 +3412,8 @@ namespace CalamityMod.CalPlayer
{
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<GravistarSabaton>()));
//Spawn explosion. ai[0] is used for transferring the recorded falling time
int damage = 300;
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(GravistarSabaton.SlamDamage));
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<SabatonSlam>(), damage, 4f, Player.whoAmI, gSabatonFall);
gSabatonFall = 0;
@@ -4004,9 +3997,9 @@ namespace CalamityMod.CalPlayer
veneratedCloneYPos *= veneratedCloneDistance;
float speedX4 = veneratedCloneXPos + (float)Main.rand.Next(-30, 31) * 0.02f;
float speedY5 = veneratedCloneYPos + (float)Main.rand.Next(-30, 31) * 0.02f;
int locketDamage = (int)(damage * 0.07f);
if (oldFashioned)
locketDamage = CalamityUtils.CalcOldFashionedDamage(locketDamage);
// 08DEC2023: Ozzatron: Locket + Old Fashioned may need to be a corner case. We should probably just rework Locket instead.
int locketDamage = Player.ApplyArmorAccDamageBonusesTo((int)(damage * 0.07f));
int p = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, locketDamage, knockBack * 0.5f, Player.whoAmI);
@@ -4027,8 +4020,7 @@ namespace CalamityMod.CalPlayer
{
int knifeCount = 12;
int knifeDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(55);
if (oldFashioned)
knifeDamage = CalamityUtils.CalcOldFashionedDamage(knifeDamage);
knifeDamage = Player.ApplyArmorAccDamageBonusesTo(knifeDamage);
float angleStep = MathHelper.TwoPi / knifeCount;
float speed = 14f;
@@ -4051,9 +4043,8 @@ namespace CalamityMod.CalPlayer
{
if (item.CountsAsClass<RangedDamageClass>())
{
int d = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Items.Accessories.RustyMedallion.AcidDropBaseDamage);
if (oldFashioned)
d = CalamityUtils.CalcOldFashionedDamage(d);
int d = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(RustyMedallion.AcidDropBaseDamage);
d = Player.ApplyArmorAccDamageBonusesTo(d);
Vector2 startingPosition = Main.MouseWorld - Vector2.UnitY.RotatedByRandom(0.4f) * 1250f;
Vector2 directionToMouse = (Main.MouseWorld - startingPosition).SafeNormalize(Vector2.UnitY).RotatedByRandom(0.1f);
+18 -35
View File
@@ -153,8 +153,7 @@ namespace CalamityMod.CalPlayer
for (int i = 0; i < 10; i++)
{
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(55);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
int lumenyl = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), ModContent.ProjectileType<AbyssalMirrorProjectile>(), damage, 0, Player.whoAmI);
Main.projectile[lumenyl].rotation = Main.rand.NextFloat(0, 360);
@@ -186,8 +185,7 @@ namespace CalamityMod.CalPlayer
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<EclipseMirror>()));
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(2750);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
int eclipse = Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<EclipseMirrorBurst>(), damage, 0, Player.whoAmI);
if (eclipse.WithinBounds(Main.maxProjectiles))
@@ -1449,9 +1447,7 @@ namespace CalamityMod.CalPlayer
Rectangle npcHitbox = n.getRect();
if ((Player.getRect()).Intersects(npcHitbox) && (n.noTileCollide || Collision.CanHit(Player.position, Player.width, Player.height, n.position, n.width, n.height)))
{
int damage = 150;
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(GravistarSabaton.PassthroughDamage));
Projectile.NewProjectile(Player.GetSource_FromThis(), n.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0, Main.myPlayer);
@@ -2396,8 +2392,7 @@ namespace CalamityMod.CalPlayer
for (int n = 0; n < 4; n++)
{
int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(65);
if (oldFashioned)
featherDamage = CalamityUtils.CalcOldFashionedDamage(featherDamage);
featherDamage = Player.ApplyArmorAccDamageBonusesTo(featherDamage);
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 20f, ModContent.ProjectileType<StickyFeatherAero>(), featherDamage, 1f, Player.whoAmI);
}
@@ -2406,13 +2401,12 @@ 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);
blazeDamage = Player.ApplyArmorAccDamageBonusesTo(blazeDamage);
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(320);
if (oldFashioned)
{
blazeDamage = CalamityUtils.CalcOldFashionedDamage(blazeDamage);
astralStarDamage = CalamityUtils.CalcOldFashionedDamage(astralStarDamage);
}
astralStarDamage = Player.ApplyArmorAccDamageBonusesTo(astralStarDamage);
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, 0f, ModContent.ProjectileType<GodSlayerBlaze>(), blazeDamage, 5f, Player.whoAmI, 0f, 1f);
for (int n = 0; n < 12; n++)
@@ -2426,8 +2420,7 @@ namespace CalamityMod.CalPlayer
for (int n = 0; n < 3; n++)
{
int deificStarDamage = (int)Player.GetBestClassDamage().ApplyTo(130);
if (oldFashioned)
deificStarDamage = CalamityUtils.CalcOldFashionedDamage(deificStarDamage);
deificStarDamage = Player.ApplyArmorAccDamageBonusesTo(deificStarDamage);
Projectile star = CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileID.StarVeilStar, deificStarDamage, 4f, Player.whoAmI);
if (star.whoAmI.WithinBounds(Main.maxProjectiles))
@@ -2454,8 +2447,7 @@ namespace CalamityMod.CalPlayer
if (transformer)
sDamage += 42;
sDamage = (int)Player.GetBestClassDamage().ApplyTo(sDamage);
if (oldFashioned)
sDamage = CalamityUtils.CalcOldFashionedDamage(sDamage);
sDamage = Player.ApplyArmorAccDamageBonusesTo(sDamage);
if (Player.whoAmI == Main.myPlayer)
{
@@ -2501,8 +2493,7 @@ namespace CalamityMod.CalPlayer
{
SoundEngine.PlaySound(SoundID.Item74, Player.Center);
int eDamage = (int)Player.GetBestClassDamage().ApplyTo(230);
if (oldFashioned)
eDamage = CalamityUtils.CalcOldFashionedDamage(eDamage);
eDamage = Player.ApplyArmorAccDamageBonusesTo(eDamage);
if (Player.whoAmI == Main.myPlayer)
Projectile.NewProjectile(fuckYouBitch, Player.Center, Vector2.Zero, ModContent.ProjectileType<DeepseaBlaze>(), eDamage, 1f, Player.whoAmI, 0f, 0f);
@@ -2519,8 +2510,7 @@ namespace CalamityMod.CalPlayer
double deltaAngle = spread / 8f;
double offsetAngle;
int sDamage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(60);
if (oldFashioned)
sDamage = CalamityUtils.CalcOldFashionedDamage(sDamage);
sDamage = Player.ApplyArmorAccDamageBonusesTo(sDamage);
if (Player.whoAmI == Main.myPlayer)
{
@@ -2545,8 +2535,7 @@ namespace CalamityMod.CalPlayer
if (hurtInfo.Damage > 0)
{
int rDamage = (int)Player.GetBestClassDamage().ApplyTo(240);
if (oldFashioned)
rDamage = CalamityUtils.CalcOldFashionedDamage(rDamage);
rDamage = Player.ApplyArmorAccDamageBonusesTo(rDamage);
if (Player.whoAmI == Main.myPlayer)
Projectile.NewProjectile(source, Player.Center.X, Player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ReaverThornBase>(), rDamage, 0f, Player.whoAmI, 0f, 0f);
@@ -2562,18 +2551,14 @@ namespace CalamityMod.CalPlayer
double startAngle = Math.Atan2(Player.velocity.X, Player.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
int baseDamage = 675;
if (oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
int shrapnelFinalDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(baseDamage);
int shrapnelDamage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(675));
if (Player.whoAmI == Main.myPlayer)
{
for (int i = 0; i < 4; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<GodKiller>(), shrapnelFinalDamage, 5f, Player.whoAmI, 0f, 0f);
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<GodKiller>(), shrapnelFinalDamage, 5f, Player.whoAmI, 0f, 0f);
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<GodKiller>(), shrapnelDamage, 5f, Player.whoAmI, 0f, 0f);
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<GodKiller>(), shrapnelDamage, 5f, Player.whoAmI, 0f, 0f);
}
}
}
@@ -2587,8 +2572,7 @@ namespace CalamityMod.CalPlayer
for (int l = 0; l < 2; l++)
{
int shadowbeamDamage = (int)Player.GetBestClassDamage().ApplyTo(3000);
if (oldFashioned)
shadowbeamDamage = CalamityUtils.CalcOldFashionedDamage(shadowbeamDamage);
shadowbeamDamage = Player.ApplyArmorAccDamageBonusesTo(shadowbeamDamage);
Projectile beam = CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 22f, ProjectileID.ShadowBeamFriendly, shadowbeamDamage, 7f, Player.whoAmI);
if (beam.whoAmI.WithinBounds(Main.maxProjectiles))
@@ -2601,8 +2585,7 @@ namespace CalamityMod.CalPlayer
for (int l = 0; l < 5; l++)
{
int scytheDamage = (int)Player.GetBestClassDamage().ApplyTo(5000);
if (oldFashioned)
scytheDamage = CalamityUtils.CalcOldFashionedDamage(scytheDamage);
scytheDamage = Player.ApplyArmorAccDamageBonusesTo(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))
+20 -46
View File
@@ -237,9 +237,7 @@ namespace CalamityMod.CalPlayer
if (!HasIncreasedDashFirstFrame)
{
Player.velocity.X *= 1.2f;
int damage = 75;
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(75));
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<LeviAmberDash>(), damage, 20f, Player.whoAmI);
HasIncreasedDashFirstFrame = true;
@@ -269,10 +267,7 @@ namespace CalamityMod.CalPlayer
}
if (Player.miscCounter % 4 == 0 && Player.velocity != Vector2.Zero) //every other frame spawn the hitbox
{
int damage = 90;
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(90));
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<LeviAmberDash>(), damage, 0f, Player.whoAmI);
}
}
@@ -288,9 +283,7 @@ namespace CalamityMod.CalPlayer
if (!HasReducedDashFirstFrame) // Dash isn't reduced, this is used to determine the first frame of dashing
{
SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact with { Volume = 0.4f , PitchVariance = 0.4f }, Player.Center);
int damage = 67;
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(67));
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<PauldronDash>(), damage, 16f, Player.whoAmI);
HasReducedDashFirstFrame = true;
@@ -318,10 +311,7 @@ namespace CalamityMod.CalPlayer
if (Player.miscCounter % 5 == 0 && Player.velocity != Vector2.Zero) //every other frame spawn the hitbox
{
int damage = 175;
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(175));
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<PauldronDash>(), damage, 10f, Player.whoAmI);
}
}
@@ -723,8 +713,7 @@ namespace CalamityMod.CalPlayer
Rectangle sigilHitbox = Utils.CenteredRectangle(Main.MouseWorld, new Vector2(35f, 62f));
int sigilDamage = (int)Player.GetBestClassDamage().ApplyTo(Calamity.BaseDamage);
if (oldFashioned)
sigilDamage = CalamityUtils.CalcOldFashionedDamage(sigilDamage);
sigilDamage = Player.ApplyArmorAccDamageBonusesTo(sigilDamage);
bool brightenedSigil = false;
for (int i = 0; i < Main.maxNPCs; i++)
@@ -1157,8 +1146,7 @@ namespace CalamityMod.CalPlayer
if (!tentaclesPresent[i])
{
int damage = (int)Player.GetBestClassDamage().ApplyTo(390);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
var source = Player.GetSource_FromThis(OmegaBlueHelmet.TentacleEntitySourceContext);
Vector2 vel = new Vector2(Main.rand.Next(-13, 14), Main.rand.Next(-13, 14)) * 0.25f;
@@ -1267,9 +1255,7 @@ namespace CalamityMod.CalPlayer
{
unstableSelectedTarget = Main.npc[target];
unstableSelectedTarget.Calamity().arcZapCooldown = 18;
int damage = 18;
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(18));
Projectile.NewProjectile(Player.GetSource_FromThis(), new Vector2(Player.Center.X, Player.Center.Y - 20f), new Vector2(0f, -2f), ModContent.ProjectileType<ArcZap>(), damage, 0f, Player.whoAmI, target, 3f);
target = -1;
@@ -1956,8 +1942,7 @@ namespace CalamityMod.CalPlayer
lightningVel.Normalize();
lightningVel *= Main.rand.NextFloat(1f, 2f);
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(30);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
int projectile = Projectile.NewProjectile(source, Player.Center, lightningVel, ModContent.ProjectileType<BlunderBoosterLightning>(), damage, 0, Player.whoAmI, Main.rand.Next(2), 0f);
Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240);
@@ -1983,8 +1968,7 @@ namespace CalamityMod.CalPlayer
cloudVelocity.Normalize();
cloudVelocity *= Main.rand.NextFloat(0f, 1f);
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(20);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
int projectile = Projectile.NewProjectile(source, Player.Center, cloudVelocity, ModContent.ProjectileType<PlaguedFuelPackCloud>(), damage, 0, Player.whoAmI, 0, 0);
Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240);
@@ -3048,11 +3032,11 @@ namespace CalamityMod.CalPlayer
for (int I = 0; I < 3; I++)
{
float ai1 = I * 120;
int baseDamage = 3750;
if (oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
int damage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
// 08DEC2023: Ozzatron: Bloodflare mines spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = Player.ApplyArmorAccDamageBonusesTo(3750);
int damage = Player.CalcIntDamage<SummonDamageClass>(baseDamage);
int projectile = Projectile.NewProjectile(source, Player.Center.X + (float)(Math.Sin(I * 120) * 550), Player.Center.Y + (float)(Math.Cos(I * 120) * 550), 0f, 0f,
ModContent.ProjectileType<GhostlyMine>(), damage, 1f, Player.whoAmI, ai1, 0f);
if (projectile.WithinBounds(Main.maxProjectiles))
@@ -3125,10 +3109,7 @@ namespace CalamityMod.CalPlayer
// If the timer rolls over, it's time to deal damage. Only run this code for the client which is wearing the armor.
if (tarraLifeAuraTimer == 0 && Player.whoAmI == Main.myPlayer)
{
const int BaseDamage = 120;
int damage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(BaseDamage);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcDamage<SummonDamageClass>(120));
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
var source = Player.GetSource_FromThis(TarragonHeadSummon.LifeAuraEntitySourceContext);
@@ -3199,10 +3180,7 @@ namespace CalamityMod.CalPlayer
// Brimstone flames is applied every single frame, but direct damage is only dealt twice per second.
if (Player.whoAmI == Main.myPlayer)
{
const int BaseDamage = 50;
int damage = (int)Player.GetBestClassDamage().ApplyTo(BaseDamage);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(50));
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
var source = Player.GetSource_FromThis(HydrothermicArmor.InfernoPotionEntitySourceContext);
@@ -3265,11 +3243,11 @@ namespace CalamityMod.CalPlayer
pSoulGuardians = true;
// 08DEC2023: Ozzatron: PSA/PSC "babs" spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int guardianAmt = 1;
float babCheck = profanedCrystal ? 1f : 0f;
int babDamage = profanedCrystal ? 346 : 52;
if (oldFashioned)
babDamage = CalamityUtils.CalcOldFashionedDamage(babDamage);
babDamage = Player.ApplyArmorAccDamageBonusesTo(babDamage);
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < guardianAmt)
{
@@ -3368,9 +3346,7 @@ namespace CalamityMod.CalPlayer
if (Player.whoAmI == Main.myPlayer)
{
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<BlunderBooster>()));
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(30);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcDamage<RogueDamageClass>(30));
if (Player.ownedProjectileCounts[ModContent.ProjectileType<BlunderBoosterAura>()] < 1)
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<BlunderBoosterAura>(), damage, 0f, Player.whoAmI, 0f, 0f);
@@ -3431,8 +3407,7 @@ namespace CalamityMod.CalPlayer
{
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<CryoStone>()));
int damage = (int)Player.GetBestClassDamage().ApplyTo(70);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
if (Player.whoAmI == Main.myPlayer && Player.ownedProjectileCounts[ModContent.ProjectileType<CryonicShield>()] == 0)
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<CryonicShield>(), damage, 0f, Player.whoAmI);
@@ -3454,8 +3429,7 @@ namespace CalamityMod.CalPlayer
{
float shootSpeed = 18f;
int dmg = (int)Player.GetTotalDamage<MagicDamageClass>().ApplyTo(30);
if (oldFashioned)
dmg = CalamityUtils.CalcOldFashionedDamage(dmg);
dmg = Player.ApplyArmorAccDamageBonusesTo(dmg);
Vector2 startPos = Player.RotatedRelativePoint(Player.MountedCenter, true);
Vector2 velocity = Main.MouseWorld - startPos;
+60 -118
View File
@@ -331,8 +331,7 @@ namespace CalamityMod.CalPlayer
{
hideOfDeusTimer = 10;
int bulwarkStarDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(320);
if (oldFashioned)
bulwarkStarDamage = CalamityUtils.CalcOldFashionedDamage(bulwarkStarDamage);
bulwarkStarDamage = Player.ApplyArmorAccDamageBonusesTo(bulwarkStarDamage);
for (int n = 0; n < 3; n++)
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType<AstralStar>(), bulwarkStarDamage, 5f, Player.whoAmI);
@@ -351,8 +350,7 @@ namespace CalamityMod.CalPlayer
});
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(120);
if (oldFashioned)
astralStarDamage = CalamityUtils.CalcOldFashionedDamage(astralStarDamage);
astralStarDamage = Player.ApplyArmorAccDamageBonusesTo(astralStarDamage);
Projectile star = CalamityUtils.ProjectileRain(source, position, 400f, 100f, 500f, 800f, 12f, projectileType, astralStarDamage, 5f, Player.whoAmI);
if (star.whoAmI.WithinBounds(Main.maxProjectiles))
@@ -369,8 +367,7 @@ namespace CalamityMod.CalPlayer
{
// Ataxia True Melee Geysers: 15%, softcap starts at 300 base damage
int geyserDamage = CalamityUtils.DamageSoftCap(damage * 0.15, 45);
if (oldFashioned)
geyserDamage = CalamityUtils.CalcOldFashionedDamage(geyserDamage);
geyserDamage = Player.ApplyArmorAccDamageBonusesTo(geyserDamage);
Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType<ChaoticGeyser>(), geyserDamage, 2f, Player.whoAmI, 0f, 0f);
}
@@ -409,8 +406,7 @@ namespace CalamityMod.CalPlayer
if (alchFlask && Player.ownedProjectileCounts[ProjectileType<PlagueSeeker>()] < 3 && hasClass)
{
int seekerDamage = (int)Player.GetBestClassDamage().ApplyTo(30);
if (oldFashioned)
seekerDamage = CalamityUtils.CalcOldFashionedDamage(seekerDamage);
seekerDamage = Player.ApplyArmorAccDamageBonusesTo(seekerDamage);
Projectile projectile = CalamityUtils.SpawnOrb(proj, seekerDamage, ProjectileType<PlagueSeeker>(), 400f, 12f);
if (projectile.whoAmI.WithinBounds(Main.maxProjectiles))
@@ -440,8 +436,7 @@ namespace CalamityMod.CalPlayer
});
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(120);
if (oldFashioned)
astralStarDamage = CalamityUtils.CalcOldFashionedDamage(astralStarDamage);
astralStarDamage = Player.ApplyArmorAccDamageBonusesTo(astralStarDamage);
Projectile star = CalamityUtils.ProjectileRain(source, position, 400f, 100f, 500f, 800f, 25f, projectileType, astralStarDamage, 5f, Player.whoAmI);
if (star.whoAmI.WithinBounds(Main.maxProjectiles))
@@ -495,8 +490,7 @@ namespace CalamityMod.CalPlayer
{
hideOfDeusTimer = 10;
int bulwarkStarDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(320);
if (oldFashioned)
bulwarkStarDamage = CalamityUtils.CalcOldFashionedDamage(bulwarkStarDamage);
bulwarkStarDamage = Player.ApplyArmorAccDamageBonusesTo(bulwarkStarDamage);
for (int n = 0; n < 3; n++)
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType<AstralStar>(), bulwarkStarDamage, 5f, Player.whoAmI);
@@ -509,8 +503,7 @@ namespace CalamityMod.CalPlayer
{
// Ataxia Melee Geysers: 15%, softcap starts at 240 base damage
int geyserDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.15, 36);
if (oldFashioned)
geyserDamage = CalamityUtils.CalcOldFashionedDamage(geyserDamage);
geyserDamage = Player.ApplyArmorAccDamageBonusesTo(geyserDamage);
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<ChaoticGeyser>(), geyserDamage, 0f, Player.whoAmI, 0f, 0f);
}
@@ -533,10 +526,7 @@ namespace CalamityMod.CalPlayer
for (int l = 0; l < 2; l++)
{
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
int leafDamage = (int)(0.25 * proj.damage);
if (oldFashioned)
leafDamage = CalamityUtils.CalcOldFashionedDamage(leafDamage);
int leafDamage = Player.ApplyArmorAccDamageBonusesTo(0.25f * proj.damage);
int leaf = Projectile.NewProjectile(source, position, velocity, ProjectileID.Leaf, leafDamage, 0f, Player.whoAmI);
if (leaf.WithinBounds(Main.maxProjectiles))
{
@@ -549,10 +539,7 @@ namespace CalamityMod.CalPlayer
for (int projCount = 0; projCount < 2; projCount++)
{
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
int energyDamage = (int)(0.33 * proj.damage);
if (oldFashioned)
energyDamage = CalamityUtils.CalcOldFashionedDamage(energyDamage);
int energyDamage = Player.ApplyArmorAccDamageBonusesTo(0.33f * proj.damage);
Projectile.NewProjectile(source, proj.Center, velocity, ProjectileType<TarraEnergy>(), energyDamage, 0f, proj.owner);
}
}
@@ -571,9 +558,7 @@ namespace CalamityMod.CalPlayer
var source = proj.GetSource_FromThis();
if (ataxiaMage && ataxiaDmg <= 0)
{
int orbDamage = (int)(proj.damage * 0.6);
if (oldFashioned)
orbDamage = CalamityUtils.CalcOldFashionedDamage(orbDamage);
int orbDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.6f);
CalamityUtils.SpawnOrb(proj, orbDamage, ProjectileType<HydrothermicSphere>(), 800f, 20f);
int cooldown = (int)(orbDamage * 0.5);
@@ -592,9 +577,7 @@ namespace CalamityMod.CalPlayer
{
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
// Bloodflare Mage Fireballs: 3 x 50%, softcap starts at 500 base damage to not overly punish slow weapons
int bloodflareFireballDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.5, 250);
if (oldFashioned)
bloodflareFireballDamage = CalamityUtils.CalcOldFashionedDamage(bloodflareFireballDamage);
int bloodflareFireballDamage = Player.ApplyArmorAccDamageBonusesTo(CalamityUtils.DamageSoftCap(proj.damage * 0.5, 250));
int fire = Projectile.NewProjectile(source, position, velocity, ProjectileID.BallofFire, bloodflareFireballDamage, 0f, Player.whoAmI);
if (fire.WithinBounds(Main.maxProjectiles))
@@ -610,10 +593,7 @@ namespace CalamityMod.CalPlayer
silvaMageCooldown = 300;
SoundEngine.PlaySound(SoundID.Zombie103 , proj.Center); //So scuffed, just because zombie sounds werent ported normally
// Silva Mage Blasts: 800 + 60%, softcap on the whole combined thing starts at 1400
int silvaBurstDamage = CalamityUtils.DamageSoftCap(800.0 + 0.6 * proj.damage, 1400);
if (oldFashioned)
silvaBurstDamage = CalamityUtils.CalcOldFashionedDamage(silvaBurstDamage);
int silvaBurstDamage = Player.ApplyArmorAccDamageBonusesTo(CalamityUtils.DamageSoftCap(800.0 + 0.6 * proj.damage, 1400));
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<SilvaBurst>(), silvaBurstDamage, 8f, Player.whoAmI);
}
}
@@ -653,9 +633,7 @@ namespace CalamityMod.CalPlayer
if (Player.ownedProjectileCounts[ProjectileType<PhantomicDagger>()] < 3 && Main.rand.NextBool(10))
{
int damage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(100);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
Projectile.NewProjectile(source, proj.position, proj.velocity, ProjectileType<PhantomicDagger>(), damage, 1f, Player.whoAmI);
}
}
@@ -712,36 +690,28 @@ namespace CalamityMod.CalPlayer
if (nucleogenesis)
{
int apparatusDamage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(60);
if (oldFashioned)
apparatusDamage = CalamityUtils.CalcOldFashionedDamage(apparatusDamage);
apparatusDamage = Player.ApplyArmorAccDamageBonusesTo(apparatusDamage);
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<ApparatusExplosion>(), apparatusDamage, 4f, proj.owner);
summonProjCooldown = 100f;
}
else if (starbusterCore)
{
int starburstDamage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(40);
if (oldFashioned)
starburstDamage = CalamityUtils.CalcOldFashionedDamage(starburstDamage);
starburstDamage = Player.ApplyArmorAccDamageBonusesTo(starburstDamage);
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<SummonAstralExplosion>(), starburstDamage, 3.5f, proj.owner);
summonProjCooldown = 60f;
}
else if (nuclearFuelRod)
{
int nuclearDamage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(20);
if (oldFashioned)
nuclearDamage = CalamityUtils.CalcOldFashionedDamage(nuclearDamage);
nuclearDamage = Player.ApplyArmorAccDamageBonusesTo(nuclearDamage);
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<IrradiatedAura>(), nuclearDamage, 0f, proj.owner);
summonProjCooldown = 60f;
}
else if (jellyChargedBattery)
{
int batteryDamage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(15);
if (oldFashioned)
batteryDamage = CalamityUtils.CalcOldFashionedDamage(batteryDamage);
batteryDamage = Player.ApplyArmorAccDamageBonusesTo(batteryDamage);
CalamityUtils.SpawnOrb(proj, batteryDamage, ProjectileType<EnergyOrb>(), 800f, 15f);
summonProjCooldown = 60f;
}
@@ -755,9 +725,7 @@ namespace CalamityMod.CalPlayer
Vector2 spawnPosition = position - new Vector2(0f, 920f).RotatedByRandom(0.3f);
float speed = Main.rand.NextFloat(17f, 23f);
int hallowedDamage = (int)Player.GetTotalDamage<SummonDamageClass>().ApplyTo(50);
if (oldFashioned)
hallowedDamage = CalamityUtils.CalcOldFashionedDamage(hallowedDamage);
hallowedDamage = Player.ApplyArmorAccDamageBonusesTo(hallowedDamage);
Projectile.NewProjectile(source, spawnPosition, Vector2.Normalize(position - spawnPosition) * speed, ProjectileType<HallowedStarSummon>(), hallowedDamage, 3f, proj.owner);
}
}
@@ -772,11 +740,8 @@ namespace CalamityMod.CalPlayer
int Type = ProjectileType<DragonScalesInfernado>();
if (modProj.stealthStrike && dragonScales && Main.projectile.Count(proj => proj.type == Type && proj.active) < 1)
{
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(DragonScales.TornadoBaseDamage);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
int projectileIndex = Projectile.NewProjectile(spawnSource, proj.Center.X, proj.Center.Y, 0f, 0f, ProjectileType<DragonScalesInfernado>(), damage, 15f, Main.myPlayer, 10f, 9f); //First overload seems to deal with timing, second is segment amount
if (projectileIndex.WithinBounds(Main.maxProjectiles))
Main.projectile[projectileIndex].netUpdate = true;
@@ -791,48 +756,33 @@ namespace CalamityMod.CalPlayer
{
case 0:
// Exodus Rogue Stars: 80%
int starDamage = (int)(proj.damage * 0.8);
if (oldFashioned)
starDamage = CalamityUtils.CalcOldFashionedDamage(starDamage);
int starDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.8f);
CalamityUtils.SpawnOrb(proj, starDamage, ProjectileType<EmpyreanStellarDetritus>(), 800f, Main.rand.Next(15, 30));
xerocDmg += (int)(starDamage * 0.5);
xerocDmg += (int)(starDamage * 0.5f);
break;
case 1:
// Exodus Rogue Orbs: 60%
int orbDamage = (int)(proj.damage * 0.6);
if (oldFashioned)
orbDamage = CalamityUtils.CalcOldFashionedDamage(orbDamage);
int orbDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.6f);
CalamityUtils.SpawnOrb(proj, orbDamage, ProjectileType<EmpyreanMarble>(), 800f, 30f);
xerocDmg += (int)(orbDamage * 0.5);
xerocDmg += (int)(orbDamage * 0.5f);
break;
case 2:
// Exodus Rogue Fire: 15%
int fireDamage = (int)(proj.damage * 0.15);
if (oldFashioned)
fireDamage = CalamityUtils.CalcOldFashionedDamage(fireDamage);
int fireDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.15f);
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<EmpyreanEmber>(), fireDamage, 0f, proj.owner, 0f, 0f);
break;
case 3:
// Exodus Rogue Blast: 20%
int blastDamage = (int)(proj.damage * 0.2);
if (oldFashioned)
blastDamage = CalamityUtils.CalcOldFashionedDamage(blastDamage);
int blastDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.2f);
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<EmpyreanBlast>(), blastDamage, 0f, proj.owner, 0f, 0f);
break;
case 4:
// Exodus Rogue Bubble: 60%
int bubbleDamage = (int)(proj.damage * 0.6);
if (oldFashioned)
bubbleDamage = CalamityUtils.CalcOldFashionedDamage(bubbleDamage);
int bubbleDamage = Player.ApplyArmorAccDamageBonusesTo(proj.damage * 0.6f);
CalamityUtils.SpawnOrb(proj, bubbleDamage, ProjectileType<EmpyreanGlob>(), 800f, 15f);
xerocDmg += (int)(bubbleDamage * 0.5);
break;
@@ -852,19 +802,16 @@ namespace CalamityMod.CalPlayer
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
Vector2 velocity = (position - source) / 40f;
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(120);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType<NanoFlare>(), damage, 3f, proj.owner);
}
}
else if (moonCrown)
{
int lunarFlareDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(MoonstoneCrown.BaseDamage);
if (oldFashioned)
lunarFlareDamage = CalamityUtils.CalcOldFashionedDamage(lunarFlareDamage);
lunarFlareDamage = Player.ApplyArmorAccDamageBonusesTo(lunarFlareDamage);
float lunarFlareKB = 3f;
for (int i = 0; i < 3; i++)
{
Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50));
@@ -882,16 +829,16 @@ namespace CalamityMod.CalPlayer
float speedX = (position.X - source.X) / 30f;
float speedY = (position.Y - source.Y) * 8;
Vector2 velocity = new Vector2(speedX, speedY);
int featherDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(25);
if (oldFashioned)
featherDamage = CalamityUtils.CalcOldFashionedDamage(featherDamage);
featherDamage = Player.ApplyArmorAccDamageBonusesTo(featherDamage);
int feather = Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType<StickyFeather>(), featherDamage, 3f, proj.owner);
if (feather.WithinBounds(Main.maxProjectiles))
{
{
Main.projectile[feather].DamageType = DamageClass.Generic;
Main.projectile[feather].extraUpdates += 3;
}
}
}
spawnedFeathers = true;
}
@@ -907,8 +854,7 @@ namespace CalamityMod.CalPlayer
xVector *= 10f;
yVector *= 10f;
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(40);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
int eater = Projectile.NewProjectile(spawnSource, proj.Center.X, proj.Center.Y, xVector, yVector, ProjectileType<ForbiddenCircletEater>(), damage, proj.knockBack, proj.owner);
if (eater.WithinBounds(Main.maxProjectiles))
@@ -920,8 +866,7 @@ namespace CalamityMod.CalPlayer
if (titanHeartSet && modProj.stealthStrike && titanCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
{
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(40);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<SabatonBoom>(), damage, proj.knockBack, proj.owner, 1f, 0f);
SoundEngine.PlaySound(SoundID.Item14, proj.Center);
@@ -959,8 +904,7 @@ namespace CalamityMod.CalPlayer
if (type != -1)
{
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(24);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
float speed = Main.rand.NextFloat(5f, 11f);
int cloud = Projectile.NewProjectile(spawnSource, position, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * speed, type, damage, proj.knockBack, Player.whoAmI);
@@ -973,12 +917,12 @@ namespace CalamityMod.CalPlayer
if (shadow && shadowPotCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
{
int randrot = Main.rand.Next(-30, 391);
Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(randrot));
int soul = Projectile.NewProjectile(spawnSource, proj.Center, SoulSpeed, ProjectileType<PenumbraSoul>(), (int)(proj.damage * 0.1), 3f, proj.owner, 0f, 0f);
if (soul.WithinBounds(Main.maxProjectiles))
Main.projectile[soul].DamageType = DamageClass.Generic;
shadowPotCooldown = 30;
int randrot = Main.rand.Next(-30, 391);
Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(randrot));
int soul = Projectile.NewProjectile(spawnSource, proj.Center, SoulSpeed, ProjectileType<PenumbraSoul>(), (int)(proj.damage * 0.1), 3f, proj.owner, 0f, 0f);
if (soul.WithinBounds(Main.maxProjectiles))
Main.projectile[soul].DamageType = DamageClass.Generic;
shadowPotCooldown = 30;
}
if (raiderTalisman && modProj.stealthStrike)
@@ -998,8 +942,7 @@ namespace CalamityMod.CalPlayer
{
// Umbraphile Rogue Blasts: 20%, softcap starts at 50 base damage
int umbraBlastDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.20, 50);
if (oldFashioned)
umbraBlastDamage = CalamityUtils.CalcOldFashionedDamage(umbraBlastDamage);
umbraBlastDamage = Player.ApplyArmorAccDamageBonusesTo(umbraBlastDamage);
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<UmbraphileBoom>(), umbraBlastDamage, 0f, Player.whoAmI);
}
@@ -1009,8 +952,7 @@ namespace CalamityMod.CalPlayer
{
Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f);
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(9);
if (oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
int spark = Projectile.NewProjectile(spawnSource, position, velocity, ProjectileType<EGloveSpark>(), damage, 0f, Player.whoAmI);
if (spark.WithinBounds(Main.maxProjectiles))
@@ -1044,21 +986,21 @@ namespace CalamityMod.CalPlayer
CalamityUtils.Inflict246DebuffsNPC(target, BuffID.OnFire3, 4f);
}
}
if ((melee || rogue || whip) && !noFlask)
{
if (flaskCrumbling)
{
if ((melee || rogue || whip) && !noFlask)
{
if (flaskCrumbling)
{
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<Crumbling>());
}
if (flaskBrimstone)
{
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<BrimstoneFlames>(), 4f);
}
if (flaskBrimstone)
{
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<BrimstoneFlames>(), 4f);
}
if (flaskHoly)
{
target.AddBuff(BuffType<HolyFlames>(), 180, false);
}
}
{
target.AddBuff(BuffType<HolyFlames>(), 180, false);
}
}
if (rogue && !noFlask)
{
switch (Player.meleeEnchant)
@@ -1237,11 +1179,11 @@ namespace CalamityMod.CalPlayer
{
float heal = MathHelper.Clamp(damage * 0.011f, 0f, 5f);
if ((int)heal > 0)
{
{
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileID.VampireHeal, 1200f, 3f);
float cooldown = heal * 2f;
Main.player[Main.myPlayer].lifeSteal -= cooldown;
}
float cooldown = heal * 2f;
Main.player[Main.myPlayer].lifeSteal -= cooldown;
}
}
if (bloodyGlove && proj.CountsAsClass<RogueDamageClass>() && modProj.stealthStrike)
+3 -5
View File
@@ -79,14 +79,12 @@ namespace CalamityMod.CalPlayer.Dashes
// Define damage parameters.
int dashDamage = AsgardianAegis.ShieldSlamDamage;
hitContext.damageClass = DamageClass.Melee;
hitContext.BaseDamage = player.Calamity().oldFashioned ? CalamityUtils.CalcOldFashionedDamage(dashDamage) : dashDamage;
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
hitContext.BaseKnockback = AsgardianAegis.ShieldSlamKnockback;
// Spawn explosion
// On-hit Cosmic Dash Explosion
int explosionDamage = (int)player.GetBestClassDamage().ApplyTo(AsgardianAegis.RamExplosionDamage);
if (player.Calamity().oldFashioned)
explosionDamage = CalamityUtils.CalcOldFashionedDamage(explosionDamage);
explosionDamage = player.ApplyArmorAccDamageBonusesTo(explosionDamage);
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<CosmicDashExplosion>(), explosionDamage, AsgardianAegis.RamExplosionKnockback, Main.myPlayer, 3f, 0f);
npc.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
}
+1 -1
View File
@@ -63,7 +63,7 @@ namespace CalamityMod.CalPlayer.Dashes
// Define damage parameters.
int dashDamage = AsgardsValor.ShieldSlamDamage;
hitContext.damageClass = DamageClass.Melee;
hitContext.BaseDamage = player.Calamity().oldFashioned ? CalamityUtils.CalcOldFashionedDamage(dashDamage) : dashDamage;
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
hitContext.BaseKnockback = AsgardsValor.ShieldSlamKnockback;
int Dusts = 12;
+2 -4
View File
@@ -76,14 +76,12 @@ namespace CalamityMod.CalPlayer.Dashes
// Define damage parameters.
int dashDamage = ElysianAegis.ShieldSlamDamage;
hitContext.damageClass = DamageClass.Melee;
hitContext.BaseDamage = player.Calamity().oldFashioned ? CalamityUtils.CalcOldFashionedDamage(dashDamage) : dashDamage;
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
hitContext.BaseKnockback = ElysianAegis.ShieldSlamKnockback;
// On-hit Supreme Holy Explosion
int supremeExplosionDamage = (int)player.GetBestClassDamage().ApplyTo(ElysianAegis.RamExplosionDamage);
if (player.Calamity().oldFashioned)
supremeExplosionDamage = CalamityUtils.CalcOldFashionedDamage(supremeExplosionDamage);
supremeExplosionDamage = player.ApplyArmorAccDamageBonusesTo(supremeExplosionDamage);
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosionSupreme>(), supremeExplosionDamage, ElysianAegis.RamExplosionKnockback, Main.myPlayer, 1f, 0f);
npc.AddBuff(ModContent.BuffType<HolyFlames>(), 300);
}
+1 -1
View File
@@ -134,7 +134,7 @@ namespace CalamityMod.CalPlayer.Dashes
// Define damage parameters.
int dashDamage = 3000;
hitContext.damageClass = player.GetBestClass();
hitContext.BaseDamage = player.Calamity().oldFashioned ? CalamityUtils.CalcOldFashionedDamage(dashDamage) : dashDamage;
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
hitContext.BaseKnockback = 15f;
// God Slayer Dash intentionally does not use the vanilla function for collision attack iframes.
+1 -1
View File
@@ -53,7 +53,7 @@ namespace CalamityMod.CalPlayer.Dashes
// Define damage parameters.
int dashDamage = OrnateShield.ShieldSlamDamage;
hitContext.damageClass = DamageClass.Melee;
hitContext.BaseDamage = player.Calamity().oldFashioned ? CalamityUtils.CalcOldFashionedDamage(dashDamage) : dashDamage;
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
hitContext.BaseKnockback = OrnateShield.ShieldSlamKnockback;
npc.AddBuff(BuffID.Frostburn2, 180); //Great, Frostbite is ACTUALLY called Frostburn 2
+1 -1
View File
@@ -65,7 +65,7 @@ namespace CalamityMod.CalPlayer.Dashes
// Define damage parameters.
int dashDamage = 50;
hitContext.damageClass = DamageClass.Summon;
hitContext.BaseDamage = player.Calamity().oldFashioned ? CalamityUtils.CalcOldFashionedDamage(dashDamage) : dashDamage;
hitContext.BaseDamage = player.ApplyArmorAccDamageBonusesTo(dashDamage);
hitContext.BaseKnockback = 3f;
}
}
+1 -2
View File
@@ -41,8 +41,7 @@ namespace CalamityMod.CalPlayer.Dashes
if (Main.myPlayer == player.whoAmI && player.Calamity().statisTimer % 5 == 0)
{
int scytheDamage = (int)player.GetBestClassDamage().ApplyTo(250);
if (player.Calamity().oldFashioned)
scytheDamage = CalamityUtils.CalcOldFashionedDamage(scytheDamage);
scytheDamage = player.ApplyArmorAccDamageBonusesTo(scytheDamage);
int scythe = Projectile.NewProjectile(player.GetSource_FromAI(), player.Center, player.velocity.RotatedBy(player.direction * (AngleSwap ? 30 : -30), default) * 0.1f - player.velocity / 2f, ModContent.ProjectileType<CosmicScythe>(), scytheDamage, 5f, player.whoAmI);;
if (scythe.WithinBounds(Main.maxProjectiles))
+3 -6
View File
@@ -147,8 +147,7 @@ namespace CalamityMod.DataStructures
return;
int damage = (int)Owner.GetTotalDamage<MeleeDamageClass>().ApplyTo(GemTechHeadgear.MeleeShardBaseDamage);
if (Owner.Calamity().oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Owner.ApplyArmorAccDamageBonusesTo(damage);
for (int i = 0; i < 14; i++)
{
@@ -166,8 +165,7 @@ namespace CalamityMod.DataStructures
return;
int damage = CalamityUtils.DamageSoftCap((int)(hitDamage * 0.32f), 400);
if (Owner.Calamity().oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = Owner.ApplyArmorAccDamageBonusesTo(damage);
Vector2 spawnPosition = Owner.Center + Main.rand.NextVector2Circular(Owner.width, Owner.height) * 1.35f;
Vector2 shootVelocity = (target.Center - spawnPosition) * 0.04f;
@@ -272,8 +270,7 @@ namespace CalamityMod.DataStructures
// Softcap the damage. This is done primarily to dampen stealth interactions.
gemDamage = CalamityUtils.DamageSoftCap(gemDamage, GemTechHeadgear.GemDamageSoftcapThreshold);
if (Owner.Calamity().oldFashioned)
gemDamage = CalamityUtils.CalcOldFashionedDamage(gemDamage);
gemDamage = Owner.ApplyArmorAccDamageBonusesTo(gemDamage);
if (Main.myPlayer == OwnerIndex)
Projectile.NewProjectile(Owner.GetSource_ItemUse(Owner.ActiveItem()), gemPosition, Vector2.Zero, ModContent.ProjectileType<GemTechArmorGem>(), gemDamage, 0f, OwnerIndex, 0f, (int)GemThatShouldBeLost);
+8 -1
View File
@@ -142,7 +142,14 @@ namespace CalamityMod.Events
// TODO -- Multiple different lists might be ideal for this at some point instead of a god-struct? This is a lot of parameters.
Bosses = new List<Boss>()
{
new Boss(NPCID.KingSlime, permittedNPCs: new int[] { NPCID.BlueSlime, NPCID.YellowSlime, NPCID.PurpleSlime, NPCID.RedSlime, NPCID.GreenSlime, NPCID.RedSlime,
new Boss(NPCID.KingSlime, spawnContext: type => {
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type);
// When King Slime spawns, Boss Rush is considered to be started at least once.
// Xeroc will no longer give his full start monologue anymore for this world.
DownedBossSystem.startedBossRushAtLeastOnce = true;
},
permittedNPCs: new int[] { NPCID.BlueSlime, NPCID.YellowSlime, NPCID.PurpleSlime, NPCID.RedSlime, NPCID.GreenSlime, NPCID.RedSlime,
NPCID.IceSlime, NPCID.UmbrellaSlime, NPCID.Pinky, NPCID.SlimeSpiked, NPCID.RainbowSlime, ModContent.NPCType<KingSlimeJewel>() }),
new Boss(ModContent.NPCType<DesertScourgeHead>(), spawnContext: type =>
+1 -2
View File
@@ -47,8 +47,7 @@ namespace CalamityMod.ExtraJumps
{
var source = player.GetSource_Misc("0");
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(20);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
int bubble = Projectile.NewProjectile(source, new Vector2(player.position.X, player.position.Y + (player.gravDir == -1f ? 20 : -20)), Vector2.Zero, ModContent.ProjectileType<SulphuricAcidBubbleFriendly>(), damage, 0f, player.whoAmI, 1f, 0f);
if (bubble.WithinBounds(Main.maxProjectiles))
+1 -2
View File
@@ -34,8 +34,7 @@ namespace CalamityMod.Items.Accessories
if (player.whoAmI == Main.myPlayer)
{
int damage = (int)player.GetBestClassDamage().ApplyTo(60);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
Projectile rain = CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<AuraRain>(), damage, 2f, player.whoAmI);
if (rain.whoAmI.WithinBounds(Main.maxProjectiles))
+2 -3
View File
@@ -69,10 +69,9 @@ namespace CalamityMod.Items.Accessories
damage = 30;
break;
}
int finalDamage = (int)player.GetBestClassDamage().ApplyTo(damage);
if (player.Calamity().oldFashioned)
finalDamage = CalamityUtils.CalcOldFashionedDamage(finalDamage);
int finalDamage = (int)player.GetBestClassDamage().ApplyTo(damage);
finalDamage = player.ApplyArmorAccDamageBonusesTo(finalDamage);
Projectile.NewProjectile(source, spawn.X, spawn.Y, velocity.X / 3, velocity.Y / 2, type, finalDamage, 5f, Main.myPlayer);
}
}
+1 -4
View File
@@ -79,11 +79,8 @@ namespace CalamityMod.Items.Accessories
{
spinningPoint *= 1.5f;
dmgAmt = (int)player.GetBestClassDamage().ApplyTo(dmgAmt);
if (player.Calamity().oldFashioned)
dmgAmt = CalamityUtils.CalcOldFashionedDamage(dmgAmt);
dmgAmt = player.ApplyArmorAccDamageBonusesTo(dmgAmt);
Projectile.NewProjectile(player.GetSource_FromThis(), player.Center, vector2, projectileType, dmgAmt, 0f, Main.myPlayer);
}
}
offset += 10f;
+6 -6
View File
@@ -44,11 +44,11 @@ namespace CalamityMod.Items.Accessories
if (player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] < 1)
{
var source = player.GetSource_Accessory(Item);
int baseDamage = 45;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Cloud Elementals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(45);
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
var p = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<CloudElementalMinion>(), damage, 2f, Main.myPlayer, 0f, 0f);
p.originalDamage = baseDamage;
}
@@ -68,11 +68,11 @@ namespace CalamityMod.Items.Accessories
if (player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] < 1)
{
var source = player.GetSource_Accessory(Item);
int baseDamage = 45;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Cloud Elementals spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
int baseDamage = 45;
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
var p = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<CloudElementalMinion>(), damage, 2f, Main.myPlayer, 0f, 0f);
p.originalDamage = baseDamage;
}
+2 -4
View File
@@ -56,8 +56,7 @@ namespace CalamityMod.Items.Accessories
float offsetAngle = (float)Math.PI * radialOffset;
int type = ModContent.ProjectileType<FlameLickedHellblast>();
int damage = (int)player.GetBestClassDamage().ApplyTo(60);
if (calPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
if (player.whoAmI == Main.myPlayer)
{
@@ -74,8 +73,7 @@ namespace CalamityMod.Items.Accessories
float radians2 = MathHelper.TwoPi / totalProjectiles;
type = ModContent.ProjectileType<FlameLickedBarrage>();
damage = (int)player.GetBestClassDamage().ApplyTo(20);
if (calPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
double angleA = radians2 * 0.5;
double angleB = MathHelper.ToRadians(90f) - angleA;
+6 -8
View File
@@ -36,11 +36,10 @@ namespace CalamityMod.Items.Accessories
{
var source = player.GetSource_Accessory(Item);
int baseDamage = FungalClumpDamage;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Fungal Clumps spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(FungalClumpDamage);
int damage = (int)player.GetBestClassDamage().ApplyTo(baseDamage);
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), damage, 1f, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = baseDamage;
@@ -62,11 +61,10 @@ namespace CalamityMod.Items.Accessories
{
var source = player.GetSource_Accessory(Item);
int baseDamage = FungalClumpDamage;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Fungal Clumps spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
int baseDamage = player.ApplyArmorAccDamageBonusesTo(FungalClumpDamage);
int damage = (int)player.GetBestClassDamage().ApplyTo(baseDamage);
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), damage, 1f, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = baseDamage;
+4
View File
@@ -8,6 +8,10 @@ namespace CalamityMod.Items.Accessories
public class GravistarSabaton : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public static readonly int PassthroughDamage = 150;
public static readonly int SlamDamage = 300;
public override void SetDefaults()
{
Item.width = 20;
+6 -8
View File
@@ -59,11 +59,10 @@ namespace CalamityMod.Items.Accessories
var source = player.GetSource_Accessory(Item);
Vector2 velocity = new Vector2(0f, -1f);
int baseDamage = 50;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Elementals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(50);
int elementalDmg = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
float kBack = 2f + player.GetKnockback<SummonDamageClass>().Additive;
if (player.ownedProjectileCounts[brimmy] > 1 || player.ownedProjectileCounts[siren] > 1 ||
@@ -126,11 +125,10 @@ namespace CalamityMod.Items.Accessories
var source = player.GetSource_Accessory(Item);
Vector2 velocity = new Vector2(0f, -1f);
int baseDamage = 90;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Elementals spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
int baseDamage = player.ApplyArmorAccDamageBonusesTo(50);
int elementalDmg = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
float kBack = 2f + player.GetKnockback<SummonDamageClass>().Additive;
if (player.ownedProjectileCounts[brimmy] > 1 || player.ownedProjectileCounts[siren] > 1 ||
+6 -6
View File
@@ -51,9 +51,9 @@ namespace CalamityMod.Items.Accessories
}
if (player.ownedProjectileCounts[ProjectileType<HowlsHeartHowl>()] < 1)
{
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(HowlDamage);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
// 08DEC2023: Ozzatron: Howls spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(HowlDamage);
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
Projectile howl = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ProjectileType<HowlsHeartHowl>(), damage, 1f, player.whoAmI, 0f, 1f);
howl.originalDamage = damage;
@@ -80,9 +80,9 @@ namespace CalamityMod.Items.Accessories
if (player.ownedProjectileCounts[ProjectileType<HowlsHeartHowl>()] < 1)
{
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(HowlDamage);
if (player.Calamity().oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
// 08DEC2023: Ozzatron: Howls spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
int baseDamage = player.ApplyArmorAccDamageBonusesTo(HowlDamage);
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
int p = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ProjectileType<HowlsHeartHowl>(), damage, 1f, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(p))
+1 -4
View File
@@ -37,10 +37,7 @@ namespace CalamityMod.Items.Accessories
if (player.whoAmI == Main.myPlayer)
{
int baseDamage = 5;
if (player.Calamity().oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
int baseDamage = player.ApplyArmorAccDamageBonusesTo(5);
var source = player.GetSource_Accessory(Item);
if (player.ownedProjectileCounts[ModContent.ProjectileType<MarniteRepulsionHitbox>()] < 1)
{
+1 -3
View File
@@ -34,6 +34,7 @@ namespace CalamityMod.Items.Accessories
modPlayer.nCore = true;
player.GetDamage<GenericDamageClass>() += 0.1f;
int damage = (int)player.GetBestClassDamage().ApplyTo(250);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
float knockBack = 3f;
if (Main.rand.NextBool(15))
{
@@ -92,9 +93,6 @@ namespace CalamityMod.Items.Accessories
}
if (canSpawnProj && Main.myPlayer == player.whoAmI)
{
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
Projectile.NewProjectile(source, center.X, center.Y, 0f, 0f, ModContent.ProjectileType<NebulaStar>(), damage, knockBack, player.whoAmI);
return;
}
+6 -8
View File
@@ -45,11 +45,10 @@ namespace CalamityMod.Items.Accessories
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] < 1)
{
int baseDamage = 65;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Anahitas spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(65);
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
int anahita = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<WaterElementalMinion>(), damage, 2f, Main.myPlayer);
if (Main.projectile.IndexInRange(anahita))
Main.projectile[anahita].originalDamage = baseDamage;
@@ -70,11 +69,10 @@ namespace CalamityMod.Items.Accessories
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] < 1)
{
int baseDamage = 65;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Anahitas spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
int baseDamage = player.ApplyArmorAccDamageBonusesTo(65);
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
int anahita = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<WaterElementalMinion>(), damage, 2f, Main.myPlayer);
if (Main.projectile.IndexInRange(anahita))
Main.projectile[anahita].originalDamage = baseDamage;
+8 -15
View File
@@ -301,8 +301,7 @@ namespace CalamityMod.Items.Accessories
int separation = (i * 4) - 8;
int spearBaseDamage = 350;
int spearDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(spearBaseDamage);
if (player.Calamity().oldFashioned)
spearDamage = CalamityUtils.CalcOldFashionedDamage(spearDamage);
spearDamage = player.ApplyArmorAccDamageBonusesTo(spearDamage);
int proj = Projectile.NewProjectile(source, player.Center.X, player.Center.Y - separation, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), spearDamage, 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f);
if (proj.WithinBounds(Main.maxProjectiles))
@@ -319,8 +318,7 @@ namespace CalamityMod.Items.Accessories
{
int spearBaseDamage = 250;
int spearDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(spearBaseDamage);
if (player.Calamity().oldFashioned)
spearDamage = CalamityUtils.CalcOldFashionedDamage(spearDamage);
spearDamage = player.ApplyArmorAccDamageBonusesTo(spearDamage);
int proj = Projectile.NewProjectile(source, player.Center, correctedVelocity * 14f, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), spearDamage, 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f);
if (proj.WithinBounds(Main.maxProjectiles))
@@ -346,8 +344,7 @@ namespace CalamityMod.Items.Accessories
int projType = isSmallBoomer ? isThiccBoomer ? 1 : 2 : 3;
int boomBaseDamage = 200;
int boomDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(boomBaseDamage);
if (player.Calamity().oldFashioned)
boomDamage = CalamityUtils.CalcOldFashionedDamage(boomDamage);
boomDamage = player.ApplyArmorAccDamageBonusesTo(boomDamage);
switch (projType)
{
@@ -402,8 +399,7 @@ namespace CalamityMod.Items.Accessories
int sickPenalty = (int)(mageFireDamage * (0.05f * ((player.buffTime[player.FindBuffIndex(BuffID.ManaSickness)] + 60) / 60)));
mageFireDamage -= sickPenalty;
}
if (player.Calamity().oldFashioned)
mageFireDamage = CalamityUtils.CalcOldFashionedDamage(mageFireDamage);
mageFireDamage = player.ApplyArmorAccDamageBonusesTo(mageFireDamage);
int proj = Projectile.NewProjectile(source, player.position, correctedVelocity, ModContent.ProjectileType<ProfanedCrystalMageFireball>(), mageFireDamage, 1f, player.whoAmI, empowered ? 1f : 0f);
if (proj.WithinBounds(Main.maxProjectiles))
@@ -431,8 +427,7 @@ namespace CalamityMod.Items.Accessories
float angle = MathHelper.TwoPi / crystalCount * i;
int shardBaseDamage = 176;
int shardDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(shardBaseDamage);
if (player.Calamity().oldFashioned)
shardDamage = CalamityUtils.CalcOldFashionedDamage(shardDamage);
shardDamage = player.ApplyArmorAccDamageBonusesTo(shardDamage);
int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 12f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), shardDamage, 1f, player.whoAmI, 0f, 0f);
if (proj.WithinBounds(Main.maxProjectiles))
@@ -450,8 +445,7 @@ namespace CalamityMod.Items.Accessories
int totalShardProjectiles = empowered ? 360 / 5 : 360 / 10;
int shardBaseDamage = empowered ? 125 : 220;
int shardDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(shardBaseDamage);
if (player.Calamity().oldFashioned)
shardDamage = CalamityUtils.CalcOldFashionedDamage(shardDamage);
shardDamage = player.ApplyArmorAccDamageBonusesTo(shardDamage);
float interval = totalShardProjectiles / chains * (empowered ? 5f : 10f);
double patternInterval = Math.Floor(player.Calamity().profanedSoulWeaponUsage / interval);
@@ -490,9 +484,8 @@ namespace CalamityMod.Items.Accessories
if (player.Calamity().profanedSoulWeaponUsage == 0)
{
int whipBaseDamage = 250;
int whipDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(whipBaseDamage);
if (player.Calamity().oldFashioned)
whipDamage = CalamityUtils.CalcOldFashionedDamage(whipDamage);
int whipDamage = (int)player.GetTotalDamage<SummonMeleeSpeedDamageClass>().ApplyTo(whipBaseDamage);
whipDamage = player.ApplyArmorAccDamageBonusesTo(whipDamage);
var buffed = player.HasBuff<ProfanedCrystalWhipBuff>();
correctedVelocity *= buffed ? 10f : 8f;
+6 -8
View File
@@ -43,11 +43,10 @@ namespace CalamityMod.Items.Accessories
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] < 1)
{
int baseDamage = 60;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Brimstone Elementals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(60);
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<BrimstoneElementalMinion>(), damage, 2f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = baseDamage;
@@ -68,11 +67,10 @@ namespace CalamityMod.Items.Accessories
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] < 1)
{
int baseDamage = 60;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Brimstone Elementals spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
int baseDamage = player.ApplyArmorAccDamageBonusesTo(60);
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<BrimstoneElementalMinion>(), damage, 2f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = baseDamage;
+2 -5
View File
@@ -1,10 +1,8 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Magic;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.Localization;
using CalamityMod.Items.Potions.Alcohol;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
@@ -30,8 +28,7 @@ namespace CalamityMod.Items.Accessories
if (player.whoAmI == Main.myPlayer)
{
int damage = (int)player.GetBestClassDamage().ApplyTo(18);
if (player.Calamity().oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
Projectile rain = CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<AuraRain>(), damage, 2f, player.whoAmI);
if (rain.whoAmI.WithinBounds(Main.maxProjectiles))
+2 -2
View File
@@ -30,9 +30,9 @@ namespace CalamityMod.Items.Accessories
Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0.05f, 1f, 0.1f);
int plagueDebuff = ModContent.BuffType<Plague>();
bool shouldInflictPlague = plagueCounter % 60 == 0;
int auraDamage = (int)player.GetBestClassDamage().ApplyTo(50);
if (modPlayer.oldFashioned)
auraDamage = CalamityUtils.CalcOldFashionedDamage(auraDamage);
auraDamage = player.ApplyArmorAccDamageBonusesTo(auraDamage);
int random = Main.rand.Next(10);
var source = player.GetSource_Accessory(Item);
+1 -3
View File
@@ -33,9 +33,7 @@ namespace CalamityMod.Items.Accessories
if (player.miscCounter % 10 == 0)
{
int damage = (int)player.GetBestClassDamage().ApplyTo(30);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<StandingFire>(), damage, 5f, player.whoAmI);
}
}
+3 -4
View File
@@ -49,11 +49,10 @@ namespace CalamityMod.Items.Accessories
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] < 1)
{
int baseDamage = ElementalDamage;
if (player.Calamity().oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Sand Elementals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(ElementalDamage);
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
var p = Projectile.NewProjectileDirect(player.GetSource_Accessory(Item), player.Center, -Vector2.UnitY, ModContent.ProjectileType<SandElementalMinion>(), damage, 2f, Main.myPlayer);
p.originalDamage = baseDamage;
}
+6 -6
View File
@@ -44,11 +44,11 @@ namespace CalamityMod.Items.Accessories
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] < 1)
{
var source = player.GetSource_Accessory(Item);
int baseDamage = 45;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Rare Sand Elementals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(45);
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
Projectile sandy = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<SandElementalHealer>(), damage, 2f, Main.myPlayer, 0f, 0f);
sandy.originalDamage = baseDamage;
}
@@ -68,11 +68,11 @@ namespace CalamityMod.Items.Accessories
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] < 1)
{
var source = player.GetSource_Accessory(Item);
int baseDamage = 45;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Rare Sand Elementals spawned with... Hold on a second. Why the fuck are we doing damage calculations when the accessory is in vanity?!
int baseDamage = player.ApplyArmorAccDamageBonusesTo(45);
int damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
Projectile sandy = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<SandElementalHealer>(), damage, 2f, Main.myPlayer, 0f, 0f);
sandy.originalDamage = baseDamage;
}
+1 -2
View File
@@ -60,8 +60,7 @@ namespace CalamityMod.Items.Accessories.Wings
{
var source = player.GetSource_Accessory(Item);
int damage = (int)player.GetBestClassDamage().ApplyTo(25);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ModContent.ProjectileType<FrostShardFriendly>(), damage, 3f, player.whoAmI, 1f);
if (p.WithinBounds(Main.maxProjectiles))
+2 -4
View File
@@ -37,8 +37,7 @@ namespace CalamityMod.Items.Accessories
if (player.whoAmI == Main.myPlayer)
{
int damage = (int)player.GetBestClassDamage().ApplyTo(175);
if (player.Calamity().oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
int projectile1 = Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<DragonDust>(), damage, 5f, player.whoAmI, 0f, 0f);
Main.projectile[projectile1].timeLeft = 60;
@@ -57,8 +56,7 @@ namespace CalamityMod.Items.Accessories
if (player.whoAmI == Main.myPlayer)
{
int damage = (int)player.GetBestClassDamage().ApplyTo(375);
if (player.Calamity().oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<SkyFlareFriendly>(), damage, 9f, player.whoAmI);
}
+3 -4
View File
@@ -48,11 +48,10 @@ namespace CalamityMod.Items.Armor.Aerospec
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<Valkyrie>()] < 1)
{
int baseDamage = 20;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Aerospec Valkyries spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(20);
var damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
var p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<Valkyrie>(), damage, 0f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = baseDamage;
+3 -4
View File
@@ -49,11 +49,10 @@ namespace CalamityMod.Items.Armor.Daedalus
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<DaedalusCrystal>()] < 1)
{
int baseDamage = 95;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Daedalus Crystals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(95);
var damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
var p = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<DaedalusCrystal>(), damage, 0f, Main.myPlayer, 50f, 0f);
p.originalDamage = baseDamage;
}
+3 -4
View File
@@ -59,11 +59,10 @@ namespace CalamityMod.Items.Armor.Demonshade
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<DemonshadeRedDevil>()] < 1)
{
var baseDamage = 10000;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Demonshade Red Devils spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
var baseDamage = player.ApplyArmorAccDamageBonusesTo(10000);
var damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
var devil = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<DemonshadeRedDevil>(), damage, 0f, Main.myPlayer, 0f, 0f);
devil.originalDamage = baseDamage;
}
@@ -49,11 +49,10 @@ namespace CalamityMod.Items.Armor.Hydrothermic
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<HydrothermicVent>()] < 1)
{
int baseDamage = 190;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Hydrothermic Vents spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(190);
var damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
var p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<HydrothermicVent>(), damage, 0f, Main.myPlayer, 38f, 0f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = baseDamage;
+3 -3
View File
@@ -52,9 +52,9 @@ namespace CalamityMod.Items.Armor.Mollusk
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<Shellfish>()] < 2)
{
int baseDamage = 140;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Clams spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(140);
// wait why does this not scale with summon damage
Projectile clam = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<Shellfish>(), baseDamage, 0f, player.whoAmI);
clam.originalDamage = baseDamage;
+1 -2
View File
@@ -61,8 +61,7 @@ namespace CalamityMod.Items.Armor.PlagueReaper
if (player.miscCounter % 10 == 0)
{
var damage = (int)player.GetTotalDamage<RangedDamageClass>().ApplyTo(40);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
var cinder = CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<TheSyringeCinder>(), damage, 4f, player.whoAmI);
if (cinder.whoAmI.WithinBounds(Main.maxProjectiles))
@@ -58,11 +58,10 @@ namespace CalamityMod.Items.Armor.Plaguebringer
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<PlaguebringerSummon>()] < 1)
{
int baseDamage = 25;
if (player.Calamity().oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Plaguebringer armor dudes spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(25);
var damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
var p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<PlaguebringerSummon>(), damage, 0f, player.whoAmI, 0f, 0f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = baseDamage;
+3 -4
View File
@@ -56,11 +56,10 @@ namespace CalamityMod.Items.Armor.Silva
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<SilvaCrystal>()] < 1)
{
int baseDamage = 600;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Silva Crystals spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(600);
var damage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
var p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SilvaCrystal>(), damage, 0f, Main.myPlayer, -20f, 0f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = baseDamage;
+3 -3
View File
@@ -50,11 +50,11 @@ namespace CalamityMod.Items.Armor.Statigel
}
var minionID = -1;
var baseDamage = 33;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Corruption and Crimson Slimes spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
var baseDamage = player.ApplyArmorAccDamageBonusesTo(33);
var minionDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
if (WorldGen.crimson && player.ownedProjectileCounts[ModContent.ProjectileType<CrimsonSlimeGodMinion>()] < 1)
minionID = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<CrimsonSlimeGodMinion>(), minionDamage, 0f, Main.myPlayer);
else if (!WorldGen.crimson && player.ownedProjectileCounts[ModContent.ProjectileType<CorruptionSlimeGodMinion>()] < 1)
+3 -4
View File
@@ -46,11 +46,10 @@ namespace CalamityMod.Items.Armor.Victide
var source = player.GetSource_ItemUse(Item);
if (player.ownedProjectileCounts[ModContent.ProjectileType<VictideSeaSnail>()] < 1)
{
var baseDamage = 7;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Victide Sea Snails spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
var baseDamage = player.ApplyArmorAccDamageBonusesTo(7);
var minionDamage = (int)player.GetTotalDamage<SummonDamageClass>().ApplyTo(baseDamage);
var p = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType<VictideSeaSnail>(), minionDamage, 0f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = baseDamage;
+2 -2
View File
@@ -81,8 +81,8 @@ namespace CalamityMod.Items.Armor.Wulfrum
{
velocity = velocity.RotatedByRandom(MathHelper.PiOver4 * 0.1f);
if (player.Calamity().oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
// This weapon is acquired through usage of an armor set bonus and thus counts as armor. This function must be used.
damage = player.ApplyArmorAccDamageBonusesTo(damage);
}
public override bool CanUseItem(Player player)
+18 -38
View File
@@ -271,19 +271,17 @@ namespace CalamityMod.Items
if (modPlayer.luxorsGift && !item.channel)
{
// useTime 9 = 0.9 useTime 2 = 0.2
double damageMult = 1.0;
float damageMult = 1f;
if (item.useTime < 10)
damageMult -= (10 - item.useTime) / 10D;
damageMult -= (10 - item.useTime) / 10f;
double newDamage = damage * damageMult;
float newDamage = damage * damageMult;
if (player.whoAmI == Main.myPlayer)
{
if (item.CountsAsClass<MeleeDamageClass>())
{
int meleeDamage = (int)(newDamage * 0.25f);
if (modPlayer.oldFashioned)
meleeDamage = CalamityUtils.CalcOldFashionedDamage(meleeDamage);
int meleeDamage = player.ApplyArmorAccDamageBonusesTo(newDamage * 0.25f);
if (meleeDamage >= 1)
{
@@ -294,9 +292,7 @@ namespace CalamityMod.Items
}
else if (item.CountsAsClass<ThrowingDamageClass>())
{
int throwingDamage = (int)(newDamage * 0.2f);
if (modPlayer.oldFashioned)
throwingDamage = CalamityUtils.CalcOldFashionedDamage(throwingDamage);
int throwingDamage = player.ApplyArmorAccDamageBonusesTo(newDamage * 0.2f);
if (throwingDamage >= 1)
{
@@ -313,9 +309,7 @@ namespace CalamityMod.Items
// The projectile is fired inside of the scope's code instead
if (type != ModContent.ProjectileType<TitaniumRailgunScope>())
{
int rangedDamage = (int)(newDamage * 0.15f);
if (modPlayer.oldFashioned)
rangedDamage = CalamityUtils.CalcOldFashionedDamage(rangedDamage);
int rangedDamage = player.ApplyArmorAccDamageBonusesTo(newDamage * 0.15f);
if (rangedDamage >= 1)
{
@@ -327,9 +321,7 @@ namespace CalamityMod.Items
}
else if (item.CountsAsClass<MagicDamageClass>())
{
int magicDamage = (int)(newDamage * 0.3f);
if (modPlayer.oldFashioned)
magicDamage = CalamityUtils.CalcOldFashionedDamage(magicDamage);
int magicDamage = player.ApplyArmorAccDamageBonusesTo(newDamage * 0.3f);
if (magicDamage >= 1)
{
@@ -342,11 +334,10 @@ namespace CalamityMod.Items
{
if (damage >= 1)
{
int baseDamage = item.damage;
if (modPlayer.oldFashioned)
baseDamage = CalamityUtils.CalcOldFashionedDamage(baseDamage);
// 08DEC2023: Ozzatron: Luxor Summons spawned with Old Fashioned active will retain their bonus damage indefinitely. Oops. Don't care.
int baseDamage = player.ApplyArmorAccDamageBonusesTo(item.damage);
int summonDamage = baseDamage;
int projectile = Projectile.NewProjectile(source, position, Vector2.Zero, ModContent.ProjectileType<LuxorsGiftSummon>(), summonDamage, 0f, player.whoAmI);
if (projectile.WithinBounds(Main.maxProjectiles))
{
@@ -366,8 +357,7 @@ namespace CalamityMod.Items
{
// Bloodflare Mage Bolt: 130%, soft cap starts at 2000 base damage
int bloodflareBoltDamage = CalamityUtils.DamageSoftCap(damage * 1.3, 2600);
if (modPlayer.oldFashioned)
bloodflareBoltDamage = CalamityUtils.CalcOldFashionedDamage(bloodflareBoltDamage);
bloodflareBoltDamage = player.ApplyArmorAccDamageBonusesTo(bloodflareBoltDamage);
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<GhostlyBolt>(), bloodflareBoltDamage, 1f, player.whoAmI);
}
@@ -383,8 +373,7 @@ namespace CalamityMod.Items
// Bloodflare Ranged Bloodsplosion: 80%, soft cap starts at 150 base damage
// This is intentionally extremely low because this effect can be grossly overpowered with sniper rifles and the like.
int bloodsplosionDamage = CalamityUtils.DamageSoftCap(damage * 0.8, 120);
if (modPlayer.oldFashioned)
bloodsplosionDamage = CalamityUtils.CalcOldFashionedDamage(bloodsplosionDamage);
bloodsplosionDamage = player.ApplyArmorAccDamageBonusesTo(bloodsplosionDamage);
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<BloodBomb>(), bloodsplosionDamage, 2f, player.whoAmI);
}
@@ -397,9 +386,7 @@ namespace CalamityMod.Items
modPlayer.tarraCrits = 0;
// Tarragon Mage Leaves: (8-10) x 20%, soft cap starts at 200 base damage
int leafAmt = 8 + Main.rand.Next(3); // 8, 9, or 10
int leafDamage = (int)(damage * 0.2);
if (modPlayer.oldFashioned)
leafDamage = CalamityUtils.CalcOldFashionedDamage(leafDamage);
int leafDamage = player.ApplyArmorAccDamageBonusesTo(damage * 0.2f);
for (int l = 0; l < leafAmt; l++)
{
@@ -423,10 +410,7 @@ namespace CalamityMod.Items
modPlayer.canFireAtaxiaRangedProjectile = false;
if (player.whoAmI == Main.myPlayer)
{
int ataxiaFlareDamage = (int)(damage * 0.25);
if (modPlayer.oldFashioned)
ataxiaFlareDamage = CalamityUtils.CalcOldFashionedDamage(ataxiaFlareDamage);
int ataxiaFlareDamage = player.ApplyArmorAccDamageBonusesTo(damage * 0.25f);
Projectile.NewProjectile(source, position, velocity * 1.25f, ModContent.ProjectileType<HydrothermicFlare>(), ataxiaFlareDamage, 2f, player.whoAmI);
}
}
@@ -440,8 +424,7 @@ namespace CalamityMod.Items
{
// God Slayer Ranged Shrapnel: 100%, soft cap starts at 800 base damage
int shrapnelRoundDamage = CalamityUtils.DamageSoftCap(damage, 800);
if (modPlayer.oldFashioned)
shrapnelRoundDamage = CalamityUtils.CalcOldFashionedDamage(shrapnelRoundDamage);
shrapnelRoundDamage = player.ApplyArmorAccDamageBonusesTo(shrapnelRoundDamage);
Projectile.NewProjectile(source, position, velocity * 1.25f, ModContent.ProjectileType<GodSlayerShrapnelRound>(), shrapnelRoundDamage, 2f, player.whoAmI);
}
@@ -456,8 +439,7 @@ namespace CalamityMod.Items
// Ataxia Rogue Flares: 8 x 50%, soft cap starts at 120 base damage
int flareDamage = CalamityUtils.DamageSoftCap(damage * 0.5, 120);
if (modPlayer.oldFashioned)
flareDamage = CalamityUtils.CalcOldFashionedDamage(flareDamage);
flareDamage = player.ApplyArmorAccDamageBonusesTo(flareDamage);
if (player.whoAmI == Main.myPlayer)
{
@@ -485,8 +467,7 @@ namespace CalamityMod.Items
{
// Victide All-class Seashells: 200%, soft cap starts at 46 base damage
int seashellDamage = CalamityUtils.DamageSoftCap(damage * 2, 46);
if (modPlayer.oldFashioned)
seashellDamage = CalamityUtils.CalcOldFashionedDamage(seashellDamage);
seashellDamage = player.ApplyArmorAccDamageBonusesTo(seashellDamage);
Projectile.NewProjectile(source, position, velocity * 1.25f, ModContent.ProjectileType<Seashell>(), seashellDamage, 1f, player.whoAmI);
}
@@ -501,8 +482,7 @@ namespace CalamityMod.Items
damageMult = 0.35;
int newDamage = (int)(damage * 2 * damageMult);
if (modPlayer.oldFashioned)
newDamage = CalamityUtils.CalcOldFashionedDamage(newDamage);
newDamage = player.ApplyArmorAccDamageBonusesTo(newDamage);
if (player.whoAmI == Main.myPlayer)
{
+3 -2
View File
@@ -8,8 +8,9 @@ namespace CalamityMod.Items.Potions.Alcohol
public class OldFashioned : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public const float AccessoryAndSetBonusDamageMultiplier = 1.5f;
public const float DamageStatReduction = 0.25f;
public static readonly float AccessoryAndSetBonusDamageMultiplier = 1.5f;
public static readonly float DamageStatReduction = 0.25f;
public override void SetStaticDefaults()
{
@@ -52,8 +52,7 @@ namespace CalamityMod.Items.VanillaArmorChanges
owner.Calamity().MythrilFlareSpawnCountdown = FlareFrameSpawnDelay;
int flareDamage = CalamityUtils.DamageSoftCap(originalDamage * 0.4, FlareDamageSoftcap);
if (owner.Calamity().oldFashioned)
flareDamage = CalamityUtils.CalcOldFashionedDamage(flareDamage);
flareDamage = owner.ApplyArmorAccDamageBonusesTo(flareDamage);
Vector2 flareSpawnPosition = victim.Center + Main.rand.NextVector2Circular(10f, 10f);
Projectile.NewProjectile(owner.GetSource_ItemUse(owner.ActiveItem()), flareSpawnPosition, Vector2.Zero, ModContent.ProjectileType<MythrilFlare>(), flareDamage, 0f, owner.whoAmI);
+3 -3
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Rogue
public override void SetDefaults()
{
Item.width = 80;
Item.damage = 31;
Item.damage = 84;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useAnimation = 48;
@@ -30,8 +30,8 @@ namespace CalamityMod.Items.Weapons.Rogue
Item.Calamity().donorItem = true;
}
public override float StealthDamageMultiplier => 0.45f;
public override float StealthVelocityMultiplier => 1f;
public override float StealthDamageMultiplier => 0.40f;
public override float StealthVelocityMultiplier => 1.75f;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
+4 -3
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
public override void SetDefaults()
{
Item.damage = 310;
Item.damage = 300;
Item.width = Item.height = 68;
Item.useAnimation = Item.useTime = 9;
Item.noMelee = true;
@@ -32,8 +32,8 @@ namespace CalamityMod.Items.Weapons.Rogue
public override bool AltFunctionUse(Player player) => player.ownedProjectileCounts[Item.shoot] > 0;
public override float StealthDamageMultiplier => 1.7f;
public override float StealthVelocityMultiplier => 1.2f;
public override float StealthDamageMultiplier => 1.65f;
public override float StealthVelocityMultiplier => 1.5f;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
@@ -52,6 +52,7 @@ namespace CalamityMod.Items.Weapons.Rogue
Main.projectile[i].ModProjectile<SacrificeProjectile>().AbleToHealOwner = attachedNPC.type != NPCID.TargetDummy && attachedNPC.type != ModContent.NPCType<SuperDummyNPC>();
Main.projectile[i].netUpdate = true;
}
//TODO: Add something here to avoid stealth being consumed
return false;
}
+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Summon
Item.DamageType = DamageClass.Summon;
Item.mana = 300;
Item.damage = 18000;
Item.damage = 15000;
Item.knockBack = 7f;
Item.useTime = Item.useAnimation = 10;
Item.shoot = ModContent.ProjectileType<UniverseSplitterField>();
@@ -401,13 +401,14 @@ CalamityConfig: {
'''
}
PlayerRespawnTime_BossAlive: {
Label: "[i:Stopwatch] Player Respawn Time while a Boss is Alive"
Tooltip:
'''
Adjust the amount of time it takes for a player to respawn while a boss is alive, in seconds.
'''
}
PlayerRespawnTime_BossAlive: {
Label: "[i:Stopwatch] Boss Fight Player Respawn Time"
Tooltip:
'''
Sets the respawn time for players when a boss is alive, in seconds. This applies equally in single player and multiplayer.
When no boss is alive, players will respawn in 3 seconds in both single player and multiplayer.
'''
}
TownNPCSpawnRateMultiplier: {
Label: "[i:GuideVoodooDoll] Town NPC Spawn Rate Multiplier"
@@ -14,7 +14,6 @@ AbyssBlade: {
'''
Fires short-range tridents
Hitting enemies will inflict the crush depth debuff
The lower the enemies' defense, the more damage they take from this debuff
'''
}
@@ -313,7 +313,7 @@ DILF: {
LikeNPC: "{NPCName} is well learned, and quite a respectable mage himself!"
DislikeNPC: I dislike {NPCName}'s blatant disregard of magic. I cannot blame his functions, but he is quite ignorant.
LikeNPC_Princess: "{NPCName} has some very quaint spells. I'm quite impressed, for someone of her age."
Princess_LovesNPC: I like {NPCName}.
Princess_LovesNPC: "{NPCName} makes the best ice cream I've ever tasted, it's so good!"
}
}
@@ -404,7 +404,7 @@ FAP: {
HateNPC_GoblinTinkerer: "{NPCName} was so terrible that I had to FORCE him to have a better reforge system. Why would you house me next to him? Do you enjoy watching me relive the stress he gave me!?"
HateNPC_Angler: "{NPCName} never stops blabbering about his inane fishing quests. Get me away from him before I stomp him into the ground!"
LikeNPC_Princess: You think I'd dislike {NPCName} because we're too different? Quite the contrary, there's a lot we like to talk about, over non-alcoholic drinks of course.
Princess_LovesNPC: I like {NPCName}.
Princess_LovesNPC: "{NPCName} has really interesting stories to tell, I learned a lot from her already!"
HateNPC: I hate {NPCName}.
DislikeNPC: I dislike {NPCName}.
LikeNPC: I like {NPCName}.
@@ -493,7 +493,7 @@ SEAHOE: {
DislikeNPC: I've had quite enough carnage for one lifetime thank you! {NPCName}'s destructive tendencies are a bit insensitive.
HateNPC: "{NPCName} is just a child, but his attitude towards marine life is unacceptable! Absolutely unacceptable!"
LikeNPC_Princess: That child, {NPCName}. She is an innocent soul. Let us hope the horrors of war never reach her.
Princess_LovesNPC: I like {NPCName}.
Princess_LovesNPC: "{NPCName} always smiles when I'm nearby, I like being around him just for that!"
}
}
@@ -574,7 +574,7 @@ THIEF: {
LikeNPC: "{NPCName} doesn't only keep spiky balls in his pockets, he keeps a ton of cash! He's too absentminded to notice I'm stealing from him too! I like that a lot!"
DislikeNPC: What a goody two shoes, {NPCName} is! I dislike her out of principle! …And because she has almost no material goods.
LikeNPC_Princess: I couldn't bear to steal anything from {NPCName}, she's so cute!
Princess_LovesNPC: I like {NPCName}.
Princess_LovesNPC: "{NPCName} gifts me with nice exact replicas of other's things! I wonder where she gets them from..."
}
}
@@ -616,6 +616,6 @@ WITCH: {
LikeNPC: "{NPCName} is someone who's had a terrible experience being cursed. He's put up with it quite well all that time, it's quite impressive honestly."
DislikeNPC: Such a racket! All {NPCName} does is make noise, day in and day out! I can't stand her!
LikeNPC_Princess: What a strangely pleasant kid {NPCName} is to be around.
Princess_LovesNPC: I like {NPCName}.
Princess_LovesNPC: "{NPCName} is always lonely, it's why I want to hang out with her, no one should be left alone like that!"
}
}
+7 -13
View File
@@ -2422,9 +2422,7 @@ namespace CalamityMod.Projectiles
if (projectile.owner == Main.myPlayer && player.ownedProjectileCounts[ProjectileType<NanotechProjectile>()] < 5)
{
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(60);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType<NanotechProjectile>(), damage, 0f, projectile.owner);
}
}
@@ -2436,8 +2434,7 @@ namespace CalamityMod.Projectiles
if (projectile.owner == Main.myPlayer && player.ownedProjectileCounts[ProjectileType<MoonSigil>()] < 5)
{
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(42);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
int proj = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType<MoonSigil>(), damage, 0f, projectile.owner);
if (proj.WithinBounds(Main.maxProjectiles))
@@ -2453,8 +2450,7 @@ namespace CalamityMod.Projectiles
if (projectile.owner == Main.myPlayer && player.ownedProjectileCounts[ProjectileType<DragonShit>()] < 5)
{
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(DragonScales.ShitBaseDamage);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
int proj = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * 1.2f, ProjectileType<DragonShit>(), damage, 0f, projectile.owner);
if (proj.WithinBounds(Main.maxProjectiles))
@@ -2474,8 +2470,7 @@ namespace CalamityMod.Projectiles
{
// Daedalus Rogue Crystals: 2 x 25%, soft cap starts at 120 base damage
int crystalDamage = CalamityUtils.DamageSoftCap(projectile.damage * 0.25, 30);
if (modPlayer.oldFashioned)
crystalDamage = CalamityUtils.CalcOldFashionedDamage(crystalDamage);
crystalDamage = player.ApplyArmorAccDamageBonusesTo(crystalDamage);
for (int i = 0; i < 2; i++)
{
@@ -3093,9 +3088,9 @@ namespace CalamityMod.Projectiles
for (int i = 0; i < 2; i++)
{
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(20);
if (player.Calamity().oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
int soul = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, velocity, ProjectileType<LostSoulFriendly>(), damage, 0f, projectile.owner);
Main.projectile[soul].tileCollide = false;
@@ -3107,8 +3102,7 @@ namespace CalamityMod.Projectiles
if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0)
{
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(18);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
int spike = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType<JewelSpike>(), damage, projectile.knockBack, projectile.owner);
Main.projectile[spike].frame = 4;
@@ -38,10 +38,10 @@ namespace CalamityMod.Projectiles.Rogue
SoundEngine.PlaySound(SoundID.Item7, Projectile.position);
}
//Spawn a skull every 30 frames
if (Projectile.timeLeft % 30 == 0)
//Spawn a skull every 90 frames
if (Projectile.timeLeft % 90 == 0)
{
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 0.2f, ModContent.ProjectileType<GrimreaverSkull>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f, 0f);
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 0.2f, ModContent.ProjectileType<GrimreaverSkull>(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner, 1f, 0f);
}
CalamityUtils.HomeInOnNPC(Projectile, true, 250f, 4f, 14f);
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue
DustExplosion(15, 6, 12, 30, 2.4f);
for (int i = 0; i < 10; i++)
{
CalamityUtils.ProjectileRain(Projectile.GetSource_FromThis(), Projectile.Center, 600f, 100f, 700f, 1000f, 20, ModContent.ProjectileType<GrimreaverSkull>(), (int)(Projectile.damage * 0.75f), 3f, Projectile.owner);
CalamityUtils.ProjectileRain(Projectile.GetSource_FromThis(), Projectile.Center, 600f, 100f, 700f, 1000f, 20, ModContent.ProjectileType<GrimreaverSkull>(), (int)(Projectile.damage * 0.35f), 3f, Projectile.owner);
}
}
else
+1 -2
View File
@@ -67,8 +67,7 @@ namespace CalamityMod.Projectiles.Rogue
break;
}
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(22);
if (player.Calamity().oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
damage = player.ApplyArmorAccDamageBonusesTo(damage);
int inkID = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), inkType, damage, 7, Projectile.owner);
Main.projectile[inkID].timeLeft += Main.rand.Next(-20, 25);
+4 -4
View File
@@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue
if (ReturningToOwner)
{
Projectile.timeLeft = 15;
Projectile.timeLeft = 20;
Projectile.velocity = Projectile.SafeDirectionTo(Owner.Center) * 28f;
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.Pi + MathHelper.PiOver4;
Projectile.damage = 0;
@@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue
{
if (!Owner.moonLeech && AbleToHealOwner)
{
int healAmount = Projectile.Calamity().stealthStrike ? 35 : 3;
int healAmount = Projectile.Calamity().stealthStrike ? 40 : 3;
Owner.HealEffect(healAmount);
Owner.statLife += healAmount;
@@ -84,8 +84,8 @@ namespace CalamityMod.Projectiles.Rogue
{
if (Projectile.timeLeft > 90 && !Projectile.Calamity().stealthStrike)
Projectile.timeLeft = 90;
else if (Projectile.timeLeft > 120 && Projectile.Calamity().stealthStrike)
Projectile.timeLeft = 120;
else if (Projectile.timeLeft > 180 && Projectile.Calamity().stealthStrike)
Projectile.timeLeft = 180;
}
Projectile.StickyProjAI(50);
}
+2 -2
View File
@@ -129,8 +129,8 @@ namespace CalamityMod.Projectiles.Rogue
if (!Main.player[Projectile.owner].moonLeech)
{
// Give on-heal effects from stealth strikes.
Main.player[Projectile.owner].statLife += 120;
Main.player[Projectile.owner].HealEffect(120);
Main.player[Projectile.owner].statLife += 90;
Main.player[Projectile.owner].HealEffect(90);
}
// And spawn a bloom of bullets.
+2 -4
View File
@@ -2,7 +2,6 @@
using System.IO;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.Summon.Whips;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.NPCs.Providence;
using Microsoft.Xna.Framework;
using Terraria;
@@ -360,9 +359,8 @@ namespace CalamityMod.Projectiles.Summon
// Dynamically update stats here, originalDamage can be found in MiscEffects
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.localNPCHitCooldown = (SpawnedFromPSC ? 6 : 9);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
Projectile.localNPCHitCooldown = SpawnedFromPSC ? 6 : 9;
var currentAIState = getAiState;
+4 -10
View File
@@ -1,19 +1,14 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.NPCs;
using CalamityMod.NPCs.ProfanedGuardians;
using System;
using System.IO;
using CalamityMod.NPCs.Providence;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using System;
using System.IO;
using CalamityMod.Buffs.Summon.Whips;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.Enums;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Summon
{
public class MiniGuardianHolyRay : ModProjectile, ILocalizedModType
@@ -67,8 +62,7 @@ namespace CalamityMod.Projectiles.Summon
Vector2 fireFrom = new Vector2(owner.Center.X, owner.Center.Y);
Projectile.position = fireFrom - new Vector2(Projectile.width, Projectile.height) / 2f;
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
}
else
Projectile.Kill();
+2 -4
View File
@@ -1,7 +1,6 @@
using System;
using CalamityMod.Buffs.Summon.Whips;
using CalamityMod.Dusts;
using CalamityMod.Items.Potions.Alcohol;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -45,6 +44,8 @@ namespace CalamityMod.Projectiles.Summon
{
// Dynamically update stats here, originalDamage can be found in MiscEffects
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
// Despawn properly
if (Owner.Calamity().pSoulGuardians && Projectile.ai[0] == 0f)
Projectile.timeLeft = 4;
@@ -54,9 +55,6 @@ namespace CalamityMod.Projectiles.Summon
Projectile.active = false;
return;
}
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
if (Projectile.ai[0] == 0f) //regular expected behaviour of floaty rocks
{
+5 -7
View File
@@ -1,13 +1,12 @@
using CalamityMod.NPCs.Providence;
using System;
using CalamityMod.Items.Accessories;
using CalamityMod.NPCs.Providence;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
namespace CalamityMod.Projectiles.Summon
{
@@ -34,8 +33,7 @@ namespace CalamityMod.Projectiles.Summon
Player owner = Main.player[Projectile.owner];
Projectile.damage = (int)owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
if (Projectile.ai[0] < 240f)
{
@@ -16,6 +16,7 @@ using Terraria.ModLoader;
using Terraria.Audio;
using Terraria.GameContent;
using Vector2 = Microsoft.Xna.Framework.Vector2;
using static Humanizer.In;
namespace CalamityMod.Projectiles.Summon
{
@@ -142,8 +143,7 @@ namespace CalamityMod.Projectiles.Summon
Main.dust[num469].velocity *= 0f;
var Owner = Main.player[Projectile.owner];
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
}
public override Color? GetAlpha(Color lightColor)
@@ -254,8 +254,7 @@ namespace CalamityMod.Projectiles.Summon
Lighting.AddLight(Projectile.Center, 0.5f, 0.1f, 0f);
var Owner = Main.player[Projectile.owner];
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
if (Projectile.timeLeft == 600)
{
damage = Projectile.damage;
@@ -456,8 +455,7 @@ namespace CalamityMod.Projectiles.Summon
Lighting.AddLight(Projectile.Center, 1f, 0.2f, 0f);
var Owner = Main.player[Projectile.owner];
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
}
public override bool PreAI()
@@ -730,9 +728,8 @@ namespace CalamityMod.Projectiles.Summon
var Owner = Main.player[Projectile.owner];
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
Projectile.frameCounter++;
if (Projectile.frameCounter > 8)
{
@@ -897,9 +894,8 @@ namespace CalamityMod.Projectiles.Summon
{
var Owner = Main.player[Projectile.owner];
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
Projectile.frameCounter++;
if (Projectile.frameCounter > 4)
{
@@ -1020,9 +1016,8 @@ namespace CalamityMod.Projectiles.Summon
{
var Owner = Main.player[Projectile.owner];
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
if (Projectile.timeLeft > 120)
{
Projectile.rotation += 1f;
@@ -1320,11 +1315,10 @@ namespace CalamityMod.Projectiles.Summon
public override void AI()
{
Player owner = Main.player[Projectile.owner];
Projectile.damage = (int)owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
if (Projectile.ai[1] == 0f)
{
owner.itemAnimation = owner.itemAnimationMax;
@@ -1792,14 +1786,12 @@ namespace CalamityMod.Projectiles.Summon
public override void AI()
{
var psc = Projectile.ai[0] > 0f;
//Ensure that psa's spears are not coloured by night
var Owner = Main.player[Projectile.owner];
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
//Ensure that psa's spears are not coloured by night
var psc = Projectile.ai[0] > 0f;
int pscState = (int)((!Main.dayTime && psc) ? Providence.BossMode.Night : Providence.BossMode.Day);
int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, ProvUtils.GetDustID(pscState), 0f, 0f, 100, default, !Main.dayTime && psc ? 0.5f : 1f);
Main.dust[num469].noGravity = true;
@@ -1941,9 +1933,8 @@ namespace CalamityMod.Projectiles.Summon
{
var Owner = Main.player[Projectile.owner];
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night);
int num469 = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, ProvUtils.GetDustID(pscState), 0f, 0f, 100, default, 1f);
Main.dust[num469].noGravity = true;
@@ -2061,8 +2052,7 @@ namespace CalamityMod.Projectiles.Summon
var Owner = Main.player[Projectile.owner];
Projectile.damage = (int)Owner.GetTotalDamage<SummonDamageClass>().ApplyTo(Projectile.originalDamage);
if (Owner.Calamity().oldFashioned)
Projectile.damage = CalamityUtils.CalcOldFashionedDamage(Projectile.damage);
Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage);
Projectile.frameCounter++;
if (Projectile.frameCounter > 6)
+1 -1
View File
@@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Typeless
BossRushEvent.BossRushActive = true;
// Play startup dialogue
BossRushDialogueSystem.StartDialogue(DownedBossSystem.downedBossRush ? BossRushDialoguePhase.StartRepeat : BossRushDialoguePhase.Start);
BossRushDialogueSystem.StartDialogue(DownedBossSystem.startedBossRushAtLeastOnce ? BossRushDialoguePhase.StartRepeat : BossRushDialoguePhase.Start);
CalamityNetcode.SyncWorld();
if (Main.netMode == NetmodeID.Server)
@@ -51,9 +51,8 @@ namespace CalamityMod.Projectiles.VanillaProjectileOverrides
{
if (Main.myPlayer == projectile.owner)
{
int pulseDamage = (int)Main.player[projectile.owner].GetBestClassDamage().ApplyTo(ChlorophyteArmorSetChange.BaseDamageToEnemies);
if (owner.Calamity().oldFashioned)
pulseDamage = CalamityUtils.CalcOldFashionedDamage(pulseDamage);
int pulseDamage = (int)owner.GetBestClassDamage().ApplyTo(ChlorophyteArmorSetChange.BaseDamageToEnemies);
pulseDamage = owner.ApplyArmorAccDamageBonusesTo(pulseDamage);
Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ModContent.ProjectileType<ChlorophyteLifePulse>(), pulseDamage, 0f, projectile.owner);
}
+13
View File
@@ -54,6 +54,7 @@ namespace CalamityMod
// Events
internal static bool _downedEoCAcidRain = false;
internal static bool _downedAquaticScourgeAcidRain = false;
internal static bool _startedBossRushAtLeastOnce = false;
internal static bool _downedBossRush = false;
// Betsy and Dreadnautilus because vanilla doesn't track them
@@ -493,6 +494,11 @@ namespace CalamityMod
NPC.SetEventFlagCleared(ref _downedAquaticScourgeAcidRain, -1);
}
}
public static bool startedBossRushAtLeastOnce
{
get => _startedBossRushAtLeastOnce;
set => _startedBossRushAtLeastOnce = value; // Starting Boss Rush for the first time does not trigger a Lantern Night
}
public static bool downedBossRush
{
get => _downedBossRush;
@@ -552,6 +558,8 @@ namespace CalamityMod
downedMauler = false;
downedNuclearTerror = false;
startedBossRushAtLeastOnce = false;
downedBossRush = false;
}
@@ -654,6 +662,9 @@ namespace CalamityMod
downed.Add("mauler");
if (downedNuclearTerror)
downed.Add("nuclearTerror");
if (startedBossRushAtLeastOnce)
downed.Add("startedBossRush");
if (downedBossRush)
downed.Add("bossRush");
@@ -710,6 +721,8 @@ namespace CalamityMod
downedMauler = downed.Contains("mauler");
downedNuclearTerror = downed.Contains("nuclearTerror");
startedBossRushAtLeastOnce = downed.Contains("startedBossRush");
downedBossRush = downed.Contains("bossRush");
}
}
+1 -16
View File
@@ -12,22 +12,7 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
[LegacyName("WulfrumWorkbench")]
public class WulfrumWorkBenchTile : ModTile
{
public override void SetStaticDefaults()
{
Main.tileSolidTop[Type] = true;
Main.tileFrameImportant[Type] = true;
Main.tileNoAttach[Type] = true;
Main.tileTable[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1);
TileObjectData.newTile.Width = 3;
TileObjectData.newTile.CoordinateHeights = new int[] { 18 };
TileObjectData.addTile(Type);
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable);
AddMapEntry(new Color(191, 142, 111), Language.GetText("ItemName.WorkBench"));
TileID.Sets.DisableSmartCursor[Type] = true;
AdjTiles = new int[] { TileID.WorkBenches };
}
public override void SetStaticDefaults() => this.SetUpWorkBench(ModContent.ItemType<Items.Placeables.FurnitureWulfrum.WulfrumWorkBench>(), true);
public override bool CanExplode(int i, int j) => false;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

+14 -3
View File
@@ -50,9 +50,6 @@ namespace CalamityMod
public static float CalcDamage<T>(this Player player, float baseDamage) where T : DamageClass => player.GetTotalDamage<T>().ApplyTo(baseDamage);
public static int CalcIntDamage<T>(this Player player, float baseDamage) where T : DamageClass => (int)player.CalcDamage<T>(baseDamage);
// Calculate and return Old Fashioned damage adjustment for Accessories and Set Bonuses.
public static int CalcOldFashionedDamage(int damage) => (int)(damage * OldFashioned.AccessoryAndSetBonusDamageMultiplier);
// Naively determines the player's chosen (aka "best") class by whichever has the highest damage boost.
public static DamageClass GetBestClass(this Player player)
{
@@ -130,6 +127,20 @@ namespace CalamityMod
return ret;
}
/// <summary>
/// Extension method which calculates the player's current multiplicative boost to armor set bonus and accessory damage.<br />
/// This is currently only used by the Old Fashioned drink.
/// </summary>
/// <param name="player">The player whose armor / accessory damage bonus should be applied.</param>
/// <param name="damage">The damage to apply the bonus to.</param>
/// <returns>Boosted damage. If no boosts are applicable, returns the damage parameter that was passed in.</returns>
public static int ApplyArmorAccDamageBonusesTo(this Player player, float damage)
{
if (!player.Calamity().oldFashioned)
return (int)damage;
return (int)(damage * OldFashioned.AccessoryAndSetBonusDamageMultiplier);
}
public static float GetRangedAmmoCostReduction(this Player player)
{
// Tally up all possible vanilla effects.