-
Notifications
You must be signed in to change notification settings - Fork 3
/
RocWings.cs
58 lines (53 loc) · 1.7 KB
/
RocWings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
namespace JoostMod.Items.Rewards
{
[AutoloadEquip(EquipType.Wings)]
public class RocWings : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Roc Wings");
Tooltip.SetDefault("Allows short flight and gliding\n" + "Hold UP while not flying or using an item to glide\n" + "Hold left or right to angle your glide");
}
public override void SetDefaults()
{
item.width = 46;
item.height = 32;
item.value = 60000;
item.rare = 3;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.wingTimeMax = 30;
player.GetModPlayer<JoostPlayer>().rocWings = true;
}
public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising,
ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
{
ascentWhenFalling = 0.5f;
ascentWhenRising = 0.1f;
maxCanAscendMultiplier = 0.5f;
maxAscentMultiplier = 1.4f;
constantAscend = 0.1f;
}
public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration)
{
speed = 6.25f;
acceleration *= 1.25f;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
foreach (TooltipLine line2 in list)
{
if (line2.mod == "Terraria" && line2.Name == "ItemName")
{
line2.overrideColor = new Color(230, 204, 128);
}
}
}
}
}