This commit is contained in:
Andrew Marheine committed 2020-01-22 16:17:19 -06:00
commit 044dfced0c
9 files changed
+72 -177

No files matched your search

+35 -162
View File
@@ -6532,186 +6532,59 @@ namespace CalamityMod.CalPlayer
player.palladiumRegen = false;
player.iceBarrier = false;
player.crystalLeaf = false;
PlayerDeathReason damageSource = PlayerDeathReason.ByOther(player.Male ? 14 : 15);
if (abyssDeath)
{
if (Main.rand.NextBool(2))
{
PlayerDeathReason damageSource = PlayerDeathReason.ByCustomReason(player.name + " is food for the Wyrms.");
NetworkText deathText = damageSource.GetDeathText(player.name);
if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer)
{
NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1);
}
if (Main.netMode == NetmodeID.Server)
{
NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1);
}
else if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.NewText(deathText.ToString(), 225, 25, 25, false);
}
if (player.whoAmI == Main.myPlayer && player.difficulty == 0)
{
player.DropCoins();
}
player.DropTombstone(coinsOwned, deathText, 0);
damageSource = PlayerDeathReason.ByCustomReason(player.name + " is food for the Wyrms.");
}
else
{
PlayerDeathReason damageSource = PlayerDeathReason.ByCustomReason("Oxygen failed to reach " + player.name + " from the depths of the Abyss.");
NetworkText deathText = damageSource.GetDeathText(player.name);
if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer)
{
NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1);
}
if (Main.netMode == NetmodeID.Server)
{
NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1);
}
else if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.NewText(deathText.ToString(), 225, 25, 25, false);
}
if (player.whoAmI == Main.myPlayer && player.difficulty == 0)
{
player.DropCoins();
}
player.DropTombstone(coinsOwned, deathText, 0);
damageSource = PlayerDeathReason.ByCustomReason("Oxygen failed to reach " + player.name + " from the depths of the Abyss.");
}
}
else if (specialDeath)
{
PlayerDeathReason damageSource = PlayerDeathReason.ByCustomReason(player.name + " was defeated.");
NetworkText deathText = damageSource.GetDeathText(player.name);
if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer)
{
NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1);
}
if (Main.netMode == NetmodeID.Server)
{
NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1);
}
else if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.NewText(deathText.ToString(), 225, 25, 25, false);
}
if (player.whoAmI == Main.myPlayer && player.difficulty == 0)
{
player.DropCoins();
}
player.DropTombstone(coinsOwned, deathText, 0);
}
else if (SCalLore)
{
PlayerDeathReason damageSource = PlayerDeathReason.ByCustomReason(player.Male ? player.name + " was consumed by his inner hatred." : player.name + " was consumed by her inner hatred.");
NetworkText deathText = damageSource.GetDeathText(player.name);
if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer)
{
NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1);
}
if (Main.netMode == NetmodeID.Server)
{
NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1);
}
else if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.NewText(deathText.ToString(), 225, 25, 25, false);
}
if (player.whoAmI == Main.myPlayer && player.difficulty == 0)
{
player.DropCoins();
}
player.DropTombstone(coinsOwned, deathText, 0);
}
else if (CalamityWorld.armageddon && areThereAnyDamnBosses)
{
PlayerDeathReason damageSource = PlayerDeathReason.ByCustomReason(player.name + " failed the challenge at hand.");
NetworkText deathText = damageSource.GetDeathText(player.name);
if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer)
{
NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1);
}
if (Main.netMode == NetmodeID.Server)
{
NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1);
}
else if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.NewText(deathText.ToString(), 225, 25, 25, false);
}
if (player.whoAmI == Main.myPlayer && player.difficulty == 0)
{
player.DropCoins();
}
player.DropTombstone(coinsOwned, deathText, 0);
}
else if (CalamityWorld.bossRushActive && bossRushImmunityFrameCurseTimer > 0)
{
PlayerDeathReason damageSource = PlayerDeathReason.ByCustomReason(player.name + " was destroyed by a mysterious force.");
NetworkText deathText = damageSource.GetDeathText(player.name);
if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer)
{
NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1);
}
if (Main.netMode == NetmodeID.Server)
{
NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1);
}
else if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.NewText(deathText.ToString(), 225, 25, 25, false);
}
if (player.whoAmI == Main.myPlayer && player.difficulty == 0)
{
player.DropCoins();
}
player.DropTombstone(coinsOwned, deathText, 0);
damageSource = PlayerDeathReason.ByCustomReason(player.name + " was defeated.");
}
else if (CalamityWorld.death && deathModeBlizzardTime > 1980)
{
deathModeBlizzardTime = 0;
PlayerDeathReason damageSource = PlayerDeathReason.ByCustomReason(player.name + " was chilled to the bone by the frigid environment.");
NetworkText deathText = damageSource.GetDeathText(player.name);
if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer)
{
NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1);
}
if (Main.netMode == NetmodeID.Server)
{
NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1);
}
else if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.NewText(deathText.ToString(), 225, 25, 25, false);
}
if (player.whoAmI == Main.myPlayer && player.difficulty == 0)
{
player.DropCoins();
}
player.DropTombstone(coinsOwned, deathText, 0);
damageSource = PlayerDeathReason.ByCustomReason(player.name + " was chilled to the bone by the frigid environment.");
}
else
else if (SCalLore)
{
PlayerDeathReason damageSource = PlayerDeathReason.ByOther(player.Male ? 14 : 15);
NetworkText deathText = damageSource.GetDeathText(player.name);
if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer)
{
NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1);
}
if (Main.netMode == NetmodeID.Server)
{
NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1);
}
else if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.NewText(deathText.ToString(), 225, 25, 25, false);
}
if (player.whoAmI == Main.myPlayer && player.difficulty == 0)
{
player.DropCoins();
}
player.DropTombstone(coinsOwned, deathText, 0);
damageSource = PlayerDeathReason.ByCustomReason(player.Male ? player.name + " was consumed by his inner hatred." : player.name + " was consumed by her inner hatred.");
}
else if (CalamityWorld.armageddon && areThereAnyDamnBosses)
{
damageSource = PlayerDeathReason.ByCustomReason(player.name + " failed the challenge at hand.");
}
else if (CalamityWorld.bossRushActive && bossRushImmunityFrameCurseTimer > 0)
{
damageSource = PlayerDeathReason.ByCustomReason(player.name + " was destroyed by a mysterious force.");
}
NetworkText deathText = damageSource.GetDeathText(player.name);
if (Main.netMode == NetmodeID.MultiplayerClient && player.whoAmI == Main.myPlayer)
{
NetMessage.SendPlayerDeath(player.whoAmI, damageSource, (int)1000.0, 0, false, -1, -1);
}
if (Main.netMode == NetmodeID.Server)
{
NetMessage.BroadcastChatMessage(deathText, new Color(225, 25, 25), -1);
}
else if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.NewText(deathText.ToString(), 225, 25, 25, false);
}
if (player.whoAmI == Main.myPlayer && player.difficulty == 0)
{
player.DropCoins();
}
player.DropTombstone(coinsOwned, deathText, 0);
if (player.whoAmI == Main.myPlayer)
{
try
+3 -2
View File
@@ -297,7 +297,8 @@ namespace CalamityMod.CalPlayer
player.buffImmune[BuffID.Electrified] = true;
// Reduce breath meter while in icy water instead of chilling
if (player.arcticDivingGear)
bool canBreath = ((modPlayer.sirenBoobs && NPC.downedBoss3) || (modPlayer.sirenBoobsAlt && NPC.downedBoss3) || player.gills || player.merman);
if (player.arcticDivingGear || canBreath)
{
player.buffImmune[ModContent.BuffType<FrozenLungs>()] = true;
}
@@ -308,7 +309,7 @@ namespace CalamityMod.CalPlayer
player.buffImmune[BuffID.Chilled] = true;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
{
if (Main.myPlayer == player.whoAmI && !player.gills && !player.merman)
if (Main.myPlayer == player.whoAmI)
{
player.AddBuff(ModContent.BuffType<FrozenLungs>(), 2, false);
}
+2 -1
View File
@@ -12,7 +12,8 @@ namespace CalamityMod.Items.Weapons.Summon
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Guidelight of Oblivion");
Tooltip.SetDefault("Summons a lantern turret to fight for you");
Tooltip.SetDefault("Shadows dream of endless fire, flames devour and embers swoop\n" +
"Summons a lantern turret to fight for you");
}
public override void SetDefaults()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+2 -1
View File
@@ -34,6 +34,8 @@ namespace CalamityMod.Projectiles.Summon
projectile.minion = true;
projectile.tileCollide = false;
projectile.extraUpdates = 1;
projectile.usesIDStaticNPCImmunity = true;
projectile.idStaticNPCHitCooldown = 4;
}
public override void AI()
@@ -260,7 +262,6 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.immune[projectile.owner] = 4;
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
target.AddBuff(ModContent.BuffType<Plague>(), 120);
+14 -7
View File
@@ -3,10 +3,13 @@ using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Buffs.DamageOverTime;
namespace CalamityMod.Projectiles.Summon
{
public class LanternFlame : ModProjectile
{
private bool playSound = true;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Flame");
@@ -28,14 +31,14 @@ namespace CalamityMod.Projectiles.Summon
public override void AI()
{
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.5f / 255f, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.65f / 255f);
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 1f / 255f, 0f, 0f);
projectile.frameCounter++;
if (projectile.frameCounter > 4)
{
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame > 3)
if (projectile.frame >= 4)
{
projectile.frame = 0;
}
@@ -113,10 +116,9 @@ namespace CalamityMod.Projectiles.Summon
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 10;
projectile.Damage();
Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 74);
for (int num621 = 0; num621 < 10; num621++)
{
int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default, 2f);
int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 127, 0f, 0f, 100, default, 2f);
Main.dust[num622].velocity *= 3f;
if (Main.rand.NextBool(2))
{
@@ -126,17 +128,22 @@ namespace CalamityMod.Projectiles.Summon
}
for (int num623 = 0; num623 < 15; num623++)
{
int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default, 3f);
int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 127, 0f, 0f, 100, default, 3f);
Main.dust[num624].noGravity = true;
Main.dust[num624].velocity *= 5f;
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default, 2f);
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 127, 0f, 0f, 100, default, 2f);
Main.dust[num624].velocity *= 2f;
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.ShadowFlame, 180);
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 180);
if (playSound)
{
Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 74);
}
playSound = false;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 822 B

+16 -4
View File
@@ -7,11 +7,12 @@ namespace CalamityMod.Projectiles.Summon
{
public class LanternSoul : ModProjectile
{
public float count = 0;
public float count = 0f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Lantern");
Main.projFrames[projectile.type] = 4;
ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true;
}
@@ -28,13 +29,24 @@ namespace CalamityMod.Projectiles.Summon
public override void AI()
{
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.5f / 255f, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.65f / 255f);
Lighting.AddLight(projectile.Center, 1f, 0f, 0f);
projectile.frameCounter++;
if (projectile.frameCounter > 4)
{
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame >= 4)
{
projectile.frame = 0;
}
Player player = Main.player[projectile.owner];
if (projectile.localAI[0] == 0f)
if (count == 0f)
{
projectile.Calamity().spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f);
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
projectile.localAI[0] += 1f;
count += 1f;
}
if ((player.allDamage + player.minionDamage - 1f) != projectile.Calamity().spawnedPlayerMinionDamageValue)
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

After

Width:  |  Height:  |  Size: 2.1 KiB