This commit is contained in:
Andrew Marheine committed 2021-05-12 13:52:03 -05:00
commit 8051a3eac3
53 files changed
+364 -61

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 530 B

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 493 B

+3 -3
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Fabled Tortoise Shell");
DisplayName.SetDefault("Flame-Licked Shell");
Tooltip.SetDefault("50% reduced movement speed\n" +
"Enemies take damage when they hit you\n" +
"You move faster and lose 18 defense for 3 seconds if you take damage");
@@ -18,8 +18,8 @@ namespace CalamityMod.Items.Accessories
public override void SetDefaults()
{
item.defense = 36;
item.width = 20;
item.height = 24;
item.width = 36;
item.height = 42;
item.value = CalamityGlobalItem.Rarity5BuyPrice;
item.rare = ItemRarityID.Pink;
item.accessory = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

After

Width:  |  Height:  |  Size: 400 B

+2 -2
View File
@@ -15,8 +15,8 @@ namespace CalamityMod.Items.Accessories
public override void SetDefaults()
{
item.width = 36;
item.height = 32;
item.width = 34;
item.height = 56;
item.value = CalamityGlobalItem.Rarity7BuyPrice;
item.rare = ItemRarityID.Lime;
item.defense = 6;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 B

After

Width:  |  Height:  |  Size: 1.0 KiB

+5 -3
View File
@@ -1,5 +1,6 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -9,15 +10,16 @@ namespace CalamityMod.Items.Accessories
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Samurai Badge");
DisplayName.SetDefault("Warbanner of the Sun");
Tooltip.SetDefault("Increases melee damage, true melee damage and melee speed the closer you are to enemies\n" +
"Max boost is 30% increased melee damage, true melee damage and melee speed");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 5));
}
public override void SetDefaults()
{
item.width = 30;
item.height = 30;
item.width = 32;
item.height = 78;
item.rare = ItemRarityID.Purple;
item.Calamity().customRarity = CalamityRarity.Turquoise;
item.value = CalamityGlobalItem.Rarity12BuyPrice;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

After

Width:  |  Height:  |  Size: 3.3 KiB

+4 -2
View File
@@ -1,5 +1,6 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
@@ -15,12 +16,13 @@ namespace CalamityMod.Items.Accessories
"This reflect has a 120 second cooldown which is shared with all other dodges and reflects\n" +
"If this effect triggers you get a health regeneration boost for 5 seconds\n" +
"If the same enemy projectile type hits you again you will resist its damage by 15%");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 10));
}
public override void SetDefaults()
{
item.width = 26;
item.height = 26;
item.width = 58;
item.height = 44;
item.value = CalamityGlobalItem.Rarity12BuyPrice;
item.Calamity().customRarity = CalamityRarity.Turquoise;
item.rare = ItemRarityID.Purple;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 964 B

After

Width:  |  Height:  |  Size: 3.8 KiB

+4 -2
View File
@@ -2,6 +2,7 @@ using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.DataStructures;
namespace CalamityMod.Items.Accessories
{
@@ -14,12 +15,13 @@ namespace CalamityMod.Items.Accessories
"Sparks do extra damage in Hardmode\n" +
"Immunity to Electrified and you resist all electrical projectile and enemy damage\n" +
"Enemy bullets do half damage to you and are reflected back at the enemy for 800% their original damage");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 16));
}
public override void SetDefaults()
{
item.width = 26;
item.height = 26;
item.width = 42;
item.height = 56;
item.value = CalamityGlobalItem.Rarity2BuyPrice;
item.rare = ItemRarityID.Green;
item.accessory = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 5.1 KiB

+3 -3
View File
@@ -43,21 +43,21 @@ namespace CalamityMod.Items.Materials
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/AuricBar_Animated");
spriteBatch.Draw(texture, position, item.GetCurrentFrame(ref frame, ref frameCounter, 6, 16), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
spriteBatch.Draw(texture, position, item.GetCurrentFrame(ref frame, ref frameCounter, 5, 15), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
return false;
}
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/AuricBar_Animated");
spriteBatch.Draw(texture, item.position - Main.screenPosition, item.GetCurrentFrame(ref frame, ref frameCounter, 6, 16), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
spriteBatch.Draw(texture, item.position - Main.screenPosition, item.GetCurrentFrame(ref frame, ref frameCounter, 5, 15), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
return false;
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/AuricBarGlow");
spriteBatch.Draw(texture, item.position - Main.screenPosition, item.GetCurrentFrame(ref frame, ref frameCounter, 6, 16, false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
spriteBatch.Draw(texture, item.position - Main.screenPosition, item.GetCurrentFrame(ref frame, ref frameCounter, 5, 15, false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
}
public override void Update(ref float gravity, ref float maxFallSpeed)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 776 B

@@ -1,14 +1,17 @@
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables.Furniture.CraftingStations
{
public class DraedonsForge : ModItem
{
public override string Texture => "CalamityMod/Items/Placeables/Furniture/CraftingStations/CosmicAnvil";
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Draedon's Forge");
Tooltip.SetDefault("Used to craft uber-tier items");
DisplayName.SetDefault("Cosmic Anvil");
Tooltip.SetDefault("Used to craft Cosmilite tier items");
}
public override void SetDefaults()
@@ -22,7 +25,7 @@ namespace CalamityMod.Items.Placeables.Furniture.CraftingStations
item.useTime = 10;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.value = 5000000;
item.value = Item.sellPrice(platinum: 1);
item.rare = ItemRarityID.Red;
item.createTile = ModContent.TileType<Tiles.Furniture.CraftingStations.DraedonsForge>();
item.Calamity().customRarity = CalamityRarity.DarkBlue;
@@ -31,8 +34,8 @@ namespace CalamityMod.Items.Placeables.Furniture.CraftingStations
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddRecipeGroup("HardmodeForge");
recipe.AddRecipeGroup("HardmodeAnvil");
recipe.AddIngredient(ItemID.TinkerersWorkshop);
recipe.AddIngredient(ItemID.LunarCraftingStation);
recipe.AddIngredient(ItemID.LunarBar, 5);
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 5);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 604 B

+2 -2
View File
@@ -16,8 +16,8 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
item.width = 62;
item.height = 62;
item.width = 64;
item.height = 66;
item.scale = 2f;
item.damage = 55;
item.melee = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

+7 -7
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
item.width = 84;
item.width = 88;
item.damage = 60;
item.melee = true;
item.useAnimation = 30;
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.knockBack = 7f;
item.UseSound = SoundID.Item60;
item.autoReuse = true;
item.height = 84;
item.height = 90;
item.value = CalamityGlobalItem.Rarity11BuyPrice;
item.rare = ItemRarityID.Purple;
item.shoot = ModContent.ProjectileType<EonBeam>();
@@ -42,16 +42,16 @@ namespace CalamityMod.Items.Weapons.Melee
switch (Main.rand.Next(4))
{
case 0:
type = ModContent.ProjectileType<EonBeam>();
type = ModContent.ProjectileType<SwordsplosionBlue>();
break;
case 1:
type = ModContent.ProjectileType<EonBeamV2>();
type = ModContent.ProjectileType<SwordsplosionGreen>();
break;
case 2:
type = ModContent.ProjectileType<EonBeamV3>();
type = ModContent.ProjectileType<SwordsplosionPurple>();
break;
case 3:
type = ModContent.ProjectileType<EonBeamV4>();
type = ModContent.ProjectileType<SwordsplosionRed>();
break;
}
float num72 = Main.rand.Next(22, 30);
@@ -88,7 +88,7 @@ namespace CalamityMod.Items.Weapons.Melee
num79 *= num80;
float speedX4 = num78 + (float)Main.rand.Next(-360, 361) * 0.02f;
float speedY5 = num79 + (float)Main.rand.Next(-360, 361) * 0.02f;
Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 0f, 0f);
Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 2f, 0f);
}
return false;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

+2 -2
View File
@@ -22,8 +22,8 @@ namespace CalamityMod.Items.Weapons.Ranged
{
item.damage = 32;
item.ranged = true;
item.width = 58;
item.height = 22;
item.width = 82;
item.height = 34;
item.useTime = 7;
item.reuseDelay = 30;
item.useAnimation = 28;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 699 B

After

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 730 B

+3 -3
View File
@@ -19,8 +19,8 @@ namespace CalamityMod.Items.Weapons.Ranged
{
item.damage = 18;
item.ranged = true;
item.width = 50;
item.height = 24;
item.width = 66;
item.height = 34;
item.useTime = 9;
item.useAnimation = 9;
item.useStyle = ItemUseStyleID.HoldingOut;
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override Vector2? HoldoutOffset()
{
return new Vector2(-5, 0);
return new Vector2(-10, 0);
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 992 B

+2 -2
View File
@@ -24,8 +24,8 @@ namespace CalamityMod.Items.Weapons.Ranged
{
item.damage = 100;
item.ranged = true;
item.width = 54;
item.height = 38;
item.width = 80;
item.height = 46;
item.useTime = 12;
item.useAnimation = 12;
item.useStyle = ItemUseStyleID.HoldingOut;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 877 B

After

Width:  |  Height:  |  Size: 1.2 KiB

+3 -3
View File
@@ -18,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Ranged
{
item.damage = 924;
item.ranged = true;
item.width = 76;
item.height = 30;
item.width = 142;
item.height = 40;
item.useTime = 60;
item.useAnimation = 60;
item.useStyle = ItemUseStyleID.HoldingOut;
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged
// Terraria seems to really dislike high crit values in SetDefaults
public override void GetWeaponCrit(Player player, ref int crit) => crit += 5;
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
public override Vector2? HoldoutOffset() => new Vector2(-50, 0); //beeg gun
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

+2 -2
View File
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue
public override void SafeSetDefaults()
{
item.width = 80;
item.width = 106;
item.damage = 90;
item.noMelee = true;
item.noUseGraphic = true;
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Rogue
item.knockBack = 4f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 64;
item.height = 104;
item.shoot = ModContent.ProjectileType<ReaperProjectile>();
item.shootSpeed = 20f;
item.Calamity().rogue = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 443 B

+77
View File
@@ -0,0 +1,77 @@
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 SwordsplosionBlue : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Blue Sword");
}
public override void SetDefaults()
{
projectile.width = 20;
projectile.height = 20;
projectile.aiStyle = 27;
projectile.friendly = true;
projectile.melee = true;
projectile.tileCollide = false;
projectile.penetrate = 3;
projectile.timeLeft = 200;
aiType = ProjectileID.EnchantedBeam;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 10;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.3f / 255f, (255 - projectile.alpha) * 0.4f / 255f, (255 - projectile.alpha) * 1f / 255f);
if (projectile.localAI[1] > 7f)
{
int num308 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, new Color(Main.DiscoR, 203, 103), 1.2f);
Main.dust[num308].velocity *= 0.1f;
Main.dust[num308].noGravity = true;
}
projectile.rotation = projectile.velocity.ToRotation() + (float)Math.Atan(90);
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(Main.DiscoR, 203, 103, projectile.alpha);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
if (projectile.timeLeft > 195)
return false;
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 Kill(int timeLeft)
{
for (int k = 0; k < 7; k++)
{
int num308 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, 0f, 0f, 150, new Color(Main.DiscoR, 203, 103), 1.2f);
Main.dust[num308].noGravity = true;
}
}
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);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

+76
View File
@@ -0,0 +1,76 @@
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 SwordsplosionGreen : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Green Sword");
}
public override void SetDefaults()
{
projectile.width = 20;
projectile.height = 20;
projectile.aiStyle = 27;
projectile.friendly = true;
projectile.melee = true;
projectile.penetrate = 3;
projectile.timeLeft = 300;
aiType = ProjectileID.EnchantedBeam;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 10;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.3f / 255f, (255 - projectile.alpha) * 0.4f / 255f, (255 - projectile.alpha) * 1f / 255f);
if (projectile.localAI[1] > 7f)
{
int num308 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, new Color(53, Main.DiscoG, 255), 1.2f);
Main.dust[num308].velocity *= 0.1f;
Main.dust[num308].noGravity = true;
}
projectile.rotation = projectile.velocity.ToRotation() + (float)Math.Atan(90);
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(53, Main.DiscoG, 255, projectile.alpha);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
if (projectile.timeLeft > 295)
return false;
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 Kill(int timeLeft)
{
for (int k = 0; k < 7; k++)
{
int num308 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, 0f, 0f, 150, new Color(53, Main.DiscoG, 255), 1.2f);
Main.dust[num308].noGravity = true;
}
}
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);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

+78
View File
@@ -0,0 +1,78 @@
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 SwordsplosionPurple : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Purple Sword");
}
public override void SetDefaults()
{
projectile.width = 20;
projectile.height = 20;
projectile.aiStyle = 27;
projectile.friendly = true;
projectile.melee = true;
projectile.penetrate = 3;
projectile.timeLeft = 300;
aiType = ProjectileID.EnchantedBeam;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 10;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.3f / 255f, (255 - projectile.alpha) * 0.4f / 255f, (255 - projectile.alpha) * 1f / 255f);
if (projectile.localAI[1] > 7f)
{
int num308 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, new Color(Main.DiscoR, 100, 255), 1.2f);
Main.dust[num308].velocity *= 0.1f;
Main.dust[num308].noGravity = true;
}
projectile.rotation = projectile.velocity.ToRotation() + (float)Math.Atan(90);
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(Main.DiscoR, 100, 255, projectile.alpha);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
if (projectile.timeLeft > 295)
return false;
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 Kill(int timeLeft)
{
for (int k = 0; k < 7; k++)
{
int num308 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, 0f, 0f, 150, new Color(Main.DiscoR, 100, 255), 1.2f);
Main.dust[num308].noGravity = true;
}
}
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);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 717 B

+77
View File
@@ -0,0 +1,77 @@
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 SwordsplosionRed : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Red Sword");
}
public override void SetDefaults()
{
projectile.width = 20;
projectile.height = 20;
projectile.aiStyle = 27;
projectile.friendly = true;
projectile.melee = true;
projectile.tileCollide = false;
projectile.penetrate = 3;
projectile.timeLeft = 200;
aiType = ProjectileID.EnchantedBeam;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 10;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.3f / 255f, (255 - projectile.alpha) * 0.4f / 255f, (255 - projectile.alpha) * 1f / 255f);
if (projectile.localAI[1] > 7f)
{
int num308 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, new Color(255, Main.DiscoG, 53), 1.2f);
Main.dust[num308].velocity *= 0.1f;
Main.dust[num308].noGravity = true;
}
projectile.rotation = projectile.velocity.ToRotation() + (float)Math.Atan(90);
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(255, Main.DiscoG, 53, projectile.alpha);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
if (projectile.timeLeft > 195)
return false;
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 Kill(int timeLeft)
{
for (int k = 0; k < 7; k++)
{
int num308 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, 0f, 0f, 150, new Color(255, Main.DiscoG, 53), 1.2f);
Main.dust[num308].noGravity = true;
}
}
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);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

@@ -6,25 +6,25 @@ using Terraria.ObjectData;
namespace CalamityMod.Tiles.Furniture.CraftingStations
{
public class DraedonsForge : ModTile
public class DraedonsForge : ModTile //Legacy names used to avoid fucking over people's placed forges and ensure they are converted properly.
{
public override void SetDefaults()
public override void SetDefaults()
{
animationFrameHeight = 36;
Main.tileLighted[Type] = true;
Main.tileFrameImportant[Type] = true;
Main.tileNoAttach[Type] = true;
Main.tileLavaDeath[Type] = false;
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2);
TileObjectData.newTile.CopyFrom(TileObjectData.Style4x2); //Changed from 3x2 to 4x2 due to sprite.
TileObjectData.newTile.LavaDeath = false;
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 18 };
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Draedon's Forge");
name.SetDefault("Cosmic Anvil");
AddMapEntry(new Color(0, 255, 0), name);
disableSmartCursor = true;
adjTiles = new int[] { TileID.Anvils, TileID.Furnaces, TileID.WorkBenches, TileID.LunarCraftingStation,
TileID.MythrilAnvil, TileID.AdamantiteForge, TileID.Hellforge, TileID.DemonAltar };
adjTiles = new int[] { TileID.Anvils, TileID.TinkerersWorkbench, TileID.WorkBenches, TileID.LunarCraftingStation,
TileID.MythrilAnvil, TileID.AdamantiteForge, TileID.DemonAltar }; //Specifically not furnaces
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
@@ -38,19 +38,5 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations
g = (float)Main.DiscoG / 255f;
b = (float)Main.DiscoB / 255f;
}
public override void AnimateTile(ref int frame, ref int frameCounter)
{
frameCounter++;
if (frameCounter > 12)
{
frameCounter = 0;
frame++;
if (frame > 3)
{
frame = 0;
}
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB