This commit is contained in:
mountaindrew10 committed 2023-12-05 15:46:25 -06:00
commit 820c047ccb
39 files changed
+124 -123

No files matched your search

+11 -5
View File
@@ -125,6 +125,9 @@ namespace CalamityMod.Balancing
// 40% resist to Cryophobia.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
// 30% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
#endregion
#region The Destroyer
@@ -137,8 +140,11 @@ namespace CalamityMod.Balancing
// 40% resist to Cryophobia.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
// 20% resist to Mineral Mortar's Projectile.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<MineralMortarProjectile>()))));
// 40% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<MeowFire>()))));
// 15% resist to Mineral Mortar's Projectile.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<MineralMortarProjectile>()))));
// 15% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<Snowflake>()))));
@@ -183,14 +189,14 @@ namespace CalamityMod.Balancing
// 75% resist to Plaguenades.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
// 70% resist to the Stardust Dragon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(ResistTrueMelee(0.5f))));
// 25% resist to Resurrection Butterfly.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<SakuraBullet>(), ProjectileType<PurpleButterfly>()))));
// 70% resist to the Stardust Dragon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
#endregion
#region Moon Lord
Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 667 B

+2 -2
View File
@@ -2214,8 +2214,8 @@ namespace CalamityMod.CalPlayer
}
else if (xerocSet)
{
Player.AddBuff(ModContent.BuffType<EmpyreanRage>(), 240);
Player.AddBuff(ModContent.BuffType<EmpyreanWrath>(), 240);
Player.AddBuff(ModContent.BuffType<EmpyreanRage>(), 180);
Player.AddBuff(ModContent.BuffType<EmpyreanWrath>(), 180);
}
else if (reaverDefense)
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

After

Width:  |  Height:  |  Size: 366 B

+2 -2
View File
@@ -12,8 +12,8 @@ namespace CalamityMod.Cooldowns
public override bool ShouldDisplay => true;
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
public override string Texture => "CalamityMod/Cooldowns/AscendEffect";
public override Color OutlineColor => new Color(50, 50, 50);
public override Color CooldownStartColor => Color.LightGreen;
public override Color OutlineColor => new Color(197, 165, 108);
public override Color CooldownStartColor => new Color(144, 84, 29);
public override Color CooldownEndColor => Color.Khaki;
public override SoundStyle? EndSound => new("CalamityMod/Sounds/Item/AscendantOff");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 206 B

+5 -4
View File
@@ -7,6 +7,7 @@ using CalamityMod.NPCs.DraedonLabThings;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using Terraria;
using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
@@ -16,15 +17,15 @@ namespace CalamityMod.ILEditing
{
#region Shimmer Changes
private static bool AdjustShimmerRequirements(On_Item.orig_CanShimmer orig, Item item)
private static bool AdjustShimmerRequirements(On_ShimmerTransforms.orig_IsItemTransformLocked orig, int type)
{
//Rod of Harmony / psc requires Draedong and SCal dead instead of Moon Lord.
if (item.type == ItemID.RodofDiscord || item.type == ModContent.ItemType<ProfanedSoulCrystal>())
if (type == ItemID.RodofDiscord || type == ModContent.ItemType<ProfanedSoulCrystal>())
{
return DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs;
return !DownedBossSystem.downedCalamitas || !DownedBossSystem.downedExoMechs;
}
return orig(item);
return orig(type);
}
#endregion
+2 -1
View File
@@ -5,6 +5,7 @@ using CalamityMod.Items.Armor.LunicCorps;
using CalamityMod.Tiles.DraedonStructures;
using CalamityMod.Tiles.FurnitureExo;
using Terraria;
using Terraria.GameContent;
using Terraria.GameContent.Drawing;
using Terraria.GameContent.Events;
using Terraria.GameContent.ItemDropRules;
@@ -132,7 +133,7 @@ namespace CalamityMod.ILEditing
IL_Sandstorm.HasSufficientWind += DecreaseSandstormWindSpeedRequirement;
IL_Item.TryGetPrefixStatMultipliersForItem += RelaxPrefixRequirements;
On_NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns;
On_Item.CanShimmer += AdjustShimmerRequirements;
On_ShimmerTransforms.IsItemTransformLocked += AdjustShimmerRequirements;
// TODO -- Beat Lava Slimes once and for all
// IL.Terraria.NPC.VanillaHitEffect += RemoveLavaDropsFromExpertLavaSlimes;
+2 -2
View File
@@ -18,8 +18,8 @@ namespace CalamityMod.Items.Accessories
public override void ModifyTooltips(List<TooltipLine> list) => list.IntegrateHotkey(CalamityKeybinds.AscendantInsigniaHotKey);
public override void SetDefaults()
{
Item.width = 42;
Item.height = 42;
Item.width = 46;
Item.height = 36;
Item.value = CalamityGlobalItem.Rarity13BuyPrice;
Item.accessory = true;
Item.rare = ModContent.RarityType<PureGreen>();
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1005 B

After

Width:  |  Height:  |  Size: 834 B

+1
View File
@@ -12,6 +12,7 @@ namespace CalamityMod.Items.Materials
{
Item.ResearchUnlockCount = 100;
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(6, 4));
ItemID.Sets.AnimatesAsSoul[Type] = true;
}
public override void SetDefaults()
+9 -3
View File
@@ -3,6 +3,7 @@ using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using CalamityMod.Items.Placeables.Ores;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,12 +12,17 @@ namespace CalamityMod.Items.Potions
public class TeslaPotion : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Potions";
public override void SetStaticDefaults() => Item.ResearchUnlockCount = 20;
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 20;
Main.RegisterItemAnimation(Type, new DrawAnimationVertical(6, 8));
ItemID.Sets.AnimatesAsSoul[Type] = true;
}
public override void SetDefaults()
{
Item.width = 24;
Item.height = 26;
Item.width = 34;
Item.height = 34;
Item.useTurn = true;
Item.maxStack = 9999;
Item.rare = ItemRarityID.Orange;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 B

After

Width:  |  Height:  |  Size: 2.0 KiB

+3 -3
View File
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true);
int j = Main.myPlayer;
int i = Main.myPlayer;
float fangSpeed = Item.shootSpeed;
float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
@@ -57,11 +57,11 @@ namespace CalamityMod.Items.Weapons.Magic
{
spikeAmount += 2;
}
for (int i = 0; i < spikeAmount; i++)
for (int j = 0; j < spikeAmount; j++)
{
float fangSpawnX = mouseXDist;
float fangSpawnY = mouseYDist;
float offsetDampener = 0.05f * (float)i;
float offsetDampener = 0.05f * (float)j;
fangSpawnX += (float)Main.rand.Next(-400, 400) * offsetDampener;
fangSpawnY += (float)Main.rand.Next(-400, 400) * offsetDampener;
float fangDistance = (float)Math.Sqrt((double)(fangSpawnX * fangSpawnX + fangSpawnY * fangSpawnY));
+3 -3
View File
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int j = Main.myPlayer;
int i = Main.myPlayer;
float beamSpeed = Item.shootSpeed;
float beamKnockback = knockback;
beamKnockback = player.GetWeaponKnockback(Item, beamKnockback);
@@ -70,11 +70,11 @@ namespace CalamityMod.Items.Weapons.Magic
}
int numLasers = 2;
for (int i = 0; i < numLasers; i++)
for (int j = 0; j < numLasers; j++)
{
realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(91) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
realPlayerPos.Y -= (float)(100 * i);
realPlayerPos.Y -= (float)(100 * j);
mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
if (mouseYDist < 0f)
+4 -7
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override void SetDefaults()
{
Item.damage = 45;
Item.damage = 65;
Item.DamageType = DamageClass.Magic;
Item.mana = 10;
Item.width = 52;
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic
Item.UseSound = SoundID.Item102;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<WyvernFeatherPurple>();
Item.shootSpeed = 18f;
Item.shootSpeed = 35f;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
@@ -76,12 +76,11 @@ namespace CalamityMod.Items.Weapons.Magic
}
if (type == ModContent.ProjectileType<WyvernProjectile>())
{
damageMult = 20f;
damageMult = 15f;
kbMult = 1.5f;
}
if (type == ModContent.ProjectileType<WyvernFeatherPink>())
{
damageMult = 1.2f;
kbMult = 2f;
}
realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
@@ -101,9 +100,7 @@ namespace CalamityMod.Items.Weapons.Magic
mouseDistance = projSpeed / mouseDistance;
mouseXDist *= mouseDistance;
mouseYDist *= mouseDistance;
float speedX4 = mouseXDist + (float)Main.rand.Next(-30, 31) * 0.02f;
float speedY5 = mouseYDist + (float)Main.rand.Next(-30, 31) * 0.02f;
int feather = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, (int)(damage * damageMult), (int)(knockback * kbMult), player.whoAmI, 0f, (float)Main.rand.Next(15));
int feather = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, mouseXDist, mouseYDist, type, (int)(damage * damageMult), (int)(knockback * kbMult), player.whoAmI, 0f, (float)Main.rand.Next(15));
}
return false;
}
+7 -6
View File
@@ -1,14 +1,14 @@
using CalamityMod.Items.Materials;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using CalamityMod.DataStructures;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -140,7 +140,8 @@ namespace CalamityMod.Items.Weapons.Melee
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
Item.shoot = ProjectileID.PurificationPowder;
Item.shootSpeed = 24f;
Item.rare = ModContent.RarityType<DarkBlue>();
Item.rare = RarityType<DarkBlue>();
Item.reuseDelay = 30;
}
#region saving and syncing attunements
+6 -6
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
var source = player.GetSource_ItemUse(Item);
int j = Main.myPlayer;
int i = Main.myPlayer;
float projSpeed = Item.shootSpeed;
float playerKnockback = hit.Knockback;
playerKnockback = player.GetWeaponKnockback(Item, playerKnockback);
@@ -56,11 +56,11 @@ namespace CalamityMod.Items.Weapons.Melee
mouseDistance = projSpeed / mouseDistance;
}
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
{
realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
realPlayerPos.Y -= (float)(100 * i);
realPlayerPos.Y -= (float)(100 * j);
mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
if (mouseYDist < 0f)
@@ -85,7 +85,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
var source = player.GetSource_ItemUse(Item);
int j = Main.myPlayer;
int i = Main.myPlayer;
float projSpeed = Item.shootSpeed;
float playerKnockback = Item.knockBack;
playerKnockback = player.GetWeaponKnockback(Item, playerKnockback);
@@ -109,11 +109,11 @@ namespace CalamityMod.Items.Weapons.Melee
mouseDistance = projSpeed / mouseDistance;
}
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
{
realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
realPlayerPos.Y -= (float)(100 * i);
realPlayerPos.Y -= (float)(100 * j);
mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
if (mouseYDist < 0f)
+6 -6
View File
@@ -23,14 +23,14 @@ namespace CalamityMod.Items.Weapons.Melee
public static readonly SoundStyle BigSwing = new("CalamityMod/Sounds/Item/MurasamaBigSwing") { Volume = 0.35f };
public override void SetStaticDefaults()
{
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 13));
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(2, 13));
ItemID.Sets.AnimatesAsSoul[Type] = true;
}
public override void SetDefaults()
{
Item.height = 128;
Item.width = 56;
Item.height = 134;
Item.width = 90;
Item.damage = 2222;
Item.DamageType = TrueMeleeNoSpeedDamageClass.Instance;
Item.noMelee = true;
@@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
//0 = 6 frames, 8 = 3 frames]
texture = ModContent.Request<Texture2D>(Texture).Value;
spriteBatch.Draw(texture, position, Item.GetCurrentFrame(ref frame, ref frameCounter, frame == 0 ? 36 : frame == 8 ? 24 : 6, 13), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
spriteBatch.Draw(texture, position, Item.GetCurrentFrame(ref frame, ref frameCounter, 2, 13), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
}
else
{
@@ -77,7 +77,7 @@ namespace CalamityMod.Items.Weapons.Melee
if (IDUnlocked(Main.LocalPlayer))
{
texture = ModContent.Request<Texture2D>(Texture).Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, frame == 0 ? 36 : frame == 8 ? 24 : 6, 13), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, 2, 13), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
else
{
@@ -92,7 +92,7 @@ namespace CalamityMod.Items.Weapons.Melee
if (!IDUnlocked(Main.LocalPlayer))
return;
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/MurasamaGlow").Value;
spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, frame == 0 ? 36 : frame == 8 ? 24 : 6, 13, false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, 2, 13, false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
public override bool CanUseItem(Player player)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

+3 -3
View File
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
var source = player.GetSource_ItemUse(Item);
SoundEngine.PlaySound(SoundID.Item88, player.Center);
int j = Main.myPlayer;
int i = Main.myPlayer;
float cometSpeed = Item.shootSpeed;
Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true);
float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
@@ -69,11 +69,11 @@ namespace CalamityMod.Items.Weapons.Melee
if (crit)
damage /= 2;
for (int i = 0; i < 2; i++)
for (int j = 0; j < 2; j++)
{
realPlayerPos = new Vector2(player.Center.X + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
realPlayerPos.Y -= (float)(100 * i);
realPlayerPos.Y -= (float)(100 * j);
mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X + (float)Main.rand.Next(-40, 41) * 0.03f;
mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
if (mouseYDist < 0f)
+3 -3
View File
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
var source = player.GetSource_ItemUse(Item);
SoundEngine.PlaySound(SoundID.Item73, player.Center);
int j = Main.myPlayer;
int i = Main.myPlayer;
float flameSpeed = 3f;
player.itemTime = Item.useTime;
Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true);
@@ -65,11 +65,11 @@ namespace CalamityMod.Items.Weapons.Melee
}
int essenceDamage = player.CalcIntDamage<MeleeDamageClass>(0.25f * Item.damage);
for (int i = 0; i < 5; i++)
for (int j = 0; j < 5; j++)
{
realPlayerPos = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(401) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y);
realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + Main.rand.Next(-400, 401);
realPlayerPos.Y -= 100 * i;
realPlayerPos.Y -= 100 * j;
mouseXDist = Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
mouseYDist = Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
if (mouseYDist < 0f)
+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
Item.damage = 454;
Item.damage = 478;
Item.DamageType = DamageClass.Ranged;
Item.width = 94;
Item.height = 72;
+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
Item.damage = 37;
Item.damage = 29;
Item.DamageType = DamageClass.Ranged;
Item.width = 74;
Item.height = 24;
+2 -2
View File
@@ -22,8 +22,8 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.shootSpeed = 6f;
Item.shoot = ModContent.ProjectileType<SparkSpreaderFire>();
Item.width = 52;
Item.height = 20;
Item.width = 56;
Item.height = 26;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.UseSound = SoundID.Item34;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

After

Width:  |  Height:  |  Size: 880 B

@@ -1314,10 +1314,10 @@ Tumbleweed: {
TyphonsGreed: {
DisplayName: Typhon's Greed
Tooltip:
Tooltip:
'''
Summons water spirits while in use
These water spirits will home in on enemies after traveling towards the player
These water spirits will home in on enemies after traveling towards the player
'''
}
@@ -165,7 +165,7 @@ BloodBoiler: {
'''
Fires twin streams of life stealing bloodfire that returns to you
Uses your health as ammo
40% chance to save health
40% chance to save health
'''
}
@@ -836,7 +836,7 @@ OverloadedBlaster: {
Tooltip:
'''
Converts gel into a spread of energized slime pearls that overload when they come to a stop
Overloaded slime pearls deal double damage but no longer pierce
Overloaded slime pearls deal 175% damage but no longer pierce
Slime pearls bounce off of walls at very high speed
Uses gel for ammo
25% chance to save ammo
+1 -1
View File
@@ -2435,7 +2435,7 @@ namespace CalamityMod.Projectiles
{
if (projectile.owner == Main.myPlayer && player.ownedProjectileCounts[ProjectileType<MoonSigil>()] < 5)
{
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(45);
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(42);
if (modPlayer.oldFashioned)
damage = CalamityUtils.CalcOldFashionedDamage(damage);
-1
View File
@@ -25,7 +25,6 @@ namespace CalamityMod.Projectiles.Magic
Projectile.DamageType = DamageClass.Magic;
Projectile.aiStyle = ProjAIStyleID.Nail;
AIType = ProjectileID.NailFriendly;
Projectile.extraUpdates = 1;
}
public override void AI()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1002 B

After

Width:  |  Height:  |  Size: 1.5 KiB

+43 -43
View File
@@ -18,27 +18,21 @@ namespace CalamityMod.Projectiles.Melee
public override LocalizedText DisplayName => CalamityUtils.GetItemName<Murasama>();
private Player Owner => Main.player[Projectile.owner];
public ref int hitCooldown => ref Main.player[Projectile.owner].Calamity().murasamaHitCooldown;
public int frameX = 0;
public int frameY = 0;
public int time = 0;
public int CurrentFrame
public override void SetStaticDefaults()
{
get => frameX * 7 + frameY;
set
{
frameX = value / 7;
frameY = value % 7;
}
Main.projFrames[Projectile.type] = 14;
}
public bool Slashing = false;
public bool Slash1 => Projectile.frame == 10;
public bool Slash2 => Projectile.frame == 0;
public bool Slash3 => Projectile.frame == 6;
public override void SetDefaults()
{
Projectile.width = 236;
Projectile.height = 236;
Projectile.scale = 1f;
Projectile.width = 216;
Projectile.height = 216;
Projectile.friendly = true;
Projectile.penetrate = -1;
Projectile.tileCollide = false;
@@ -54,10 +48,10 @@ namespace CalamityMod.Projectiles.Melee
if (Projectile.frameCounter <= 1)
return false;
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
Vector2 origin = texture.Size() / new Vector2(2f, 7f) * 0.5f;
Rectangle frame = texture.Frame(2, 7, frameX, frameY);
SpriteEffects spriteEffects = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0);
Rectangle frame = texture.Frame(verticalFrames: Main.projFrames[Type], frameY:Projectile.frame);
Vector2 origin = frame.Size() * 0.5f;
SpriteEffects spriteEffects = Projectile.direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally;
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + (Projectile.velocity * 0.3f) + new Vector2(0, -32).RotatedBy(Projectile.rotation), frame, Color.White, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0);
return false;
}
@@ -66,27 +60,30 @@ namespace CalamityMod.Projectiles.Melee
if (time == 0)
{
if (Main.zenithWorld)
{
Projectile.scale = 2;
CurrentFrame = Main.zenithWorld ? 6 : 10;
Projectile.damage = (int)(Projectile.damage * 2);
}
Projectile.frame = Main.zenithWorld ? 6 : 10;
Projectile.alpha = 0;
time++;
}
Player player = Main.player[Projectile.owner];
if (CurrentFrame == 0)
if (Slash2)
{
SoundEngine.PlaySound(Murasama.Swing with { Pitch = -0.1f }, Projectile.Center);
if (hitCooldown == 0)
Slashing = true;
Projectile.numHits = 0;
}
else if (CurrentFrame == 6)
else if (Slash3)
{
SoundEngine.PlaySound(Murasama.BigSwing with { Pitch = 0f }, Projectile.Center);
if (hitCooldown == 0)
Slashing = true;
Projectile.numHits = 0;
}
else if (CurrentFrame == 10)
else if (Slash1)
{
SoundEngine.PlaySound(Murasama.Swing with { Pitch = -0.05f }, Projectile.Center);
if (hitCooldown == 0)
@@ -96,11 +93,11 @@ namespace CalamityMod.Projectiles.Melee
else
Slashing = false;
if (CurrentFrame == 5 && Projectile.frameCounter % 3 == 0)
if (Projectile.frame == 5 && Projectile.frameCounter % 3 == 0)
{
Projectile.damage = (int)(Projectile.damage * 2);
}
if (CurrentFrame == 7 && Projectile.frameCounter % 3 == 0)
if (Projectile.frame == 7 && Projectile.frameCounter % 3 == 0)
{
Projectile.damage = (int)(Projectile.damage * 0.5f);
}
@@ -109,9 +106,7 @@ namespace CalamityMod.Projectiles.Melee
Projectile.frameCounter++;
if (Projectile.frameCounter % 3 == 0)
{
CurrentFrame++;
if (frameX >= 2)
CurrentFrame = 0;
Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type];
}
Vector2 origin = Projectile.Center + Projectile.velocity * 3f;
@@ -130,20 +125,19 @@ namespace CalamityMod.Projectiles.Melee
}
// Rotation and directioning.
if (Slashing || CurrentFrame == 10)
if (Slashing || Slash1)
{
float velocityAngle = Projectile.velocity.ToRotation();
Projectile.rotation = velocityAngle + (Projectile.spriteDirection == -1).ToInt() * MathHelper.Pi;
Projectile.rotation = velocityAngle + (Projectile.direction == -1).ToInt() * MathHelper.Pi;
}
float velocityAngle2 = Projectile.velocity.ToRotation();
Projectile.direction = (Math.Cos(velocityAngle2) > 0).ToDirectionInt();
// Positioning close to the end of the player's arm.
float offset = 80f * Projectile.scale;
Projectile.position = playerRotatedPoint - Projectile.Size * 0.5f + velocityAngle2.ToRotationVector2() * offset;
Projectile.Center = playerRotatedPoint + velocityAngle2.ToRotationVector2() * offset;
// Sprite and player directioning.
Projectile.spriteDirection = Projectile.direction;
player.ChangeDir(Projectile.direction);
// Prevents the projectile from dying
@@ -175,19 +169,25 @@ namespace CalamityMod.Projectiles.Melee
Projectile.velocity = newVelocity;
}
}
public override void ModifyDamageHitbox(ref Rectangle hitbox)
{
int size = 60;
if (Slash3)
hitbox.Inflate(size, size);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
if (target.Organic())
SoundEngine.PlaySound(Murasama.OrganicHit with { Pitch = (CurrentFrame == 0 ? -0.1f : CurrentFrame == 6 ? 0.1f : CurrentFrame == 10 ? -0.15f : 0) }, Projectile.Center);
SoundEngine.PlaySound(Murasama.OrganicHit with { Pitch = (Slash2 ? -0.1f : Slash3 ? 0.1f : Slash1 ? -0.15f : 0) }, Projectile.Center);
else
SoundEngine.PlaySound(Murasama.InorganicHit with { Pitch = (CurrentFrame == 0 ? -0.1f : CurrentFrame == 6 ? 0.1f : CurrentFrame == 10 ? -0.15f : 0) }, Projectile.Center);
SoundEngine.PlaySound(Murasama.InorganicHit with { Pitch = (Slash2 ? -0.1f : Slash3 ? 0.1f : Slash1 ? -0.15f : 0) }, Projectile.Center);
for (int i = 0; i < 3; i++)
{
Color impactColor = CurrentFrame == 6 ? Main.rand.NextBool(3) ? Color.LightCoral : Color.White : Main.rand.NextBool(4) ? Color.LightCoral : Color.Crimson;
Color impactColor = Slash3 ? Main.rand.NextBool(3) ? Color.LightCoral : Color.White : Main.rand.NextBool(4) ? Color.LightCoral : Color.Crimson;
float impactParticleScale = Main.rand.NextFloat(1f, 1.75f);
if (CurrentFrame == 6)
if (Slash3)
{
SparkleParticle impactParticle2 = new SparkleParticle(target.Center + Main.rand.NextVector2Circular(target.width * 0.75f, target.height * 0.75f), Vector2.Zero, Color.White, Color.Red, impactParticleScale * 1.2f, 8, 0, 4.5f);
GeneralParticleHandler.SpawnParticle(impactParticle2);
@@ -196,34 +196,34 @@ namespace CalamityMod.Projectiles.Melee
GeneralParticleHandler.SpawnParticle(impactParticle);
}
float sparkCount = MathHelper.Clamp(CurrentFrame == 6 ? 18 - Projectile.numHits * 3 : 5 - Projectile.numHits * 2, 0, 18);
float sparkCount = MathHelper.Clamp(Slash3 ? 18 - Projectile.numHits * 3 : 5 - Projectile.numHits * 2, 0, 18);
for (int i = 0; i < sparkCount; i++)
{
Vector2 sparkVelocity2 = Projectile.velocity.RotatedBy(CurrentFrame == 0 ? -0.45f * Owner.direction : CurrentFrame == 6 ? 0 : CurrentFrame == 10 ? 0.45f * Owner.direction : 0).RotatedByRandom(0.35f) * Main.rand.NextFloat(0.5f, 1.8f);
Vector2 sparkVelocity2 = Projectile.velocity.RotatedBy(Slash2 ? -0.45f * Owner.direction : Slash3 ? 0 : Slash1 ? 0.45f * Owner.direction : 0).RotatedByRandom(0.35f) * Main.rand.NextFloat(0.5f, 1.8f);
int sparkLifetime2 = Main.rand.Next(23, 35);
float sparkScale2 = Main.rand.NextFloat(0.95f, 1.8f);
Color sparkColor2 = CurrentFrame == 6 ? Main.rand.NextBool(3) ? Color.Red : Color.IndianRed : Main.rand.NextBool() ? Color.Red : Color.Firebrick;
Color sparkColor2 = Slash3 ? Main.rand.NextBool(3) ? Color.Red : Color.IndianRed : Main.rand.NextBool() ? Color.Red : Color.Firebrick;
if (Main.rand.NextBool())
{
AltSparkParticle spark = new AltSparkParticle(target.Center + Main.rand.NextVector2Circular(target.width * 0.5f, target.height * 0.5f) + Projectile.velocity * 1.2f, sparkVelocity2 * (CurrentFrame == 6 ? 1f : 0.65f), false, (int)(sparkLifetime2 * (CurrentFrame == 6 ? 1.2f : 1f)), sparkScale2 * (CurrentFrame == 6 ? 1.4f : 1f), sparkColor2);
AltSparkParticle spark = new AltSparkParticle(target.Center + Main.rand.NextVector2Circular(target.width * 0.5f, target.height * 0.5f) + Projectile.velocity * 1.2f, sparkVelocity2 * (Slash3 ? 1f : 0.65f), false, (int)(sparkLifetime2 * (Slash3 ? 1.2f : 1f)), sparkScale2 * (Slash3 ? 1.4f : 1f), sparkColor2);
GeneralParticleHandler.SpawnParticle(spark);
}
else
{
LineParticle spark = new LineParticle(target.Center + Main.rand.NextVector2Circular(target.width * 0.5f, target.height * 0.5f) + Projectile.velocity * 1.2f, sparkVelocity2 * (CurrentFrame == 7 ? 1f : 0.65f), false, (int)(sparkLifetime2 * (CurrentFrame == 7 ? 1.2f : 1f)), sparkScale2 * (CurrentFrame == 7 ? 1.4f : 1f), Main.rand.NextBool() ? Color.Red : Color.Firebrick);
LineParticle spark = new LineParticle(target.Center + Main.rand.NextVector2Circular(target.width * 0.5f, target.height * 0.5f) + Projectile.velocity * 1.2f, sparkVelocity2 * (Projectile.frame == 7 ? 1f : 0.65f), false, (int)(sparkLifetime2 * (Projectile.frame == 7 ? 1.2f : 1f)), sparkScale2 * (Projectile.frame == 7 ? 1.4f : 1f), Main.rand.NextBool() ? Color.Red : Color.Firebrick);
GeneralParticleHandler.SpawnParticle(spark);
}
}
float dustCount = MathHelper.Clamp(CurrentFrame == 6 ? 25 - Projectile.numHits * 3 : 12 - Projectile.numHits * 2, 0, 25);
float dustCount = MathHelper.Clamp(Slash3 ? 25 - Projectile.numHits * 3 : 12 - Projectile.numHits * 2, 0, 25);
for (int i = 0; i <= dustCount; i++)
{
int dustID = Main.rand.NextBool(3) ? 182 : Main.rand.NextBool() ? CurrentFrame == 6 ? 309 : 296 : 90;
Dust dust2 = Dust.NewDustPerfect(target.Center + Main.rand.NextVector2Circular(target.width * 0.5f, target.height * 0.5f), dustID, Projectile.velocity.RotatedBy(CurrentFrame == 0 ? -0.45f * Owner.direction : CurrentFrame == 6 ? 0 : CurrentFrame == 10 ? 0.45f * Owner.direction : 0).RotatedByRandom(0.55f) * Main.rand.NextFloat(0.3f, 1.1f));
int dustID = Main.rand.NextBool(3) ? 182 : Main.rand.NextBool() ? Slash3 ? 309 : 296 : 90;
Dust dust2 = Dust.NewDustPerfect(target.Center + Main.rand.NextVector2Circular(target.width * 0.5f, target.height * 0.5f), dustID, Projectile.velocity.RotatedBy(Slash2 ? -0.45f * Owner.direction : Slash3 ? 0 : Slash1 ? 0.45f * Owner.direction : 0).RotatedByRandom(0.55f) * Main.rand.NextFloat(0.3f, 1.1f));
dust2.scale = Main.rand.NextFloat(0.9f, 2.4f);
dust2.noGravity = true;
}
}
public override Color? GetAlpha(Color lightColor) => new Color(200, 0, 0, 0);
public override Color? GetAlpha(Color lightColor) => new Color(100, 0, 0, 0);
public override bool? CanDamage() => Slashing == false ? false : null;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 80 KiB

+1 -1
View File
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Ranged
if (Time == EmpowerTime)
{
Projectile.penetrate = 1;
Projectile.damage *= 2;
Projectile.damage = (int)(Projectile.damage * 1.75f); // 7/4
Projectile.velocity *= 0f;
Projectile.rotation = Main.rand.NextFloat(0f, MathHelper.TwoPi);
+2 -2
View File
@@ -1,4 +1,4 @@
using System;
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue
Projectile.width = Projectile.height = 28;
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
Projectile.damage /= 4;
Projectile.damage /= 5;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
for (int i = 0; i < 10; i++)
-11
View File
@@ -359,16 +359,5 @@ namespace CalamityMod
}
#endregion
// REMOVE THIS IN CALAMITY 1.4, it's a 1.4 Utils.cs function.
// Due to its temporary state, this method will not receive an XML documentation comment.
public static Vector2 MoveTowards(this Vector2 currentPosition, Vector2 targetPosition, float maxAmountAllowedToMove)
{
Vector2 v = targetPosition - currentPosition;
if (v.Length() < maxAmountAllowedToMove)
return targetPosition;
return currentPosition + v.SafeNormalize(Vector2.Zero) * maxAmountAllowedToMove;
}
}
}