added hallow point rounds
This commit is contained in:
1 parent
c04b1befbd
commit
b42595e59a
8 files changed
+62
-14
No files matched your search
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
public class HallowPointRound : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Ammo";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 99;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 8;
|
||||
Item.height = 18;
|
||||
Item.damage = 18;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
Item.knockBack = 3f;
|
||||
Item.value = Item.sellPrice(copper: 12);
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.shoot = ModContent.ProjectileType<HallowPointRoundProj>();
|
||||
Item.shootSpeed = 6f;
|
||||
Item.ammo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(100).
|
||||
AddIngredient(ItemID.EmptyBullet, 100).
|
||||
AddIngredient(ItemID.HallowedBar).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 263 B |
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().donorItem = true;
|
||||
|
||||
Item.shootSpeed = BulletSpeed;
|
||||
Item.shoot = ModContent.ProjectileType<IlluminatedBullet>();
|
||||
Item.shoot = ModContent.ProjectileType<HallowPointRoundProj>();
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.Calamity().canFirePointBlankShots = true;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Vector2 randomVelocity = baseVelocity + new Vector2(dx, dy);
|
||||
|
||||
if (type == ProjectileID.Bullet)
|
||||
Projectile.NewProjectile(source, position, randomVelocity, ModContent.ProjectileType<IlluminatedBullet>(), damage, knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(source, position, randomVelocity, Item.shoot, damage, knockback, player.whoAmI);
|
||||
else
|
||||
Projectile.NewProjectile(source, position, randomVelocity, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
|
||||
@@ -69,6 +69,11 @@ GodSlayerSlug: {
|
||||
'''
|
||||
}
|
||||
|
||||
HallowPointRound: {
|
||||
DisplayName: Hallow-Point Round
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
HolyFireBullet: {
|
||||
DisplayName: Holy Fire Bullet
|
||||
Tooltip:
|
||||
|
||||
@@ -29,7 +29,7 @@ AngelicShotgun: {
|
||||
Tooltip:
|
||||
'''
|
||||
Each shot casts a radiant beam of holy light from the sky
|
||||
Converts musket balls into illuminated bullets
|
||||
Converts musket balls into hallow-point rounds
|
||||
'Fighting 'til the war's won'
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ HyperiusBulletProj.DisplayName: Hyperius Bullet
|
||||
HyperiusSplit.DisplayName: Hyperius Bad Time
|
||||
IcicleArrowProj.DisplayName: Icicle Arrow
|
||||
IcyBulletProj.DisplayName: Icy Bullet
|
||||
IlluminatedBullet.DisplayName: Illuminated Bullet
|
||||
HallowPointRoundProj.DisplayName: Hallow-Point Round
|
||||
ImpactRound.DisplayName: Impact Round
|
||||
KarasawaShot.DisplayName: Karasawa Shot
|
||||
LeafArrow.DisplayName: Leaf Arrow
|
||||
|
||||
+9
-10
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -7,7 +8,7 @@ using Terraria.Audio;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
public class IlluminatedBullet : ModProjectile, ILocalizedModType
|
||||
public class HallowPointRoundProj : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Ranged";
|
||||
public override void SetStaticDefaults()
|
||||
@@ -25,7 +26,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.extraUpdates = 3;
|
||||
Projectile.MaxUpdates = 5;
|
||||
|
||||
// Invisible for the first few frames
|
||||
Projectile.alpha = 255;
|
||||
@@ -35,7 +36,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override void AI()
|
||||
{
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
Lighting.AddLight(Projectile.Center, 1f, 0.7f, 0f);
|
||||
Lighting.AddLight(Projectile.Center, 0.7f, 0.5f, 0.3f);
|
||||
|
||||
// Projectile becomes visible after a few frames
|
||||
if (Projectile.timeLeft == 298)
|
||||
@@ -54,20 +55,18 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
CalamityUtils.DrawAfterimagesFromEdge(Projectile, 0, lightColor);
|
||||
CalamityUtils.DrawAfterimagesFromEdge(Projectile, 0, Color.White);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
}
|
||||
|
||||
// On impact, make impact dust and play a sound.
|
||||
// On impact, make impact sparkle and play a sound.
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
Collision.HitTiles(Projectile.position, Projectile.velocity, Projectile.width, Projectile.height);
|
||||
SoundEngine.PlaySound(SoundID.Item10, Projectile.position);
|
||||
|
||||
GenericSparkle impactParticle = new GenericSparkle(Projectile.Center, Vector2.Zero, Color.Goldenrod, Color.White, Main.rand.NextFloat(0.7f, 1.2f), 12);
|
||||
GeneralParticleHandler.SpawnParticle(impactParticle);
|
||||
}
|
||||
}
|
||||
}
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 128 B |
Reference in new issue
Block a user