democratically elected execution of 2025

This commit is contained in:
Altixal committed 2025-05-09 21:06:43 +07:00
1 parent a4667e0cbf
commit c1032747ee
45 files changed
+12 -1381

No files matched your search

-6
View File
@@ -158,9 +158,6 @@ namespace CalamityMod.Balancing
// See Aquatic Scourge comment.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 50% resist to Aftershock's rocks.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AftershockRock>()))));
// 50% resist to Dormant Brimseeker.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
@@ -404,9 +401,6 @@ namespace CalamityMod.Balancing
// 65% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(ResistTrueMelee(0.35f))));
// 65% resist to The Enforcer's projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<EssenceFlame2>()))));
// 65% resist to The Final Dawn's lunge.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<FinalDawnThrow2>()))));
+1 -6
View File
@@ -4834,12 +4834,7 @@ namespace CalamityMod.CalPlayer
Vector2 mouse = Player.ClampedMouseWorld();
Vector2 startingPosition = mouse - Vector2.UnitY.RotatedByRandom(0.3f) * 1250f;
Vector2 directionToMouse = (mouse - startingPosition).SafeNormalize(Vector2.UnitX);
int drop = Projectile.NewProjectile(MedallionSource, startingPosition, directionToMouse * 15f, ProjectileType<AcidBarrelDrop>(), d, 0f, Player.whoAmI, 3);
if (drop.WithinBounds(Main.maxProjectiles))
{
Main.projectile[drop].penetrate = 2;
Main.projectile[drop].DamageType = DamageClass.Generic;
}
Projectile.NewProjectile(MedallionSource, startingPosition, directionToMouse * 15f, ProjectileType<RustyMedallionDroplet>(), d, 0f, Player.whoAmI, 3);
RustyMedallionCooldown = RustyMedallion.AcidCreationCooldown;
}
}
@@ -92,8 +92,6 @@ namespace CalamityMod.CalPlayer.DrawLayers
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/SubsumingVortexSmallGlow").Value;
else if (itemType == ModContent.ItemType<TerrorBlade>())
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/TerrorBladeGlow").Value;
else if (itemType == ModContent.ItemType<TheEnforcer>())
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/TheEnforcerGlow").Value;
else if (itemType == ModContent.ItemType<VernalBolter>())
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/VernalBolterGlow").Value;
else if (itemType == ModContent.ItemType<VividClarity>())
-201
View File
@@ -1,201 +0,0 @@
using System;
using System.Collections.Generic;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class AsteroidStaff : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
#region GFB Projectile Array
public static int[] CorekeeperChaos =
{
ProjectileID.BallofFire,
ProjectileID.BallofFrost,
ProjectileID.MagicMissile,
ProjectileID.WaterStream,
ProjectileID.Flamelash,
ProjectileID.RainbowRodBullet,
ProjectileID.UnholyTridentFriendly,
ProjectileID.AmethystBolt,
ProjectileID.AmberBolt,
ProjectileID.TopazBolt,
ProjectileID.DiamondBolt,
ProjectileID.SapphireBolt,
ProjectileID.RubyBolt,
ProjectileID.EmeraldBolt,
ProjectileID.RainCloudMoving,
ProjectileID.BloodCloudMoving,
ProjectileID.ShadowBeamFriendly,
ProjectileID.InfernoFriendlyBlast,
ProjectileID.LostSoulFriendly,
ProjectileID.Bat,
ModContent.ProjectileType<AquamarineBolt>(),
ModContent.ProjectileType<HellwingBat>(),
ModContent.ProjectileType<ManaBolt>(),
ModContent.ProjectileType<NightsRayBeam>(),
ModContent.ProjectileType<WaterLeechProj>(),
ModContent.ProjectileType<Sandstream>(),
ModContent.ProjectileType<AuroraAustralis>(),
ModContent.ProjectileType<BeamingBolt>(),
ModContent.ProjectileType<AstralCrystal>(),
ModContent.ProjectileType<AstralachneaFang>(),
ModContent.ProjectileType<PlagueFang>(),
ModContent.ProjectileType<VitriolicViperFang>(),
ModContent.ProjectileType<VitriolicViperSpit>(),
ModContent.ProjectileType<AtlantisSpear>(),
ModContent.ProjectileType<BrimroseBeam>(),
ModContent.ProjectileType<GleamingBolt>(),
ModContent.ProjectileType<InfernalBlade>(),
ModContent.ProjectileType<IcicleStaffProj>(),
ModContent.ProjectileType<KeelhaulBubble>(),
ModContent.ProjectileType<MiasmaGas>(),
ModContent.ProjectileType<PhotosyntheticSolarBeam>(),
ModContent.ProjectileType<ShiftingSandsProj>(),
ModContent.ProjectileType<SnowflakeIceStar>(),
ModContent.ProjectileType<UndinesRetributionSpear>(),
ModContent.ProjectileType<ValkyrieRayBeam>(),
ModContent.ProjectileType<AsteroidMolten>(),
ModContent.ProjectileType<WyvernProjectile>(),
ModContent.ProjectileType<ClamorNoctusWyvern>(),
ModContent.ProjectileType<WyvernFeatherPink>(),
ModContent.ProjectileType<Asteroid>(),
ModContent.ProjectileType<DeathhailBeam>(),
ModContent.ProjectileType<DivineRetributionSpear>(),
ModContent.ProjectileType<StardustElementalBeam>(),
ModContent.ProjectileType<SolarElementalBeam>(),
ModContent.ProjectileType<VortexElementalBeam>(),
ModContent.ProjectileType<NebulaElementalBeam>(),
ModContent.ProjectileType<FabBolt>(),
ModContent.ProjectileType<VolatileStarcore>(),
ModContent.ProjectileType<FatesRevealFlame>(),
ModContent.ProjectileType<MagneticOrb>(),
ModContent.ProjectileType<PhantasmalFuryProj>(),
ModContent.ProjectileType<VenusianBolt>(),
ModContent.ProjectileType<Shadowbolt>(),
ModContent.ProjectileType<NebulaCloudCore>(),
ModContent.ProjectileType<PrinceFlameLarge>(),
ModContent.ProjectileType<SanguineFlareProj>(),
ModContent.ProjectileType<VisceraBeam>(),
ModContent.ProjectileType<SoulPiercerBeam>(),
ModContent.ProjectileType<LiquidBlade>(),
ModContent.ProjectileType<VividClarityBeam>(),
ModContent.ProjectileType<BloodfireArrowProj>(),
ModContent.ProjectileType<VoidVortexProj>(),
ModContent.ProjectileType<ClimaxProj>(),
ModContent.ProjectileType<VehemenceBolt>(),
};
#endregion
public override void SetStaticDefaults()
{
Item.staff[Type] = true;
}
public override void SetDefaults()
{
Item.width = 50;
Item.height = 50;
Item.damage = 146;
Item.DamageType = DamageClass.Magic;
Item.mana = 18;
Item.useTime = 10;
Item.useAnimation = 10;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 6.75f;
Item.UseSound = SoundID.Item88;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<Asteroid>();
Item.shootSpeed = 20f;
Item.value = CalamityGlobalItem.RarityPurpleBuyPrice;
Item.rare = ItemRarityID.Purple;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (Main.zenithWorld)
{
for (int i = 0; i < 4; i++)
{
int projType;
projType = CorekeeperChaos[Main.rand.Next(CorekeeperChaos.Length)];
float SpeedX = velocity.X + (float)Main.rand.Next(-60, 61) * 0.05f;
float SpeedY = velocity.Y + (float)Main.rand.Next(-60, 61) * 0.05f;
int index = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, projType, damage, knockback, player.whoAmI);
}
}
else
{
float meteorSpeed = Item.shootSpeed;
Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true);
float meteorSpawnXPos = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
float meteorSpawnYPos = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
if (player.gravDir == -1f)
{
meteorSpawnYPos = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y;
}
float meteorSpawnDist = (float)Math.Sqrt((double)(meteorSpawnXPos * meteorSpawnXPos + meteorSpawnYPos * meteorSpawnYPos));
if ((float.IsNaN(meteorSpawnXPos) && float.IsNaN(meteorSpawnYPos)) || (meteorSpawnXPos == 0f && meteorSpawnYPos == 0f))
for (int i = 0; i < 4; i++)
{
meteorSpawnXPos = (float)player.direction;
meteorSpawnYPos = 0f;
meteorSpawnDist = meteorSpeed;
}
else
{
meteorSpawnDist = meteorSpeed / meteorSpawnDist;
}
int asteroidAmt = 3;
for (int i = 0; i < asteroidAmt; i++)
{
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);
meteorSpawnXPos = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X + (float)Main.rand.Next(-40, 41) * 0.03f;
meteorSpawnYPos = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
if (meteorSpawnYPos < 0f)
{
meteorSpawnYPos *= -1f;
}
if (meteorSpawnYPos < 20f)
{
meteorSpawnYPos = 20f;
}
meteorSpawnDist = (float)Math.Sqrt((double)(meteorSpawnXPos * meteorSpawnXPos + meteorSpawnYPos * meteorSpawnYPos));
meteorSpawnDist = meteorSpeed / meteorSpawnDist;
meteorSpawnXPos *= meteorSpawnDist;
meteorSpawnYPos *= meteorSpawnDist;
float meteorSpawnXOffset = meteorSpawnXPos;
float meteorSpawnYOffset = meteorSpawnYPos + (float)Main.rand.Next(-40, 41) * 0.02f;
Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, meteorSpawnXOffset * 0.75f, meteorSpawnYOffset * 0.75f, type, damage, knockback, player.whoAmI, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f);
}
}
return false;
}
public override void ModifyTooltips(List<TooltipLine> list) => list.FindAndReplace("[GFB]", this.GetLocalizedValue(Main.zenithWorld ? "TooltipGFB" : "TooltipNormal"));
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.MeteorStaff).
AddIngredient(ItemID.LunarBar, 5).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 951 B

-55
View File
@@ -1,55 +0,0 @@
using System;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Projectiles.Melee;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class Aftershock : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
internal const float ShootSpeed = 12f;
public override void SetDefaults()
{
Item.width = 54;
Item.height = 58;
Item.damage = 65;
Item.DamageType = DamageClass.Melee;
Item.useTime = 28;
Item.useAnimation = 28;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 9f;
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
Item.rare = ItemRarityID.Pink;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shootSpeed = ShootSpeed;
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 300);
Vector2 destination = target.Center;
Vector2 position = destination - (Vector2.UnitY * (destination.Y - Main.screenPosition.Y + 80f)) + (Vector2.UnitX * Main.rand.Next(-160, 161));
Vector2 velocity = (destination - position).SafeNormalize(Vector2.UnitY) * ShootSpeed * Main.rand.NextFloat(0.9f, 1.1f);
int rockDamage = player.CalcIntDamage<MeleeDamageClass>(Item.damage);
Projectile.NewProjectile(player.GetSource_ItemUse(Item), position, velocity, ModContent.ProjectileType<AftershockRock>(), rockDamage, hit.Knockback, player.whoAmI, 0f, (float)Main.rand.Next(10), target.Center.Y);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 300);
Vector2 destination = target.Center;
Vector2 position = destination - (Vector2.UnitY * (destination.Y - Main.screenPosition.Y + 80f)) + (Vector2.UnitX * Main.rand.Next(-160, 161));
Vector2 velocity = (destination - position).SafeNormalize(Vector2.UnitY) * ShootSpeed * Main.rand.NextFloat(0.9f, 1.1f);
int rockDamage = player.CalcIntDamage<MeleeDamageClass>(Item.damage);
Projectile.NewProjectile(player.GetSource_ItemUse(Item), position, velocity, ModContent.ProjectileType<AftershockRock>(), rockDamage, Item.knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10), target.Center.Y);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

-89
View File
@@ -1,89 +0,0 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class AstralBlade : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetDefaults()
{
Item.width = 80;
Item.height = 80;
Item.damage = 142;
Item.DamageType = TrueMeleeDamageClass.Instance;
Item.useTime = 12;
Item.useAnimation = 12;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 6f;
Item.value = CalamityGlobalItem.RarityCyanBuyPrice;
Item.rare = ItemRarityID.Cyan;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
// Terraria seems to really dislike high crit values in SetDefaults
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300);
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo) => target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300);
public override void MeleeEffects(Player player, Rectangle hitbox)
{
for (int i = 0; i < 3; i++)
{
Dust d = CalamityUtils.MeleeDustHelper(player, Main.rand.NextBool() ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>(), 0.7f, 55, 110, -0.07f, 0.07f);
if (d != null)
d.customData = 0.03f;
}
}
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
{
// Avoid dividing by 0 at all costs.
if (target.lifeMax <= 0)
return;
float lifeRatio = MathHelper.Clamp(target.life / (float)target.lifeMax, 0f, 1f);
float maxMultiplier = 1.25f;
float multiplier = MathHelper.Lerp(1f, maxMultiplier, lifeRatio);
modifiers.SourceDamage *= multiplier;
modifiers.Knockback *= multiplier;
if (Main.rand.NextBool((int)MathHelper.Clamp((Item.crit + player.GetCritChance<MeleeDamageClass>()) * multiplier, 0f, 99f), 100))
modifiers.SetCrit();
SoundEngine.PlaySound(SoundID.Item105, player.Center);
bool blue = Main.rand.NextBool();
float angleStart = Main.rand.NextFloat(0f, MathHelper.TwoPi);
float var = 0.05f + (maxMultiplier - multiplier);
for (float angle = 0f; angle < MathHelper.TwoPi; angle += var)
{
blue = !blue;
Vector2 velocity = angle.ToRotationVector2() * (2f + (float)(Math.Sin(angleStart + angle * 3f) + 1) * 2.5f) * Main.rand.NextFloat(0.95f, 1.05f);
Dust d = Dust.NewDustPerfect(target.Center, blue ? ModContent.DustType<AstralBlue>() : ModContent.DustType<AstralOrange>(), velocity);
d.customData = 0.025f;
d.scale = multiplier;
d.noLight = false;
}
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<AstralBar>(8).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

-150
View File
@@ -1,150 +0,0 @@
using System;
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 Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class TheEnforcer : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetDefaults()
{
Item.width = 100;
Item.height = 100;
Item.damage = 890;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 17;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 17;
Item.useTurn = true;
Item.knockBack = 9f;
Item.UseSound = SoundID.Item20;
Item.autoReuse = true;
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
Item.rare = ModContent.RarityType<DarkBlue>();
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/TheEnforcerGlow").Value);
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
var source = player.GetSource_ItemUse(Item);
SoundEngine.PlaySound(SoundID.Item73, player.Center);
int i = Main.myPlayer;
float flameSpeed = 3f;
player.itemTime = Item.useTime;
Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true);
float mouseXDist = Main.mouseX + Main.screenPosition.X + realPlayerPos.X;
float mouseYDist = Main.mouseY + Main.screenPosition.Y + realPlayerPos.Y;
if (player.gravDir == -1f)
{
mouseYDist = Main.screenPosition.Y + Main.screenHeight + Main.mouseY + realPlayerPos.Y;
}
float mouseDistance = (float)Math.Sqrt(mouseXDist * mouseXDist + mouseYDist * mouseYDist);
if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f))
{
mouseXDist = player.direction;
mouseYDist = 0f;
mouseDistance = flameSpeed;
}
else
{
mouseDistance = flameSpeed / mouseDistance;
}
int essenceDamage = player.CalcIntDamage<MeleeDamageClass>(0.25f * Item.damage);
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 * j;
mouseXDist = Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
mouseYDist = Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
if (mouseYDist < 0f)
{
mouseYDist *= -1f;
}
if (mouseYDist < 20f)
{
mouseYDist = 20f;
}
mouseDistance = (float)Math.Sqrt(mouseXDist * mouseXDist + mouseYDist * mouseYDist);
mouseDistance = flameSpeed / mouseDistance;
Projectile.NewProjectile(source, realPlayerPos, Vector2.Zero, ModContent.ProjectileType<EssenceFlame2>(), essenceDamage, 0f, i, 0f, Main.rand.Next(3));
}
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
var source = player.GetSource_ItemUse(Item);
SoundEngine.PlaySound(SoundID.Item73, player.Center);
int j = Main.myPlayer;
float flameSpeed = 3f;
player.itemTime = Item.useTime;
Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true);
float mouseXDist = Main.mouseX + Main.screenPosition.X + realPlayerPos.X;
float mouseYDist = Main.mouseY + Main.screenPosition.Y + realPlayerPos.Y;
if (player.gravDir == -1f)
{
mouseYDist = Main.screenPosition.Y + Main.screenHeight + Main.mouseY + realPlayerPos.Y;
}
float mouseDistance = (float)Math.Sqrt(mouseXDist * mouseXDist + mouseYDist * mouseYDist);
if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f))
{
mouseXDist = player.direction;
mouseYDist = 0f;
mouseDistance = flameSpeed;
}
else
{
mouseDistance = flameSpeed / mouseDistance;
}
int essenceDamage = player.CalcIntDamage<MeleeDamageClass>(0.25f * Item.damage);
for (int i = 0; i < 5; i++)
{
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;
mouseXDist = Main.mouseX + Main.screenPosition.X - realPlayerPos.X;
mouseYDist = Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y;
if (mouseYDist < 0f)
{
mouseYDist *= -1f;
}
if (mouseYDist < 20f)
{
mouseYDist = 20f;
}
mouseDistance = (float)Math.Sqrt(mouseXDist * mouseXDist + mouseYDist * mouseYDist);
mouseDistance = flameSpeed / mouseDistance;
Projectile.NewProjectile(source, realPlayerPos, Vector2.Zero, ModContent.ProjectileType<EssenceFlame2>(), essenceDamage, 0f, i, 0f, Main.rand.Next(3));
}
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.ShadowbeamStaff);
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<CosmiliteBar>(12).
AddTile<CosmicAnvil>().
Register();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

-46
View File
@@ -1,46 +0,0 @@
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Ranged
{
[LegacyName("AstralRepeater")]
public class AstralBow : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Ranged";
public override void SetDefaults()
{
Item.width = 38;
Item.height = 78;
Item.damage = 92;
Item.DamageType = DamageClass.Ranged;
Item.useTime = 6;
Item.useAnimation = 18;
Item.reuseDelay = 18;
Item.useLimitPerAnimation = 3;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 2.5f;
Item.value = CalamityGlobalItem.RarityCyanBuyPrice;
Item.rare = ItemRarityID.Cyan;
Item.UseSound = SoundID.Item5;
Item.autoReuse = true;
Item.shoot = ProjectileID.WoodenArrowFriendly;
Item.shootSpeed = 16f;
Item.useAmmo = AmmoID.Arrow;
Item.Calamity().canFirePointBlankShots = true;
}
// Terraria seems to really dislike high crit values in SetDefaults
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<AstralBar>(7).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

-69
View File
@@ -1,69 +0,0 @@
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Ranged
{
public class ClockGatlignum : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Ranged";
public override void SetDefaults()
{
Item.width = 66;
Item.height = 34;
Item.damage = 55;
Item.DamageType = DamageClass.Ranged;
Item.useTime = 3;
Item.useAnimation = 9;
Item.reuseDelay = 12;
Item.useLimitPerAnimation = 3;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 3.75f;
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
Item.rare = ItemRarityID.Yellow;
Item.UseSound = SoundID.Item31;
Item.autoReuse = true;
Item.shoot = ProjectileID.PurificationPowder;
Item.shootSpeed = 20f;
Item.useAmmo = AmmoID.Bullet;
Item.Calamity().canFirePointBlankShots = true;
}
public override Vector2? HoldoutOffset() => new Vector2(-14, 0);
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
float SpeedX = velocity.X + Main.rand.Next(-15, 16) * 0.05f;
float SpeedY = velocity.Y + Main.rand.Next(-15, 16) * 0.05f;
if (type == ProjectileID.Bullet)
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, ProjectileID.BulletHighVelocity, damage, knockback, player.whoAmI);
else
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI);
return false;
}
public override bool CanConsumeAmmo(Item ammo, Player player)
{
if (Main.rand.Next(0, 100) < 33)
return false;
return true;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.ClockworkAssaultRifle).
AddIngredient(ItemID.Gatligator).
AddIngredient(ItemID.VenusMagnum).
AddIngredient<LifeAlloy>(3).
AddTile(TileID.MythrilAnvil).
Register();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

+1 -1
View File
@@ -70,7 +70,7 @@ namespace CalamityMod.Items.Weapons.Ranged
{
CreateRecipe().
AddIngredient<Kingsbane>().
AddIngredient<ClockGatlignum>().
AddIngredient(ItemID.VenusMagnum).
AddIngredient<ShadowspecBar>(5).
AddTile<DraedonsForge>().
Register();
-1
View File
@@ -169,7 +169,6 @@ namespace CalamityMod.Items.Weapons.Ranged
{
CreateRecipe().
AddIngredient(ItemID.CoinGun).
AddIngredient<ClockGatlignum>().
AddIngredient(ItemID.PlatinumCoin, 7).
AddIngredient(ItemID.GoldCoin, 77).
AddIngredient(ItemID.LunarBar, 12).
-1
View File
@@ -53,7 +53,6 @@ namespace CalamityMod.Items.Weapons.Ranged
AddIngredient(ItemID.PulseBow).
AddIngredient(ItemID.LaserRifle).
AddIngredient<TheStorm>().
AddIngredient<AstralBow>().
AddIngredient<CosmiliteBar>(8).
AddIngredient<DarksunFragment>(8).
AddIngredient<ExodiumCluster>(15).
-57
View File
@@ -1,57 +0,0 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class AcidicRainBarrel : RogueWeapon
{
public override void SetDefaults()
{
Item.width = 48;
Item.height = 48;
Item.damage = 43;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.useAnimation = 22;
Item.useTime = 22;
Item.knockBack = 8f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
Item.rare = ItemRarityID.Pink;
Item.shoot = ModContent.ProjectileType<GreenDonkeyKongReference>();
Item.shootSpeed = 14f;
Item.DamageType = RogueDamageClass.Instance;
}
public override void ModifyStatsExtra(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
{
position = position - Vector2.UnitY * 12f;
velocity.Y *= 0.667f;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (p.WithinBounds(Main.maxProjectiles))
Main.projectile[p].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<BlastBarrel>().
AddIngredient<ContaminatedBile>().
AddIngredient<CorrodedFossil>(15).
AddTile(TileID.Anvils).
Register();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 872 B

-83
View File
@@ -1,83 +0,0 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class SkyStabber : RogueWeapon
{
private static int knockBack = 2;
public override void SetDefaults()
{
Item.width = 16;
Item.height = 16;
Item.damage = 50;
Item.DamageType = RogueDamageClass.Instance;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useTime = 15;
Item.useAnimation = 15;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = knockBack;
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
Item.rare = ItemRarityID.Orange;
Item.UseSound = SoundID.Item1;
Item.shootSpeed = 2.2f;
Item.shoot = ModContent.ProjectileType<SkyStabberProj>();
}
public override float StealthDamageMultiplier => 0.5f;
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
Item.shoot = ProjectileID.None;
return player.ownedProjectileCounts[ModContent.ProjectileType<SkyStabberProj>()] > 0;
}
else
{
Item.shoot = ModContent.ProjectileType<SkyStabberProj>();
return player.ownedProjectileCounts[ModContent.ProjectileType<SkyStabberProj>()] < 4;
}
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.killSpikyBalls = false;
if (modPlayer.StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<SkyStabberProj>(), damage, knockback, player.whoAmI);
if (stealth.WithinBounds(Main.maxProjectiles))
Main.projectile[stealth].Calamity().stealthStrike = true;
return false;
}
return true;
}
public override bool AltFunctionUse(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.killSpikyBalls = true;
return true;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<AerialiteBar>(4).
AddIngredient(ItemID.SunplateBlock, 8).
AddTile(TileID.Anvils).
Register();
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

@@ -106,17 +106,6 @@ ArtAttack: {
'''
}
AsteroidStaff: {
DisplayName: Asteroid Staff
Tooltip: "[GFB]"
TooltipNormal: Summons asteroids from the sky
TooltipGFB:
'''
Core Keeper Chaos Staff
bottom text
'''
}
AstralachneaStaff: {
DisplayName: Astralachnea Staff
Tooltip: Fires a spread of homing astral spider fangs
@@ -31,11 +31,6 @@ AegisBlade: {
'''
}
Aftershock: {
DisplayName: Aftershock
Tooltip: Summons boulders from the sky on enemy hits
}
AirSpinner: {
DisplayName: Air Spinner
Tooltip:
@@ -116,11 +111,6 @@ ArkoftheElements: {
'''
}
AstralBlade: {
DisplayName: Astral Blade
Tooltip: Deals more damage the more life an enemy has left
}
AstralPike: {
DisplayName: Astral Pike
Tooltip: Summons astral star swarms on hit
@@ -1326,11 +1316,6 @@ TheDarkMaster: {
'''
}
TheEnforcer: {
DisplayName: The Enforcer
Tooltip: Spawns essence flames on hit
}
TheGodsGambit: {
DisplayName: The God's Gambit
Tooltip:
@@ -124,11 +124,6 @@ AstralBlaster: {
Tooltip: Converts musket balls into homing astral rounds
}
AstralBow: {
DisplayName: Astral Bow
Tooltip: Fires a burst of three arrows
}
AstrealDefeat: {
DisplayName: Astreal Defeat
Tooltip: All arrows are converted to Astreal Arrows that emit flames as they travel
@@ -282,15 +277,6 @@ CleansingBlaze: {
'''
}
ClockGatlignum: {
DisplayName: Clock Gatlignum
Tooltip:
'''
Converts musket balls into strings of 3 high velocity bullets
33% chance to save ammo
'''
}
ClockworkBow: {
DisplayName: Clockwork Bow
Tooltip:
@@ -1,12 +1,3 @@
AcidicRainBarrel: {
DisplayName: Acidic Rain Barrel
Tooltip:
'''
Throws a rolling barrel that explodes on wall collision
Stealth strikes make it rain on collision
'''
}
AdamantiteThrowingAxe: {
DisplayName: Adamantite Throwing Axe
Tooltip: Stealth strikes ignore gravity and rain down lightning on enemy hits
@@ -1082,16 +1073,6 @@ SkyfinBombers: {
'''
}
SkyStabber: {
DisplayName: Sky Stabber
Tooltip:
'''
Throws up to 4 gravity-defying spiky balls
Stealth strikes make the balls rain feathers onto enemies when they hit
Press <right> to delete all existing spiky balls
'''
}
SlickCane: {
DisplayName: Slick Cane
Tooltip:
@@ -13,7 +13,6 @@ AquamarineBolt.DisplayName: Aqua Bolt
ArcticBearPawProj.DisplayName: Arctic Bear Paw
ArtAttackStar.DisplayName: Artsy Star
ArtAttackStrike.DisplayName: Art Attack
Asteroid.DisplayName: Asteroid
AsteroidMolten.DisplayName: Molten Asteroid
AstralachneaFang.DisplayName: Astral Fang
AstralCrystal.DisplayName: Astral Crystal
@@ -4,7 +4,6 @@ AegisBeam.DisplayName: Aegis Beam
AegisBlast.DisplayName: Aegis Blast
AegisBlast2.DisplayName: Aegis Blast
AegisFlame.DisplayName: Aegis Flame
AftershockRock.DisplayName: Afterrock
AmidiasWhirlpool.DisplayName: Whirlpool
AncientBeam.DisplayName: Ancient Beam
AncientStar.DisplayName: Ancient Star
@@ -105,7 +104,6 @@ ElementalGlassStar.DisplayName: Glass Star
EmpyreanKnife.DisplayName: Empyrean Knife
EntropicFlechette.DisplayName: Entropic Flechette
EonBolt.DisplayName: Eon Bolt
EssenceFlame2.DisplayName: Essence Flame
EssenceScythe.DisplayName: Essence Scythe
ExaltedOathbladeThrownBlade.DisplayName: Exalted Oathblade Thrown Blade
ExcelsusBlue.DisplayName: Excelsus
@@ -1,6 +1,4 @@
AbyssalMirrorProjectile.DisplayName: Lumenyl Fluid
AcidBarrelDrop.DisplayName: Barrel Acid Drop
AcidShrapnel.DisplayName: Acidic Shrapnel
AdamantiteThrowingAxeProjectile.DisplayName: Adamantite Throwing Axe
AntlionSkewerProj.DisplayName: Antlion on a Stick
AntlionSkewerSandBlast.DisplayName: Antlion Blast
@@ -130,7 +128,6 @@ GleamingDaggerProj.DisplayName: Gleaming Dagger
GodsParanoiaDart.DisplayName: God's Paranoia Dart
GodsParanoiaProj.DisplayName: God's Paranoia
GraveGrimreaverProjectile.DisplayName: Grave Grimreaver
GreenDonkeyKongReference.DisplayName: Acidic Rain Barrel
GrimreaverBat.DisplayName: Grim Bat
GrimreaverSkull.DisplayName: Grim Skull
HeavenfallenEnergy.DisplayName: Heavenfallen Energy
@@ -253,7 +250,6 @@ ShockTeslaAura.DisplayName: Electrifying Aura
ShroomerangSpore.DisplayName: Infested Spore
SkyBomberGas.DisplayName: Irradiated Cloud
SkyfinNuke.DisplayName: Skyfin Nuke
SkyStabberProj.DisplayName: Sky Stabber
SludgeSplotchProj1.DisplayName: Sludge Splotch
SludgeSplotchProj2.DisplayName: Sludge Splotch
SnapClamProj.DisplayName: Snap Clam
@@ -113,6 +113,7 @@ RedLabSeeker.DisplayName: Seeking Mechanism
RelicGuard.DisplayName: Relic Guard
RetaliationProjectile.DisplayName: Retaliation Shard
RiftReelerBobber.DisplayName: Chaotic Bobber
RustyMedallionDroplet.DisplayName: Acid Droplet
SandCloakVeil.DisplayName: Dust Veil
SandExplosion.DisplayName: Sand
SCalAltarArenaVisual.DisplayName: Supreme Calamitas Arena Visual
+1 -2
View File
@@ -413,11 +413,10 @@ namespace CalamityMod.NPCs.AstrumAureus
// Relic
npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType<AstrumAureusRelic>());
// GFB Crab Banner and Asteroid Staff drop
// GFB Crab Banner drop
var GFBOnly = npcLoot.DefineConditionalDropSet(DropHelper.GFB);
{
GFBOnly.Add(DropHelper.PerPlayer(ItemID.CrabBanner, 1, 1, 9999), true);
GFBOnly.Add(DropHelper.PerPlayer(ModContent.ItemType<AsteroidStaff>()), hideLootReport: true);
}
// Lore
-1
View File
@@ -109,7 +109,6 @@ namespace CalamityMod.NPCs.NormalNPCs
{
var weapons = new int[]
{
ModContent.ItemType<Aftershock>(),
ModContent.ItemType<EarthenPike>(),
ModContent.ItemType<SlagMagnum>(),
};
-126
View File
@@ -1,126 +0,0 @@
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Magic
{
public class Asteroid : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Magic";
public override void SetStaticDefaults()
{
ProjectileID.Sets.TrailCacheLength[Type] = 8;
ProjectileID.Sets.TrailingMode[Type] = 0;
}
public override void SetDefaults()
{
Projectile.width = 24;
Projectile.height = 24;
Projectile.friendly = true;
Projectile.tileCollide = false;
Projectile.DamageType = DamageClass.Magic;
Projectile.extraUpdates = 2;
}
public override void AI()
{
if (Projectile.position.Y > Main.player[Projectile.owner].position.Y - 300f)
{
Projectile.tileCollide = true;
}
if ((double)Projectile.position.Y < Main.worldSurface * 16.0)
{
Projectile.tileCollide = true;
}
Projectile.scale = Projectile.ai[1];
Projectile.rotation += Projectile.velocity.X * 2f;
Vector2 position = Projectile.Center + Vector2.Normalize(Projectile.velocity) * 10f;
Dust greenDust = Main.dust[Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 0, default, 1f)];
greenDust.position = position;
greenDust.velocity = Projectile.velocity.RotatedBy(1.5707963705062866, default) * 0.33f + Projectile.velocity / 4f;
greenDust.position += Projectile.velocity.RotatedBy(1.5707963705062866, default);
greenDust.fadeIn = 0.5f;
greenDust.noGravity = true;
greenDust = Main.dust[Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 0, default, 1f)];
greenDust.position = position;
greenDust.velocity = Projectile.velocity.RotatedBy(-1.5707963705062866, default) * 0.33f + Projectile.velocity / 4f;
greenDust.position += Projectile.velocity.RotatedBy(-1.5707963705062866, default);
greenDust.fadeIn = 0.5f;
greenDust.noGravity = true;
int moreGreen = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 0, default, 1f);
Main.dust[moreGreen].velocity *= 0.5f;
Main.dust[moreGreen].scale *= 1.3f;
Main.dust[moreGreen].fadeIn = 1f;
Main.dust[moreGreen].noGravity = true;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
}
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.Item89, Projectile.Center);
Projectile.position.X = Projectile.position.X + (float)(Projectile.width / 2);
Projectile.position.Y = Projectile.position.Y + (float)(Projectile.height / 2);
Projectile.width = (int)(128f * Projectile.scale);
Projectile.height = (int)(128f * Projectile.scale);
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 4; i++)
{
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, default, 1.5f);
}
for (int j = 0; j < 16; j++)
{
int killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 2.5f);
Main.dust[killDust].noGravity = true;
Main.dust[killDust].velocity *= 3f;
killDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, default, 1.5f);
Main.dust[killDust].velocity *= 2f;
Main.dust[killDust].noGravity = true;
}
if (!Main.dedServ)
{
for (int k = 0; k < 2; k++)
{
int gored = Gore.NewGore(Projectile.GetSource_Death(), Projectile.position + new Vector2((float)(Projectile.width * Main.rand.Next(100)) / 100f, (float)(Projectile.height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default, Main.rand.Next(61, 64), 1f);
Gore gore = Main.gore[gored];
gore.velocity *= 0.3f;
gore.velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
gore.velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
}
}
if (Projectile.owner == Main.myPlayer)
{
Projectile.localAI[1] = -1f;
Projectile.maxPenetrate = 0;
Projectile.Damage();
}
for (int l = 0; l < 5; l++)
{
int dustType = Utils.SelectRandom(Main.rand, new int[]
{
107,
259,
158
});
int exploding = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 2.5f * (float)Projectile.direction, -2.5f, 0, default, 1f);
Main.dust[exploding].alpha = 200;
Main.dust[exploding].velocity *= 2.4f;
Main.dust[exploding].scale += Main.rand.NextFloat();
}
}
public override bool PreDraw(ref Color lightColor)
{
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1);
return false;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 693 B

-35
View File
@@ -1,35 +0,0 @@
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class AftershockRock : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public override void SetDefaults()
{
Projectile.width = 38;
Projectile.height = 38;
Projectile.aiStyle = ProjAIStyleID.GroundProjectile;
Projectile.friendly = true;
Projectile.penetrate = 3;
Projectile.MaxUpdates = 3;
Projectile.DamageType = DamageClass.Melee;
Projectile.timeLeft = 300 * Projectile.MaxUpdates;
Projectile.ignoreWater = true;
AIType = ProjectileID.BoulderStaffOfEarth;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10 * Projectile.MaxUpdates;
Projectile.tileCollide = false;
}
public override void AI()
{
if (Projectile.Center.Y > Projectile.ai[2])
Projectile.tileCollide = true;
else
Projectile.tileCollide = false;
}
}
}
-80
View File
@@ -1,80 +0,0 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class EssenceFlame2 : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public override string Texture => "CalamityMod/Projectiles/Healing/EssenceFlame";
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 4;
ProjectileID.Sets.CultistIsResistantTo[Type] = true;
}
public override void SetDefaults()
{
Projectile.width = 20;
Projectile.height = 20;
Projectile.friendly = true;
Projectile.penetrate = 1;
Projectile.tileCollide = false;
Projectile.DamageType = DamageClass.Melee;
Projectile.timeLeft = 180;
Projectile.alpha = 255;
Projectile.extraUpdates = 3;
}
public override bool? CanHitNPC(NPC target) => Projectile.timeLeft < 150 && target.CanBeChasedBy(Projectile);
public override void AI()
{
Projectile.alpha -= 5;
Projectile.frameCounter++;
if (Projectile.frameCounter > 16)
{
Projectile.frame++;
Projectile.frameCounter = 0;
}
if (Projectile.frame > 3)
Projectile.frame = 0;
if (Projectile.timeLeft < 150)
CalamityUtils.HomeInOnNPC(Projectile, true, 760f, 10f, 20f);
}
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.Item74, Projectile.Center);
Projectile.position.X = Projectile.position.X + (float)(Projectile.width / 2);
Projectile.position.Y = Projectile.position.Y + (float)(Projectile.height / 2);
Projectile.width = 50;
Projectile.height = 50;
Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2);
Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2);
for (int i = 0; i < 5; i++)
{
int essenceDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
Main.dust[essenceDust].velocity *= 3f;
if (Main.rand.NextBool())
{
Main.dust[essenceDust].scale = 0.5f;
Main.dust[essenceDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
}
}
for (int j = 0; j < 8; j++)
{
int essenceDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 3f);
Main.dust[essenceDust2].noGravity = true;
Main.dust[essenceDust2].velocity *= 5f;
essenceDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.ShadowbeamStaff, 0f, 0f, 100, default, 2f);
Main.dust[essenceDust2].velocity *= 2f;
}
}
}
}
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged
public class LeviatitanMeteor : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public override string Texture => "CalamityMod/Projectiles/Melee/AftershockRock";
public override void SetStaticDefaults()
{
ProjectileID.Sets.TrailCacheLength[Type] = 5;
File renamed without changes.

Before

Width:  |  Height:  |  Size: 836 B

After

Width:  |  Height:  |  Size: 836 B

-71
View File
@@ -1,71 +0,0 @@
using System;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class AcidShrapnel : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Rogue";
public override string Texture => "CalamityMod/Projectiles/Rogue/BarrelShrapnel";
public bool HitTile = false;
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 3;
}
public override void SetDefaults()
{
Projectile.width = 12;
Projectile.height = 14;
Projectile.friendly = true;
Projectile.penetrate = 1;
Projectile.timeLeft = 160;
Projectile.tileCollide = true;
Projectile.DamageType = RogueDamageClass.Instance;
Projectile.ignoreWater = true;
}
public override void AI()
{
Projectile.ai[0] += 1f;
if (HitTile)
{
Projectile.velocity.X = 0f;
Projectile.rotation = MathHelper.Pi;
}
else
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
Projectile.velocity.Y += 0.2f;
}
public override bool OnTileCollide(Vector2 oldVelocity)
{
HitTile = true;
return false;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
Projectile.Kill();
}
public override void OnHitPlayer(Player target, Player.HurtInfo info)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
Projectile.Kill();
}
public override void OnKill(int timeLeft)
{
for (int i = 0; i < 15; i++)
{
Dust dust = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.SulphurousSeaAcid);
dust.velocity = Vector2.UnitY.RotatedBy(i / 15f * MathHelper.TwoPi) * 3f * (float)Math.Cos(i / 15f * MathHelper.TwoPi);
dust.scale = 2.5f;
dust.noGravity = true;
}
}
}
}
@@ -1,131 +0,0 @@
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class GreenDonkeyKongReference : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Rogue";
public override string Texture => "CalamityMod/Items/Weapons/Rogue/AcidicRainBarrel";
public float cooldown = 0f;
public float oldVelocityX = 0f;
public override void SetStaticDefaults()
{
ProjectileID.Sets.TrailCacheLength[Type] = 5;
ProjectileID.Sets.TrailingMode[Type] = 0;
}
public override void SetDefaults()
{
Projectile.width = 48;
Projectile.height = 48;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.penetrate = -1;
Projectile.timeLeft = 480;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = -1;
Projectile.DamageType = RogueDamageClass.Instance;
}
public bool CollideX => Projectile.oldPosition.X == Projectile.position.X;
public override void AI()
{
bool stealthS = Projectile.Calamity().stealthStrike;
if (Projectile.localAI[0] == 0f)
{
Projectile.ai[1] = stealthS.ToInt() == 0 ? 1 : 3;
Projectile.localAI[0] = 1f;
}
Projectile.rotation += Math.Sign(Projectile.velocity.X) * MathHelper.ToRadians(8f);
if (Projectile.velocity.Y < 15f)
{
Projectile.velocity.Y += 0.3f;
}
if (CollideX && cooldown == 0)
{
BounceEffects();
Projectile.velocity.X = -oldVelocityX;
}
else if (cooldown > 0)
{
cooldown -= 1f;
}
if (Projectile.velocity.X != 0f)
{
oldVelocityX = Math.Sign(Projectile.velocity.X) * 12f;
}
}
public override bool OnTileCollide(Vector2 oldVelocity) => false;
public void BounceEffects()
{
bool stealthS = Projectile.Calamity().stealthStrike;
int projectileCount = 8;
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
if (stealthS)
{
projectileCount += 5; //more shit the closer we are to death
}
for (int i = 0; i < projectileCount; i++)
{
if (Main.rand.NextBool(3))
{
Vector2 shrapnelVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(30f));
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity + shrapnelVelocity,
ModContent.ProjectileType<AcidShrapnel>(), Projectile.damage, 3f, Projectile.owner);
}
else
{
Vector2 acidVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f));
int acidIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity + acidVelocity,
ModContent.ProjectileType<AcidBarrelDrop>(),
(int)(Projectile.damage * 0.75f), 1f, Projectile.owner);
if (acidIndex.WithinBounds(Main.maxProjectiles))
{
Main.projectile[acidIndex].DamageType = RogueDamageClass.Instance;
Main.projectile[acidIndex].timeLeft = 300;
Main.projectile[acidIndex].usesLocalNPCImmunity = true;
Main.projectile[acidIndex].localNPCHitCooldown = -1;
}
}
}
if (stealthS)
{
for (int i = 0; i < 6; i++)
{
Vector2 acidVelocity = (Vector2.UnitY * (-16f + Main.rand.NextFloat(-3, 12f))).RotatedByRandom((double)MathHelper.ToRadians(40f));
int acidIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity + acidVelocity,
ModContent.ProjectileType<AcidBarrelDrop>(),
(int)(Projectile.damage * 0.667f), 1f, Projectile.owner);
if (acidIndex.WithinBounds(Main.maxProjectiles))
{
Main.projectile[acidIndex].DamageType = RogueDamageClass.Instance;
Main.projectile[acidIndex].timeLeft = 420;
}
}
}
Projectile.ai[1]--;
cooldown = 15;
if (Projectile.ai[1] <= 0)
{
Projectile.Kill();
}
}
public override bool PreDraw(ref Color lightColor)
{
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2);
return false;
}
}
}
-84
View File
@@ -1,84 +0,0 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class SkyStabberProj : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Rogue";
public override string Texture => "CalamityMod/Items/Weapons/Rogue/SkyStabber";
public override void SetDefaults()
{
Projectile.width = 15;
Projectile.height = 15;
Projectile.friendly = true;
Projectile.DamageType = RogueDamageClass.Instance;
Projectile.tileCollide = true;
Projectile.penetrate = 10;
Projectile.timeLeft = 1000;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 30;
}
public override void AI()
{
Projectile.ai[0] += 1f;
if (Projectile.ai[0] >= 90f)
{
Projectile.velocity.X *= 0.98f;
Projectile.velocity.Y *= 0.98f;
}
else
{
Projectile.rotation += 0.3f * (float)Projectile.direction;
}
Player player = Main.player[Projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.killSpikyBalls)
{
Projectile.active = false;
Projectile.netUpdate = true;
}
}
// Makes the projectile bounce infinitely, as it stops mid-air anyway.
public override bool OnTileCollide(Vector2 oldVelocity)
{
Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height);
if (Projectile.velocity.X != oldVelocity.X)
{
Projectile.velocity.X = -oldVelocity.X * 0.6f;
}
if (Projectile.velocity.Y != oldVelocity.Y)
{
Projectile.velocity.Y = -oldVelocity.Y * 0.6f;
}
return false;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => OnHitEffects(target.Center);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => OnHitEffects(target.Center);
private void OnHitEffects(Vector2 targetPos)
{
if (Projectile.Calamity().stealthStrike)
{
var source = Projectile.GetSource_FromThis();
for (int n = 0; n < 4; n++)
{
Projectile feather = CalamityUtils.ProjectileRain(source, targetPos, 400f, 100f, 500f, 800f, 20f, ModContent.ProjectileType<StickyFeatherAero>(), (int)(Projectile.damage * 0.25), Projectile.knockBack * 0.25f, Projectile.owner);
if (feather.whoAmI.WithinBounds(Main.maxProjectiles))
feather.DamageType = RogueDamageClass.Instance;
}
}
}
}
}
@@ -4,11 +4,11 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Typeless
{
public class AcidBarrelDrop : ModProjectile, ILocalizedModType
public class RustyMedallionDroplet : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Rogue";
public new string LocalizationCategory => "Projectiles.Typeless";
public override string Texture => "CalamityMod/Projectiles/Environment/AcidDrop";
public override void SetStaticDefaults()
@@ -25,10 +25,11 @@ namespace CalamityMod.Projectiles.Rogue
Projectile.tileCollide = true;
Projectile.ignoreWater = false;
Projectile.timeLeft = 840;
Projectile.penetrate = 2;
Projectile.extraUpdates = 2;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = -1;
Projectile.DamageType = RogueDamageClass.Instance;
Projectile.DamageType = DamageClass.Generic;
}
public override void AI()
{
@@ -40,17 +41,7 @@ namespace CalamityMod.Projectiles.Rogue
dust.velocity = -Projectile.velocity * 0.4f;
}
if (Projectile.ai[0] < 3)
{
if (Projectile.timeLeft == 839)
Projectile.velocity *= 0.5f;
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
if (Projectile.velocity.Y <= 12f)
{
Projectile.velocity.Y += 0.15f;
}
Projectile.tileCollide = Projectile.timeLeft <= 300;
}
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
}
public override bool OnTileCollide(Vector2 oldVelocity)
{
@@ -55,7 +55,7 @@ namespace CalamityMod.Systems.Collections
ProjectileID.SporeGas3
],
[ // Set 6: Astral Staff and Asteroid Staff
[ // Set 6: Astral Staff
ModContent.ProjectileType<AstralCrystal>(),
ModContent.ProjectileType<AstralCrystalInvisibleExplosion>()
],
@@ -16,7 +16,6 @@ namespace CalamityMod.Systems.Collections
{
List =
[
ItemType<SkyStabber>(),
ItemType<GodsParanoia>(),
ItemType<SlickCane>(),
ItemType<Mycoroot>(),