This commit is contained in:
DominicKarma42 committed 2020-03-29 20:54:02 -05:00
commit be97543c22
109 files changed
+166 -793

No files matched your search

+1
View File
@@ -57,6 +57,7 @@ using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.NPCs.Yharon;
using CalamityMod.Projectiles.Boss;
using CalamityMod.Projectiles.Enemy;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Ranged;
+1 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Tools
private static int HammerPower = 130;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Flamebeak Hampick");
DisplayName.SetDefault("Seismic Hampick");
Tooltip.SetDefault(@"Capable of mining Lihzahrd Bricks
Left click to use as a pickaxe
Right click to use as a hammer");
+10 -2
View File
@@ -1,5 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -30,11 +31,18 @@ namespace CalamityMod.Items.Weapons.Melee
item.height = 38;
item.value = Item.buyPrice(1, 20, 0, 0);
item.rare = 10;
item.shoot = ModContent.ProjectileType<AccretionDiskMeleeProj>();
item.shoot = ModContent.ProjectileType<AccretionDiskProj>();
item.shootSpeed = 13f;
item.Calamity().customRarity = CalamityRarity.Turquoise;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceMelee = true;
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
+1 -1
View File
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Chaotrix");
DisplayName.SetDefault("Fault Line");
Tooltip.SetDefault("Explodes on enemy hits\n" +
"A very agile yoyo");
ItemID.Sets.Yoyo[item.type] = true;
+1 -1
View File
@@ -1,4 +1,4 @@
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+1 -1
View File
@@ -1,6 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using System;
+9 -2
View File
@@ -1,4 +1,4 @@
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -31,11 +31,18 @@ namespace CalamityMod.Items.Weapons.Melee
item.height = 54;
item.value = Item.buyPrice(1, 40, 0, 0);
item.rare = 10;
item.shoot = ModContent.ProjectileType<EradicatorMeleeProjectile>();
item.shoot = ModContent.ProjectileType<EradicatorProjectile>();
item.shootSpeed = 12f;
item.Calamity().customRarity = CalamityRarity.PureGreen;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceMelee = true;
return false;
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Vector2 origin = new Vector2(31f, 29f);
+1 -1
View File
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Exsanguination Lance");
DisplayName.SetDefault("Vulcanite Lance");
Tooltip.SetDefault("Explodes on enemy hits and summons homing flares on critical hits");
}
+11 -3
View File
@@ -1,5 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -10,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Flame Scythe");
DisplayName.SetDefault("Subduction Slicer");
Tooltip.SetDefault("Throws a scythe that explodes on enemy hits");
}
@@ -30,10 +31,17 @@ namespace CalamityMod.Items.Weapons.Melee
item.height = 48;
item.value = Item.buyPrice(0, 80, 0, 0);
item.rare = 8;
item.shoot = ModContent.ProjectileType<FlameScytheProjectileMelee>();
item.shoot = ModContent.ProjectileType<FlameScytheProjectile>();
item.shootSpeed = 16f;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceMelee = true;
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
+1 -1
View File
@@ -1,5 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
+1 -1
View File
@@ -4,7 +4,7 @@ using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+10 -2
View File
@@ -1,5 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -29,10 +30,17 @@ namespace CalamityMod.Items.Weapons.Melee
item.height = 38;
item.value = Item.buyPrice(0, 60, 0, 0);
item.rare = 7;
item.shoot = ModContent.ProjectileType<MangroveChakramProjectileMelee>();
item.shoot = ModContent.ProjectileType<MangroveChakramProjectile>();
item.shootSpeed = 16f;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceMelee = true;
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
+1 -1
View File
@@ -1,6 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
+10 -2
View File
@@ -1,4 +1,5 @@
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -29,10 +30,17 @@ namespace CalamityMod.Items.Weapons.Melee
item.height = 68;
item.value = Item.buyPrice(0, 48, 0, 0);
item.rare = 6;
item.shoot = ModContent.ProjectileType<PwnagehammerMeleeProj>();
item.shoot = ModContent.ProjectileType<PwnagehammerProj>();
item.shootSpeed = 12f;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceMelee = true;
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
+1 -1
View File
@@ -1,6 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria;
using Terraria.ID;
+10 -2
View File
@@ -1,5 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -28,10 +29,17 @@ namespace CalamityMod.Items.Weapons.Melee
item.height = 34;
item.value = Item.buyPrice(0, 2, 0, 0);
item.rare = 2;
item.shoot = ModContent.ProjectileType<SeashellBoomerangProjectileMelee>();
item.shoot = ModContent.ProjectileType<SeashellBoomerangProjectile>();
item.shootSpeed = 11.5f;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceMelee = true;
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
+1 -1
View File
@@ -1,4 +1,4 @@
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
+1 -1
View File
@@ -1,6 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -1,6 +1,7 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -31,11 +32,18 @@ namespace CalamityMod.Items.Weapons.Melee
item.height = 160;
item.value = Item.buyPrice(5, 0, 0, 0);
item.rare = 10;
item.shoot = ModContent.ProjectileType<TriactisOPHammerMelee>();
item.shoot = ModContent.ProjectileType<TriactisOPHammer>();
item.shootSpeed = 25f;
item.Calamity().customRarity = CalamityRarity.Developer;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceMelee = true;
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
+10 -2
View File
@@ -1,5 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -30,10 +31,17 @@ namespace CalamityMod.Items.Weapons.Melee
item.height = 28;
item.value = Item.buyPrice(0, 80, 0, 0);
item.rare = 8;
item.shoot = ModContent.ProjectileType<OPHammerMelee>();
item.shoot = ModContent.ProjectileType<OPHammer>();
item.shootSpeed = 14f;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
Main.projectile[proj].Calamity().forceMelee = true;
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
+1 -1
View File
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Ranged
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Greatbow of Turmoil");
DisplayName.SetDefault("Continental Greatbow");
Tooltip.SetDefault("Wooden arrows are set alight with fire\n" +
"Fires 3 arrows at once\n" +
"Fires 2 additional cursed, hellfire, or ichor arrows");
+1 -1
View File
@@ -1,5 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Hybrid;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+1 -1
View File
@@ -1,4 +1,4 @@
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+1 -1
View File
@@ -1,6 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using System;
+1 -1
View File
@@ -1,4 +1,4 @@
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
+2 -2
View File
@@ -1,5 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Hybrid;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Flame Scythe");
DisplayName.SetDefault("Subduction Slicer");
Tooltip.SetDefault("Throws a scythe that explodes on enemy hits");
}
+1 -1
View File
@@ -1,5 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
+1 -1
View File
@@ -4,7 +4,7 @@ using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+1 -1
View File
@@ -1,5 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Hybrid;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+1 -1
View File
@@ -1,6 +1,6 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
+1 -1
View File
@@ -1,4 +1,4 @@
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Hybrid;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -1,5 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria;
using Terraria.ID;
+1 -1
View File
@@ -1,5 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Hybrid;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+1 -1
View File
@@ -1,4 +1,4 @@
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
+1 -1
View File
@@ -1,5 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -1,5 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria;
using Terraria.ID;
+1 -1
View File
@@ -1,5 +1,5 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Hybrid;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+1 -1
View File
@@ -1,7 +1,7 @@
using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Hybrid;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
+3 -2
View File
@@ -5,6 +5,7 @@ using CalamityMod.Dusts;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Projectiles.Healing;
using CalamityMod.Projectiles.Hybrid;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Melee.Yoyos;
@@ -1951,10 +1952,10 @@ namespace CalamityMod.Projectiles
int projectile2 = Projectile.NewProjectile(value.X, value.Y, velocity.X, velocity.Y, spawnedProjectile, (int)(projectile.damage * damageMult), projectile.knockBack, projectile.owner, 0f, 0f);
if (projectile.type == ModContent.ProjectileType<CnidarianYoyo>() || projectile.type == ModContent.ProjectileType<GodsGambitYoyo>() ||
projectile.type == ModContent.ProjectileType<ShimmersparkYoyo>() || projectile.type == ModContent.ProjectileType<VerdantYoyo>() || projectile.type == ModContent.ProjectileType<EradicatorMeleeProjectile>())
projectile.type == ModContent.ProjectileType<ShimmersparkYoyo>() || projectile.type == ModContent.ProjectileType<VerdantYoyo>() || (projectile.type == ModContent.ProjectileType<EradicatorProjectile>() && projectile.melee))
Main.projectile[projectile2].Calamity().forceMelee = true;
if (projectile.type == ModContent.ProjectileType<EradicatorProjectile>())
if (projectile.type == ModContent.ProjectileType<EradicatorProjectile>() && projectile.Calamity().rogue)
Main.projectile[projectile2].Calamity().forceRogue = true;
}
}
@@ -5,7 +5,7 @@ using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Hybrid
{
public class AccretionDisk2 : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -7,7 +7,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Hybrid
{
public class AccretionDiskProj : ModProjectile
{
@@ -102,8 +102,16 @@ namespace CalamityMod.Projectiles.Rogue
for (i = 0; i < 4; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<AccretionDisk2>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<AccretionDisk2>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
int disk = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<AccretionDisk2>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
if (projectile.melee)
Main.projectile[disk].Calamity().forceMelee = true;
else
Main.projectile[disk].Calamity().forceRogue = true;
int disk2 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<AccretionDisk2>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
if (projectile.melee)
Main.projectile[disk2].Calamity().forceMelee = true;
else
Main.projectile[disk2].Calamity().forceRogue = true;
}
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -5,7 +5,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Magic
namespace CalamityMod.Projectiles.Hybrid
{
public class AetherBeam : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 153 B

After

Width:  |  Height:  |  Size: 153 B

@@ -5,7 +5,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
namespace CalamityMod.Projectiles.Hybrid
{
public class CorpusAvertorClone : ModProjectile
{
@@ -56,41 +56,7 @@ namespace CalamityMod.Projectiles.Typeless
}
projectile.width = projectile.height = (int)(24f * projectile.scale);
float num472 = projectile.Center.X;
float num473 = projectile.Center.Y;
float num474 = 300f;
bool flag17 = false;
for (int num475 = 0; num475 < 200; num475++)
{
if (Main.npc[num475].CanBeChasedBy(projectile, false))
{
float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2);
float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2);
float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477);
if (num478 < num474)
{
num474 = num478;
num472 = num476;
num473 = num477;
flag17 = true;
}
}
}
if (flag17)
{
float num483 = 16f;
Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f);
float num484 = num472 - vector35.X;
float num485 = num473 - vector35.Y;
float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485));
num486 = num483 / num486;
num484 *= num486;
num485 *= num486;
projectile.velocity.X = (projectile.velocity.X * 20f + num484) / 21f;
projectile.velocity.Y = (projectile.velocity.Y * 20f + num485) / 21f;
}
CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 300f, 16f, 20f);
}
public override Color? GetAlpha(Color lightColor)
File renamed without changes.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 480 B

@@ -5,7 +5,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
namespace CalamityMod.Projectiles.Hybrid
{
public class CorpusAvertorProj : ModProjectile
{
@@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Typeless
velocity *= mult;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, velocity.X, velocity.Y, ModContent.ProjectileType<CorpusAvertorClone>(),
(int)((float)projectile.damage * mult), projectile.knockBack * mult, projectile.owner, projectile.ai[0], projectile.melee ? 0f : 1f);
(int)(projectile.damage * mult), projectile.knockBack * mult, projectile.owner, projectile.ai[0], projectile.melee ? 0f : 1f);
}
}
else
File renamed without changes.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 480 B

@@ -5,7 +5,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Hybrid
{
public class EmpyreanKnife : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 372 B

@@ -1,4 +1,4 @@
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Melee;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
@@ -6,7 +6,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Hybrid
{
public class EradicatorProjectile : ModProjectile
{
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue
public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
{
Vector2 origin = new Vector2(31f, 29f);
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Rogue/EradicatorProjectileGlow"), projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, origin, 1f, SpriteEffects.None, 0f);
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Hybrid/EradicatorProjectileGlow"), projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, origin, 1f, SpriteEffects.None, 0f);
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -5,7 +5,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Hybrid
{
public class FlameScytheProjectile : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -1,13 +1,13 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Melee;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
namespace CalamityMod.Projectiles.Hybrid
{
public class GalaxySmasherHammer : ModProjectile
{
@@ -186,8 +186,11 @@ namespace CalamityMod.Projectiles.Typeless
// NebulaShot projectile adjusts its own damage type based on ai[0]
if (projectile.owner == Main.myPlayer)
{
float damageType = projectile.melee ? 1f : 2f;
int proj = Projectile.NewProjectile(startPoint, velocity, laserID, laserDamage, laserKB, projectile.owner, damageType, 0f);
int proj = Projectile.NewProjectile(startPoint, velocity, laserID, laserDamage, laserKB, projectile.owner);
if (projectile.melee)
Main.projectile[proj].Calamity().forceMelee = true;
else
Main.projectile[proj].Calamity().forceRogue = true;
Main.projectile[proj].tileCollide = false;
Main.projectile[proj].timeLeft = 30;
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.IO;
@@ -6,7 +7,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
namespace CalamityMod.Projectiles.Hybrid
{
public class KelvinCatalystBoomerang : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -4,7 +4,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Hybrid
{
public class MangroveChakramProjectile : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -6,7 +6,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
namespace CalamityMod.Projectiles.Hybrid
{
public class NanoblackMain : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -5,7 +5,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
namespace CalamityMod.Projectiles.Hybrid
{
public class NanoblackSplit : ModProjectile
{
@@ -182,7 +182,7 @@ namespace CalamityMod.Projectiles.Typeless
if (projectile.spriteDirection == -1)
eff = SpriteEffects.FlipHorizontally;
Vector2 origin = new Vector2(fWidthOverTwo, fHeightOverTwo);
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Typeless/NanoblackSplitGlow"),
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Hybrid/NanoblackSplitGlow"),
projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation,
origin, projectile.scale, eff, 0f);
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -6,7 +6,7 @@ using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Hybrid
{
public class OPHammer : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 957 B

After

Width:  |  Height:  |  Size: 957 B

@@ -2,7 +2,7 @@
using Microsoft.Xna.Framework.Graphics;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Hybrid
{
public class PwnagehammerProj : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -3,7 +3,7 @@ using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
namespace CalamityMod.Projectiles.Hybrid
{
public class ScourgeoftheCosmosMini : ModProjectile
{
@@ -169,7 +169,7 @@ namespace CalamityMod.Projectiles.Melee
int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type];
int y6 = num214 * projectile.frame;
Vector2 origin = new Vector2(9f, 10f);
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Melee/ScourgeoftheCosmosMiniGlow"), projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Color.White, projectile.rotation, origin, projectile.scale, SpriteEffects.None, 0f);
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Hybrid/ScourgeoftheCosmosMiniGlow"), projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Color.White, projectile.rotation, origin, projectile.scale, SpriteEffects.None, 0f);
}
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 546 B

After

Width:  |  Height:  |  Size: 546 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

@@ -5,7 +5,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
namespace CalamityMod.Projectiles.Hybrid
{
public class ScourgeoftheCosmosProj : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 716 B

After

Width:  |  Height:  |  Size: 716 B

@@ -1,6 +1,6 @@
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Hybrid
{
public class SeashellBoomerangProjectile : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 492 B

@@ -6,7 +6,7 @@ using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
namespace CalamityMod.Projectiles.Hybrid
{
public class StellarContemptHammer : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -5,7 +5,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
namespace CalamityMod.Projectiles.Hybrid
{
public class TerraDiskProjectile : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -4,7 +4,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
namespace CalamityMod.Projectiles.Hybrid
{
public class TerraDiskProjectile2 : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 487 B

@@ -6,7 +6,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
namespace CalamityMod.Projectiles.Hybrid
{
public class TriactisOPHammer : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

-58
View File
@@ -1,58 +0,0 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class AccretionDisk2Melee : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Accretion Disk");
ProjectileID.Sets.TrailCacheLength[projectile.type] = 10;
ProjectileID.Sets.TrailingMode[projectile.type] = 1;
}
public override void SetDefaults()
{
projectile.width = 56;
projectile.height = 56;
projectile.alpha = 120;
projectile.friendly = true;
projectile.melee = true;
projectile.tileCollide = false;
projectile.penetrate = -1;
projectile.aiStyle = 3;
projectile.timeLeft = 60;
aiType = ProjectileID.WoodenBoomerang;
}
public override void AI()
{
if (Main.rand.NextBool(2))
{
int num250 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 66, (float)(projectile.direction * 2), 0f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 0.5f);
Main.dust[num250].noGravity = true;
Main.dust[num250].velocity *= 0f;
}
Lighting.AddLight(projectile.Center, 0.15f, 1f, 0.25f);
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
target.AddBuff(ModContent.BuffType<Plague>(), 120);
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2);
return false;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

-129
View File
@@ -1,129 +0,0 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class AccretionDiskMeleeProj : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Accretion Disk");
ProjectileID.Sets.TrailCacheLength[projectile.type] = 10;
ProjectileID.Sets.TrailingMode[projectile.type] = 1;
}
public override void SetDefaults()
{
projectile.width = 56;
projectile.height = 56;
projectile.friendly = true;
projectile.melee = true;
projectile.tileCollide = false;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 6;
projectile.penetrate = -1;
projectile.aiStyle = 3;
projectile.timeLeft = 400;
aiType = ProjectileID.WoodenBoomerang;
}
public override void AI()
{
if (Main.rand.NextBool(2))
{
for (int num468 = 0; num468 < 1; num468++)
{
int num250 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 66, (float)(projectile.direction * 2), 0f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.3f);
Main.dust[num250].noGravity = true;
Main.dust[num250].velocity *= 0f;
}
}
Lighting.AddLight(projectile.Center, 0.15f, 1f, 0.25f);
int[] array = new int[20];
int num428 = 0;
float distance = 300f;
bool flag14 = false;
for (int num430 = 0; num430 < 200; num430++)
{
if (Main.npc[num430].CanBeChasedBy(projectile, false))
{
float extraDistance = (float)(Main.npc[num430].width / 2) + (float)(Main.npc[num430].height / 2);
bool useCollisionDetection = extraDistance < distance;
bool canHit = true;
if (useCollisionDetection)
canHit = Collision.CanHit(projectile.Center, 1, 1, Main.npc[num430].Center, 1, 1);
if (Vector2.Distance(Main.npc[num430].Center, projectile.Center) < (distance + extraDistance) && canHit)
{
if (num428 < 20)
{
array[num428] = num430;
num428++;
}
flag14 = true;
}
}
}
if (flag14)
{
int num434 = Main.rand.Next(num428);
num434 = array[num434];
float num435 = Main.npc[num434].position.X + (float)(Main.npc[num434].width / 2);
float num436 = Main.npc[num434].position.Y + (float)(Main.npc[num434].height / 2);
projectile.localAI[0] += 1f;
if (projectile.localAI[0] > 8f)
{
projectile.localAI[0] = 0f;
float num437 = 6f;
Vector2 value10 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f);
value10 += projectile.velocity * 4f;
float num438 = num435 - value10.X;
float num439 = num436 - value10.Y;
float num440 = (float)Math.Sqrt((double)(num438 * num438 + num439 * num439));
num440 = num437 / num440;
if (Main.rand.NextBool(3))
{
if (projectile.owner == Main.myPlayer)
{
float spread = 45f * 0.0174f;
double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
int i;
for (i = 0; i < 4; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<AccretionDisk2Melee>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<AccretionDisk2Melee>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
}
}
}
}
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
target.AddBuff(ModContent.BuffType<Plague>(), 120);
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2);
return false;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

+1 -1
View File
@@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Melee
if (projectile.ai[1] == 0f)
{
// Find the closest target. The range decreases each time you find a closer target.
for (int i = 0; i < 200; ++i)
for (int i = 0; i < Main.maxNPCs; ++i)
{
if (Main.npc[i].CanBeChasedBy(projectile, false))
{
@@ -1,59 +0,0 @@
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class EradicatorMeleeProjectile : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Eradicator");
ProjectileID.Sets.TrailCacheLength[projectile.type] = 10;
ProjectileID.Sets.TrailingMode[projectile.type] = 1;
}
public override void SetDefaults()
{
projectile.width = 58;
projectile.height = 58;
projectile.friendly = true;
projectile.melee = true;
projectile.tileCollide = false;
projectile.penetrate = -1;
projectile.aiStyle = 3;
projectile.timeLeft = 180;
aiType = ProjectileID.WoodenBoomerang;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 3;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, 0.35f, 0f, 0.25f);
CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 6f, 8f, 20, ModContent.ProjectileType<NebulaShot>());
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2);
return false;
}
public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
{
Vector2 origin = new Vector2(31f, 29f);
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Projectiles/Melee/EradicatorMeleeProjectileGlow"), projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, origin, projectile.scale, SpriteEffects.None, 0f);
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.OnFire, 600);
target.AddBuff(BuffID.Frostburn, 600);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

@@ -1,64 +0,0 @@
using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class FlameScytheProjectileMelee : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Scythe");
}
public override void SetDefaults()
{
projectile.width = 30;
projectile.height = 30;
projectile.friendly = true;
projectile.melee = true;
projectile.penetrate = -1;
projectile.aiStyle = 3;
projectile.extraUpdates = 1;
projectile.timeLeft = 600;
projectile.alpha = 55;
aiType = ProjectileID.WoodenBoomerang;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, 0.25f, 0.15f, 0f);
if (Main.rand.NextBool(5))
{
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, Main.rand.NextBool(3) ? 16 : 127, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
}
Vector2 goreVec = new Vector2(projectile.position.X + (float)(projectile.width / 2) + projectile.velocity.X, projectile.position.Y + (float)(projectile.height / 2) + projectile.velocity.Y);
if (Main.rand.NextBool(8))
{
int smoke = Gore.NewGore(goreVec, default, Main.rand.Next(375, 378), 0.75f);
Main.gore[smoke].behindTiles = true;
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D tex = Main.projectileTexture[projectile.type];
spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f);
return false;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.immune[projectile.owner] = 6;
target.AddBuff(BuffID.OnFire, 300);
if (projectile.owner == Main.myPlayer)
{
int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<FuckYou>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
Main.projectile[boom].Calamity().forceMelee = true;
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Melee
{
if (projectile.owner == Main.myPlayer)
{
int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, SpeedX, SpeedY, ModContent.ProjectileType<NebulaShot>(), (int)(350f * Main.player[projectile.owner].meleeDamage), projectile.knockBack, projectile.owner, 0f, 0f);
int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, SpeedX, SpeedY, ModContent.ProjectileType<NebulaShot>(), (int)(350f * Main.player[projectile.owner].MeleeDamage()), projectile.knockBack, projectile.owner, 0f, 0f);
Main.projectile[projectile1].Calamity().forceMelee = true;
Main.projectile[projectile1].aiStyle = 1;
}
@@ -1,50 +0,0 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class MangroveChakramProjectileMelee : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Chakram");
}
public override void SetDefaults()
{
projectile.width = 30;
projectile.height = 30;
projectile.friendly = true;
projectile.melee = true;
projectile.penetrate = -1;
projectile.aiStyle = 3;
projectile.timeLeft = 600;
aiType = ProjectileID.WoodenBoomerang;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, 0f, 0.25f, 0f);
if (Main.rand.NextBool(5))
{
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 44, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D tex = Main.projectileTexture[projectile.type];
spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f);
return false;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.immune[projectile.owner] = 6;
target.AddBuff(BuffID.CursedInferno, 240);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

@@ -3,7 +3,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Ranged
namespace CalamityMod.Projectiles.Melee
{
public class NebulaShot : ModProjectile
{
@@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Ranged
projectile.height = 4;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.ranged = true;
projectile.melee = true;
projectile.alpha = 255;
projectile.penetrate = 1;
projectile.extraUpdates = 5;
@@ -35,12 +35,6 @@ namespace CalamityMod.Projectiles.Ranged
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 12);
}
// Force damage type based on AI variable (this is outdated code and the weapons themselves should set the force variables)
if (projectile.ai[0] == 1f)
projectile.Calamity().forceMelee = true;
else if (projectile.ai[0] == 2f)
projectile.Calamity().forceRogue = true;
if (projectile.alpha > 0)
{
projectile.alpha -= 15;
Loaded 100 of 109 files, more files were not shown because too many files have changed in this diff. Show more