Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
No files matched your search
@@ -264,9 +264,12 @@ namespace CalamityMod.Balancing
|
||||
// 20% resist to Eclipse's Fall.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<EclipsesSmol>(), ProjectileType<EclipsesFallMain>()))));
|
||||
|
||||
// 20% resist to Yharim's Crystal
|
||||
// 20% resist to Yharim's Crystal.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<YharimsCrystalBeam>()))));
|
||||
|
||||
// 20% resist to Zenith.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
|
||||
|
||||
// 15% resist to Enforcer projectiles.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<EssenceFlame2>()))));
|
||||
#endregion
|
||||
@@ -302,9 +305,6 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Chicken Cannon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
|
||||
|
||||
// 50% resist to Prismatic Breaker. (why is this more than BOTH Rancor and Yharim's Crystal? jesus fuck this weapon seriously)
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PrismaticBeam>()))));
|
||||
|
||||
// 50% resist to Tarragon Throwing Darts Thorns. (LOL)
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TarraThornRight>(), ProjectileType<TarraThornTip>()))));
|
||||
|
||||
@@ -320,6 +320,9 @@ namespace CalamityMod.Balancing
|
||||
// 40% resist to Rancor.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<RancorLaserbeam>()))));
|
||||
|
||||
// 35% resist to Zenith.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.FinalFractal))));
|
||||
|
||||
// 30% resist to the Spin Throw part of the Ark of the Cosmos' combo.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.7f, AotCThrowCombo))));
|
||||
|
||||
@@ -335,6 +338,9 @@ namespace CalamityMod.Balancing
|
||||
// 30% resist to Dragon Scales and The Wand's tornadoes
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
|
||||
|
||||
// 30% resist to Prismatic Breaker's laser beam.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<PrismaticBeam>()))));
|
||||
|
||||
// 25% resist to Dragon Rage projectiles.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, DragonRageFilter))));
|
||||
|
||||
@@ -377,8 +383,8 @@ namespace CalamityMod.Balancing
|
||||
// 85% resist to Chicken Cannon.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.15f, ProjectileType<ChickenExplosion>())));
|
||||
|
||||
// 35% resist to Subsuming Vortex.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.65f, ProjectileType<ExoVortex>(), ProjectileType<ExoVortex2>(), ProjectileType<EnormousConsumingVortex>())));
|
||||
// 40% resist to Subsuming Vortex.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<ExoVortex>(), ProjectileType<ExoVortex2>(), ProjectileType<EnormousConsumingVortex>())));
|
||||
|
||||
// 30% resist to Murasama.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.7f, ProjectileType<MurasamaSlash>())));
|
||||
|
||||
|
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 652 B |
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 584 B |
|
Before Width: | Height: | Size: 633 B After Width: | Height: | Size: 694 B |
|
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 720 B |
|
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 627 B |
|
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 661 B |
|
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 698 B |
|
Before Width: | Height: | Size: 591 B After Width: | Height: | Size: 702 B |
|
Before Width: | Height: | Size: 604 B After Width: | Height: | Size: 776 B |
|
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 664 B |
|
Before Width: | Height: | Size: 591 B After Width: | Height: | Size: 739 B |
|
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 622 B |
|
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 708 B |
|
Before Width: | Height: | Size: 523 B After Width: | Height: | Size: 639 B |
|
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 557 B |
|
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 720 B |
|
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 667 B |
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 555 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 472 B |
@@ -373,7 +373,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool HasAnyEnergyShield => roverDrive || lunicCorpsSet || sponge;
|
||||
public bool freeDodgeFromShieldAbsorption = false;
|
||||
public bool drawnAnyShieldThisFrame = false;
|
||||
|
||||
|
||||
// TODO -- Some way to show the player their total shield points.
|
||||
public int TotalEnergyShielding => RoverDriveShieldDurability + LunicCorpsShieldDurability + SpongeShieldDurability;
|
||||
public int TotalMaxShieldDurability => (roverDrive ? RoverDrive.ShieldDurabilityMax : 0) + (lunicCorpsSet ? LunicCorpsHelmet.ShieldDurabilityMax : 0) + (sponge ? TheSponge.ShieldDurabilityMax : 0);
|
||||
@@ -470,8 +470,14 @@ namespace CalamityMod.CalPlayer
|
||||
public bool gShell = false;
|
||||
public bool tortShell = false;
|
||||
public bool absorber = false;
|
||||
public bool alwaysHoneyRegen = false;
|
||||
public bool honeyTurboRegen = false;
|
||||
public bool honeyDewHalveDebuffs = false;
|
||||
public bool livingDewHalveDebuffs = false;
|
||||
public int jewelBonusDefense = 0;
|
||||
public bool aAmpoule = false;
|
||||
public bool rOoze = false;
|
||||
public bool JustWasDebuffed = false;
|
||||
public bool fBarrier = false;
|
||||
public bool aBrain = false;
|
||||
public bool amalgam = false;
|
||||
@@ -517,8 +523,9 @@ namespace CalamityMod.CalPlayer
|
||||
public bool coreOfTheBloodGod = false;
|
||||
public bool elementalHeart = false;
|
||||
public bool crownJewel = false;
|
||||
public bool celestialJewel = false;
|
||||
public bool astralArcanum = false;
|
||||
public bool infectedJewel = false;
|
||||
public bool purity = false;
|
||||
public int PurityHealSlowdownFrames = 0;
|
||||
public bool harpyRing = false;
|
||||
public bool angelTreads = false;
|
||||
public bool harpyWingBoost = false; //harpy wings + harpy ring
|
||||
@@ -812,6 +819,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool fishAlert = false;
|
||||
public bool clamity = false;
|
||||
public bool NOU = false;
|
||||
public bool absorberAffliction = false;
|
||||
public bool sulphurPoison = false;
|
||||
public bool nightwither = false;
|
||||
public bool eutrophication = false;
|
||||
@@ -1079,7 +1087,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
public bool witheringWeaponEnchant = false;
|
||||
public bool witheredDebuff = false;
|
||||
public bool absorberAffliction = false;
|
||||
public int witheredWeaponHoldTime = 0;
|
||||
public int witheringDamageDone = 0;
|
||||
|
||||
@@ -1572,6 +1579,10 @@ namespace CalamityMod.CalPlayer
|
||||
gShell = false;
|
||||
tortShell = false;
|
||||
absorber = false;
|
||||
alwaysHoneyRegen = false;
|
||||
honeyTurboRegen = false;
|
||||
honeyDewHalveDebuffs = false;
|
||||
livingDewHalveDebuffs = false;
|
||||
aAmpoule = false;
|
||||
rOoze = false;
|
||||
fBarrier = false;
|
||||
@@ -1609,8 +1620,8 @@ namespace CalamityMod.CalPlayer
|
||||
coreOfTheBloodGod = false;
|
||||
elementalHeart = false;
|
||||
crownJewel = false;
|
||||
celestialJewel = false;
|
||||
astralArcanum = false;
|
||||
infectedJewel = false;
|
||||
purity = false;
|
||||
harpyRing = false;
|
||||
angelTreads = false;
|
||||
harpyWingBoost = false; //harpy wings + harpy ring
|
||||
@@ -2243,6 +2254,7 @@ namespace CalamityMod.CalPlayer
|
||||
vaporfied = false;
|
||||
banishingFire = false;
|
||||
wither = false;
|
||||
PurityHealSlowdownFrames = 0;
|
||||
#endregion
|
||||
|
||||
#region Rogue
|
||||
@@ -2575,7 +2587,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
gSabatonHotkeyHoldTime = 0;
|
||||
}
|
||||
|
||||
|
||||
if (CalamityKeybinds.NormalityRelocatorHotKey.JustPressed && normalityRelocator && Main.myPlayer == Player.whoAmI)
|
||||
{
|
||||
if (!Player.CCed && !Player.chaosState)
|
||||
@@ -2882,25 +2894,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (prismaticSet && !Player.HasCooldown(PrismaticLaser.ID) && prismaticLasers <= 0)
|
||||
prismaticLasers = CalamityUtils.SecondsToFrames(35f);
|
||||
}
|
||||
if (CalamityKeybinds.AstralArcanumUIHotkey.JustPressed && astralArcanum && !areThereAnyDamnBosses)
|
||||
{
|
||||
AstralArcanumUI.Toggle();
|
||||
}
|
||||
if (CalamityKeybinds.AstralTeleportHotKey.JustPressed)
|
||||
{
|
||||
if (celestialJewel && !areThereAnyDamnBosses)
|
||||
{
|
||||
if (Main.netMode == NetmodeID.SinglePlayer)
|
||||
{
|
||||
Player.TeleportationPotion();
|
||||
SoundEngine.PlaySound(SoundID.Item6, Player.Center);
|
||||
}
|
||||
else if (Main.netMode == NetmodeID.MultiplayerClient && Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
NetMessage.SendData(MessageID.RequestTeleportationByServer, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CalamityKeybinds.BlazingCoreHotKey.JustPressed)
|
||||
{
|
||||
if (blazingCore && blazingCoreParry == 0 && blazingCoreSuccessfulParry == 0)
|
||||
@@ -2964,7 +2958,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
float angle = MathHelper.TwoPi * i / skullCount;
|
||||
Vector2 initialVelocity = angle.ToRotationVector2().RotatedByRandom(MathHelper.ToRadians(12f)) * skullSpeed * new Vector2(0.82f, 1.5f) *
|
||||
Main.rand.NextFloat(0.8f, 1.2f) * (i < skullCount / 2 ? 0.25f : 1f);
|
||||
Main.rand.NextFloat(0.8f, 1.2f) * (i < skullCount / 2 ? 0.25f : 1f);
|
||||
int projectileIndex = Projectile.NewProjectile(source, Player.Center + initialVelocity * 3f, initialVelocity, ModContent.ProjectileType<GaelSkull2>(), damage, 2f, Player.whoAmI);
|
||||
Main.projectile[projectileIndex].tileCollide = false;
|
||||
Main.projectile[projectileIndex].localAI[1] = (Main.projectile[projectileIndex].velocity.Y < 0f).ToInt();
|
||||
@@ -3285,7 +3279,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
//Life Jelly regen aura spawn when using a healing potion
|
||||
if (timePotionSick == 1 && Player.whoAmI == Main.myPlayer && lifejelly && !GrandGelatin)
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<PinkJellyAura>(), 0, 0, Player.whoAmI);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<PinkJellyAura>(), 0, 0, Player.whoAmI);
|
||||
|
||||
//Cleansing Jelly cleansing aura spawn when using a healing potion
|
||||
if (timePotionSick == 1 && Player.whoAmI == Main.myPlayer && cleansingjelly && !GrandGelatin)
|
||||
@@ -3351,7 +3345,7 @@ namespace CalamityMod.CalPlayer
|
||||
//While holding hotkey, but before slam, bring Y velocity closer to 0
|
||||
if (gSabatonHotkeyHoldTime < 60 && gSabatonHotkeyHoldTime != 0 && !gSabatonFalling)
|
||||
{
|
||||
Player.velocity.Y *= (60 - (gSabatonHotkeyHoldTime/4f))/60f;
|
||||
Player.velocity.Y *= (60 - (gSabatonHotkeyHoldTime / 4f)) / 60f;
|
||||
}
|
||||
//Play sound a bit early so it goes in time with the fall
|
||||
if (gSabatonHotkeyHoldTime == 45 && !gSabatonFalling)
|
||||
@@ -3372,11 +3366,11 @@ namespace CalamityMod.CalPlayer
|
||||
if (gSabatonFalling)
|
||||
{
|
||||
SpawnGravistarParticle();
|
||||
|
||||
|
||||
//Cap time converted to damage at 2 seconds
|
||||
if (gSabatonFall < 120)
|
||||
gSabatonFall++;
|
||||
|
||||
|
||||
Player.maxFallSpeed = 40f;
|
||||
Player.gravity = 1.3f;
|
||||
//If the player can fly during the fall, the physics gets a bit funky
|
||||
@@ -3394,7 +3388,7 @@ namespace CalamityMod.CalPlayer
|
||||
gSabatonTempJumpSpeed = 40;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -3405,7 +3399,7 @@ namespace CalamityMod.CalPlayer
|
||||
//Infinite flight granted by some boss attacks
|
||||
if (infiniteFlight)
|
||||
Player.wingTime = Player.wingTimeMax;
|
||||
|
||||
|
||||
// Reset the Calamity shader.
|
||||
CalamityFireDyeShader = null;
|
||||
|
||||
@@ -3774,7 +3768,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.rand.NextBool(20))
|
||||
{
|
||||
int confettiDust = Main.rand.Next(139, 143);
|
||||
int confetti = Dust.NewDust(new Vector2(hitbox.X,hitbox.Y), hitbox.Width, hitbox.Height, confettiDust, Player.velocity.X, Player.velocity.Y, 0, new Color(), 1.2f);
|
||||
int confetti = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, confettiDust, Player.velocity.X, Player.velocity.Y, 0, new Color(), 1.2f);
|
||||
Main.dust[confetti].velocity.X *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.dust[confetti].velocity.Y *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.dust[confetti].velocity.X += Main.rand.Next(-50, 51) * 0.05f;
|
||||
@@ -3915,7 +3909,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Shoot
|
||||
public override bool Shoot(Item item, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockBack)
|
||||
{
|
||||
@@ -3926,60 +3920,66 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (item.CountsAsClass<RogueDamageClass>())
|
||||
{
|
||||
float num72 = item.shootSpeed;
|
||||
Vector2 vector2 = Player.RotatedRelativePoint(Player.MountedCenter, true);
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
|
||||
if (Player.gravDir == -1f)
|
||||
{
|
||||
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
|
||||
}
|
||||
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
|
||||
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
|
||||
{
|
||||
num78 = (float)Player.direction;
|
||||
num79 = 0f;
|
||||
num80 = num72;
|
||||
}
|
||||
else
|
||||
if (!CalamityLists.VeneratedLocketBanlist.Contains(item.type))
|
||||
{
|
||||
float num72 = item.shootSpeed;
|
||||
Vector2 vector2 = Player.RotatedRelativePoint(Player.MountedCenter, true);
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
|
||||
if (Player.gravDir == -1f)
|
||||
{
|
||||
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
|
||||
}
|
||||
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
|
||||
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
|
||||
{
|
||||
num78 = (float)Player.direction;
|
||||
num79 = 0f;
|
||||
num80 = num72;
|
||||
}
|
||||
else
|
||||
{
|
||||
num80 = num72 / num80;
|
||||
}
|
||||
|
||||
vector2 = new Vector2(Player.position.X + (float)Player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)Player.direction) + ((float)Main.mouseX + Main.screenPosition.X - Player.position.X), Player.MountedCenter.Y - 600f);
|
||||
vector2.X = (vector2.X + Player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
|
||||
vector2.Y -= 100f;
|
||||
num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
|
||||
if (num79 < 0f)
|
||||
{
|
||||
num79 *= -1f;
|
||||
}
|
||||
if (num79 < 20f)
|
||||
{
|
||||
num79 = 20f;
|
||||
}
|
||||
num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
|
||||
num80 = num72 / num80;
|
||||
}
|
||||
num78 *= num80;
|
||||
num79 *= num80;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.07), knockBack * 0.5f, Player.whoAmI);
|
||||
|
||||
vector2 = new Vector2(Player.position.X + (float)Player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)Player.direction) + ((float)Main.mouseX + Main.screenPosition.X - Player.position.X), Player.MountedCenter.Y - 600f);
|
||||
vector2.X = (vector2.X + Player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
|
||||
vector2.Y -= 100f;
|
||||
num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
|
||||
if (num79 < 0f)
|
||||
{
|
||||
num79 *= -1f;
|
||||
}
|
||||
if (num79 < 20f)
|
||||
{
|
||||
num79 = 20f;
|
||||
}
|
||||
num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
|
||||
num80 = num72 / num80;
|
||||
num78 *= num80;
|
||||
num79 *= num80;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.075), knockBack * 0.5f, Player.whoAmI);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[p].DamageType = DamageClass.Generic; //Makes it not proc shit like nanotech, extorter and other stuff
|
||||
Main.projectile[p].Calamity().LocketClone = true; //To not have clones trigger effects like Sacrifice's Lifesteal and Final Dawn's stealth generation
|
||||
}
|
||||
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[p].DamageType = DamageClass.Generic; //in case melee/rogue variants bug out
|
||||
|
||||
// Handle AI edge-cases.
|
||||
if (item.type == ModContent.ItemType<FinalDawn>())
|
||||
Main.projectile[p].ai[1] = 1f;
|
||||
if (item.type == ModContent.ItemType<TheAtomSplitter>())
|
||||
Main.projectile[p].ai[0] = -1f;
|
||||
// Handle AI edge-cases. These are like overlapping projectiles and the projectile not spawning at all
|
||||
if (item.type == ModContent.ItemType<FinalDawn>())
|
||||
Main.projectile[p].ai[1] = 1f; //MUST BE 1 OTHERWISE CLONES GENERATE STEALTH AAAAAAAAAAA
|
||||
if (item.type == ModContent.ItemType<TheAtomSplitter>())
|
||||
Main.projectile[p].ai[0] = -1f;
|
||||
}
|
||||
|
||||
if (StealthStrikeAvailable())
|
||||
{
|
||||
int knifeCount = 16;
|
||||
int knifeDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(60);
|
||||
int knifeCount = 12;
|
||||
int knifeDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(70);
|
||||
float angleStep = MathHelper.TwoPi / knifeCount;
|
||||
float speed = 15f;
|
||||
|
||||
@@ -4063,7 +4063,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else if (AresExoskeleton.ArmExists(Player))
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "AresExoskeleton", EquipType.Body);
|
||||
|
||||
|
||||
else if ((abyssalDivingSuitPower || abyssalDivingSuitForce) && !abyssalDivingSuitHide)
|
||||
{
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Legs);
|
||||
@@ -4663,7 +4663,7 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
if (Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].friendly)
|
||||
{
|
||||
bool attack = Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType<MiniGuardianAttack>();
|
||||
bool attack = Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType<MiniGuardianAttack>();
|
||||
bool defense = Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType<MiniGuardianDefense>();
|
||||
if (attack || defense)
|
||||
{
|
||||
|
||||
@@ -746,7 +746,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// Can't have any cooldowns here because dodges grrrrr....
|
||||
if (fleshTotem && !Player.HasCooldown(Cooldowns.FleshTotem.ID))
|
||||
if (fleshTotem && !Player.HasCooldown(Cooldowns.FleshTotem.ID) && TotalEnergyShielding <= 0)
|
||||
contactDamageReduction += 0.5;
|
||||
|
||||
if (tarragonCloak && tarraMelee && !Player.HasCooldown(Cooldowns.TarragonCloak.ID))
|
||||
@@ -1157,20 +1157,20 @@ namespace CalamityMod.CalPlayer
|
||||
// As such, to avoid cooldowns proccing from dodge hits, do it here
|
||||
if (fleshTotem && !Player.HasCooldown(Cooldowns.FleshTotem.ID) && hurtInfo.Damage > 0)
|
||||
Player.AddCooldown(Cooldowns.FleshTotem.ID, CalamityUtils.SecondsToFrames(20), true, coreOfTheBloodGod ? "bloodgod" : "default");
|
||||
|
||||
if (NPC.AnyNPCs(ModContent.NPCType<THELORDE>()))
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<NOU>(), 15, true);
|
||||
}
|
||||
|
||||
if (crawCarapace)
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<Crumbling>(), 720);
|
||||
npc.AddBuff(ModContent.BuffType<Crumbling>(), 900);
|
||||
SoundEngine.PlaySound(SoundID.NPCHit33 with { Volume = 0.5f }, Player.Center);
|
||||
}
|
||||
|
||||
if (baroclaw)
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<ArmorCrunch>(), 1800);
|
||||
npc.AddBuff(ModContent.BuffType<CrushDepth>(), 1800);
|
||||
npc.AddBuff(ModContent.BuffType<ArmorCrunch>(), 900);
|
||||
npc.AddBuff(ModContent.BuffType<CrushDepth>(), 900);
|
||||
SoundEngine.PlaySound(BaroclawHit, Player.Center);
|
||||
Vector2 bloodSpawnPosition = Player.Center + Main.rand.NextVector2Circular(Player.width, Player.height) * 0.04f;
|
||||
Vector2 splatterDirection = (Player.Center - bloodSpawnPosition).SafeNormalize(Vector2.UnitY);
|
||||
@@ -1189,7 +1189,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (absorber)
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<AbsorberAffliction>(), 1800);
|
||||
npc.AddBuff(ModContent.BuffType<AbsorberAffliction>(), 900);
|
||||
SoundEngine.PlaySound(AbsorberHit, Player.Center);
|
||||
Vector2 bloodSpawnPosition = Player.Center + Main.rand.NextVector2Circular(Player.width, Player.height) * 0.04f;
|
||||
Vector2 splatterDirection = (Player.Center - bloodSpawnPosition).SafeNormalize(Vector2.UnitY);
|
||||
@@ -1629,9 +1629,10 @@ namespace CalamityMod.CalPlayer
|
||||
private void ModifyHurtInfo_Calamity(ref Player.HurtInfo info)
|
||||
{
|
||||
// Boss Rush's damage floor is implemented as a dirty modifier
|
||||
// TODO -- implementing this correctly would require fully reimplementing all of DR and ADR
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
int bossRushDamageFloor = (Main.expertMode ? 400 : 240) + (BossRushEvent.BossRushStage * 2);
|
||||
int bossRushDamageFloor = (Main.expertMode ? 160 : 100) + (BossRushEvent.BossRushStage * 2);
|
||||
if (info.Damage < bossRushDamageFloor)
|
||||
info.Damage += (bossRushDamageFloor - info.Damage);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
using CalamityMod.Items.Accessories;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.Systems;
|
||||
using System.Linq;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
@@ -24,141 +25,94 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<BloodBoilerFire>()] > 0)
|
||||
noLifeRegen = true;
|
||||
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
double lifeRegenMult = death ? 1.5 : 1D;
|
||||
if (reaverDefense)
|
||||
lifeRegenMult *= 0.8;
|
||||
int lifeRegenLost = 0;
|
||||
// Universal +50% increase to DoT debuff damage in Death Mode
|
||||
float deathNegativeRegenBonus = 0.5f;
|
||||
float calamityDebuffMultiplier = 1f + (CalamityWorld.death ? deathNegativeRegenBonus : 0f);
|
||||
|
||||
// Initial Debuffs
|
||||
// Cumulative amount of DoT debuff negative life regen from Calamity debuffs (or changes to vanilla debuffs)
|
||||
float totalNegativeLifeRegen = 0;
|
||||
|
||||
// Get fucked, Nebula Armor
|
||||
Player.nebulaLevelLife = 0;
|
||||
#region Damage over Time Debuffs (Negative Life Regen)
|
||||
|
||||
// Vanilla
|
||||
if (death)
|
||||
// Vanilla debuffs (+50% damage over time in Death Mode is applied here)
|
||||
if (CalamityWorld.death)
|
||||
{
|
||||
if (Player.poisoned)
|
||||
lifeRegenLost += 4;
|
||||
int totalVanillaDoT = 0;
|
||||
|
||||
if (Player.onFire)
|
||||
lifeRegenLost += 8;
|
||||
if (Player.poisoned && !purity)
|
||||
totalVanillaDoT += 4;
|
||||
|
||||
if (Player.onFire && !purity)
|
||||
totalVanillaDoT += 8;
|
||||
|
||||
if (Player.tongued)
|
||||
lifeRegenLost += 100;
|
||||
totalVanillaDoT += 100;
|
||||
|
||||
if (Player.venom)
|
||||
lifeRegenLost += 12;
|
||||
if (Player.venom && !purity)
|
||||
totalVanillaDoT += 12;
|
||||
|
||||
if (Player.onFrostBurn)
|
||||
lifeRegenLost += 12;
|
||||
if (Player.onFrostBurn && !purity)
|
||||
totalVanillaDoT += 12;
|
||||
|
||||
if (Player.onFire2)
|
||||
lifeRegenLost += 12;
|
||||
if (Player.onFire2 && !purity)
|
||||
totalVanillaDoT += 12;
|
||||
|
||||
if (Player.burned)
|
||||
lifeRegenLost += 60;
|
||||
totalVanillaDoT += 60;
|
||||
|
||||
if (Player.suffocating)
|
||||
lifeRegenLost += 40;
|
||||
totalVanillaDoT += 40;
|
||||
|
||||
if (Player.electrified)
|
||||
if (Player.electrified && !purity)
|
||||
{
|
||||
lifeRegenLost += 8;
|
||||
totalVanillaDoT += 8;
|
||||
if (Player.controlLeft || Player.controlRight)
|
||||
lifeRegenLost += 32;
|
||||
totalVanillaDoT += 32;
|
||||
}
|
||||
|
||||
// Tally up total current vanilla DoT so it can be added as extra DoT from Death Mode
|
||||
totalNegativeLifeRegen += totalVanillaDoT * deathNegativeRegenBonus;
|
||||
}
|
||||
|
||||
// Calamity
|
||||
if (shadowflame)
|
||||
//
|
||||
// Calamity debuffs (Vanilla Shadowflame is added here)
|
||||
//
|
||||
void ApplyDoTDebuff(bool hasDebuff, int negativeLifeRegenToApply, bool immuneCondition = false)
|
||||
{
|
||||
if (!hasDebuff || immuneCondition)
|
||||
return;
|
||||
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 30;
|
||||
totalNegativeLifeRegen += negativeLifeRegenToApply * calamityDebuffMultiplier;
|
||||
}
|
||||
|
||||
if (wDeath)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
// Whispering Death sets positive regen to zero but doesn't actually deal any damage
|
||||
ApplyDoTDebuff(wDeath, 0);
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
}
|
||||
|
||||
if (weakBrimstoneFlames)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 7;
|
||||
}
|
||||
|
||||
if (bFlames)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 16;
|
||||
}
|
||||
|
||||
if (nightwither)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 16;
|
||||
}
|
||||
|
||||
if (vaporfied)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 8;
|
||||
}
|
||||
|
||||
if (cragsLava)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 30;
|
||||
}
|
||||
|
||||
if (gsInferno)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += profanedCrystalBuffs ? 35 : 30;
|
||||
}
|
||||
|
||||
if (astralInfection)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 20;
|
||||
}
|
||||
|
||||
if (irradiated)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 4;
|
||||
}
|
||||
ApplyDoTDebuff(irradiated, 4, purity);
|
||||
int sulphurDoT = 6 - (sulfurSet ? 2 : 0) - (sulphurskin ? 2 : 0);
|
||||
ApplyDoTDebuff(sulphurPoison, sulphurDoT, purity);
|
||||
ApplyDoTDebuff(rTide, 6, purity);
|
||||
ApplyDoTDebuff(weakBrimstoneFlames, 7);
|
||||
ApplyDoTDebuff(bBlood, 8, purity);
|
||||
ApplyDoTDebuff(vaporfied, 8, purity);
|
||||
ApplyDoTDebuff(bFlames, 16, purity);
|
||||
ApplyDoTDebuff(nightwither, 16, purity);
|
||||
ApplyDoTDebuff(hFlames, 16, purity);
|
||||
ApplyDoTDebuff(vHex, 16);
|
||||
ApplyDoTDebuff(cDepth, 18, purity);
|
||||
ApplyDoTDebuff(astralInfection, 20, infectedJewel || purity);
|
||||
ApplyDoTDebuff(pFlames, 20, purity);
|
||||
ApplyDoTDebuff(cragsLava, 30);
|
||||
ApplyDoTDebuff(shadowflame, 30, purity);
|
||||
// Profaned Soul Crystal turns you into Providence, a God, and you take more damage from God Slayer Inferno
|
||||
ApplyDoTDebuff(gsInferno, profanedCrystalBuffs ? 35 : 30);
|
||||
ApplyDoTDebuff(dragonFire, 36);
|
||||
ApplyDoTDebuff(miracleBlight, 40);
|
||||
ApplyDoTDebuff(banishingFire, 60);
|
||||
|
||||
// Slowly increase the sulphuric water poisoning effect. Once it's high enough, the player starts taking damage over time.
|
||||
bool nearSafeZone = false;
|
||||
@@ -199,116 +153,20 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else
|
||||
SulphWaterPoisoningLevel = MathHelper.Clamp(SulphWaterPoisoningLevel - 1f / SulphSeaWaterRecoveryTime, 0f, 1f);
|
||||
#endregion
|
||||
|
||||
if (sulphurPoison)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 6;
|
||||
if (sulfurSet)
|
||||
{
|
||||
lifeRegenLost -= 2;
|
||||
}
|
||||
if (sulphurskin)
|
||||
{
|
||||
lifeRegenLost -= 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (hFlames)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 16;
|
||||
}
|
||||
|
||||
if (banishingFire)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 60;
|
||||
}
|
||||
|
||||
if (pFlames)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 20;
|
||||
}
|
||||
|
||||
if (bBlood)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 8;
|
||||
}
|
||||
|
||||
if (vHex)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 16;
|
||||
}
|
||||
|
||||
if (dragonFire)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 36;
|
||||
}
|
||||
|
||||
if (miracleBlight)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 40;
|
||||
}
|
||||
|
||||
if (cDepth)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 18;
|
||||
}
|
||||
|
||||
if (rTide)
|
||||
{
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 6;
|
||||
}
|
||||
|
||||
#region Alcohol
|
||||
if (vodka)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 1;
|
||||
totalNegativeLifeRegen += 1;
|
||||
}
|
||||
if (redWine)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 1;
|
||||
totalNegativeLifeRegen += 1;
|
||||
if (baguette)
|
||||
lifeRegenLost += 3;
|
||||
totalNegativeLifeRegen += 3;
|
||||
}
|
||||
if (grapeBeer)
|
||||
{
|
||||
@@ -317,7 +175,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (moonshine)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 1;
|
||||
totalNegativeLifeRegen += 1;
|
||||
}
|
||||
if (rum)
|
||||
{
|
||||
@@ -330,7 +188,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (fireball)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 1;
|
||||
totalNegativeLifeRegen += 1;
|
||||
}
|
||||
if (whiskey)
|
||||
{
|
||||
@@ -339,27 +197,27 @@ namespace CalamityMod.CalPlayer
|
||||
if (everclear)
|
||||
{
|
||||
alcoholPoisonLevel += 2;
|
||||
lifeRegenLost += 10;
|
||||
totalNegativeLifeRegen += 10;
|
||||
}
|
||||
if (bloodyMary)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 4;
|
||||
totalNegativeLifeRegen += 4;
|
||||
}
|
||||
if (tequila)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 1;
|
||||
totalNegativeLifeRegen += 1;
|
||||
}
|
||||
if (tequilaSunrise)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 2;
|
||||
totalNegativeLifeRegen += 2;
|
||||
}
|
||||
if (screwdriver)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 1;
|
||||
totalNegativeLifeRegen += 1;
|
||||
}
|
||||
if (caribbeanRum)
|
||||
{
|
||||
@@ -372,27 +230,27 @@ namespace CalamityMod.CalPlayer
|
||||
if (margarita)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 1;
|
||||
totalNegativeLifeRegen += 1;
|
||||
}
|
||||
if (starBeamRye)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 2;
|
||||
totalNegativeLifeRegen += 2;
|
||||
}
|
||||
if (moscowMule)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 4;
|
||||
totalNegativeLifeRegen += 4;
|
||||
}
|
||||
if (whiteWine)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 1;
|
||||
totalNegativeLifeRegen += 1;
|
||||
}
|
||||
if (evergreenGin)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
lifeRegenLost += 1;
|
||||
totalNegativeLifeRegen += 1;
|
||||
}
|
||||
if (Player.tipsy)
|
||||
{
|
||||
@@ -410,14 +268,16 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
lifeRegenLost += 3 * alcoholPoisonLevel;
|
||||
totalNegativeLifeRegen += 3 * alcoholPoisonLevel;
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (manaOverloader)
|
||||
{
|
||||
if (Player.statMana > (int)(Player.statManaMax2 * 0.5))
|
||||
lifeRegenLost += 3;
|
||||
totalNegativeLifeRegen += 3;
|
||||
}
|
||||
|
||||
if (brimflameFrenzy)
|
||||
{
|
||||
Player.manaRegen = 0;
|
||||
@@ -425,7 +285,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.manaRegenDelay = (int) Player.maxRegenDelay;
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
lifeRegenLost += 42; //the meaning of death
|
||||
totalNegativeLifeRegen += 42; //the meaning of death
|
||||
}
|
||||
|
||||
if (witheredDebuff)
|
||||
@@ -437,7 +297,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else
|
||||
{
|
||||
lifeRegenLost += (int)(5D * Math.Pow(1.5D, witheredWeaponHoldTime / 87D));
|
||||
totalNegativeLifeRegen += (int)(5D * Math.Pow(1.5D, witheredWeaponHoldTime / 87D));
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
}
|
||||
@@ -450,14 +310,62 @@ namespace CalamityMod.CalPlayer
|
||||
int debuffIndex = Player.FindBuffIndex(ModContent.BuffType<ManaBurn>());
|
||||
float debuffIntensity = debuffIndex == -1 ? 0f : Player.buffTime[debuffIndex] / (float)Player.manaSickTimeMax;
|
||||
|
||||
lifeRegenLost += (int)(Math.Sqrt(debuffIntensity) * Math.Pow(6D, debuffIntensity + 1f));
|
||||
totalNegativeLifeRegen += (int)(Math.Sqrt(debuffIntensity) * Math.Pow(6D, debuffIntensity + 1f));
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
}
|
||||
|
||||
Player.lifeRegen -= (int)(lifeRegenLost * lifeRegenMult);
|
||||
//
|
||||
// ACTUALLY APPLY NEGATIVE LIFE REGEN
|
||||
//
|
||||
|
||||
// Buffs
|
||||
// At the last second, Reaver defense helm reduces DoT debuffs by 20%
|
||||
if (reaverDefense)
|
||||
totalNegativeLifeRegen = (int)(0.8f * totalNegativeLifeRegen);
|
||||
|
||||
Player.lifeRegen -= (int)totalNegativeLifeRegen;
|
||||
|
||||
#region Life Regen That Works Even During DoT Debuffs
|
||||
|
||||
// Honey Dew (and upgrades)
|
||||
if (alwaysHoneyRegen)
|
||||
{
|
||||
// Exact copy of vanilla Honey behavior, but does not stack with actually standing in Honey
|
||||
if (!Player.honey)
|
||||
{
|
||||
Player.lifeRegen += 2;
|
||||
Player.lifeRegenTime += 1;
|
||||
|
||||
// Grants +2 life regen if negative life regen would otherwise occur.
|
||||
// However, this can't bring regen into the positives.
|
||||
if (Player.lifeRegen < 0)
|
||||
{
|
||||
Player.lifeRegen += 2;
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (honeyDewHalveDebuffs)
|
||||
{
|
||||
// Tick down all sickness debuffs; this makes them expire 2x faster
|
||||
// Upgrades increase the sets of debuffs which expire faster
|
||||
for (int l = 0; l < Player.MaxBuffs; ++l)
|
||||
{
|
||||
int buffID = Player.buffType[l];
|
||||
if (Player.buffTime[l] <= 2)
|
||||
continue;
|
||||
bool shouldHalveDuration = CalamityLists.sicknessDebuffList.Contains(buffID);
|
||||
if (livingDewHalveDebuffs)
|
||||
shouldHalveDuration |= CalamityLists.fireDebuffList.Contains(buffID);
|
||||
if (purity)
|
||||
shouldHalveDuration |= CalamityLists.debuffList.Contains(buffID);
|
||||
|
||||
if (shouldHalveDuration)
|
||||
--Player.buffTime[l];
|
||||
}
|
||||
}
|
||||
|
||||
if (divineBless)
|
||||
{
|
||||
@@ -496,76 +404,136 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// Permafrost's Concoction increases life regen while afflicted with a fire debuff
|
||||
if (permafrostsConcoction)
|
||||
if (permafrostsConcoction && Player.buffType.Any(CalamityLists.fireDebuffList.Contains))
|
||||
{
|
||||
if (Player.onFire || Player.onFire2 || Player.onFire3 || Player.burned || shadowflame || weakBrimstoneFlames || bFlames || cragsLava || gsInferno || hFlames || banishingFire || dragonFire)
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
|
||||
Player.lifeRegen += 6;
|
||||
}
|
||||
|
||||
// Grant life regen based on missing health for Radiant Ooze, Ambrosial Ampule, and purity
|
||||
if (rOoze || aAmpoule || purity)
|
||||
{
|
||||
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / Player.statLifeMax2;
|
||||
//Ambrosial Ampule and ooze give between 2 and 6 hp/s, Purity gives between 3 and 7 hp/s
|
||||
float lifeRegenToGive = MathHelper.Lerp( purity ? 6f : 4f, purity ? 14f : 12f, missingLifeRatio);
|
||||
Player.lifeRegen += (int)lifeRegenToGive;
|
||||
}
|
||||
|
||||
if (purity)
|
||||
{
|
||||
int intendedPurityDefense = 0;
|
||||
int currentDebuffs = Player.buffType.Count(CalamityLists.debuffList.Contains);
|
||||
if (currentDebuffs > 0)
|
||||
{
|
||||
// Healing rate is normally 5 HP/s (+1 every 12 frames)
|
||||
// However, that 12 frames can and will slowly increase if you try to abuse this accessory
|
||||
int healFrameCadence = 12;
|
||||
|
||||
// Healing slows down after 5 seconds (300 frames) debuffed. For every 15 frames thereafter the cadence slows
|
||||
// There is no upper limit to how slow it can get and it can take a very long time to reset to normal
|
||||
int punishmentFrames = PurityHealSlowdownFrames - 300;
|
||||
//lowest punishment is three full seconds between the one health heal
|
||||
if (healFrameCadence < 180)
|
||||
healFrameCadence += (punishmentFrames < 0) ? 0 : punishmentFrames / 15;
|
||||
|
||||
if (Player.miscCounter % healFrameCadence == healFrameCadence - 1)
|
||||
Player.Heal(1);
|
||||
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
|
||||
Player.lifeRegen += 6;
|
||||
intendedPurityDefense = 20 + (currentDebuffs - 1) * 8;
|
||||
if (jewelBonusDefense < intendedPurityDefense)
|
||||
jewelBonusDefense = intendedPurityDefense;
|
||||
|
||||
// Count up total frames spent healing for slowdown.
|
||||
++PurityHealSlowdownFrames;
|
||||
}
|
||||
|
||||
// If the defense should be ticking down to some lower value, do that.
|
||||
// Purity loses 1 point of defense every second.
|
||||
if (Player.miscCounter % 60 == 0 && jewelBonusDefense > intendedPurityDefense)
|
||||
--jewelBonusDefense;
|
||||
|
||||
// If the player is clear of all debuffs then gradually reduce the slowdown frames
|
||||
if (currentDebuffs <= 0)
|
||||
{
|
||||
--PurityHealSlowdownFrames;
|
||||
if (PurityHealSlowdownFrames < 0)
|
||||
PurityHealSlowdownFrames = 0;
|
||||
}
|
||||
|
||||
// Actually apply defense bonus
|
||||
Player.statDefense += jewelBonusDefense;
|
||||
}
|
||||
|
||||
if (celestialJewel || astralArcanum)
|
||||
// Infected Jewel does not stack with Purity
|
||||
else if (infectedJewel)
|
||||
{
|
||||
bool lesserEffect = false;
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
Player.lifeRegen += 2;
|
||||
|
||||
// If the player has any debuffs, give the extra life regen and defense
|
||||
// More defense is given for each additional debuff
|
||||
int intendedJewelDefense = 0;
|
||||
int currentDebuffs = Player.buffType.Count(CalamityLists.debuffList.Contains);
|
||||
if (currentDebuffs > 0)
|
||||
{
|
||||
int hasBuff = Player.buffType[l];
|
||||
lesserEffect = CalamityLists.alcoholList.Contains(hasBuff);
|
||||
Player.lifeRegen += 4;
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
|
||||
intendedJewelDefense = 16 + (currentDebuffs - 1) * 5;
|
||||
if (jewelBonusDefense < intendedJewelDefense)
|
||||
jewelBonusDefense = intendedJewelDefense;
|
||||
}
|
||||
|
||||
int defenseBoost = astralArcanum ? 15 : 11;
|
||||
if (lesserEffect)
|
||||
{
|
||||
Player.lifeRegen += astralArcanum ? 2 : 1;
|
||||
Player.statDefense += defenseBoost;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Player.lifeRegen < 0)
|
||||
{
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
// If the defense should be ticking down to some lower value, do that.
|
||||
// Infected Jewel loses 1 point of defense every 20 frames.
|
||||
if (Player.miscCounter % 60 == 0 && jewelBonusDefense > intendedJewelDefense)
|
||||
--jewelBonusDefense;
|
||||
|
||||
Player.lifeRegen += astralArcanum ? 6 : 4;
|
||||
Player.statDefense += defenseBoost;
|
||||
}
|
||||
else
|
||||
Player.lifeRegen += astralArcanum ? 3 : 2;
|
||||
}
|
||||
// Actually apply defense bonus
|
||||
Player.statDefense += jewelBonusDefense;
|
||||
}
|
||||
|
||||
// Crown Jewel does not stack with Purity or Infected Jewel
|
||||
else if (crownJewel)
|
||||
{
|
||||
bool lesserEffect = false;
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
int hasBuff = Player.buffType[l];
|
||||
lesserEffect = CalamityLists.alcoholList.Contains(hasBuff);
|
||||
}
|
||||
Player.lifeRegen += 2;
|
||||
|
||||
if (lesserEffect)
|
||||
Player.statDefense += 8;
|
||||
else
|
||||
// If any debuff is detected, provide even more life regen and massively accelerate it
|
||||
if (Player.buffType.Any(CalamityLists.debuffList.Contains))
|
||||
{
|
||||
if (Player.lifeRegen < 0)
|
||||
{
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
|
||||
Player.lifeRegen += 4;
|
||||
Player.statDefense += 8;
|
||||
}
|
||||
else
|
||||
Player.lifeRegen += 2;
|
||||
Player.lifeRegen += 3;
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
// Last Debuffs
|
||||
// During Silva revive or God Slayer dash, all negative life regen is canceled
|
||||
if ((silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodSlayerDash.ID && Player.dashDelay < 0))
|
||||
{
|
||||
if (Player.lifeRegen < 0)
|
||||
Player.lifeRegen = 0;
|
||||
}
|
||||
|
||||
#region Things That Disable Even That Life Regen
|
||||
//
|
||||
// Yes, really, there's a list of conditions under which life regen doesn't work
|
||||
// even if it's life regen that normally works during a damage over time debuff.
|
||||
//
|
||||
// 1. No life regen bool (Blood Boiler usage or wearing Omega Blue armor)
|
||||
// 2. Being too far from Providence cocoon ("Holy Inferno")
|
||||
// 3. Air drowning in the Abyss
|
||||
//
|
||||
|
||||
if (noLifeRegen)
|
||||
{
|
||||
Player.nebulaLevelLife = 0;
|
||||
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
@@ -585,7 +553,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
Player.lifeRegen -= (int)(hInfernoBoost * lifeRegenMult);
|
||||
Player.lifeRegen -= (int)(hInfernoBoost * calamityDebuffMultiplier);
|
||||
|
||||
if (Player.lifeRegen < -200)
|
||||
Player.lifeRegen = -200;
|
||||
@@ -605,22 +573,18 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
Player.lifeRegenTime = 0;
|
||||
Player.lifeRegen -= (int)(160D * lifeRegenMult);
|
||||
Player.lifeRegen -= (int)(160D * calamityDebuffMultiplier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO -- Why is this here?
|
||||
if (weakPetrification)
|
||||
{
|
||||
if (Player.mount.Active)
|
||||
Player.mount.Dismount(Player);
|
||||
}
|
||||
|
||||
if ((silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodSlayerDash.ID && Player.dashDelay < 0))
|
||||
{
|
||||
if (Player.lifeRegen < 0)
|
||||
Player.lifeRegen = 0;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -673,9 +637,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (trinketOfChi || chiRegen)
|
||||
Player.lifeRegen += 2;
|
||||
|
||||
if (rOoze)
|
||||
Player.lifeRegen += 4;
|
||||
|
||||
|
||||
if (ursaSergeant)
|
||||
{
|
||||
@@ -810,101 +771,55 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegenTime += (int)MathHelper.Lerp(1f, 3f, regenBenefitFactor);
|
||||
}
|
||||
|
||||
// Standing still healing bonuses (all exclusive with vanilla Shiny Stone)
|
||||
if (!Player.shinyStone)
|
||||
{
|
||||
int lifeRegenTimeMaxBoost = areThereAnyDamnBosses ? 450 : 1800;
|
||||
int lifeRegenMaxBoost = areThereAnyDamnBosses ? 1 : 4;
|
||||
float lifeRegenLifeRegenTimeMaxBoost = areThereAnyDamnBosses ? 8f : 30f;
|
||||
#region Standing Still Life Regen
|
||||
// Standing still healing bonuses (all are exclusive with vanilla Shiny Stone, but all function similarly)
|
||||
if (!Player.shinyStone && Player.StandingStill() && Player.velocity.Y == 0 && Player.itemAnimation == 0)
|
||||
{
|
||||
bool honeyDewWorking = honeyTurboRegen && Player.honeyWet;
|
||||
bool anyStandingStillLifeRegen = shadeRegen || cFreeze || honeyDewWorking || photosynthesis || aAmpoule || purity;
|
||||
bool onlyPhotosynthesisAtNight = !shadeRegen && !cFreeze && !honeyDewWorking && photosynthesis && !Main.dayTime;
|
||||
|
||||
if (Player.StandingStill() && Player.itemAnimation == 0)
|
||||
// Divides all negative life regen by two before applying any other effects.
|
||||
if (anyStandingStillLifeRegen && Player.lifeRegen < 0)
|
||||
Player.lifeRegen /= 2;
|
||||
|
||||
// Spawn dust of some flavor while actually regenerating, aAmpule and purity have a slightly different looking style
|
||||
if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife)
|
||||
{
|
||||
bool boostedRegen = false;
|
||||
bool noSunlight = false;
|
||||
if (shadeRegen)
|
||||
int dustType = shadeRegen ? 173 : cFreeze ? 67 : honeyDewWorking ? DustID.Honey2 : photosynthesis ? 244 : aAmpoule ? 228 : purity ? 187 : -1;
|
||||
bool dustSpawnRolled = Main.rand.Next(30000) < Player.lifeRegenTime || purity ? Main.rand.NextBool(2) : aAmpoule ? Main.rand.NextBool(4) : Main.rand.NextBool(30);
|
||||
if (dustType != -1 && dustSpawnRolled)
|
||||
{
|
||||
boostedRegen = true;
|
||||
if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife)
|
||||
{
|
||||
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool(30))
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, 173, 0f, 0f, 200, default, 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cFreeze)
|
||||
{
|
||||
boostedRegen = true;
|
||||
if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife)
|
||||
{
|
||||
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool(30))
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, 67, 0f, 0f, 200, new Color(150, Main.DiscoG, 255), 0.75f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (photosynthesis)
|
||||
{
|
||||
boostedRegen = true;
|
||||
if (!Main.dayTime)
|
||||
noSunlight = true;
|
||||
if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife)
|
||||
{
|
||||
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool(2))
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, 244, 0f, 0f, 200, default, 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (boostedRegen)
|
||||
{
|
||||
int lifeRegenTimeMaxBoost2 = !noSunlight ? lifeRegenTimeMaxBoost : (lifeRegenTimeMaxBoost / 5);
|
||||
int lifeRegenMaxBoost2 = !noSunlight ? lifeRegenMaxBoost : (lifeRegenMaxBoost / 5);
|
||||
float lifeRegenLifeRegenTimeMaxBoost2 = !noSunlight ? lifeRegenLifeRegenTimeMaxBoost : (lifeRegenLifeRegenTimeMaxBoost / 5);
|
||||
|
||||
if (Player.lifeRegenTime > 90 && Player.lifeRegenTime < lifeRegenTimeMaxBoost2)
|
||||
Player.lifeRegenTime = lifeRegenTimeMaxBoost2;
|
||||
|
||||
Player.lifeRegenTime += lifeRegenMaxBoost2;
|
||||
Player.lifeRegen += lifeRegenMaxBoost2;
|
||||
|
||||
float num3 = Player.lifeRegenTime * 2.5f; // lifeRegenTime max is 3600
|
||||
num3 /= 300f;
|
||||
if (num3 > 0f)
|
||||
{
|
||||
if (num3 > lifeRegenLifeRegenTimeMaxBoost2)
|
||||
num3 = lifeRegenLifeRegenTimeMaxBoost2;
|
||||
|
||||
Player.lifeRegen += (int)num3;
|
||||
}
|
||||
if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife)
|
||||
{
|
||||
Player.lifeRegenCount++;
|
||||
}
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, dustType, 0f, 0f, purity || aAmpoule ? 80 : 200, default, purity || aAmpoule ? 0.5f : 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= purity || aAmpoule ? 55f : 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
|
||||
// Actually apply "standing still" regeneration (the stats are granted even at full health)
|
||||
float regenTimeNeededForTurboRegen = shadeRegen ? 40f : cFreeze ? 60f : honeyDewWorking ? 90f : photosynthesis ? 90f : aAmpoule ? 90f : purity ? 60f : -1f;
|
||||
|
||||
// 4 = vanilla Shiny Stone
|
||||
int turboRegenPower = shadeRegen || cFreeze || purity ? 4 : honeyDewWorking || aAmpoule ? 3 : photosynthesis ? 1 : -1;
|
||||
|
||||
if (turboRegenPower > 0)
|
||||
{
|
||||
// After a brief delay determined by your form of standing still regen, min-cap life regen time at 1800 / 3600.
|
||||
// Photosynthesis Potion does not do this at night.
|
||||
if (Player.lifeRegenTime > regenTimeNeededForTurboRegen && Player.lifeRegenTime < 1800f && !onlyPhotosynthesisAtNight)
|
||||
Player.lifeRegenTime = 1800f;
|
||||
|
||||
Player.lifeRegen += turboRegenPower;
|
||||
Player.lifeRegenTime += turboRegenPower;
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
// The Camper counteracts the regen loss while moving horizontally
|
||||
if (camper && (Player.velocity.X != 0 && Player.grappling[0] <= 0))
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Potions;
|
||||
@@ -1153,7 +1152,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (instance.timeLeft < 0)
|
||||
{
|
||||
handler.OnCompleted();
|
||||
if (handler.EndSound != null)
|
||||
if (handler.EndSound != null && handler.ShouldPlayEndSound)
|
||||
SoundEngine.PlaySound(handler.EndSound.GetValueOrDefault());
|
||||
expiredCooldowns.Add(id);
|
||||
}
|
||||
@@ -1577,23 +1576,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
}
|
||||
|
||||
// Ambrosial Ampoule bonus and other light-granting bonuses
|
||||
float[] light = new float[3];
|
||||
if ((rOoze && !Main.dayTime) || aAmpoule)
|
||||
{
|
||||
light[0] += 1f;
|
||||
light[1] += 1f;
|
||||
light[2] += 0.6f;
|
||||
}
|
||||
if (aAmpoule)
|
||||
{
|
||||
Player.endurance += 0.05f;
|
||||
Player.buffImmune[BuffID.Frozen] = true;
|
||||
Player.buffImmune[BuffID.Chilled] = true;
|
||||
Player.buffImmune[BuffID.Frostburn] = true;
|
||||
Player.buffImmune[BuffID.CursedInferno] = true;
|
||||
Player.buffImmune[ModContent.BuffType<BurningBlood>()] = true;
|
||||
}
|
||||
if (cFreeze)
|
||||
{
|
||||
light[0] += 0.3f;
|
||||
@@ -2383,8 +2366,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (AbsorberRegen)
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
Player.endurance += 0.07f;
|
||||
Player.GetDamage<GenericDamageClass>() += 0.08f;
|
||||
Player.endurance += 0.05f;
|
||||
}
|
||||
|
||||
if (crawCarapace)
|
||||
@@ -2698,25 +2681,25 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeMagnet = true;
|
||||
}
|
||||
|
||||
if (wDeath)
|
||||
if (wDeath && !purity)
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.25f;
|
||||
|
||||
if (astralInfection)
|
||||
if (astralInfection && !(infectedJewel || purity))
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.15f;
|
||||
|
||||
if (pFlames)
|
||||
if (pFlames && !purity)
|
||||
{
|
||||
Player.blind = true;
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.15f;
|
||||
}
|
||||
|
||||
if (aCrunch && !laudanum)
|
||||
if (aCrunch && !laudanum && !purity)
|
||||
{
|
||||
Player.statDefense -= ArmorCrunch.DefenseReduction;
|
||||
Player.endurance *= ArmorCrunch.MultiplicativeDamageReductionPlayer;
|
||||
}
|
||||
|
||||
if (wither)
|
||||
if (wither && !purity)
|
||||
{
|
||||
Player.statDefense -= WitherDebuff.DefenseReduction;
|
||||
}
|
||||
@@ -2729,10 +2712,10 @@ namespace CalamityMod.CalPlayer
|
||||
Player.velocity.Y = 15f;
|
||||
}
|
||||
|
||||
if (eutrophication)
|
||||
if (eutrophication && !purity)
|
||||
Player.velocity = Vector2.Zero;
|
||||
|
||||
if (vaporfied || galvanicCorrosion)
|
||||
if ((vaporfied && !purity) || galvanicCorrosion)
|
||||
Player.velocity *= 0.98f;
|
||||
|
||||
if (molluskSet)
|
||||
@@ -3629,7 +3612,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
CooldownInstance durabilityCooldown = Player.AddCooldown(WulfrumRoverDriveDurability.ID, RoverDrive.ShieldDurabilityMax);
|
||||
durabilityCooldown.timeLeft = RoverDriveShieldDurability;
|
||||
SoundEngine.PlaySound(RoverDrive.ActivationSound, Player.Center);
|
||||
}
|
||||
|
||||
// Add light if this shield is currently active
|
||||
|
||||
@@ -707,7 +707,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// Fearmonger set's colossal life regeneration
|
||||
// Fearmonger set gains +10 frames (max 90) of regen when any minion lands any hit
|
||||
if (fearmongerSet)
|
||||
{
|
||||
fearmongerRegenFrames += 10;
|
||||
@@ -840,7 +840,7 @@ 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);
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(125);
|
||||
Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType<NanoFlare>(), damage, 3f, proj.owner);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,6 @@ namespace CalamityMod
|
||||
public static ModKeybind SetBonusHotKey { get; private set; }
|
||||
public static ModKeybind RageHotKey { get; private set; }
|
||||
public static ModKeybind AdrenalineHotKey { get; private set; }
|
||||
public static ModKeybind AstralTeleportHotKey { get; private set; }
|
||||
public static ModKeybind AstralArcanumUIHotkey { get; private set; }
|
||||
public static ModKeybind SandCloakHotkey { get; private set; }
|
||||
public static ModKeybind SpectralVeilHotKey { get; private set; }
|
||||
public static ModKeybind PlaguePackHotKey { get; private set; }
|
||||
@@ -28,8 +26,6 @@ namespace CalamityMod
|
||||
AdrenalineHotKey = KeybindLoader.RegisterKeybind(Mod, "AdrenalineMode", "B");
|
||||
BlazingCoreHotKey = KeybindLoader.RegisterKeybind(Mod, "BlazingCoreParry", "N");
|
||||
SetBonusHotKey = KeybindLoader.RegisterKeybind(Mod, "ArmorSetBonus", "Y");
|
||||
AstralTeleportHotKey = KeybindLoader.RegisterKeybind(Mod, "AstralTeleport", "P");
|
||||
AstralArcanumUIHotkey = KeybindLoader.RegisterKeybind(Mod, "AstralArcanumUIToggle", "O");
|
||||
SandCloakHotkey = KeybindLoader.RegisterKeybind(Mod, "SandCloakEffect", "C");
|
||||
SpectralVeilHotKey = KeybindLoader.RegisterKeybind(Mod, "SpectralVeilTeleport", "Z");
|
||||
PlaguePackHotKey = KeybindLoader.RegisterKeybind(Mod, "BoosterDash", "Q");
|
||||
@@ -47,8 +43,6 @@ namespace CalamityMod
|
||||
AdrenalineHotKey = null;
|
||||
BlazingCoreHotKey = null;
|
||||
SetBonusHotKey = null;
|
||||
AstralTeleportHotKey = null;
|
||||
AstralArcanumUIHotkey = null;
|
||||
SandCloakHotkey = null;
|
||||
SpectralVeilHotKey = null;
|
||||
PlaguePackHotKey = null;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Buffs;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Buffs.Cooldowns;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor.Vanity;
|
||||
using CalamityMod.Items.DraedonMisc;
|
||||
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
|
||||
using CalamityMod.Items.Fishing.FishingRods;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
using CalamityMod.Items.Materials;
|
||||
@@ -64,7 +66,6 @@ using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Tiles.LivingFire;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -87,6 +88,8 @@ namespace CalamityMod
|
||||
public static List<int> friendlyBeeList;
|
||||
public static List<int> hardModeNerfList;
|
||||
public static List<int> debuffList;
|
||||
public static List<int> fireDebuffList;
|
||||
public static List<int> sicknessDebuffList;
|
||||
public static List<int> alcoholList;
|
||||
public static List<int> spearAutoreuseList;
|
||||
public static List<int> pumpkinMoonBuffList;
|
||||
@@ -160,6 +163,8 @@ namespace CalamityMod
|
||||
public static List<int> DisabledSummonerNerfItems;
|
||||
public static List<int> DisabledSummonerNerfMinions;
|
||||
|
||||
public static List<int> VeneratedLocketBanlist; //To ban projectiles from locket, mainly spikeballs altho Toasty asked me to add mod calls for adding stuff like Dreamtastic
|
||||
|
||||
public static void LoadLists()
|
||||
{
|
||||
donatorList = new List<string>()
|
||||
@@ -1155,7 +1160,47 @@ namespace CalamityMod
|
||||
BuffType<Dragonfire>(),
|
||||
BuffType<Nightwither>(),
|
||||
BuffType<VulnerabilityHex>(),
|
||||
BuffType<MiracleBlight>()
|
||||
BuffType<MiracleBlight>(),
|
||||
BuffType<WhisperingDeath>(),
|
||||
BuffType<FrozenLungs>(),
|
||||
BuffType<FishAlert>(),
|
||||
BuffType<HolyInferno>(),
|
||||
BuffType<IcarusFolly>(),
|
||||
BuffType<DoGExtremeGravity>(),
|
||||
// BuffType<NOU>(),
|
||||
BuffType<PopoNoselessBuff>(),
|
||||
BuffType<SearingLava>(),
|
||||
BuffType<WeakBrimstoneFlames>(),
|
||||
BuffType<Withered>()
|
||||
};
|
||||
|
||||
fireDebuffList = new List<int>()
|
||||
{
|
||||
BuffID.OnFire,
|
||||
BuffID.OnFire3, // Hellfire
|
||||
BuffID.Burning, // Touching meteorite ore or hellstone without obsidian skull
|
||||
BuffID.CursedInferno,
|
||||
BuffID.ShadowFlame, // Vanilla Shadowflame, can normally never be applied to players
|
||||
BuffType<Shadowflame>(), // Calamity Shadowflame copy for players
|
||||
BuffType<SearingLava>(), // Crags lava
|
||||
BuffType<BrimstoneFlames>(),
|
||||
BuffType<HolyFlames>(),
|
||||
BuffType<GodSlayerInferno>(),
|
||||
BuffType<Dragonfire>(),
|
||||
BuffType<WeakBrimstoneFlames>(), // Aflame enchant self damage
|
||||
BuffType<BanishingFire>(),
|
||||
};
|
||||
|
||||
sicknessDebuffList = new List<int>()
|
||||
{
|
||||
BuffID.Poisoned,
|
||||
BuffID.Venom,
|
||||
BuffType<SulphuricPoisoning>(),
|
||||
BuffType<AstralInfectionDebuff>(),
|
||||
BuffType<Plague>(),
|
||||
BuffType<AbsorberAffliction>(),
|
||||
BuffType<WhisperingDeath>(),
|
||||
BuffType<Irradiated>()
|
||||
};
|
||||
|
||||
alcoholList = new List<int>()
|
||||
@@ -1944,6 +1989,8 @@ namespace CalamityMod
|
||||
ProjectileID.MonkStaffT3,
|
||||
ProjectileID.LastPrismLaser,
|
||||
ProjectileID.ChargedBlasterLaser,
|
||||
ProjectileID.PiercingStarlight,
|
||||
ProjectileID.FinalFractal,
|
||||
ProjectileType<FlakKrakenProj>(),
|
||||
ProjectileType<MurasamaSlash>(),
|
||||
ProjectileType<OmnibladeSwing>(),
|
||||
@@ -1990,6 +2037,10 @@ namespace CalamityMod
|
||||
ProjectileType<SparklingLaser>(),
|
||||
ProjectileType<YharimsCrystalBeam>(),
|
||||
ProjectileType<PrismaticBeam>(),
|
||||
ProjectileType<SpiritCongregation>(),
|
||||
ProjectileType<BallisticPoisonCloud>(),
|
||||
ProjectileType<DuststormCloudHitbox>(),
|
||||
ProjectileType<StarmageddonBinaryStarCenter>(),
|
||||
};
|
||||
|
||||
// Lists of enemies that resist piercing to some extent (mostly worms).
|
||||
@@ -2670,6 +2721,18 @@ namespace CalamityMod
|
||||
|
||||
DisabledSummonerNerfItems = new();
|
||||
DisabledSummonerNerfMinions = new();
|
||||
|
||||
VeneratedLocketBanlist = new List<int>()
|
||||
{
|
||||
ItemType<PoisonPack>(),
|
||||
ItemType<SkyStabber>(),
|
||||
ItemType<Nychthemeron>(),
|
||||
ItemType<HellsSun>(),
|
||||
ItemType<GodsParanoia>(),
|
||||
ItemType<SlickCane>(),
|
||||
ItemType<Mycoroot>(),
|
||||
ItemType<CosmicKunai>()
|
||||
};
|
||||
}
|
||||
|
||||
public static void UnloadLists()
|
||||
@@ -2686,6 +2749,8 @@ namespace CalamityMod
|
||||
beeProjectileList = null;
|
||||
hardModeNerfList = null;
|
||||
debuffList = null;
|
||||
fireDebuffList = null;
|
||||
sicknessDebuffList = null;
|
||||
alcoholList = null;
|
||||
spearAutoreuseList = null;
|
||||
pumpkinMoonBuffList = null;
|
||||
@@ -2758,6 +2823,8 @@ namespace CalamityMod
|
||||
|
||||
DisabledSummonerNerfItems = null;
|
||||
DisabledSummonerNerfMinions = null;
|
||||
|
||||
VeneratedLocketBanlist = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -361,7 +361,6 @@ namespace CalamityMod
|
||||
RipperUI.Load();
|
||||
StealthUI.Load();
|
||||
ChargeMeterUI.Load();
|
||||
AstralArcanumUI.Load(this);
|
||||
FlightBar.Load();
|
||||
|
||||
// TODO -- Is this not possible to place in ModNPC.Load or ModNPC.SetStaticDefaults ?
|
||||
@@ -465,7 +464,6 @@ namespace CalamityMod
|
||||
RipperUI.Unload();
|
||||
StealthUI.Unload();
|
||||
ChargeMeterUI.Unload();
|
||||
AstralArcanumUI.Unload();
|
||||
FlightBar.Unload();
|
||||
|
||||
if (!Main.dedServ)
|
||||
|
||||
@@ -49,6 +49,11 @@ namespace CalamityMod.Cooldowns
|
||||
/// When the cooldown instance ends, this sound is played. Leave at <b>null</b> for no sound.
|
||||
/// </summary>
|
||||
public virtual SoundStyle? EndSound => null;
|
||||
|
||||
/// <summary>
|
||||
/// Set this to true to have the cooldown instance end sound play upon expiration. Defaults to <b>true</b>
|
||||
/// </summary>
|
||||
public virtual bool ShouldPlayEndSound => true;
|
||||
#endregion
|
||||
|
||||
#region Display & Rendering
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace CalamityMod.Cooldowns
|
||||
public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override SoundStyle? EndSound => LunicCorpsHelmet.ActivationSound;
|
||||
public override bool ShouldPlayEndSound => instance.player.Calamity().lunicCorpsSet;
|
||||
|
||||
public override void Tick() => instance.player.Calamity().playedLunicCorpsShieldSound = false;
|
||||
// When the recharge period completes, grant 1 point of shielding immediately so the rest my refill normally.
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace CalamityMod.Cooldowns
|
||||
public override Color CooldownStartColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override Color CooldownEndColor => Color.Lerp(ringColorLerpStart, ringColorLerpEnd, instance.Completion);
|
||||
public override SoundStyle? EndSound => TheSponge.ActivationSound;
|
||||
public override bool ShouldPlayEndSound => instance.player.Calamity().sponge;
|
||||
|
||||
public override void Tick() => instance.player.Calamity().playedSpongeShieldSound = false;
|
||||
// When the recharge period completes, grant 1 point of shielding immediately so the rest my refill normally.
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace CalamityMod.Cooldowns
|
||||
if (modPlayer.roverDrive)
|
||||
modPlayer.RoverDriveShieldDurability = RoverDrive.ShieldDurabilityMax;
|
||||
}
|
||||
public override SoundStyle? EndSound => null;
|
||||
public override SoundStyle? EndSound => RoverDrive.ActivationSound;
|
||||
public override bool ShouldPlayEndSound => instance.player.Calamity().roverDrive;
|
||||
}
|
||||
}
|
||||
@@ -456,8 +456,14 @@ namespace CalamityMod.ILEditing
|
||||
private static string IncorporateEnchantmentInAffix(Terraria.On_Item.orig_AffixName orig, Item self)
|
||||
{
|
||||
string result = orig(self);
|
||||
if (!self.IsAir && self.Calamity().AppliedEnchantment.HasValue)
|
||||
result = $"{self.Calamity().AppliedEnchantment.Value.Name} {result}";
|
||||
|
||||
// This hook could occur before CalamityGlobalItem is loaded and throw an error.
|
||||
try
|
||||
{
|
||||
if (!self.IsAir && self.Calamity().AppliedEnchantment.HasValue)
|
||||
result = $"{self.Calamity().AppliedEnchantment.Value.Name} {result}";
|
||||
}
|
||||
catch { }
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -12,37 +12,38 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.defense = 6;
|
||||
Item.width = 20;
|
||||
Item.height = 20;
|
||||
Item.value = CalamityGlobalItem.Rarity5BuyPrice;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.value = CalamityGlobalItem.Rarity9BuyPrice;
|
||||
Item.rare = ItemRarityID.Cyan;
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.statLifeMax2 += 70;
|
||||
|
||||
// bool left in for abyss light purposes and life regen effects
|
||||
modPlayer.aAmpoule = true;
|
||||
modPlayer.rOoze = true;
|
||||
|
||||
// Inherits all effects of Honey Dew and Living Dew (except standing regen is not honey exclusive anymore)
|
||||
modPlayer.alwaysHoneyRegen = true;
|
||||
modPlayer.honeyDewHalveDebuffs = true;
|
||||
modPlayer.livingDewHalveDebuffs = true;
|
||||
|
||||
// Add light if the other accessories aren't equipped and visibility is turned on
|
||||
if (!(modPlayer.rOoze || modPlayer.purity) && !hideVisual)
|
||||
Lighting.AddLight(player.Center, new Vector3(1.2f, 1.2f, 0.72f));
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<CorruptFlask>().
|
||||
AddIngredient<LivingDew>().
|
||||
AddIngredient<RadiantOoze>().
|
||||
AddIngredient<CryonicBar>(5).
|
||||
AddIngredient<SeaPrism>(10).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
|
||||
CreateRecipe().
|
||||
AddIngredient<CrimsonFlask>().
|
||||
AddIngredient<RadiantOoze>().
|
||||
AddIngredient<CryonicBar>(5).
|
||||
AddIngredient<SeaPrism>(10).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
AddIngredient<LifeAlloy>(3).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories
|
||||
player.GetDamage<GenericDamageClass>() += 0.08f;
|
||||
player.GetDamage<SummonDamageClass>() += 0.07f; //7% + 8% = 15%
|
||||
player.maxMinions += 2;
|
||||
if (player.controlJump)
|
||||
if (player.wingTime < player.wingTimeMax)
|
||||
player.lifeRegen += 4;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class AstralArcanum : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.defense = 12;
|
||||
Item.width = 26;
|
||||
Item.height = 26;
|
||||
Item.accessory = true;
|
||||
Item.value = CalamityGlobalItem.Rarity12BuyPrice;
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.AstralArcanumUIHotkey);
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.astralArcanum = true;
|
||||
player.buffImmune[ModContent.BuffType<AstralInfectionDebuff>()] = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<CelestialJewel>().
|
||||
AddIngredient<DarkPlasma>(3).
|
||||
AddIngredient(ItemID.LunarBar, 5).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.defense = 5;
|
||||
Item.defense = 4;
|
||||
Item.width = 26;
|
||||
Item.height = 26;
|
||||
Item.value = CalamityGlobalItem.Rarity1BuyPrice;
|
||||
|
||||
@@ -13,46 +13,27 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 20;
|
||||
Item.value = CalamityGlobalItem.Rarity5BuyPrice;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.value = CalamityGlobalItem.Rarity2BuyPrice;
|
||||
Item.rare = ItemRarityID.Green;
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.statLifeMax2 += 30;
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.beeResist = true;
|
||||
|
||||
if (player.ZoneJungle)
|
||||
{
|
||||
player.lifeRegen += 1;
|
||||
player.statDefense += 9;
|
||||
player.endurance += 0.05f;
|
||||
}
|
||||
|
||||
player.buffImmune[BuffID.Venom] = true;
|
||||
player.buffImmune[BuffID.Poisoned] = true;
|
||||
|
||||
if (!player.honey && player.lifeRegen < 0)
|
||||
{
|
||||
player.lifeRegen += 2;
|
||||
if (player.lifeRegen > 0)
|
||||
player.lifeRegen = 0;
|
||||
}
|
||||
|
||||
player.lifeRegenTime += 1;
|
||||
player.lifeRegen += 2;
|
||||
modPlayer.alwaysHoneyRegen = true;
|
||||
modPlayer.honeyTurboRegen = true;
|
||||
modPlayer.honeyDewHalveDebuffs = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<LivingDew>().
|
||||
AddIngredient(ItemID.BottledHoney, 10).
|
||||
AddIngredient<TrapperBulb>(2).
|
||||
AddIngredient(ItemID.ButterflyDust).
|
||||
AddIngredient<BeetleJuice>(3).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
AddIngredient(ItemID.BeeWax, 3).
|
||||
AddIngredient<MurkyPaste>(3).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Potions;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class CelestialJewel : ModItem, ILocalizedModType
|
||||
[LegacyName("CelestialJewel")]
|
||||
public class InfectedJewel : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.defense = 8;
|
||||
Item.defense = 6;
|
||||
Item.width = 26;
|
||||
Item.height = 26;
|
||||
Item.value = CalamityGlobalItem.Rarity7BuyPrice;
|
||||
@@ -21,21 +21,18 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.AstralTeleportHotKey);
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.celestialJewel = true;
|
||||
modPlayer.infectedJewel = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<CrownJewel>().
|
||||
AddIngredient(ItemID.TeleportationPotion, 3).
|
||||
AddIngredient<AureusCell>(15).
|
||||
AddIngredient<SeaPrism>(15).
|
||||
AddIngredient<AureusCell>(10).
|
||||
AddIngredient<Stardust>(25).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
Before Width: | Height: | Size: 947 B After Width: | Height: | Size: 947 B |
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -12,29 +13,32 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
Item.width = 34;
|
||||
Item.height = 22;
|
||||
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.value = CalamityGlobalItem.Rarity7BuyPrice;
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if (player.ZoneJungle)
|
||||
{
|
||||
player.lifeRegen += 1;
|
||||
player.statDefense += 5;
|
||||
player.endurance += 0.05f;
|
||||
}
|
||||
player.buffImmune[BuffID.Poisoned] = true;
|
||||
player.statLifeMax2 += 50;
|
||||
|
||||
// Inherits all effects of Honey Dew
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.alwaysHoneyRegen = true;
|
||||
modPlayer.honeyTurboRegen = true;
|
||||
modPlayer.honeyDewHalveDebuffs = true;
|
||||
modPlayer.livingDewHalveDebuffs = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.Bezoar).
|
||||
AddIngredient(ItemID.Vine, 2).
|
||||
AddIngredient<MurkyPaste>(5).
|
||||
AddTile(TileID.Anvils).
|
||||
AddIngredient<HoneyDew>().
|
||||
AddIngredient<TrapperBulb>(3).
|
||||
AddIngredient<LivingShard>(6).
|
||||
// TODO -- Replace with Water Essence
|
||||
AddIngredient<EssenceofSunlight>(5).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("AstralArcanum")]
|
||||
public class Purity : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.defense = 8;
|
||||
Item.width = 18;
|
||||
Item.height = 44;
|
||||
Item.accessory = true;
|
||||
Item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
||||
Item.rare = ModContent.RarityType<Violet>();
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.statLifeMax2 += 100;
|
||||
|
||||
// Abyss light, debuff near-immunity, life regen effects, and massively enhances debuff halving
|
||||
modPlayer.purity = true;
|
||||
|
||||
// Inherits effects from Honey Dew and Living Dew
|
||||
modPlayer.alwaysHoneyRegen = true;
|
||||
modPlayer.honeyDewHalveDebuffs = true;
|
||||
modPlayer.livingDewHalveDebuffs = true;
|
||||
|
||||
// Add light if the other accessories aren't equipped and visibility is turned on
|
||||
if (!(modPlayer.rOoze || modPlayer.aAmpoule) && !hideVisual)
|
||||
Lighting.AddLight(player.Center, new Vector3(1.32f, 1.32f, 1.82f));
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<AmbrosialAmpoule>().
|
||||
AddIngredient<InfectedJewel>().
|
||||
AddIngredient<AuricBar>(5).
|
||||
AddIngredient<AscendantSpiritEssence>(4).
|
||||
AddTile(ModContent.TileType<CosmicAnvil>()).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
@@ -1,4 +1,6 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -19,7 +21,14 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().rOoze = true;
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
// bool left in for abyss light purposes and life regen effects
|
||||
modPlayer.rOoze = true;
|
||||
|
||||
// Add light if the other accessories aren't equipped and visibility is turned on
|
||||
if (!(modPlayer.aAmpoule || modPlayer.purity) && !hideVisual)
|
||||
Lighting.AddLight(player.Center, new Vector3(1f, 1f, 0.6f));
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -17,10 +17,10 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
Item.width = 64;
|
||||
Item.height = 62;
|
||||
Item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
||||
Item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
||||
Item.defense = 18;
|
||||
Item.accessory = true;
|
||||
Item.rare = ModContent.RarityType<DarkBlue>();
|
||||
Item.rare = ModContent.RarityType<Violet>();
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
@@ -57,8 +57,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.FrozenShield).
|
||||
AddIngredient<DeificAmulet>().
|
||||
AddIngredient<DivineGeode>(10).
|
||||
AddIngredient<CosmiliteBar>(10).
|
||||
AddIngredient<AuricBar>(5).
|
||||
AddIngredient<AscendantSpiritEssence>(4).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.defense = 16;
|
||||
Item.defense = 15;
|
||||
Item.width = 20;
|
||||
Item.height = 24;
|
||||
Item.value = CalamityGlobalItem.Rarity9BuyPrice;
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
// Damage stat boosts
|
||||
public const float DamageMultiplier = 0.5f; // 2.5% to 10% (x100)
|
||||
public const float CritMultiplier = 25f; // 1.25% to 5%
|
||||
public const float CritMultiplier = 25f; // 1.25% to 5% (end result rounded down)
|
||||
|
||||
// Defensive stat boosts
|
||||
public const float HealthMultiplier = 50f; // 2% to 10% (rounded down)
|
||||
@@ -112,11 +112,11 @@ namespace CalamityMod.Items.Accessories
|
||||
float power = CalculatePower();
|
||||
string statList = this.GetLocalization("StatsList").Format(
|
||||
(DamageMultiplier * power * 100).ToString("N1"),
|
||||
(CritMultiplier * power).ToString("N0"),
|
||||
(int)(CritMultiplier * power),
|
||||
(int)(HealthMultiplier * power),
|
||||
(DRMultiplier * power * 100).ToString("N2"),
|
||||
(int)(DefenseMultiplier * power),
|
||||
1 + (int)(RegenMultiplier * power),
|
||||
(0.5f * (1f + (int)(RegenMultiplier * power))).ToString("n1"),
|
||||
(SpeedMultiplier * power * 100).ToString("N1"),
|
||||
(FlightMultiplier * power * 100).ToString("N1"),
|
||||
(CalculatePower(true) * 100).ToString("N0"));
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 10));
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 10));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public static readonly SoundStyle BreakSound = new("CalamityMod/Sounds/Custom/RoverDriveBreak") { Volume = 0.75f };
|
||||
|
||||
public static int ShieldDurabilityMax = 180;
|
||||
public static int ShieldRechargeDelay = CalamityUtils.SecondsToFrames(6);
|
||||
public static int ShieldRechargeDelay = CalamityUtils.SecondsToFrames(9); // was 6
|
||||
public static int TotalShieldRechargeTime = CalamityUtils.SecondsToFrames(6);
|
||||
|
||||
// While active, The Sponge gives 30 defense and 30% DR
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
Item.damage = 10;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 8;
|
||||
Item.height = 8;
|
||||
Item.width = 10;
|
||||
Item.height = 16;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
Item.knockBack = 1.25f;
|
||||
|
||||
|
Before Width: | Height: | Size: 253 B After Width: | Height: | Size: 269 B |
@@ -138,12 +138,15 @@ namespace CalamityMod.Items.Armor.GemTech
|
||||
tooltips.Insert(setBonusIndex, purpleGemTooltip);
|
||||
|
||||
setBonusIndex++;
|
||||
TooltipLine pinkGemTooltip = new TooltipLine(item.Mod, "CalamityMod:SetBonus7", CalamityUtils.GetTextFromModItem<GemTechHeadgear>("PinkGemInfo").Format(BaseGemDefenseBoost, BaseGemLifeRegenBoost));
|
||||
string pinkLifeRegenString = (0.5f * BaseGemLifeRegenBoost).ToString("n1");
|
||||
TooltipLine pinkGemTooltip = new TooltipLine(item.Mod, "CalamityMod:SetBonus7", CalamityUtils.GetTextFromModItem<GemTechHeadgear>("PinkGemInfo").Format(BaseGemDefenseBoost, pinkLifeRegenString));
|
||||
pinkGemTooltip.OverrideColor = new Color(255, 115, 206);
|
||||
tooltips.Insert(setBonusIndex, pinkGemTooltip);
|
||||
|
||||
setBonusIndex++;
|
||||
TooltipLine liferegenTooltip = new TooltipLine(item.Mod, "CalamityMod:SetBonus8", CalamityUtils.GetTextFromModItem<GemTechHeadgear>("GemBonusInfo").Format(AllGemsWeaponUseLifeRegenBoost, AllGemsLifeRegenBoostTime / 60, AllGemsMultiWeaponUseLifeRegenBoost, AllGemsMultiWeaponLifeRegenBoostTime / 60f));
|
||||
string baseLifeRegenString = (0.5f * AllGemsWeaponUseLifeRegenBoost).ToString("n1");
|
||||
string multiclassLifeRegenString = (0.5f * AllGemsMultiWeaponUseLifeRegenBoost).ToString("n1");
|
||||
TooltipLine liferegenTooltip = new TooltipLine(item.Mod, "CalamityMod:SetBonus8", CalamityUtils.GetTextFromModItem<GemTechHeadgear>("GemBonusInfo").Format(baseLifeRegenString, AllGemsLifeRegenBoostTime / 60, multiclassLifeRegenString, AllGemsMultiWeaponLifeRegenBoostTime / 60f));
|
||||
liferegenTooltip.OverrideColor = new Color(230, 230, 230);
|
||||
tooltips.Insert(setBonusIndex, liferegenTooltip);
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ namespace CalamityMod.Items
|
||||
|
||||
// Palladium
|
||||
if (item.type == ItemID.PalladiumSword || item.type == ItemID.PalladiumPike)
|
||||
EditTooltipByName("Knockback", (line) => line.Text += "\nIncreases life regen on hit");
|
||||
EditTooltipByName("Knockback", (line) => line.Text += "\nIncreases natural life regen on hit");
|
||||
|
||||
// Mythril
|
||||
if (item.type == ItemID.MythrilSword || item.type == ItemID.MythrilHalberd)
|
||||
@@ -588,7 +588,7 @@ namespace CalamityMod.Items
|
||||
// Fairy Boots buff.
|
||||
if (item.type == ItemID.FairyBoots)
|
||||
EditTooltipByNum(2, (line) => line.Text += "\nFairies can spawn at any time on the surface and spawn far more frequently\n" +
|
||||
"Nearby fairies grant increased life regen, defense and movement speed\n" +
|
||||
"Nearby fairies grant +2 HP/s life regen, 10 defense and 10% movement speed\n" +
|
||||
"Fairies are immune to damage and will no longer flee");
|
||||
|
||||
// Armor Crunch immunity pre-Golem.
|
||||
@@ -729,7 +729,7 @@ namespace CalamityMod.Items
|
||||
if (item.type == ItemID.TinHelmet)
|
||||
AddTooltip("3% increased critical strike chance");
|
||||
if (item.type == ItemID.TinChainmail)
|
||||
AddTooltip("+1 life regen");
|
||||
AddTooltip("+0.5 HP/s life regen");
|
||||
if (item.type == ItemID.TinGreaves)
|
||||
AddTooltip("5% increased movement speed");
|
||||
|
||||
@@ -745,7 +745,7 @@ namespace CalamityMod.Items
|
||||
if (item.type == ItemID.SilverHelmet)
|
||||
AddTooltip("5% increased critical strike chance");
|
||||
if (item.type == ItemID.SilverChainmail)
|
||||
AddTooltip("+2 life regen");
|
||||
AddTooltip("+1 HP/s life regen");
|
||||
if (item.type == ItemID.SilverGreaves)
|
||||
AddTooltip("8% increased movement speed");
|
||||
|
||||
@@ -753,7 +753,7 @@ namespace CalamityMod.Items
|
||||
if (item.type == ItemID.TungstenHelmet)
|
||||
AddTooltip("7% increased damage");
|
||||
if (item.type == ItemID.TungstenChainmail)
|
||||
AddTooltip("+1 life regen");
|
||||
AddTooltip("+0.5 HP/s life regen");
|
||||
if (item.type == ItemID.TungstenGreaves)
|
||||
AddTooltip("8% increased movement speed");
|
||||
|
||||
@@ -782,7 +782,7 @@ namespace CalamityMod.Items
|
||||
{
|
||||
EditTooltipByNum(0, (line) => {
|
||||
string newTooltip = line.Text.Replace("2%", "5%");
|
||||
newTooltip += "\n+1 life regen";
|
||||
newTooltip += "\n+0.5 HP/s life regen";
|
||||
line.Text = newTooltip;
|
||||
});
|
||||
}
|
||||
@@ -945,7 +945,7 @@ namespace CalamityMod.Items
|
||||
AddWingStats(3f, 1f, 0, 25);
|
||||
|
||||
if (item.type == ItemID.AngelWings)
|
||||
AddWingStats(6.25f, 1f, 1, 100, "+20 max life, +10 defense and +2 life regen");
|
||||
AddWingStats(6.25f, 1f, 1, 100, "+20 max life, +10 defense and +1 HP/s life regen");
|
||||
|
||||
if (item.type == ItemID.DemonWings)
|
||||
AddWingStats(6.25f, 1f, 1, 100, "5% increased damage and critical strike chance");
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace CalamityMod.Items
|
||||
// { ItemID.FireworksLauncher, Do(DamageRatio(2f)) }, // Celebration
|
||||
{ ItemID.Flamarang, Do(DamageExact(43)) },
|
||||
{ ItemID.Flamelash, Do(DamageRatio(1.25f)) },
|
||||
{ ItemID.Flamethrower, Do(DamageExact(42), ShootSpeedDelta(+3f)) },
|
||||
{ ItemID.Flamethrower, Do(ShootSpeedDelta(+3f)) },
|
||||
{ ItemID.FlowerofFire, Do(AutoReuse, ManaExact(7), UseRatio(0.88f)) }, // Uses ratios due to remix seed
|
||||
{ ItemID.FlowerofFrost, Do(AutoReuse, ManaExact(7), UseExact(30), DamageExact(70), ShootSpeedExact(14)) },
|
||||
{ ItemID.FlyingKnife, Do(DamageExact(70)) },
|
||||
@@ -212,7 +212,6 @@ namespace CalamityMod.Items
|
||||
{ ItemID.StakeLauncher, Do(PointBlank, DamageRatio(2f), UseRatio(1.5f)) },
|
||||
{ ItemID.StarCannon, Do(DamageExact(25)) },
|
||||
{ ItemID.StardustDragonStaff, Do(AutoReuse, DamageExact(20), UseExact(19)) },
|
||||
{ ItemID.StarWrath, Do(DamageRatio(0.9f)) },
|
||||
{ ItemID.StormTigerStaff, Do(AutoReuse, DamageExact(49), UseExact(20)) }, // Desert Tiger Staff
|
||||
{ ItemID.StylistKilLaKillScissorsIWish, Do(AutoReuse, UseTurn, DamageExact(18)) }, // Stylish Scissors
|
||||
{ ItemID.Swordfish, Do(AutoReuse, TrueMelee, DamageExact(24)) },
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace CalamityMod.Items.PermanentBoosters
|
||||
AddIngredient(ItemID.LifeFruit, 5).
|
||||
AddIngredient<TrapperBulb>(5).
|
||||
AddIngredient<LifeAlloy>(5).
|
||||
AddIngredient<LivingShard>(10).
|
||||
AddIngredient<LivingShard>(12).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"Atalya",
|
||||
"Ben-TK",
|
||||
"Cei",
|
||||
"CongratsIsTrash",
|
||||
"Cooper",
|
||||
"CrabBar",
|
||||
"Done",
|
||||
@@ -91,7 +92,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"Shayy",
|
||||
"Spider Prov",
|
||||
"StipulateVenus",
|
||||
"Sylvium",
|
||||
"Tomat",
|
||||
"Triangle",
|
||||
"Uberransy",
|
||||
@@ -182,6 +182,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"spooktacular",
|
||||
"Spoopyro",
|
||||
"Svante",
|
||||
"Sylvium",
|
||||
"Teragat",
|
||||
"Terry N. Muse",
|
||||
"ThousandFields",
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
public override void UpdateSetBonusText(ref string setBonusText)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(256);
|
||||
sb.Append("\nIncreases damage reduction by 6%\n+2 life regen");
|
||||
sb.Append("\nIncreases damage reduction by 6%\n+1 HP/s life regen");
|
||||
setBonusText += sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
public override void UpdateSetBonusText(ref string setBonusText)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(256);
|
||||
sb.Append("\nIncreases damage reduction by 3%\n+1 life regen\nGrants immunity to knockback");
|
||||
sb.Append("\nIncreases damage reduction by 3%\n+0.5 HP/s life regen\nGrants immunity to knockback");
|
||||
setBonusText += sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,10 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
public const float HeadDamage = 0.06f;
|
||||
public const float ChestCrit = 5f;
|
||||
public const float LegsMoveSpeed = 0.1f;
|
||||
public const float SetBonusLifeRegenPerDefense = 0.0666667f; // 15 defense = +1 life regen
|
||||
public const float SetBonusCritPerDefense = 0.0666667f; // 15 defense = +1% crit chance
|
||||
public const int SetBonusDefenseCap = 45;
|
||||
public const float SetBonusLifeRegenPerDefense = 0.1f; // 10 defense = +1 life regen
|
||||
public const float SetBonusDamagePerDefense = 0.1f; // 10 defense = +1% damage
|
||||
public const float SetBonusCritPerDefense = 0.1f; // 10 defense = +1% crit chance
|
||||
public const int SetBonusDefenseCap = 40;
|
||||
|
||||
public override void ApplyHeadPieceEffect(Player player) => player.GetDamage<GenericDamageClass>() += HeadDamage;
|
||||
|
||||
@@ -31,7 +32,7 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
public override void UpdateSetBonusText(ref string setBonusText)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(256);
|
||||
sb.Append("\nEvery 15 defense gives you +1 life regen and 1% increased critical strike chance\nThese effects both cap at 45 defense");
|
||||
sb.Append("\nEvery 10 defense gives you +0.5 HP/s life regen, 1% increased damage and 1% increased critical strike chance\nThese effects cap at 40 defense");
|
||||
setBonusText += sb.ToString();
|
||||
}
|
||||
|
||||
@@ -41,6 +42,7 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
if (defense > SetBonusDefenseCap)
|
||||
defense = SetBonusDefenseCap;
|
||||
player.lifeRegen += (int)(defense * SetBonusLifeRegenPerDefense);
|
||||
player.GetDamage<GenericDamageClass>() += defense * SetBonusDamagePerDefense;
|
||||
player.GetCritChance<GenericDamageClass>() += defense * SetBonusCritPerDefense;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
public override void UpdateSetBonusText(ref string setBonusText)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(256);
|
||||
sb.Append("\n+1 life regen\nTwo seconds after getting hit for 20 or more damage, you heal for 10\nGetting hit again resets the timer, delaying the heal");
|
||||
sb.Append("\n+0.5 HP/s life regen\nTwo seconds after getting hit for 20 or more damage, you heal for 10\nGetting hit again resets the timer, delaying the heal");
|
||||
setBonusText += sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
Item.width = 22;
|
||||
Item.height = 28;
|
||||
Item.damage = 1378;
|
||||
Item.damage = 1000;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.consumable = false;
|
||||
@@ -40,19 +40,20 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Item.rare = ModContent.RarityType<DarkBlue>();
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<PlasmaGrenadeProjectile>();
|
||||
Item.shootSpeed = 14f;
|
||||
Item.shootSpeed = 11f;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 250f;
|
||||
modItem.ChargePerUse = 0.2f;
|
||||
modItem.ChargePerUse = 0.25f;
|
||||
}
|
||||
|
||||
public override float StealthDamageMultiplier => 1.2f;
|
||||
public override float StealthVelocityMultiplier => 1.2f;
|
||||
public override float StealthKnockbackMultiplier => 1.5f;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
damage = (int)(damage * 1.05);
|
||||
|
||||
int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/PulseRifleFire");
|
||||
|
||||
private int BaseDamage = 1280;
|
||||
private int BaseDamage = 1200;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -15,12 +15,16 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
public class SnakeEyes : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
|
||||
public static float EnemyDistanceDetection = 2000f;
|
||||
public static float TimeToShoot = 30f;
|
||||
public static float ProjectileSpeed = 40f;
|
||||
public static float TimeToRedirect = 15f;
|
||||
public static float TimeToRestart = 45f;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.shootSpeed = 10f;
|
||||
Item.damage = 65;
|
||||
Item.damage = 200;
|
||||
Item.mana = 12;
|
||||
Item.width = 38;
|
||||
Item.height = 24;
|
||||
@@ -35,9 +39,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Item.UseSound = SoundID.Item15;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<SnakeEyesSummon>();
|
||||
Item.shootSpeed = 10f;
|
||||
Item.DamageType = DamageClass.Summon;
|
||||
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 190f;
|
||||
modItem.ChargePerUse = 1f;
|
||||
@@ -46,10 +50,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
int watcher = Projectile.NewProjectile(source, Main.MouseWorld, Vector2.Zero, type, damage, knockback, player.whoAmI);
|
||||
if (Main.projectile.IndexInRange(watcher))
|
||||
Main.projectile[watcher].originalDamage = Item.damage;
|
||||
|
||||
Projectile.NewProjectile(source, Main.MouseWorld, Vector2.Zero, type, damage, knockback, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public new string LocalizationCategory => "Items.Weapons.Magic";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 888;
|
||||
Item.damage = 666;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.noUseGraphic = true;
|
||||
Item.channel = true;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public new string LocalizationCategory => "Items.Weapons.Magic";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.staff[Item.type] = true;
|
||||
Item.staff[Item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.damage = 24;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 10;
|
||||
Item.width = 50;
|
||||
Item.height = 50;
|
||||
Item.width = 58;
|
||||
Item.height = 54;
|
||||
Item.useTime = 20;
|
||||
Item.useAnimation = 20;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -34,7 +34,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.shoot = ModContent.ProjectileType<NightsRayBeam>();
|
||||
Item.shootSpeed = 6f;
|
||||
}
|
||||
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 714 B After Width: | Height: | Size: 954 B |
@@ -12,13 +12,13 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public new string LocalizationCategory => "Items.Weapons.Magic";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 62;
|
||||
Item.damage = 52;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 12;
|
||||
Item.width = 28;
|
||||
Item.height = 32;
|
||||
Item.useTime = 45;
|
||||
Item.useAnimation = 45;
|
||||
Item.useTime = 49;
|
||||
Item.useAnimation = 49;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 6f;
|
||||
@@ -27,13 +27,12 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<PoseidonTyphoon>();
|
||||
Item.shootSpeed = 20f;
|
||||
Item.shootSpeed = 18f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
int typhoon = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[typhoon].penetrate = Main.rand.Next(4,11);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public const float ReleaseSpeed = 33f;
|
||||
|
||||
public const float ReleaseDamageFactor = 4.48f;
|
||||
public const float ReleaseDamageFactor = 4.65f;
|
||||
|
||||
public static readonly SoundStyle ExplosionSound = new("CalamityMod/Sounds/Custom/SubsumingVortexExplosion");
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 507;
|
||||
Item.damage = 483;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.useTime = Item.useAnimation = 20;
|
||||
Item.shootSpeed = 7f;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 50;
|
||||
Item.damage = 60;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 10;
|
||||
Item.width = 54;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public class VoidVortex : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Magic";
|
||||
public const int OrbFireRate = 16;
|
||||
public const int OrbFireRate = 20;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 112;
|
||||
Item.damage = 106;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 60;
|
||||
Item.width = 130;
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.useStyle = ItemUseStyleID.Rapier;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = 10;
|
||||
Item.useTime = 10;
|
||||
Item.useAnimation = 13;
|
||||
Item.useTime = 13;
|
||||
Item.width = 44;
|
||||
Item.height = 44;
|
||||
Item.damage = 190;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 18;
|
||||
Item.damage = 198;
|
||||
Item.damage = 207;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
|
||||
@@ -36,8 +36,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
|
||||
Item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
||||
Item.rare = ModContent.RarityType<DarkBlue>();
|
||||
Item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
||||
Item.rare = ModContent.RarityType<Violet>();
|
||||
Item.Calamity().donorItem = true;
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<NadirSpear>();
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 16;
|
||||
Item.height = 16;
|
||||
Item.damage = 60;
|
||||
Item.damage = 78;
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.NewProjectile(source, position.X, position.Y, velocity.X * 0.5f, velocity.Y * 0.5f, type, (int)(damage * 1.3f), knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(source, position.X, position.Y, velocity.X * 0.5f, velocity.Y * 0.5f, type, (int)(damage * 1.1f), knockback, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 60;
|
||||
Item.damage = 177;
|
||||
Item.damage = 232;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.autoReuse = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -97,4 +97,4 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 20;
|
||||
Item.damage = 14;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 38;
|
||||
Item.height = 68;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 62;
|
||||
Item.height = 34;
|
||||
Item.damage = 857;
|
||||
Item.damage = 1020;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 30;
|
||||
Item.useAnimation = 30;
|
||||
|
||||
@@ -26,11 +26,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 130;
|
||||
Item.damage = 162;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 124;
|
||||
Item.height = 78;
|
||||
|
||||
Item.useTime = 9;
|
||||
Item.useAnimation = 18;
|
||||
Item.reuseDelay = BetweenShotsPause;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 55;
|
||||
Item.damage = 67;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 104;
|
||||
Item.height = 42;
|
||||
|
||||
@@ -13,12 +13,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 17;
|
||||
Item.damage = 31;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 40;
|
||||
Item.height = 72;
|
||||
Item.useTime = 30;
|
||||
Item.useAnimation = 30;
|
||||
Item.useTime = 41;
|
||||
Item.useAnimation = 41;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 1.5f;
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.UseSound = SoundID.Item5;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ProjectileID.WoodenArrowFriendly;
|
||||
Item.shootSpeed = 16f;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.useAmmo = AmmoID.Arrow;
|
||||
Item.Calamity().canFirePointBlankShots = true;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num117 = 0.314159274f;
|
||||
int num118 = 4;
|
||||
int num118 = 3;
|
||||
Vector2 vector7 = velocity;
|
||||
vector7.Normalize();
|
||||
vector7 *= 50f;
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
AddIngredient<EssenceofSunlight>(5).
|
||||
AddIngredient(ItemID.LivingFireBlock, 50).
|
||||
AddIngredient(ItemID.Obsidian, 10).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 300;
|
||||
Item.damage = 221;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 138;
|
||||
Item.height = 176;
|
||||
@@ -76,4 +76,4 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 56;
|
||||
Item.damage = 37;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 26;
|
||||
Item.height = 70;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 121;
|
||||
Item.damage = 152;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 46;
|
||||
Item.height = 78;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 40;
|
||||
Item.damage = 51;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 64;
|
||||
Item.height = 32;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 90;
|
||||
Item.damage = 100;
|
||||
Item.knockBack = 4f;
|
||||
Item.shootSpeed = 16f;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -55,11 +55,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Starfleet>().
|
||||
AddIngredient<StarSputter>().
|
||||
AddIngredient<BarracudaGun>().
|
||||
AddIngredient<AscendantSpiritEssence>().
|
||||
AddIngredient<CosmiliteBar>(5).
|
||||
AddIngredient<Lumenyl>(10).
|
||||
AddIngredient<DarksunFragment>(10).
|
||||
AddIngredient<ExodiumCluster>(15).
|
||||
AddTile(ModContent.TileType<CosmicAnvil>()).
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.Flamethrower).
|
||||
AddIngredient<Meowthrower>().
|
||||
AddIngredient<LivingShard>(7).
|
||||
AddIngredient<LivingShard>(12).
|
||||
AddIngredient<EssenceofSunlight>(5).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 80;
|
||||
Item.damage = 60;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.width = 62;
|
||||
Item.height = 30;
|
||||
Item.useTime = 21;
|
||||
Item.useAnimation = 21;
|
||||
Item.useTime = 34;
|
||||
Item.useAnimation = 34;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 3.5f;
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -14,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 564;
|
||||
Item.damage = 540;
|
||||
Item.knockBack = 3.5f;
|
||||
Item.useAnimation = Item.useTime = 21;
|
||||
Item.autoReuse = true;
|
||||
@@ -43,6 +44,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) => Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>(Texture + "Glow").Value);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
|
After Width: | Height: | Size: 853 B |
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = 62;
|
||||
Item.height = 58;
|
||||
Item.damage = 563;
|
||||
Item.damage = 620;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.autoReuse = true;
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
public override float StealthDamageMultiplier => 0.5f;
|
||||
public override float StealthDamageMultiplier => 0.75f;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 64;
|
||||
Item.damage = 188;
|
||||
Item.damage = 225;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useTime = 3;
|
||||
@@ -41,19 +41,15 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/ExecutionersBladeGlow").Value);
|
||||
}
|
||||
public override bool AdditionalStealthCheck() => counter == 0;
|
||||
public override float StealthDamageMultiplier => 0.6f;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
bool usingStealth = player.Calamity().StealthStrikeAvailable() && counter == 0;
|
||||
bool usingStealth = player.Calamity().StealthStrikeAvailable();
|
||||
|
||||
int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
||||
if (usingStealth && stealth.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
|
||||
counter++;
|
||||
if (counter >= Item.useAnimation / Item.useTime)
|
||||
counter = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 52;
|
||||
Item.height = 48;
|
||||
Item.width = 54;
|
||||
Item.height = 54;
|
||||
Item.damage = 55; //33
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -5,6 +5,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Particles;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
@@ -45,23 +46,23 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
}
|
||||
else
|
||||
{
|
||||
int utensil = ModContent.ProjectileType<Fork>();
|
||||
type = ModContent.ProjectileType<Fork>();
|
||||
double dmgMult = 1D;
|
||||
float kbMult = 1f;
|
||||
switch (Main.rand.Next(3))
|
||||
switch (counter)
|
||||
{
|
||||
case 0:
|
||||
utensil = ModContent.ProjectileType<Fork>();
|
||||
type = ModContent.ProjectileType<Fork>();
|
||||
dmgMult = 1.1;
|
||||
kbMult = 2f;
|
||||
break;
|
||||
case 1:
|
||||
utensil = ModContent.ProjectileType<Knife>();
|
||||
type = ModContent.ProjectileType<Knife>();
|
||||
dmgMult = 1.2;
|
||||
kbMult = 1f;
|
||||
break;
|
||||
case 2:
|
||||
utensil = ModContent.ProjectileType<CarvingFork>();
|
||||
type = ModContent.ProjectileType<CarvingFork>();
|
||||
dmgMult = 1D;
|
||||
kbMult = 1f;
|
||||
break;
|
||||
@@ -70,7 +71,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
}
|
||||
damage = (int)(damage * dmgMult);
|
||||
knockback = knockback * kbMult;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
@@ -80,9 +82,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
int idx = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
||||
if (idx.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[idx].Calamity().stealthStrike = mp.StealthStrikeAvailable();
|
||||
|
||||
counter++;
|
||||
if (counter == 3)
|
||||
if (counter >= 3)
|
||||
counter = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
public new string LocalizationCategory => "Items.Weapons.Summon";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 7;
|
||||
Item.damage = 9;
|
||||
Item.mana = 10;
|
||||
Item.width = 58;
|
||||
Item.height = 64;
|
||||
|
||||