Updated remaining healing to use HealPlayer
This commit is contained in:
1 parent
d8423ee9b8
commit
b2bf93cfbe
20 files changed
+26
-75
No files matched your search
@@ -2251,15 +2251,13 @@ namespace CalamityMod.CalPlayer
|
||||
if (daedalusAbsorb && Main.rand.NextBool(10))
|
||||
{
|
||||
int healAmt = (int)(hurtInfo.Damage / 2D);
|
||||
Player.statLife += healAmt;
|
||||
Player.HealEffect(healAmt);
|
||||
Player.HealPlayer(healAmt);
|
||||
}
|
||||
|
||||
if (absorber)
|
||||
{
|
||||
int healAmt = (int)(hurtInfo.Damage / 20D);
|
||||
Player.statLife += healAmt;
|
||||
Player.HealEffect(healAmt);
|
||||
Player.HealPlayer(healAmt);
|
||||
}
|
||||
|
||||
if (witheringDamageDone > 0)
|
||||
@@ -2268,8 +2266,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (healCompenstationRatio > 1D)
|
||||
healCompenstationRatio = 1D;
|
||||
int healCompensation = (int)(healCompenstationRatio * hurtInfo.Damage);
|
||||
Player.statLife += (int)(healCompenstationRatio * hurtInfo.Damage);
|
||||
Player.HealEffect(healCompensation);
|
||||
Player.HealPlayer((int)(healCompenstationRatio * hurtInfo.Damage));
|
||||
Player.AddBuff(ModContent.BuffType<Withered>(), 1080);
|
||||
witheringDamageDone = 0;
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.whoAmI == Main.myPlayer && Player.miscCounter % 15 == 0) // Flat 4 health per second
|
||||
{
|
||||
if (!noLifeRegen)
|
||||
Player.statLife += 1;
|
||||
Player.HealPlayer(1, HealTextType.None);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ namespace CalamityMod.CalPlayer
|
||||
bloodfinTimer = 30;
|
||||
|
||||
if (Player.statLife < (int)(Player.statLifeMax2 * 0.75) && !noLifeRegen)
|
||||
Player.statLife += 1;
|
||||
Player.HealPlayer(1, HealTextType.None);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -752,7 +752,7 @@ namespace CalamityMod.CalPlayer
|
||||
reaverRegenCooldown = 0;
|
||||
|
||||
if (Player.statLife != Player.statLifeMax2 && !noLifeRegen)
|
||||
Player.statLife += 1;
|
||||
Player.HealPlayer(1, HealTextType.None);
|
||||
}
|
||||
|
||||
if (BloomStoneRegen)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -563,8 +564,7 @@ namespace CalamityMod.DataStructures
|
||||
{
|
||||
if (!player.moonLeech)
|
||||
{
|
||||
player.statLife += OmegaBiomeBlade.SuperPogoAttunement_PassiveLifeSteal;
|
||||
player.HealEffect(OmegaBiomeBlade.SuperPogoAttunement_PassiveLifeSteal);
|
||||
player.HealPlayer(OmegaBiomeBlade.SuperPogoAttunement_PassiveLifeSteal);
|
||||
}
|
||||
|
||||
Procced = false;
|
||||
|
||||
@@ -616,9 +616,7 @@ namespace CalamityMod.Items
|
||||
bool boostedHeart = player.Calamity().photosynthesis;
|
||||
if (boostedHeart)
|
||||
{
|
||||
player.statLife += 5;
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
player.HealEffect(5, true);
|
||||
player.HealPlayer(5);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -35,12 +35,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int healAmount = (int)Projectile.ai[1];
|
||||
Main.player[playerTracker].HealEffect(healAmount, false);
|
||||
Main.player[playerTracker].statLife += healAmount;
|
||||
if (Main.player[playerTracker].statLife > Main.player[playerTracker].statLifeMax2)
|
||||
{
|
||||
Main.player[playerTracker].statLife = Main.player[playerTracker].statLifeMax2;
|
||||
}
|
||||
Main.player[playerTracker].HealPlayer(healAmount);
|
||||
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, playerTracker, (float)healAmount, 0f, 0f, 0, 0, 0);
|
||||
}
|
||||
Projectile.Kill();
|
||||
|
||||
@@ -104,8 +104,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
if (!cannotLifesteal) //trolled
|
||||
{
|
||||
Owner.statLife += BrokenBiomeBlade.EvilAttunement_Lifesteal;
|
||||
Owner.HealEffect(BrokenBiomeBlade.EvilAttunement_Lifesteal); //Idk if its too much or what but at the same time its close range as fuck
|
||||
Owner.HealPlayer(BrokenBiomeBlade.EvilAttunement_Lifesteal); //Idk if its too much or what but at the same time its close range as fuck
|
||||
}
|
||||
|
||||
// Bounce off
|
||||
|
||||
@@ -264,10 +264,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
int heal = (int)(MathHelper.Clamp(80 - Projectile.numHits * 40, 1, 80));
|
||||
if (Projectile.numHits < 30)
|
||||
{
|
||||
Owner.statLife += heal;
|
||||
Owner.HealEffect(heal);
|
||||
if (Owner.statLife > Owner.statLifeMax2)
|
||||
Owner.statLife = Owner.statLifeMax2;
|
||||
Owner.HealPlayer(heal);
|
||||
}
|
||||
|
||||
if (Projectile.numHits <= 2)
|
||||
|
||||
@@ -31,8 +31,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
if (Mode == 0f && Main.rand.NextFloat() < FourSeasonsGalaxia.CancerPassiveLifeStealProc)
|
||||
{
|
||||
Owner.statLife += FourSeasonsGalaxia.CancerPassiveLifeSteal;
|
||||
Owner.HealEffect(FourSeasonsGalaxia.CancerPassiveLifeSteal);
|
||||
Owner.HealPlayer(FourSeasonsGalaxia.CancerPassiveLifeSteal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -219,10 +219,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
int heal = (int)(MathHelper.Clamp(20 - Projectile.numHits * 5, 1, 20));
|
||||
if (Projectile.numHits < 20)
|
||||
{
|
||||
Owner.statLife += heal;
|
||||
Owner.HealEffect(heal);
|
||||
if (Owner.statLife > Owner.statLifeMax2)
|
||||
Owner.statLife = Owner.statLifeMax2;
|
||||
Owner.HealPlayer(heal);
|
||||
}
|
||||
|
||||
if (target.CanBeMoved(true) || Main.zenithWorld || target.type == ModContent.NPCType<PrimordialWyrmHead>() || (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs))
|
||||
|
||||
@@ -208,10 +208,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
int heal = (int)(MathHelper.Clamp(3 - Projectile.numHits, 1, 3));
|
||||
if (Projectile.numHits < 3)
|
||||
{
|
||||
Owner.statLife += heal;
|
||||
Owner.HealEffect(heal);
|
||||
if (Owner.statLife > Owner.statLifeMax2)
|
||||
Owner.statLife = Owner.statLifeMax2;
|
||||
Owner.HealPlayer(heal);
|
||||
}
|
||||
|
||||
int points = 4;
|
||||
|
||||
@@ -183,10 +183,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
int heal = (int)(MathHelper.Clamp(5 - Projectile.numHits * 3, 1, 5));
|
||||
if (Projectile.numHits < 5)
|
||||
{
|
||||
Owner.statLife += heal;
|
||||
Owner.HealEffect(heal);
|
||||
if (Owner.statLife > Owner.statLifeMax2)
|
||||
Owner.statLife = Owner.statLifeMax2;
|
||||
Owner.HealPlayer(heal);
|
||||
}
|
||||
|
||||
if (target.CanBeMoved(true))
|
||||
|
||||
@@ -154,8 +154,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
if (!cannotLifesteal) //trolled
|
||||
{
|
||||
Owner.statLife += TrueBiomeBlade.EvilAttunement_Lifesteal;
|
||||
Owner.HealEffect(TrueBiomeBlade.EvilAttunement_Lifesteal); //Idk if its too much or what but at the same time its close range as fuck
|
||||
Owner.HealPlayer(TrueBiomeBlade.EvilAttunement_Lifesteal); //Idk if its too much or what but at the same time its close range as fuck
|
||||
}
|
||||
|
||||
// Bounce off
|
||||
|
||||
@@ -59,8 +59,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Owner.moonLeech)
|
||||
return;
|
||||
|
||||
Owner.statLife += OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal;
|
||||
Owner.HealEffect(OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal);
|
||||
Owner.HealPlayer(OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor) //OMw to reuse way too much code from the entangling vines
|
||||
|
||||
@@ -76,15 +76,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
continue;
|
||||
//Main.PlaySound(7, (int)player.position.X, (int)player.position.Y, 1);
|
||||
//player.statLife += 20;
|
||||
//if (Main.myPlayer == player.whoAmI)
|
||||
//{
|
||||
// player.HealEffect(20, true);
|
||||
//}
|
||||
//if (player.statLife > player.statLifeMax2)
|
||||
//{
|
||||
// player.statLife = player.statLifeMax2;
|
||||
//}
|
||||
//player.HealPlayer(20);
|
||||
//Main.item[itemIndex] = new Item();
|
||||
//if (Main.netMode == 1)
|
||||
//{
|
||||
|
||||
@@ -207,10 +207,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
|
||||
Main.player[Main.myPlayer].lifeSteal -= heal;
|
||||
player.statLife += heal;
|
||||
player.HealEffect(heal);
|
||||
if (Main.player[Projectile.owner].statLife > Main.player[Projectile.owner].statLifeMax2)
|
||||
Main.player[Projectile.owner].statLife = Main.player[Projectile.owner].statLifeMax2;
|
||||
player.HealPlayer(heal);
|
||||
}
|
||||
|
||||
Projectile.Kill();
|
||||
|
||||
@@ -268,10 +268,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
|
||||
int heal = 25;
|
||||
Owner.statLife += heal;
|
||||
Owner.HealEffect(heal);
|
||||
if (Owner.statLife > Owner.statLifeMax2)
|
||||
Owner.statLife = Owner.statLifeMax2;
|
||||
Owner.HealPlayer(heal);
|
||||
|
||||
spawnPullBlood = false;
|
||||
}
|
||||
|
||||
@@ -64,10 +64,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
|
||||
Main.player[Main.myPlayer].lifeSteal -= heal;
|
||||
Owner.HealEffect(heal);
|
||||
Owner.statLife += heal;
|
||||
if (Owner.statLife > Owner.statLifeMax2)
|
||||
Owner.statLife = Owner.statLifeMax2;
|
||||
Owner.HealPlayer(heal);
|
||||
}
|
||||
|
||||
Projectile.Kill();
|
||||
|
||||
@@ -40,10 +40,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
if (targetDist < 200f * areaScale && time % 6 == 0)
|
||||
{
|
||||
player.statLife += 1;
|
||||
player.HealEffect(1);
|
||||
if (player.statLife > player.statLifeMax2)
|
||||
player.statLife = player.statLifeMax2;
|
||||
player.HealPlayer(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,8 +57,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
continue;
|
||||
|
||||
int healQuantity = (int)owner.GetBestClassDamage().ApplyTo(ChlorophyteArmorSetChange.AmountToHealPerPulse);
|
||||
player.statLife += healQuantity;
|
||||
player.HealEffect(healQuantity);
|
||||
player.HealPlayer(healQuantity);
|
||||
player.Calamity().ChlorophyteHealDelay = ChlorophyteArmorSetChange.DelayBetweenHeals;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -652,7 +652,7 @@ namespace CalamityMod
|
||||
healAmt = 0;
|
||||
}
|
||||
|
||||
player.statLife += healAmt;
|
||||
player.HealPlayer(healAmt, healAmt > 0 ? Enums.HealTextType.Broadcast : Enums.HealTextType.None);
|
||||
player.statMana += item.healMana;
|
||||
if (player.statMana > player.statManaMax2)
|
||||
{
|
||||
@@ -666,8 +666,6 @@ namespace CalamityMod
|
||||
player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true);
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
if (healAmt > 0)
|
||||
player.HealEffect(healAmt, true);
|
||||
if (item.healMana > 0)
|
||||
player.ManaEffect(item.healMana);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user