1 - Demonic Pitchfork meets Thanos.
This commit is contained in:
1 parent
fccdbb73b5
commit
aed464ced6
4 files changed
-123
No files matched your search
@@ -1,56 +0,0 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class DemonicPitchfork : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Demonic Pitchfork");
|
||||
Tooltip.SetDefault("Fires a demonic pitchfork");
|
||||
Item.staff[item.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 82;
|
||||
item.magic = true;
|
||||
item.mana = 11;
|
||||
item.width = 52;
|
||||
item.height = 48;
|
||||
item.useTime = 24;
|
||||
item.useAnimation = 24;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 6f;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = ItemRarityID.Pink;
|
||||
item.UseSound = SoundID.Item20;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<DemonicPitchforkProj>();
|
||||
item.shootSpeed = 16f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOrigin()
|
||||
{
|
||||
return new Vector2(15, 15);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.Obsidian, 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<TrueShadowScale>(), 15);
|
||||
recipe.AddIngredient(ItemID.HellstoneBar, 10);
|
||||
recipe.AddIngredient(ItemID.SoulofNight, 10);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,67 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class DemonicPitchforkProj : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Pitchfork");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 16;
|
||||
projectile.height = 16;
|
||||
projectile.aiStyle = 27;
|
||||
projectile.friendly = true;
|
||||
projectile.magic = true;
|
||||
projectile.penetrate = 2;
|
||||
projectile.timeLeft = 600;
|
||||
aiType = ProjectileID.UnholyTridentFriendly;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.2f / 255f, (255 - projectile.alpha) * 0.01f / 255f, (255 - projectile.alpha) * 0.2f / 255f);
|
||||
if (projectile.localAI[1] > 7f)
|
||||
{
|
||||
int num307 = Main.rand.Next(3);
|
||||
if (num307 == 0)
|
||||
{
|
||||
num307 = 14;
|
||||
}
|
||||
else if (num307 == 1)
|
||||
{
|
||||
num307 = 27;
|
||||
}
|
||||
else
|
||||
{
|
||||
num307 = 173;
|
||||
}
|
||||
int num308 = Dust.NewDust(new Vector2(projectile.position.X - projectile.velocity.X * 4f + 2f, projectile.position.Y + 2f - projectile.velocity.Y * 4f), 8, 8, num307, 0f, 0f, 100, default, 1.25f);
|
||||
Main.dust[num308].velocity *= 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
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 Kill(int timeLeft)
|
||||
{
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 14, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f);
|
||||
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 27, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f);
|
||||
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 173, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 472 B |
Reference in new issue
Block a user