2 - Reduced Portal Gun fall speed while a boss is alive from 3.5x to 2x. 3 - Made the hardmode progression config option actually do what it's supposed to do. 4 - Teleporters are disabled during boss fights. 5 - Celestial Jewel and Astral Arcanum teleports no longer work if a boss is alive. 6 - Added Malice Mode activation item with placeholder sprite. 7 - Adjusted Alicorn mount offsets a bit.
29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
using CalamityMod.Projectiles.Pets;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Buffs.Pets
|
|
{
|
|
public class SCalPetBuff : ModBuff
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
DisplayName.SetDefault("Supreme Calamitas");
|
|
Description.SetDefault("Watching over you with supreme calamitous energy...how adorable");
|
|
Main.buffNoTimeDisplay[Type] = true;
|
|
Main.vanityPet[Type] = true;
|
|
}
|
|
|
|
public override void Update(Player player, ref int buffIndex)
|
|
{
|
|
player.buffTime[buffIndex] = 18000;
|
|
player.Calamity().scalPet = true;
|
|
bool PetProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<SCalPet>()] <= 0;
|
|
if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer)
|
|
{
|
|
Projectile.NewProjectile(player.position.X + (player.width / 2), player.position.Y + (player.height / 2), 0f, 0f, ModContent.ProjectileType<SCalPet>(), 0, 0f, player.whoAmI, 50f, 0f);
|
|
}
|
|
}
|
|
}
|
|
}
|