Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
This commit is contained in:
commit
55a623ef99
6 files changed
+22
-14
No files matched your search
@@ -577,6 +577,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool chaliceOfTheBloodGod = false;
|
||||
public double chaliceBleedoutBuffer = 0D;
|
||||
public double chaliceDamagePointPartialProgress = 0D;
|
||||
public int chaliceHitOriginalDamage = 0;
|
||||
public bool elementalHeart = false;
|
||||
public bool crownJewel = false;
|
||||
public bool infectedJewel = false;
|
||||
@@ -2611,6 +2612,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
chaliceBleedoutBuffer = 0D;
|
||||
chaliceDamagePointPartialProgress = 0D;
|
||||
chaliceHitOriginalDamage = 0;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
|
||||
@@ -1978,6 +1978,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
int bleedoutToApply = info.Damage - ChaliceOfTheBloodGod.MinAllowedDamage;
|
||||
chaliceBleedoutBuffer += bleedoutToApply;
|
||||
chaliceHitOriginalDamage = info.Damage;
|
||||
info.Damage = ChaliceOfTheBloodGod.MinAllowedDamage;
|
||||
|
||||
// Defense damage is applied here.
|
||||
@@ -2954,11 +2955,20 @@ namespace CalamityMod.CalPlayer
|
||||
return;
|
||||
}
|
||||
|
||||
// 19MAR2024: Ozzatron: Chalice makes you lose adrenaline based on the damage you would have suffered in total.
|
||||
int damageToUse = hurtInfo.Damage;
|
||||
if (chaliceOfTheBloodGod && chaliceHitOriginalDamage > 0)
|
||||
{
|
||||
damageToUse = chaliceHitOriginalDamage;
|
||||
// Maybe at some point in the future, tracking this value will be useful elsewhere. Until then, it's only used here, so it is reset here.
|
||||
chaliceHitOriginalDamage = 0;
|
||||
}
|
||||
|
||||
// Calculate the amount of Adrenaline to lose. This is done in 3 steps:
|
||||
// 1. Find out how much %HP the player lost (or was absorbed by a shield).
|
||||
// 2. Use an inverse lerp to calculate the Adrenaline loss scaling down for very small hits (5% HP or less).
|
||||
// 3. Re-scale the lerp result into a % of Adrenaline loss from 10% (min loss) to 100%.
|
||||
float damageMaxHPRatio = (float)hurtInfo.Damage / Player.statLifeMax2;
|
||||
float damageMaxHPRatio = (float)damageToUse / Player.statLifeMax2;
|
||||
float smallHitAdrenalineLossRatio = (float)Utils.GetLerpValue(0f, BalancingConstants.AdrenalineFalloffTinyHitHealthRatio, damageMaxHPRatio, true);
|
||||
float adrenalineLossFraction = MathHelper.Lerp(BalancingConstants.MinimumAdrenalineLoss, 1f, smallHitAdrenalineLossRatio);
|
||||
float adrenalineToLose = adrenaline * adrenalineLossFraction;
|
||||
|
||||
@@ -26,12 +26,12 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
Item.width = 50;
|
||||
Item.height = 52;
|
||||
Item.damage = 200;
|
||||
Item.damage = 229;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 18;
|
||||
Item.useTime = 7;
|
||||
Item.useAnimation = 22;
|
||||
Item.reuseDelay = 45;
|
||||
Item.reuseDelay = 40;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 5f;
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
SoundEngine.PlaySound(fire with { Volume = 0.2f, Pitch = 0.95f }, position);
|
||||
position = position + velocity.RotatedBy(-0.75f * player.direction) * 1.8f;
|
||||
|
||||
Projectile.NewProjectile(source, position, velocity.RotatedByRandom(0.025f), type, damage, knockback, player.whoAmI, 0f, Counter == 4 ? 1 : 0);
|
||||
Projectile.NewProjectile(source, position, velocity.RotatedByRandom(0.025f), type, (int)(damage * (1 + (Counter - 1) * 0.2)), knockback, player.whoAmI, 0f, Counter == 4 ? 1 : 0);
|
||||
if (Counter >= 4)
|
||||
Counter = 0;
|
||||
|
||||
|
||||
@@ -900,9 +900,9 @@ Viscera: {
|
||||
DisplayName: Viscera
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a rapid barrage of piercing blood beams
|
||||
Fires a rapid barrage of piercing blood beams that heal you on enemy hit
|
||||
Each successive beam in the barrage deals more damage
|
||||
The last beam of the barrage instead explodes upon hitting an enemy
|
||||
Blood beams heal you on enemy hit
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = DamageClass.Magic;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.penetrate = 6;
|
||||
Projectile.penetrate = 7;
|
||||
Projectile.MaxUpdates = 100;
|
||||
Projectile.timeLeft = 900;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
@@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
GeneralParticleHandler.SpawnParticle(blood);
|
||||
}
|
||||
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<VisceraBoom>(), (int)(Projectile.damage * 0.85f), Projectile.knockBack * 4, Projectile.owner, 0f, Projectile.ai[1]);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<VisceraBoom>(), (int)(Projectile.damage * 0.75f), Projectile.knockBack * 4, Projectile.owner, 0f, Projectile.ai[1]);
|
||||
|
||||
Particle bloodsplosion = new CustomPulse(Projectile.Center, Vector2.Zero, Color.DarkRed, "CalamityMod/Particles/DetailedExplosion", Vector2.One, Main.rand.NextFloat(-15f, 15f), 0.16f, 0.87f, (int)(Viscera.BoomLifetime * 0.38f), false);
|
||||
GeneralParticleHandler.SpawnParticle(bloodsplosion);
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Particles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using static System.TimeZoneInfo;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
@@ -39,12 +35,12 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 180);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 90);
|
||||
target.AddBuff(ModContent.BuffType<BurningBlood>(), 180);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user