cleanliness and forgot summon right click code

This commit is contained in:
Ozzatron committed 2020-12-19 14:48:31 -05:00
1 parent 3e7838eb49
commit 49eaa015c9
3 files changed
+11 -3

No files matched your search

@@ -1,5 +1,7 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -34,6 +36,13 @@ namespace CalamityMod.Items.Weapons.Summon
item.shootSpeed = 16f;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.altFunctionUse != 2)
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f);
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
+1 -2
View File
@@ -74,8 +74,7 @@ namespace CalamityMod.Projectiles.Ranged
// For the sake of bonus damage, life regen time caps at 3600, aka 60 seconds. This is its natural cap in vanilla.
int regenTimeForCalc = (int)MathHelper.Clamp(owner.lifeRegenTime, 0f, 3600f);
int bloodFireBonus = (int)(regenDamageRatio * regenTimeForCalc);
return bloodFireBonus;
return (int)(regenDamageRatio * regenTimeForCalc);
}
public override void Kill(int timeLeft)
+1 -1
View File
@@ -177,7 +177,7 @@ namespace CalamityMod.Projectiles.Summon
bool dontConsumeAmmo = Main.rand.NextBool() || shootRocket;
int projIndex;
// This function uses the fake gun item (changed to be ranged) with the appropriate base damage as the "firing item".
// Vanilla function tricked into using a fake gun item with the appropriate base damage as the "firing item".
player.PickAmmo(FalseGun, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, dontConsumeAmmo);
// One in every 20 shots is a rocket which deals 1.5x total damage and extreme knockback.