Dark Master changes
This commit is contained in:
1 parent
c3ecf97835
commit
4ebe4f2030
3 files changed
+7
-4
No files matched your search
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 60;
|
||||
Item.height = 60;
|
||||
Item.damage = 60;
|
||||
Item.damage = 50;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = Item.useTime = 26;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
@@ -46,14 +46,14 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
if (player.altFunctionUse != 2)
|
||||
{
|
||||
// only fire beams at max health
|
||||
if (player.statLife >= player.statLifeMax2)
|
||||
if (player.statLife >= (player.statLifeMax2 * 0.75f))
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item71, player.position);
|
||||
// increase the beam's damage by the player's additional health starting from the vanilla maximum amount with just life crystals
|
||||
int baseMaxHealth = 400;
|
||||
int bonusHealth = player.statLifeMax2 - baseMaxHealth;
|
||||
float bonusDamage = DamagePerHealth * bonusHealth;
|
||||
Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, (int)(damage * (1 + bonusDamage)), knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, (int)(damage * (1 + bonusDamage)), knockback, player.whoAmI, 0, 0);
|
||||
}
|
||||
// still play the sound if the clones are out since they always fire beams
|
||||
else if (player.ownedProjectileCounts[ModContent.ProjectileType<DarkMasterClone>()] > 0)
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.penetrate = 2;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 30;
|
||||
@@ -72,6 +73,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color drawColor) => Projectile.ai[0] == 1 ? new Color(100, 100, 100, Projectile.alpha) : new Color(255, 255, 255, Projectile.alpha);
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1);
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
// ai[1] not being 0 determines if the projectile should always ignore tiles
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center, direction * owner.HeldItem.shootSpeed, ModContent.ProjectileType<DarkMasterBeam>(), (int)(Projectile.damage * 0.3f), Projectile.knockBack, Projectile.owner, ai1: 1);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center, direction * owner.HeldItem.shootSpeed, ModContent.ProjectileType<DarkMasterBeam>(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user