This commit is contained in:
Dominic committed 2022-03-18 21:24:29 -05:00
commit a8ef8b3b87
50 files changed
+102 -40

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.Buffs.StatBuffs
// Otherwise, Rage Mode ends instantly.
else
{
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/RageEnd"), player.position);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/RageEnd"), player.position);
player.DelBuff(buffIndex--); // TML documentation requires you to decrement buffIndex if deleting the buff during Update.
mp.rageModeActive = false;
mp.rage = 0f;
+12 -12
View File
@@ -2895,7 +2895,7 @@ namespace CalamityMod.CalPlayer
{
int seconds = CalamityUtils.SecondsToFrames(15f);
player.AddBuff(ModContent.BuffType<Buffs.StatBuffs.DivineBless>(), seconds, false);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AngelicAllianceActivation"), player.Center);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/AngelicAllianceActivation"), player.Center);
// Spawn an archangel for every minion you have
float angelAmt = 0f;
@@ -3003,7 +3003,7 @@ namespace CalamityMod.CalPlayer
{
brimflameFrenzy = true;
player.AddBuff(ModContent.BuffType<BrimflameFrenzyBuff>(), 10 * 60, true);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/BrimflameAbility"), player.Center);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/AbilitySounds/BrimflameAbility"), player.Center);
for (int num502 = 0; num502 < 36; num502++)
{
int dust = Dust.NewDust(new Vector2(player.position.X, player.position.Y + 16f), player.width, player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
@@ -3036,7 +3036,7 @@ namespace CalamityMod.CalPlayer
if (player.whoAmI == Main.myPlayer)
player.AddCooldown(BloodflareRangedSet.ID, 1800);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/BloodflareRangerActivation"), player.Center);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/BloodflareRangerActivation"), player.Center);
for (int d = 0; d < 64; d++)
{
int dust = Dust.NewDust(new Vector2(player.position.X, player.position.Y + 16f), player.width, player.height - 16, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f);
@@ -3083,7 +3083,7 @@ namespace CalamityMod.CalPlayer
player.AddBuff(ModContent.BuffType<AbyssalMadness>(), 300, false);
}
player.AddCooldown(OmegaBlue.ID, 1800);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/OmegaBlueAbility"), player.Center);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/OmegaBlueAbility"), player.Center);
for (int i = 0; i < 66; i++)
{
int d = Dust.NewDust(player.position, player.width, player.height, 20, 0, 0, 100, Color.Transparent, 2.6f);
@@ -3095,7 +3095,7 @@ namespace CalamityMod.CalPlayer
}
if (dsSetBonus)
{
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/DemonshadeEnrage"), player.Center);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/DemonshadeEnrage"), player.Center);
for (int num502 = 0; num502 < 36; num502++)
{
int dust = Dust.NewDust(new Vector2(player.position.X, player.position.Y + 16f), player.width, player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
@@ -3131,7 +3131,7 @@ namespace CalamityMod.CalPlayer
}
if (plagueReaper && !player.HasCooldown(PlagueBlackout.ID))
{
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/PlagueReaperAbility"), player.Center);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/PlagueReaperAbility"), player.Center);
player.AddCooldown(PlagueBlackout.ID, 1800);
}
if (forbiddenCirclet && forbiddenCooldown <= 0)
@@ -3205,7 +3205,7 @@ namespace CalamityMod.CalPlayer
// Gael's Greatsword replaces Rage Mode with an uber skull attack
if (gaelRageAttackCooldown == 0 && player.ActiveItem().type == ModContent.ItemType<GaelsGreatsword>() && rage > 0f)
{
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), player.Center);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/SilvaDispel"), player.Center);
for (int i = 0; i < 3; i++)
Dust.NewDust(player.position, 120, 120, 218, 0f, 0f, 100, default, 1.5f);
@@ -3249,7 +3249,7 @@ namespace CalamityMod.CalPlayer
player.AddBuff(ModContent.BuffType<RageMode>(), 2);
// Play Rage Activation sound
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/RageActivate"), player.position);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/RageActivate"), player.position);
// TODO -- improve Rage activation visuals
for (int num502 = 0; num502 < 64; num502++)
@@ -3280,7 +3280,7 @@ namespace CalamityMod.CalPlayer
player.AddBuff(ModContent.BuffType<AdrenalineMode>(), AdrenalineDuration);
// Play Adrenaline Activation sound
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AdrenalineActivate"), player.position);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/AdrenalineActivate"), player.position);
// TODO -- improve Adrenaline activation visuals
for (int num502 = 0; num502 < 64; num502++)
@@ -4250,7 +4250,7 @@ namespace CalamityMod.CalPlayer
Main.dust[sVeilDustIndex2].noLight = false;
}
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), player.Center);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/SilvaDispel"), player.Center);
NetMessage.SendData(MessageID.Dodge, -1, -1, null, player.whoAmI, 1f, 0f, 0f, 0, 0, 0);
}
@@ -4324,7 +4324,7 @@ namespace CalamityMod.CalPlayer
player.GiveIFrames(player.longInvince ? 100 : 60, true);
rogueStealth += 0.5f;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaActivation"), player.Center);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/SilvaActivation"), player.Center);
for (int i = 0; i < 10; i++)
{
@@ -4499,7 +4499,7 @@ namespace CalamityMod.CalPlayer
{
if (silvaCountdown == silvaReviveDuration && !hasSilvaEffect)
{
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaActivation"), (int)player.position.X, (int)player.position.Y);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/SilvaActivation"), (int)player.position.X, (int)player.position.Y);
player.AddBuff(ModContent.BuffType<SilvaRevival>(), silvaReviveDuration);
+3 -3
View File
@@ -371,7 +371,7 @@ namespace CalamityMod.CalPlayer
if (playFullRageSound)
{
playFullRageSound = false;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/FullRage"), (int)player.position.X, (int)player.position.Y);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/FullRage"), (int)player.position.X, (int)player.position.Y);
}
}
else
@@ -417,7 +417,7 @@ namespace CalamityMod.CalPlayer
if (playFullAdrenalineSound)
{
playFullAdrenalineSound = false;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/FullAdrenaline"), (int)player.position.X, (int)player.position.Y);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/FullAdrenaline"), (int)player.position.X, (int)player.position.Y);
}
}
else
@@ -1155,7 +1155,7 @@ namespace CalamityMod.CalPlayer
silvaCountdown -= 1;
if (silvaCountdown <= 0)
{
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), player.Center);
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AbilitySounds/SilvaDispel"), player.Center);
player.AddCooldown(SilvaRevive.ID, CalamityUtils.SecondsToFrames(5 * 60));
}
+1 -1
View File
@@ -13,6 +13,6 @@ namespace CalamityMod.Cooldowns
public override Color CooldownStartColor => new Color(216, 60, 90);
public override Color CooldownEndColor => new Color(251, 106, 150);
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/BloodflareRangerRecharge");
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/AbilitySounds/BloodflareRangerRecharge");
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Cooldowns
public override Color CooldownStartColor => Color.Lerp(new Color(107, 6, 6), new Color(228, 78, 78), 1 - instance.Completion);
public override Color CooldownEndColor => Color.Lerp(new Color(107, 6, 6), new Color(228, 78, 78), 1 - instance.Completion);
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/BrimflameRecharge");
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/AbilitySounds/BrimflameRecharge");
//Add red eyes to the icon
+2
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using Terraria.Audio;
namespace CalamityMod.Cooldowns
{
@@ -12,6 +13,7 @@ namespace CalamityMod.Cooldowns
public override Color OutlineColor => outlineColor;
public override Color CooldownStartColor => Color.Lerp(cooldownColorStart, cooldownColorEnd, 1 - instance.Completion);
public override Color CooldownEndColor => Color.Lerp(cooldownColorStart, cooldownColorEnd, 1 - instance.Completion);
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/AbilitySounds/ChaosStateOver");
//It's the same cooldown with different skins each time, basically.
public string skinTexture;
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Cooldowns
public override Color OutlineColor => instance.timeLeft > 1500 ? new Color(231, 164, 1) : new Color(72, 135, 205);
public override Color CooldownStartColor => instance.timeLeft > 1500 ? Color.Lerp(new Color(98, 110, 179), new Color(216, 176, 80), (instance.timeLeft - 1500) / 300f) : new Color(98, 110, 179);
public override Color CooldownEndColor => instance.timeLeft > 1500 ? Color.Lerp(new Color(179, 132, 98), new Color(216, 176, 80), (instance.timeLeft - 1500) / 300f) : new Color(179, 132, 98);
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/OmegaBlueRecharge");
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/AbilitySounds/OmegaBlueRecharge");
public override void OnCompleted()
{
+1 -1
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Cooldowns
public override Color OutlineColor => new Color(174, 237, 122);
public override Color CooldownStartColor => Color.DarkSlateGray;
public override Color CooldownEndColor => Color.DarkSlateGray;
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/PlagueReaperRecharge");
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/AbilitySounds/PlagueReaperRecharge");
public override void OnCompleted()
{
+2
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using Terraria.Audio;
namespace CalamityMod.Cooldowns
{
@@ -11,5 +12,6 @@ namespace CalamityMod.Cooldowns
public override Color OutlineColor => new Color(255, 142, 165);
public override Color CooldownStartColor => Color.Lerp(new Color(208, 234, 255), new Color(231, 3, 54), instance.Completion);
public override Color CooldownEndColor => Color.Lerp(new Color(208, 234, 255), new Color(231, 3, 54), instance.Completion);
public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/AbilitySounds/PotionSicknessOver");
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

+3 -3
View File
@@ -35,12 +35,12 @@ namespace CalamityMod.Items.Weapons.Melee
public static int BaseDamage = 800;
public static int PhoenixAttunement_BaseDamage = 800;
public static int PhoenixAttunement_LocalIFrames = 20; //Remember its got one extra update
public static int PhoenixAttunement_LocalIFrames = 30; //Remember its got one extra update
public static float PhoenixAttunement_BoltDamageReduction = 0.5f;
public static float PhoenixAttunement_BoltThrowDamageMultiplier = 1.5f;
public static float PhoenixAttunement_BoltThrowDamageMultiplier = 1f;
public static float PhoenixAttunement_BaseDamageReduction = 0.5f;
public static float PhoenixAttunement_FullChargeDamageBoost = 2.1f;
public static float PhoenixAttunement_ThrowDamageBoost = 3.6f;
public static float PhoenixAttunement_ThrowDamageBoost = 3.2f;
public static int PolarisAttunement_BaseDamage = 1200;
public static int PolarisAttunement_FullChargeDamage = 1900;
+22
View File
@@ -100,6 +100,28 @@ namespace CalamityMod.NPCs.CeaselessVoid
CalamityAI.CeaselessVoidAI(npc, mod);
}
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
{
cooldownSlot = 1;
Rectangle targetHitbox = target.Hitbox;
float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft());
float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight());
float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft());
float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight());
float minDist = dist1;
if (dist2 < minDist)
minDist = dist2;
if (dist3 < minDist)
minDist = dist3;
if (dist4 < minDist)
minDist = dist4;
return minDist <= 50f;
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
SpriteEffects spriteEffects = SpriteEffects.None;
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class AdrenalineActivate : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class AngelicAllianceActivation : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class BloodflareRangerActivation : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class BloodflareRangerRecharge : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class BrimflameAbility : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class BrimflameRecharge : ModSound
{
@@ -0,0 +1,18 @@
using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class ChaosStateOver : ModSound
{
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
{
soundInstance = sound.CreateInstance();
soundInstance.Volume = volume * 1f;
soundInstance.Pan = pan;
Main.PlaySoundInstance(soundInstance);
return soundInstance;
}
}
}
Binary file not shown.
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class DemonshadeEnrage : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class FullAdrenaline : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class FullRage : ModSound
{
File renamed without changes.
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class OmegaBlueAbility : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class OmegaBlueRecharge : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class PlagueReaperAbility : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class PlagueReaperRecharge : ModSound
{
@@ -0,0 +1,18 @@
using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class PotionSicknessOver : ModSound
{
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
{
soundInstance = sound.CreateInstance();
soundInstance.Volume = volume * 1f;
soundInstance.Pan = pan;
Main.PlaySoundInstance(soundInstance);
return soundInstance;
}
}
}
Binary file not shown.
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class RageActivate : ModSound
{
File renamed without changes.
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class RageEnd : ModSound
{
File renamed without changes.
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class SilvaActivation : ModSound
{
@@ -2,7 +2,7 @@ using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
namespace CalamityMod.Sounds.Custom.AbilitySounds
{
public class SilvaDispel : ModSound
{
File renamed without changes.