Merge branch '1.4.4' into SunkenSeaTileOddities

This commit is contained in:
Heart-Plus-Up committed 2025-02-22 22:35:39 -07:00
commit 1804d91c13
20 files changed
+132 -25

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

After

Width:  |  Height:  |  Size: 779 B

+74
View File
@@ -0,0 +1,74 @@
using CalamityMod.Events;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Abyss;
using CalamityMod.NPCs.Leviathan;
using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.SummonItems
{
public class NaiadsWarhorn : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.SummonItems";
public static readonly SoundStyle HornSound = new("CalamityMod/Sounds/Item/LeviathanHornSound");
public override void SetStaticDefaults()
{
ItemID.Sets.SortingPriorityBossSpawns[Type] = 12; // Truffle Worm
}
public override void SetDefaults()
{
Item.width = 108;
Item.height = 68;
Item.rare = ItemRarityID.Lime;
Item.useAnimation = 30;
Item.useTime = 30;
Item.useStyle = ItemUseStyleID.Shoot;
Item.consumable = false;
}
public override Vector2? HoldoutOffset() => new Vector2(5, 8);
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.BossItem;
}
public override bool CanUseItem(Player player)
{
return player.ZoneBeach && !player.Calamity().ZoneSulphur && !NPC.AnyNPCs(ModContent.NPCType<Anahita>()) && !NPC.AnyNPCs(ModContent.NPCType<Leviathan>()) && !BossRushEvent.BossRushActive;
}
public override bool? UseItem(Player player)
{
int posX = (int)player.position.X;
int posY = (int)(player.position.Y - 700f);
int bossToSpawn = ModContent.NPCType<Anahita>();
CalamityUtils.SpawnBossOnPosUsingItem(player, bossToSpawn, posX, posY, HornSound);
return true;
}
// Makes it draw lower in the world so that it doesn't look weird with the cloth at the bottom
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
spriteBatch.Draw(tex, Item.Center - Main.screenPosition + Vector2.UnitY * 20f, null, lightColor, rotation, tex.Size() / 2f, scale, 0, 0);
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<AbyssGravel>(30).
AddIngredient<PlantyMush>(15).
AddIngredient<Lumenyl>(10).
AddTile(TileID.MythrilAnvil).
Register();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

+2 -2
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
Item.width = Item.height = 108;
Item.damage = 400;
Item.damage = 415;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = Item.useTime = useTime;
Item.useStyle = ItemUseStyleID.Swing;
@@ -101,7 +101,7 @@ namespace CalamityMod.Items.Weapons.Melee
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
int beamDamage = player.CalcIntDamage<MeleeDamageClass>(Item.damage);
int beamDamage = player.CalcIntDamage<MeleeDamageClass>(Item.damage * 0.5f);
Vector2 mouseClamped = player.ClampedMouseWorld();
for (int i = 0; i < 2; i++)
{
+2 -2
View File
@@ -61,8 +61,8 @@ namespace CalamityMod.Items.Weapons.Rogue
if (!HasHoveredOverNameInGFB)
{
HasHoveredOverNameInGFB = true;
string firstWord = this.GetLocalizedValue("GFBFirstWord" + Main.rand.Next(1, 12 + 1).ToString());
string lastWord = this.GetLocalizedValue("GFBLastWord" + Main.rand.Next(1, 10 + 1).ToString());
string firstWord = this.GetLocalizedValue("GFBFirstWord" + Main.rand.Next(1, 16 + 1).ToString());
string lastWord = this.GetLocalizedValue("GFBLastWord" + Main.rand.Next(1, 13 + 1).ToString());
Item.SetNameOverride(firstWord + " " + lastWord);
}
}
+25 -14
View File
@@ -8,18 +8,13 @@ namespace CalamityMod.Items.Weapons.Rogue
{
public class UrchinStinger : RogueWeapon
{
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 99;
}
public override void SetDefaults()
{
Item.width = 10;
Item.height = 26;
Item.damage = 15;
Item.damage = 9;
Item.DamageType = RogueDamageClass.Instance;
Item.useAnimation = Item.useTime = 14;
Item.useAnimation = Item.useTime = 17;
Item.knockBack = 1.5f;
Item.noMelee = true;
@@ -28,9 +23,7 @@ namespace CalamityMod.Items.Weapons.Rogue
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.consumable = true;
Item.maxStack = Item.CommonMaxStack;
Item.value = Item.sellPrice(silver: 2);
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
Item.rare = ItemRarityID.Blue;
Item.shoot = ModContent.ProjectileType<UrchinStingerProj>();
Item.shootSpeed = 12f;
@@ -38,10 +31,28 @@ namespace CalamityMod.Items.Weapons.Rogue
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (player.Calamity().StealthStrikeAvailable())
Main.projectile[proj].Calamity().stealthStrike = true;
return false;
Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(23f)) * 0.6f;
Vector2 newVel2 = velocity.RotatedByRandom(MathHelper.ToRadians(23f)) * 0.8f;
if (!player.Calamity().StealthStrikeAvailable())
{
Projectile.NewProjectile(source, position, newVel, type, damage / 2, knockback, player.whoAmI);
Projectile.NewProjectile(source, position, newVel2, type, damage / 2, knockback, player.whoAmI);
}
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
for (int i = 0; i < 3; i++)
{
newVel = velocity.RotatedByRandom(MathHelper.ToRadians(23f));
int stealth = Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI);
if (stealth.WithinBounds(Main.maxProjectiles))
{
Main.projectile[stealth].Calamity().stealthStrike = true;
}
}
return false;
}
return true;
}
}
}
@@ -160,6 +160,17 @@ EyeofDesolation: {
GFBInfo: Creates a square arena of blocks, with you at its center
}
NaiadsWarhorn: {
DisplayName: Naiad's Warhorn
Tooltip:
'''
Summons Anahita when used in the Ocean
Enrages outside the Ocean
{$Common.NotConsumable}
'An instrument used by mermen to call upon Anahita. Its melody is oddly alluring.'
'''
}
MarkofProvidence: {
DisplayName: Mark of Providence
Tooltip:
@@ -217,6 +217,10 @@ CrushsawCrasher: {
GFBFirstWord10: Coleslaw
GFBFirstWord11: Cashew
GFBFirstWord12: Cawcaw
GFBFirstWord13: Crabshaw
GFBFirstWord14: Castle
GFBFirstWord15: Catshaw
GFBFirstWord16: Catspaw
GFBLastWord1: Crasher
GFBLastWord2: Crusher
GFBLastWord3: Clasher
@@ -227,6 +231,9 @@ CrushsawCrasher: {
GFBLastWord8: Rasher
GFBLastWord9: Cracker
GFBLastWord10: Cackler
GFBLastWord11: Checker
GFBLastWord12: Clicker
GFBLastWord13: Catsher
}
Crystalline: {
+3 -1
View File
@@ -7,6 +7,7 @@ using CalamityMod.Sounds;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.GameContent.Bestiary;
using Terraria.ID;
using Terraria.ModLoader;
@@ -16,6 +17,7 @@ namespace CalamityMod.NPCs.NormalNPCs
{
public class WulfrumAmplifier : ModNPC
{
public static readonly SoundStyle Hit = new("CalamityMod/Sounds/NPCHit/WulfrumHit", 3);
public bool Charging
{
get => NPC.ai[0] != 0f;
@@ -54,7 +56,7 @@ namespace CalamityMod.NPCs.NormalNPCs
NPC.value = Item.buyPrice(0, 0, 1, 0);
NPC.noGravity = false;
NPC.noTileCollide = false;
NPC.HitSound = SoundID.NPCHit4;
NPC.HitSound = Hit;
NPC.DeathSound = CommonCalamitySounds.WulfrumNPCDeathSound;
Banner = NPC.type;
BannerItem = ModContent.ItemType<WulfrumAmplifierBanner>();
+1 -1
View File
@@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.NormalNPCs
NPC.value = Item.buyPrice(0, 0, 0, 80);
NPC.noGravity = true;
NPC.noTileCollide = true;
NPC.HitSound = SoundID.NPCHit4;
NPC.HitSound = WulfrumAmplifier.Hit;
NPC.DeathSound = CommonCalamitySounds.WulfrumNPCDeathSound;
Banner = NPC.type;
BannerItem = ModContent.ItemType<WulfrumDroneBanner>();
+1 -1
View File
@@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.NormalNPCs
NPC.lifeMax = 23;
NPC.knockBackResist = 0.15f;
NPC.value = Item.buyPrice(0, 0, 0, 75);
NPC.HitSound = SoundID.NPCHit4;
NPC.HitSound = WulfrumAmplifier.Hit;
NPC.DeathSound = CommonCalamitySounds.WulfrumNPCDeathSound;
Banner = NPC.type;
BannerItem = ModContent.ItemType<WulfrumGyratorBanner>();
+1 -1
View File
@@ -80,7 +80,7 @@ namespace CalamityMod.NPCs.NormalNPCs
NPC.defense = 4;
NPC.lifeMax = 25;
NPC.value = Item.buyPrice(0, 0, 1, 0);
NPC.HitSound = SoundID.NPCHit4;
NPC.HitSound = WulfrumAmplifier.Hit;
NPC.DeathSound = CommonCalamitySounds.WulfrumNPCDeathSound;
NPC.noGravity = true;
NPC.noTileCollide = true;
+1 -1
View File
@@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.NormalNPCs
NPC.lifeMax = 40;
NPC.knockBackResist = Main.zenithWorld ? 0f : 0.15f;
NPC.value = Item.buyPrice(0, 0, 0, 75);
NPC.HitSound = SoundID.NPCHit4;
NPC.HitSound = WulfrumAmplifier.Hit;
NPC.DeathSound = CommonCalamitySounds.WulfrumNPCDeathSound;
Banner = NPC.type;
BannerItem = ModContent.ItemType<WulfrumRoverBanner>();
+1 -1
View File
@@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.SulphurousSea
public override void ModifyNPCLoot(NPCLoot npcLoot)
{
npcLoot.Add(ModContent.ItemType<UrchinStinger>(), 1, 30, 50);
npcLoot.Add(ModContent.ItemType<UrchinStinger>(), 15);
}
public override void HitEffect(NPC.HitInfo hit)
+1 -1
View File
@@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Melee
}
if (time % 6 == 0)
{
GeneralParticleHandler.SpawnParticle(new CustomSpark(Projectile.Center, Projectile.velocity * 0.1f, "CalamityMod/Particles/BloomCircle", false, 20, Main.rand.NextFloat(0.05f, 0.055f) * deathLerp * Projectile.ai[0], (Main.rand.NextBool() ? Color.MediumOrchid : clr) * 0.7f, new Vector2(0.8f, 1), shrinkSpeed: 0.2f));
GeneralParticleHandler.SpawnParticle(new CustomSpark(Projectile.Center, Projectile.velocity * 0.1f, "CalamityMod/Particles/BloomCircle", false, 20, Main.rand.NextFloat(0.05f, 0.055f) * deathLerp * Projectile.ai[0], (Main.rand.NextBool() ? Color.MediumOrchid : clr) * (CalamityClientConfig.Instance.Photosensitivity ? 0.25f : 0.7f), new Vector2(0.8f, 1), shrinkSpeed: 0.2f));
}
if (angleTimer % 60 == 0 && Projectile.ai[0] > 0.7f)
{
+2
View File
@@ -92,6 +92,8 @@ namespace CalamityMod.Projectiles.Summon
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
{
modifiers.DisableCrit();
if (!Collision.CanHit(Projectile, Main.player[Projectile.owner]))
modifiers.SourceDamage *= 0.75f; // Minion deals 75% damage if it doesn't have line of sight with its owner
}
public override Color? GetAlpha(Color lightColor)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.