1 - Rev+ EoW cursed flame projectiles are fired in the direction the mouth is facing.
2 - Deleted Frostspark Bullets because they had no reason to exist.
This commit is contained in:
1 parent
fbef22a96c
commit
e90d5b990a
5 files changed
+8
-158
No files matched your search
@@ -1,42 +0,0 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
public class FrostsparkBullet : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Frostspark Bullet");
|
||||
Tooltip.SetDefault("Has a chance to freeze enemies and explode into electricity\n" +
|
||||
"Enemies that are immune to being frozen take more damage from these bullets");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 8;
|
||||
item.ranged = true;
|
||||
item.width = 8;
|
||||
item.height = 8;
|
||||
item.maxStack = 999;
|
||||
item.consumable = true;
|
||||
item.knockBack = 1.25f;
|
||||
item.value = 600;
|
||||
item.rare = ItemRarityID.Orange;
|
||||
item.shoot = ModContent.ProjectileType<FrostsparkBulletProj>();
|
||||
item.shootSpeed = 14f;
|
||||
item.ammo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.MusketBall, 150);
|
||||
recipe.AddIngredient(ModContent.ItemType<VerstaltiteBar>());
|
||||
recipe.AddTile(TileID.IceMachine);
|
||||
recipe.SetResult(this, 150);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 258 B |
@@ -1448,21 +1448,18 @@ namespace CalamityMod.NPCs
|
||||
Vector2 vector34 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
float num349 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2) - vector34.X;
|
||||
float num350 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2) - vector34.Y;
|
||||
float num351 = (float)Math.Sqrt(num349 * num349 + num350 * num350);
|
||||
|
||||
num349 *= num351;
|
||||
num350 *= num351;
|
||||
|
||||
float num418 = 12f;
|
||||
int type = ProjectileID.CursedFlameHostile;
|
||||
num351 = (float)Math.Sqrt(num349 * num349 + num350 * num350);
|
||||
float num418 = 12f;
|
||||
float num351 = (float)Math.Sqrt(num349 * num349 + num350 * num350);
|
||||
num351 = num418 / num351;
|
||||
num349 *= num351;
|
||||
num350 *= num351;
|
||||
vector34.X += num349 * 3f;
|
||||
vector34.Y += num350 * 3f;
|
||||
num350 += npc.velocity.Y * 0.5f;
|
||||
num349 += npc.velocity.X * 0.5f;
|
||||
vector34.X -= num349;
|
||||
vector34.Y -= num350;
|
||||
|
||||
Projectile.NewProjectile(vector34.X, vector34.Y, num349, num350, type, npc.GetProjectileDamage(type), 0f, Main.myPlayer, 0f, 0f);
|
||||
int type = ProjectileID.CursedFlameHostile;
|
||||
Projectile.NewProjectile(vector34.X, vector34.Y, num349, num350, type, npc.GetProjectileDamage(type), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
public class FrostsparkBulletProj : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Frostspark Bullet");
|
||||
ProjectileID.Sets.TrailCacheLength[projectile.type] = 6;
|
||||
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 4;
|
||||
projectile.height = 4;
|
||||
projectile.aiStyle = 1;
|
||||
projectile.friendly = true;
|
||||
projectile.ranged = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.extraUpdates = 1;
|
||||
aiType = ProjectileID.Bullet;
|
||||
projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.basePointBlankShotDuration;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, 0.15f, 0.05f, 0.3f);
|
||||
|
||||
projectile.localAI[0] += 1f;
|
||||
if (projectile.localAI[0] > 4f)
|
||||
{
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int dustType = 15;
|
||||
float spacing = Main.rand.NextFloat(-0.2f, 0.8f);
|
||||
int dust = Dust.NewDust(projectile.Center - spacing * projectile.velocity, 1, 1, dustType); ;
|
||||
Main.dust[dust].position = projectile.Center;
|
||||
Main.dust[dust].velocity *= 0.4f;
|
||||
Main.dust[dust].velocity += projectile.velocity * 0.7f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
CalamityUtils.DrawAfterimagesFromEdge(projectile, 0, lightColor);
|
||||
return false;
|
||||
}
|
||||
|
||||
// This projectile is always fullbright.
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
return new Color(1f, 1f, 1f, 0f);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.OnFire, 120);
|
||||
target.AddBuff(BuffID.Frostburn, 60);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item27, projectile.position);
|
||||
|
||||
projectile.damage /= 3;
|
||||
projectile.position = projectile.Center;
|
||||
projectile.width = projectile.height = 24;
|
||||
projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
|
||||
projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
|
||||
projectile.maxPenetrate = -1;
|
||||
projectile.penetrate = -1;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
projectile.Damage();
|
||||
|
||||
int num212 = Main.rand.Next(10, 20);
|
||||
for (int num213 = 0; num213 < num212; num213++)
|
||||
{
|
||||
int dustType = Main.rand.Next(2);
|
||||
if (dustType == 0)
|
||||
{
|
||||
dustType = 67;
|
||||
}
|
||||
else
|
||||
{
|
||||
dustType = 6;
|
||||
}
|
||||
int num214 = Dust.NewDust(projectile.Center - projectile.velocity / 2f, 0, 0, dustType, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num214].velocity *= 2f;
|
||||
Main.dust[num214].noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 128 B |
Reference in new issue
Block a user