using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Armor { [AutoloadEquip(EquipType.Head)] public class StatigelHood : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("Statigel Hood"); Tooltip.SetDefault("Increased minion knockback and +1 max minion"); } public override void SetDefaults() { item.width = 18; item.height = 18; item.value = Item.buyPrice(0, 5, 0, 0); item.rare = 4; item.defense = 4; //20 } public override bool IsArmorSet(Item head, Item body, Item legs) { return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } public override void UpdateArmorSet(Player player) { player.setBonus = "18% increased minion damage\n" + "Summons a mini slime god to fight for you, the type depends on what world evil you have\n" + "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + "Grants an extra jump and increased jump height"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; modPlayer.slimeGod = true; player.doubleJumpSail = true; player.jumpBoost = true; player.minionDamage += 0.18f; if (player.whoAmI == Main.myPlayer) { if (player.FindBuffIndex(ModContent.BuffType()) == -1) { player.AddBuff(ModContent.BuffType(), 3600, true); } if (WorldGen.crimson && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(33f * player.minionDamage), 0f, Main.myPlayer, 0f, 0f); } else if (!WorldGen.crimson && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(33f * player.minionDamage), 0f, Main.myPlayer, 0f, 0f); } } } public override void UpdateEquip(Player player) { player.minionKB += 1.5f; player.maxMinions++; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ItemID.HellstoneBar, 9); recipe.AddTile(TileID.Anvils); recipe.SetResult(this); recipe.AddRecipe(); } } }