Claret Cannon rework, set consistency, Blood Boiler balancing
This commit is contained in:
1 parent
55b5917884
commit
205e12d5a2
21 files changed
+242
-190
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Typeless;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
shotArrow.tileCollide = false;
|
||||
(shotArrow.ModProjectile as BloodfireArrowProj).DisableEffects = true;
|
||||
shotArrow.Calamity().conditionalHomingRange = 175f;
|
||||
shotArrow.Calamity().BloodstoneOrbValue = 1;
|
||||
shotArrow.Calamity().BloodstoneOrbValue = 20;
|
||||
shotNum++;
|
||||
if (shotNum > 4) shotNum = 0;
|
||||
return false;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 60;
|
||||
Item.height = 30;
|
||||
Item.damage = 115;
|
||||
Item.damage = 135;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 25;
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
shotReturn = !shotReturn;
|
||||
if (Main.rand.NextFloat() > 0.60f)
|
||||
if (Main.rand.NextFloat() > 0.20f)
|
||||
player.statLife -= 1;
|
||||
if (player.statLife <= 0)
|
||||
{
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public class ClaretCannon : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 48;
|
||||
Item.height = 30;
|
||||
Item.damage = 148;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 3;
|
||||
Item.useAnimation = 9;
|
||||
Item.reuseDelay = 10;
|
||||
Item.useLimitPerAnimation = 3;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 5.5f;
|
||||
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
Item.UseSound = SoundID.Item40;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 24f;
|
||||
Item.shoot = ModContent.ProjectileType<ClaretCannonProj>();
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
Item.Calamity().canFirePointBlankShots = true;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<BloodstoneCore>(4).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (type == ProjectileID.Bullet)
|
||||
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<ClaretCannonProj>(), damage, knockback, player.whoAmI);
|
||||
else
|
||||
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria.ModLoader;
|
||||
using System;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Typeless
|
||||
{
|
||||
public class ClaretCannon : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Typeless";
|
||||
|
||||
public int ClaretCooldown = 0;
|
||||
|
||||
public static int ClaretCooldownMax = 300;
|
||||
|
||||
public float baseUseDir = 0;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 48;
|
||||
Item.height = 30;
|
||||
Item.damage = 500;
|
||||
Item.DamageType = AverageDamageClass.Instance;
|
||||
Item.useTime = 10;
|
||||
Item.useAnimation = 10;
|
||||
Item.useLimitPerAnimation = 1;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 5.5f;
|
||||
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
Item.UseSound = SoundID.Item40;
|
||||
Item.autoReuse = true;
|
||||
Item.shootSpeed = 12f;
|
||||
Item.shoot = ModContent.ProjectileType<ClaretCannonProj>();
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
{
|
||||
ClaretCooldown--;
|
||||
if (ClaretCooldown < 0)
|
||||
ClaretCooldown = 0;
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<BloodstoneCore>(4).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (ClaretCooldown > 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void UseAnimation(Player player)
|
||||
{
|
||||
}
|
||||
|
||||
public override void UseItemFrame(Player player)
|
||||
{
|
||||
float comp = 1 - player.itemTime / (float)player.itemTimeMax;
|
||||
float lerpValue1 = MathHelper.Lerp(0, 90, MathF.Pow(comp, 0.3f));
|
||||
float lerpValue2 = MathHelper.Lerp(90, 0, MathF.Pow(comp, 2));
|
||||
player.itemRotation = baseUseDir - MathHelper.ToRadians(Math.Min(lerpValue1, lerpValue2)) * player.direction;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
baseUseDir = player.itemRotation;
|
||||
ClaretCooldown = ClaretCooldownMax;
|
||||
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
float fill = ClaretCooldown / (float)ClaretCooldownMax;
|
||||
if (fill <= 0)
|
||||
return;
|
||||
|
||||
float barScale = 1.5f;
|
||||
|
||||
var barBG = ModContent.Request<Texture2D>("CalamityMod/UI/MiscTextures/GenericBarBack").Value;
|
||||
var barFG = ModContent.Request<Texture2D>("CalamityMod/UI/MiscTextures/GenericBarFront").Value;
|
||||
|
||||
Vector2 barOrigin = barBG.Size() * 0.5f;
|
||||
float yOffset = 5f;
|
||||
Vector2 drawPos = position + Vector2.UnitY * scale * (frame.Height - yOffset);
|
||||
Rectangle frameCrop = new Rectangle(0, 0, (int)((fill) * barFG.Width), barFG.Height);
|
||||
Color colorBG = Color.Crimson;
|
||||
Color colorFG = Color.Lerp(Color.OrangeRed, Color.DarkOrange, fill);
|
||||
|
||||
spriteBatch.Draw(barBG, drawPos, null, colorBG, 0f, barOrigin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barFG, drawPos, frameCrop, colorFG, 0f, barOrigin, scale * barScale, 0f, 0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 694 B After Width: | Height: | Size: 694 B |
@@ -272,15 +272,6 @@ ClamorRifle: {
|
||||
Tooltip: Converts musket balls into homing energy bolts
|
||||
}
|
||||
|
||||
ClaretCannon: {
|
||||
DisplayName: Claret Cannon
|
||||
Tooltip:
|
||||
'''
|
||||
Fires strings of 3 bullets
|
||||
Converts musket balls into bloody tears that drain enemy health
|
||||
'''
|
||||
}
|
||||
|
||||
CleansingBlaze: {
|
||||
DisplayName: Cleansing Blaze
|
||||
Tooltip:
|
||||
|
||||
@@ -7,6 +7,19 @@ Aestheticus: {
|
||||
'''
|
||||
}
|
||||
|
||||
ClaretCannon: {
|
||||
DisplayName: Claret Cannon
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a hypercondensed claret round
|
||||
The round explodes upon striking an enemy and releases blood orbs
|
||||
The explosion shreds enemies, inflicting [Laceration] and dramatically reducing their defense
|
||||
Picking up the blood orbs will reduce [Potion Sickness] when possible
|
||||
If you do not have [Potion Sickness], your natural regeneration will be enhanced
|
||||
Can only fire once every 5 seconds
|
||||
'''
|
||||
}
|
||||
|
||||
EyeofMagnus: {
|
||||
DisplayName: Eye of Magnus
|
||||
Tooltip:
|
||||
|
||||
@@ -46,7 +46,6 @@ ChromaticFlare.DisplayName: Chromatic Flare
|
||||
CinderArrowProj.DisplayName: Cinder Arrow
|
||||
ClamorRifleProj.DisplayName: Clamor Bolt
|
||||
ClamorRifleProjSplit.DisplayName: Clamor Bolt
|
||||
ClaretCannonProj.DisplayName: Claret Cannon
|
||||
CondemnationArrow.DisplayName: Condemning Arrow
|
||||
CondemnationArrowHoming.DisplayName: Condemning Echo
|
||||
ContagionArrow.DisplayName: Contagion Arrow
|
||||
|
||||
@@ -32,6 +32,7 @@ BossRushTierAnimation.DisplayName: Boss Rush Tier Animation
|
||||
ChaoticGeyser.DisplayName: Chaotic Geyser
|
||||
ChlorophyteLifePulse.DisplayName: Life Pulse
|
||||
ChronoClock.DisplayName: Chrono Clock
|
||||
ClaretCannonProj.DisplayName: Claret Round
|
||||
CoralBubble.DisplayName: Bubble
|
||||
CoralBubbleSmall.DisplayName: Bubble
|
||||
CosmicDashExplosion.DisplayName: Cosmic Dash Explosion
|
||||
|
||||
@@ -4225,10 +4225,9 @@ namespace CalamityMod.Projectiles
|
||||
#region On Hit NPC
|
||||
public override void OnHitNPC(Projectile projectile, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
for (var i = 0; i < BloodstoneOrbValue; i++)
|
||||
if (BloodstoneOrbValue > 0)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.GetSource_OnHit(target), projectile.Center, projectile.velocity.SafeNormalize(Vector2.Zero) * Math.Min(((projectile.velocity.Length() * projectile.MaxUpdates) / 4f), 4f) * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType<BloodstoneHealOrb>(), 1, 0f, Main.player[projectile.owner].whoAmI);
|
||||
|
||||
Projectile.NewProjectile(projectile.GetSource_OnHit(target), projectile.Center, projectile.velocity.SafeNormalize(Vector2.Zero) * Math.Min(((projectile.velocity.Length() * projectile.MaxUpdates) / 4f), 4f) * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType<BloodstoneHealOrb>(), BloodstoneOrbValue, 0f, Main.player[projectile.owner].whoAmI);
|
||||
}
|
||||
// Hyperius Overflow
|
||||
if (projectile.type != ProjectileType<HyperiusBulletProj>() && projectile.type != ProjectileType<HyperiusSplit>() && projectile.type != ProjectileType<HyperiusDamage>() && projectile.type != ProjectileType<HyperiusBleed>() && target.Calamity().hyperiusMarked)
|
||||
|
||||
@@ -88,19 +88,19 @@ namespace CalamityMod.Projectiles.Healing
|
||||
float playerDist = playerVector.Length();
|
||||
if (playerDist < 50f && Projectile.position.X < player.position.X + player.width && Projectile.position.X + Projectile.width > player.position.X && Projectile.position.Y < player.position.Y + player.height && Projectile.position.Y + Projectile.height > player.position.Y)
|
||||
{
|
||||
AdjustedHeal(player, heal);
|
||||
Heal(player, heal);
|
||||
Projectile.Kill();
|
||||
}
|
||||
|
||||
Projectile.velocity = (Projectile.velocity * 5 + (playerVector.SafeNormalize(Vector2.Zero) * 5)) / 6f; //Move towards player. Range is determined in the AI();
|
||||
}
|
||||
|
||||
public void AdjustedHeal(Player player, int heal)
|
||||
public static void Heal(Player player, int PotionTime)
|
||||
{
|
||||
var cplayer = player.Calamity();
|
||||
if (player.potionDelay > 0)
|
||||
{
|
||||
player.potionDelay -= 20;
|
||||
player.potionDelay -= PotionTime;
|
||||
if (player.potionDelay < 0)
|
||||
player.potionDelay = 0;
|
||||
if (player.HasBuff(BuffID.PotionSickness))
|
||||
@@ -116,8 +116,11 @@ namespace CalamityMod.Projectiles.Healing
|
||||
}
|
||||
else
|
||||
{
|
||||
player.lifeRegenTime += 60; //if Potion Sickness is full, each orb speeds up natural regen by 1 second
|
||||
player.lifeRegenTime += 3*PotionTime; //if Potion Sickness is full, each orb speeds up natural regen
|
||||
}
|
||||
|
||||
Particle ring = new CustomPulse(player.Center, Vector2.Zero, new Color(255, 32, 32)*0.75f, "CalamityMod/Particles/DustyCircleHardEdge", Vector2.One, 0, 0.01f, 0.05f, 20);
|
||||
GeneralParticleHandler.SpawnParticle(ring);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
float orbCount = MathHelper.Lerp(0, 20, (dmgMult-1) / 4f);
|
||||
for (var i = 0; i < orbCount; i++)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_OnHit(target), Projectile.Center, Projectile.velocity.RotatedByRandom(1) * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType<BloodstoneHealOrb>(), 1, 0f, player.whoAmI);
|
||||
Projectile.NewProjectile(Projectile.GetSource_OnHit(target), Projectile.Center, Projectile.velocity.RotatedByRandom(1) * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType<BloodstoneHealOrb>(), 20, 0f, player.whoAmI);
|
||||
}
|
||||
if (dmgMult > 1)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ using Terraria.Audio;
|
||||
using CalamityMod.Balancing;
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Projectiles.Healing;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
@@ -93,15 +94,13 @@ namespace CalamityMod.Projectiles.Magic
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
if (Projectile.ai[2] < 1){
|
||||
for (int i = 0; i < 2; i++) {
|
||||
Projectile.NewProjectile(Projectile.GetSource_OnHit(target), Projectile.Center, -Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedByRandom(0.5f) * Main.rand.NextFloat(3, 5), ModContent.ProjectileType<BloodstoneHealOrb>(), 5, 0f, Projectile.owner);
|
||||
}
|
||||
Projectile.ai[2]++;
|
||||
}
|
||||
|
||||
int heal = (int)Math.Round(hit.Damage * 0.05);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
if (Main.LocalPlayer.lifeSteal <= 0f || heal <= 0 || target.lifeMax <= 5)
|
||||
return;
|
||||
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(Projectile, Main.player[Projectile.owner], heal, ProjectileID.VampireHeal, BalancingConstants.LifeStealRange);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -93,14 +93,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (modItem.Charge > TheMutilator.MaximumCharge)
|
||||
{
|
||||
modItem.Charge = 0;
|
||||
int healAmount = 1;
|
||||
int orbAmount = 30;
|
||||
if (orbAmount > 0)
|
||||
{
|
||||
float spreadAmount = MathHelper.ToRadians(360);
|
||||
for (var i = 0; i < orbAmount; i++)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_OnHit(target), target.Center, -angle.RotatedByRandom(spreadAmount) * 3.5f * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType<BloodstoneHealOrb>(), healAmount, 0f, player.whoAmI);
|
||||
Projectile.NewProjectile(Projectile.GetSource_OnHit(target), target.Center, -angle.RotatedByRandom(spreadAmount) * 3.5f * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType<BloodstoneHealOrb>(), 22, 0f, player.whoAmI);
|
||||
|
||||
}
|
||||
Particle bloodsplosion2 = new CustomPulse(target.Center, Vector2.Zero, new Color(255, 32, 32) * 0.75f, "CalamityMod/Particles/DustyCircleHardEdge", Vector2.One, Main.rand.NextFloat(-15f, 15f), 0.03f, 0.155f, 40);
|
||||
|
||||
@@ -7,6 +7,7 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Projectiles.Healing;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
@@ -195,19 +196,9 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
if (Projectile.Hitbox.Intersects(player.Hitbox))
|
||||
{
|
||||
if (!Main.player[Projectile.owner].moonLeech)
|
||||
if (improvedHeal)
|
||||
{
|
||||
int bonusHeal = Main.rand.NextBool(3) ? 5 : 3;
|
||||
int heal = improvedHeal ? bonusHeal : 2;
|
||||
|
||||
if (Main.LocalPlayer.lifeSteal <= 0f)
|
||||
{
|
||||
Projectile.Kill();
|
||||
return;
|
||||
}
|
||||
|
||||
Main.LocalPlayer.lifeSteal -= heal;
|
||||
player.HealPlayer(heal);
|
||||
BloodstoneHealOrb.Heal(player, 8);
|
||||
}
|
||||
|
||||
Projectile.Kill();
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
using CalamityMod.Balancing;
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
public class ClaretCannonProj : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Ranged";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ProjectileID.Sets.TrailCacheLength[Type] = 10;
|
||||
ProjectileID.Sets.TrailingMode[Type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 14;
|
||||
Projectile.height = 14;
|
||||
Projectile.friendly = true;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.extraUpdates = 1;
|
||||
Projectile.aiStyle = ProjAIStyleID.Arrow;
|
||||
AIType = ProjectileID.Bullet;
|
||||
Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.5f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0f / 255f);
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Collision.HitTiles(Projectile.position, Projectile.velocity, Projectile.width, Projectile.height);
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, Projectile.oldVelocity.X * 0.15f, Projectile.oldVelocity.Y * 0.15f);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Laceration>(), 120);
|
||||
|
||||
int heal = (int)Math.Round(hit.Damage * 0.02);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
if (Main.LocalPlayer.lifeSteal <= 0f || heal <= 0 || target.lifeMax <= 5)
|
||||
return;
|
||||
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(Projectile, Main.player[Projectile.owner], heal, ProjectileID.VampireHeal, BalancingConstants.LifeStealRange);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
float spreadAmount = MathHelper.ToRadians(360);
|
||||
for (var i = 0; i < orbAmount; i++)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.One.RotatedByRandom(spreadAmount) * 2f * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType<BloodstoneHealOrb>(), 1, 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.One.RotatedByRandom(spreadAmount) * 2f * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType<BloodstoneHealOrb>(), 20, 0f, Projectile.owner);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 6;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
Projectile.Calamity().BloodstoneOrbValue = 1; //Bloodstone Orb lifesteal. May want to go back to regular lifesteal.
|
||||
Projectile.Calamity().BloodstoneOrbValue = 20; //Bloodstone Orb lifesteal. May want to go back to regular lifesteal.
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -50,16 +50,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
blood.velocity = Main.rand.NextVector2Circular(1f, 2f);
|
||||
blood.noGravity = true;
|
||||
}
|
||||
//regular lifesteal code. Not sure if we wanna go back to it so I left it here.
|
||||
/*int heal = (int)Math.Round(hit.Damage * 0.01);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
if (Main.LocalPlayer.lifeSteal <= 0f || heal <= 0 || target.lifeMax <= 5)
|
||||
return;
|
||||
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(Projectile, Main.player[Projectile.owner], heal, ProjectileID.VampireHeal, BalancingConstants.LifeStealRange);
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
using CalamityMod.Balancing;
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Items.Weapons.Typeless;
|
||||
using CalamityMod.Projectiles.Healing;
|
||||
using CalamityMod.Particles;
|
||||
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class ClaretCannonProj : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Typeless";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ProjectileID.Sets.TrailCacheLength[Type] = 10;
|
||||
ProjectileID.Sets.TrailingMode[Type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 14;
|
||||
Projectile.height = 14;
|
||||
Projectile.friendly = true;
|
||||
Projectile.alpha = 0;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.timeLeft = 600;
|
||||
Projectile.DamageType = AverageDamageClass.Instance;
|
||||
Projectile.extraUpdates = 1;
|
||||
Projectile.aiStyle = 0;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.5f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0f / 255f);
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Collision.HitTiles(Projectile.position, Projectile.velocity, Projectile.width, Projectile.height);
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
if (Projectile.penetrate != -1)
|
||||
return;
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/NPCKilled/PerfLargeDeath") { Volume = 0.5f }, Projectile.Center);
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/BloodPactCrit") { Volume = 0.5f }, Projectile.Center);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Laceration>(), ClaretCannon.ClaretCooldownMax);
|
||||
target.AddBuff(BuffID.BetsysCurse, ClaretCannon.ClaretCooldownMax*2);
|
||||
if (Projectile.penetrate == -1)
|
||||
return;
|
||||
var player = Main.player[Projectile.owner];
|
||||
float orbCount = 20;
|
||||
for (var i = 0; i < orbCount; i++)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_OnHit(target), Projectile.Center, -Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedByRandom(1) * Main.rand.NextFloat(2.75f, 5.25f), ModContent.ProjectileType<BloodstoneHealOrb>(), 20, 0f, player.whoAmI);
|
||||
}
|
||||
Projectile.position = Projectile.Center;
|
||||
Projectile.Size = new Vector2(352);
|
||||
Projectile.Center = Projectile.position;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.extraUpdates = 0;
|
||||
Projectile.timeLeft = 2;
|
||||
Projectile.velocity *= 0;
|
||||
Projectile.damage /= 2;
|
||||
float particleScale = 8f;
|
||||
Particle bloodsplosion = new CustomPulse(Projectile.Center, Vector2.Zero, Color.DarkRed, "CalamityMod/Particles/DetailedExplosion", Vector2.One, Main.rand.NextFloat(-15f, 15f), 0.16f*particleScale/5f, 0.87f * particleScale / 5f, (int)(40 * 0.38f), false);
|
||||
GeneralParticleHandler.SpawnParticle(bloodsplosion);
|
||||
Particle bloodsplosion2 = new CustomPulse(Projectile.Center, Vector2.Zero, new Color(255, 32, 32), "CalamityMod/Particles/DustyCircleHardEdge", Vector2.One, Main.rand.NextFloat(-15f, 15f), 0.03f * particleScale / 5f, 0.155f * particleScale / 5f, 40);
|
||||
GeneralParticleHandler.SpawnParticle(bloodsplosion2);
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
//CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Reference in new issue
Block a user