Files
CalamityModPublic/Items/Weapons/Magic/SHPC.cs
T
Andrew Marheine ce36dc7d32 1 - Added Malice Mode (there's no way to activate it yet) and adjusted all AIs a bit for it.
2 - IL Edited asphalt run speed and removed the multiplier given to player velocity while on asphalt.
3 - Removed Boss Rush Xeroc Curse.
4 - IL Edited Chlorophyte Bullets to have reduced dust and homing range and removed the damage nerf.
5 - Made Counter Scarf a rare variant of the Shield of Cthulhu and slightly increased the dash length.
6 - IL Edited to remove Aerial Bane's damage bonus against in-air enemies and removed the nerf it had.
7 - IL Edited to adjust the random damage variance for attacks both for and against the player from +-15% to +-5%.
8 - IL Edited to reduce Vortex Booster, Nebula Mantle and Betsy Wings horizontal hover speeds.
9 - Crown Jewel is now a legendary drop from King Slime.
10 - Teardrop Cleaver is now a legendary drop from Eye of Cthulhu.
11 - Changed Celestial Jewel recipe to use a Large Ruby and 5 teleportation potions.
12 - Bosses now drop rare variants and legendaries while in Malice Mode, adjusted damages and rarities/values for some that were moved to different tiers.
13 - Magic Mirror, Ice Mirror, Cell Phone and Recall Potions are now disabled while a boss is alive.
14 - Burden Breaker is now a legendary drop from Skeletron Prime.
15 - Rev+ Plantera spore gas no longer deals damage for 2 seconds after spawning in.
16 - Reduced the severity of the stat-changing properties of Nullification Pistol and Molecular Manipulator.
2021-03-30 02:38:07 -05:00

100 lines
3.2 KiB
C#

using CalamityMod.Projectiles.Magic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class SHPC : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("SHPC");
Tooltip.SetDefault("Fires plasma orbs that linger and emit massive explosions\n" +
"Right click to fire powerful energy beams\n" +
"Legendary");
}
public override void SetDefaults()
{
item.damage = 22;
item.magic = true;
item.mana = 20;
item.width = 90;
item.height = 42;
item.useTime = item.useAnimation = 7;
item.useStyle = ItemUseStyleID.HoldingOut;
item.noMelee = true;
item.knockBack = 3.25f;
item.UseSound = SoundID.Item92;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<SHPB>();
item.shootSpeed = 20f;
item.value = CalamityGlobalItem.Rarity5BuyPrice;
item.rare = ItemRarityID.Pink;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-25, 0);
}
public override bool AltFunctionUse(Player player)
{
return true;
}
public override bool CanUseItem(Player player)
{
if (player.altFunctionUse == 2)
{
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon");
}
else
{
item.UseSound = SoundID.Item92;
}
return base.CanUseItem(player);
}
public override void ModifyManaCost(Player player, ref float reduce, ref float mult)
{
if (player.altFunctionUse == 2)
mult *= 0.3f;
}
public override float UseTimeMultiplier (Player player)
{
if (player.altFunctionUse == 2)
return 1f;
return 0.14f;
}
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)
{
for (int shootAmt = 0; shootAmt < 3; shootAmt++)
{
float SpeedX = speedX + (float)Main.rand.Next(-20, 21) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-20, 21) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType<SHPL>(), damage, knockBack * 0.5f, player.whoAmI, 0f, 0f);
}
return false;
}
else
{
for (int shootAmt = 0; shootAmt < 3; shootAmt++)
{
float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType<SHPB>(), (int)(damage * 1.1), knockBack, player.whoAmI, 0f, 0f);
}
return false;
}
}
}
}