2 - Nerfed all jump speed bonuses. 3 - The player now gets a 24% jump speed bonus whenever they have any wing or balloon accessory equipped, you don't get another 24% if you're wearing both a balloon and wings at the same time. 4 - Pwnhammer and Hammush now state that Demon Altars don't spawn ore when broken.
84 lines
2.7 KiB
C#
84 lines
2.7 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Materials;
|
|
using System.Collections.Generic;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Armor
|
|
{
|
|
[AutoloadEquip(EquipType.Head)]
|
|
public class ReaverVisage : ModItem
|
|
{
|
|
//Jump/Flight Boosts and Movement Speed Helm
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Reaver Visage");
|
|
Tooltip.SetDefault("10% increased jump speed and 25% increased movement speed");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 24;
|
|
item.height = 28;
|
|
item.value = Item.buyPrice(0, 30, 0, 0);
|
|
item.rare = ItemRarityID.Lime;
|
|
item.defense = 13; //46
|
|
}
|
|
|
|
public override void ModifyTooltips(List<TooltipLine> list)
|
|
{
|
|
bool autoJump = Main.player[Main.myPlayer].autoJump;
|
|
string jumpAmt = autoJump ? "2.5" : "10";
|
|
foreach (TooltipLine line2 in list)
|
|
{
|
|
if (line2.mod == "Terraria" && line2.Name == "Tooltip0")
|
|
line2.text = jumpAmt + "% increased jump speed and 25% increased movement speed";
|
|
}
|
|
}
|
|
|
|
public override bool IsArmorSet(Item head, Item body, Item legs)
|
|
{
|
|
return body.type == ModContent.ItemType<ReaverScaleMail>() && legs.type == ModContent.ItemType<ReaverCuisses>();
|
|
}
|
|
|
|
public override void ArmorSetShadows(Player player)
|
|
{
|
|
player.armorEffectDrawShadowSubtle = true;
|
|
player.armorEffectDrawOutlines = true;
|
|
}
|
|
|
|
public override void UpdateArmorSet(Player player)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.reaverSpeed = true;
|
|
modPlayer.wearingRogueArmor = true;
|
|
player.setBonus = "Grants immunity to fall damage and allows constant jumping\n" +
|
|
"10% increased flight time and horizontal wing speed\n" +
|
|
"Hooks fly out and retract 10% faster\n" +
|
|
"Reduces the cooldown of dashes";
|
|
player.noFallDmg = true;
|
|
player.autoJump = true;
|
|
if (player.miscCounter % 3 == 2 && player.dashDelay > 0)
|
|
player.dashDelay--;
|
|
}
|
|
|
|
public override void UpdateEquip(Player player)
|
|
{
|
|
player.jumpSpeedBoost += player.autoJump ? 0.125f : 0.5f;
|
|
player.moveSpeed += 0.25f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<DraedonBar>(), 6);
|
|
recipe.AddIngredient(ItemID.JungleSpores, 4);
|
|
recipe.AddIngredient(ModContent.ItemType<EssenceofCinder>());
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|