Added Healthy prefix
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace ForgottenWawiTech.Content.Items.Accessories
|
||||
{
|
||||
public class SoulOfAvalon : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 28;
|
||||
Item.height = 28;
|
||||
Item.value = Item.buyPrice(platinum: 50);
|
||||
Item.rare = ItemRarityID.Purple;
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.statDefense += 200;
|
||||
player.statLifeMax2 += 1000;
|
||||
player.endurance += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 504 B |
@@ -0,0 +1,55 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace ForgottenWawiTech.Content.Items.Prefixes
|
||||
{
|
||||
public class Healthy : ModPrefix
|
||||
{
|
||||
public override PrefixCategory Category => PrefixCategory.Accessory;
|
||||
|
||||
public override void SetStats(ref float damageMult, ref float knockbackMult, ref float useTimeMult,
|
||||
ref float scaleMult, ref float shootSpeedMult, ref float manaMult, ref int critBonus)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Apply(Item item)
|
||||
{
|
||||
item.GetGlobalItem<HealthyPrefixGlobalItem>().hasHealthyPrefix = true;
|
||||
}
|
||||
|
||||
public override void ModifyValue(ref float valueMult)
|
||||
{
|
||||
valueMult = 1.5f;
|
||||
}
|
||||
|
||||
public override IEnumerable<TooltipLine> ModifyTooltips(Item item, IEnumerable<TooltipLine> tooltips)
|
||||
{
|
||||
yield return new TooltipLine(Mod, "HealthyPrefix", "+20 Max HP")
|
||||
{
|
||||
isModifier = true,
|
||||
isModifierBad = false
|
||||
};
|
||||
yield return new TooltipLine(Mod, "HealthyPrefixRegen", "+3 HP/s")
|
||||
{
|
||||
isModifier = true,
|
||||
isModifierBad = false
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class HealthyPrefixGlobalItem : GlobalItem
|
||||
{
|
||||
public bool hasHealthyPrefix = false;
|
||||
|
||||
public override bool InstancePerEntity => true;
|
||||
|
||||
public override void UpdateAccessory(Item item, Player player, bool hideVisual)
|
||||
{
|
||||
if (hasHealthyPrefix)
|
||||
{
|
||||
player.lifeRegen += 3;
|
||||
player.statLifeMax2 += 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace ForgottenWawiTech.Content.Items.Weapons.Magic
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 10000;
|
||||
Item.mana = 0; // Temp value for development
|
||||
Item.mana = 30;
|
||||
Item.crit = 100;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.width = 40;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace ForgottenWawiTech.Content.Items.Weapons.Magic
|
||||
public override void SetDefaults() {
|
||||
Item.CloneDefaults(ItemID.LastPrism);
|
||||
Item.mana = 4;
|
||||
Item.damage = 2000;
|
||||
Item.damage = 500;
|
||||
Item.shoot = ModContent.ProjectileType<ShatteredPrismHoldout>();
|
||||
Item.shootSpeed = 30f;
|
||||
|
||||
|
||||
@@ -94,6 +94,11 @@ Items: {
|
||||
DisplayName: Dev Infinite Mana
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
SoulOfAvalon: {
|
||||
DisplayName: Soul Of Avalon
|
||||
Tooltip: ""
|
||||
}
|
||||
}
|
||||
|
||||
NPCs: {
|
||||
@@ -188,3 +193,5 @@ Projectiles: {
|
||||
ShatteredPrismBeam.DisplayName: Shattered Prism Beam
|
||||
ShatteredPrismHoldout.DisplayName: Shattered Prism Holdout
|
||||
}
|
||||
|
||||
Prefixes.Healthy.DisplayName: Healthy
|
||||
|
||||
Reference in New Issue
Block a user