Rework item descriptions, fix item rescue menu

This commit is contained in:
2026-02-18 02:41:22 -08:00
parent d39524ffe2
commit 104b9cf25e
172 changed files with 1336 additions and 915 deletions

View File

@@ -292,6 +292,9 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
public override void _Input(InputEvent @event)
{
if (GetTree().Paused)
return;
if (@event.IsActionPressed(GameInputs.Attack))
Attack();
if (@event.IsActionPressed(GameInputs.Sprint))
@@ -362,51 +365,56 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
EquipmentComponent.Unequip(equipable);
if (equipable is Weapon weapon && weapon.WeaponTag == WeaponTag.KineticProjectile)
PersuaderCrosshair.Hide();
if (equipable is Weapon weapon)
{
if (weapon.WeaponTag == WeaponTag.KineticProjectile)
PersuaderCrosshair.Hide();
}
if (equipable is Accessory accessory)
{
if (accessory.AccessoryTag == AccessoryTag.BoostEXPGainRate)
ExperiencePointsComponent.ModifyExpGainRate(ExperiencePointsComponent.ExpGainRate.Value - 0.2f);
}
if (equipable.ItemTag == ItemTag.BreaksOnUnequip)
Inventory.Remove(equipable);
}
public void ApplyNewAugment(IAugmentItem jewel, IAugmentableItem augmentableItem)
{
Inventory.Remove(jewel);
ApplyNewAugment((dynamic)augmentableItem, (jewel as Jewel).Stats.JewelTag);
ApplyNewAugment((dynamic)augmentableItem, jewel as Jewel);
if (augmentableItem is IEquipableItem equipable && EquipmentComponent.IsItemEquipped(equipable))
augmentableItem.Augment.AugmentType.Apply();
}
private void ApplyNewAugment(Weapon weapon, JewelTags tag)
private void ApplyNewAugment(Weapon weapon, Jewel jewel)
{
switch (tag)
switch (jewel.Stats.JewelTag)
{
case JewelTags.AeolicElement:
weapon.Stats.WeaponElement = ElementType.Aeolic;
weapon.Augment = new Augment(JewelTags.AeolicElement, new BasicAugment());
weapon.Augment = new Augment(JewelTags.AeolicElement, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.HydricElement:
weapon.Stats.WeaponElement = ElementType.Hydric;
weapon.Augment = new Augment(JewelTags.HydricElement, new BasicAugment());
weapon.Augment = new Augment(JewelTags.HydricElement, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.SlowVTReduction:
weapon.Augment = new Augment(JewelTags.SlowVTReduction, new SlowVTReductionAugment(this));
weapon.Augment = new Augment(JewelTags.SlowVTReduction, new SlowVTReductionAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.HastenVT:
weapon.Augment = new Augment(JewelTags.HastenVT, new HastenVTAugment(this));
weapon.Augment = new Augment(JewelTags.HastenVT, new HastenVTAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.ReviveUserOnce:
weapon.Augment = new Augment(JewelTags.ReviveUserOnce, new RevivePlayerAugment(this));
weapon.Augment = new Augment(JewelTags.ReviveUserOnce, new RevivePlayerAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.IncreaseHPRecovery:
weapon.Augment = new Augment(JewelTags.IncreaseHPRecovery, new HPRecoverySpeedAugment(this));
weapon.Augment = new Augment(JewelTags.IncreaseHPRecovery, new HPRecoverySpeedAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.LowerEXPGain:
weapon.Augment = new Augment(JewelTags.LowerEXPGain, new LowerEXPRateAugment(this));
weapon.Augment = new Augment(JewelTags.LowerEXPGain, new LowerEXPRateAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.ItemRescue:
Inventory.Remove(weapon);
@@ -415,55 +423,55 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
if (!EquipmentComponent.IsItemEquipped(weapon))
break;
weapon.Glued = true;
weapon.Augment = new Augment(JewelTags.Glue, new BasicAugment());
weapon.Augment = new Augment(JewelTags.Glue, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.TelluricElement:
weapon.Stats.WeaponElement = ElementType.Telluric;
weapon.Augment = new Augment(JewelTags.TelluricElement, new BasicAugment());
weapon.Augment = new Augment(JewelTags.TelluricElement, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.AutoIdentifyAllItems:
weapon.Augment = new Augment(JewelTags.AutoIdentifyAllItems, new IdentifyAllItemsAugment(this));
weapon.Augment = new Augment(JewelTags.AutoIdentifyAllItems, new IdentifyAllItemsAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.IncreaseAtkDefLuck:
weapon.IncreaseAttack(2);
weapon.IncreaseDefense(2);
weapon.IncreaseLuck(10);
weapon.Augment = new Augment(JewelTags.IncreaseAtkDefLuck, new BasicAugment());
weapon.IncreaseAttack(jewel.Stats.BonusAttack);
weapon.IncreaseDefense(jewel.Stats.BonusDefense);
weapon.IncreaseLuck(jewel.Stats.BonusLuck);
weapon.Augment = new Augment(JewelTags.IncreaseAtkDefLuck, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.IncreaseLuck:
weapon.IncreaseLuck(25);
weapon.Augment = new Augment(JewelTags.IncreaseLuck, new BasicAugment());
weapon.Augment = new Augment(JewelTags.IncreaseLuck, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
}
EquipmentComponent.UpdateEquipment(weapon);
}
private void ApplyNewAugment(Armor armor, JewelTags tag)
private void ApplyNewAugment(Armor armor, Jewel jewel)
{
switch (tag)
switch (jewel.Stats.JewelTag)
{
case JewelTags.AeolicElement:
armor.Stats.AeolicResistance += 25;
armor.Augment = new Augment(JewelTags.AeolicElement, new BasicAugment());
armor.Stats.AeolicResistance += jewel.Stats.AeolicResistance;
armor.Augment = new Augment(JewelTags.AeolicElement, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.HydricElement:
armor.Stats.HydricResistance += 25;
armor.Augment = new Augment(JewelTags.HydricElement, new BasicAugment());
armor.Stats.HydricResistance += jewel.Stats.HydricResistance;
armor.Augment = new Augment(JewelTags.HydricElement, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.SlowVTReduction:
armor.Augment = new Augment(JewelTags.SlowVTReduction, new SlowVTReductionAugment(this));
armor.Augment = new Augment(JewelTags.SlowVTReduction, new SlowVTReductionAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.HastenVT:
armor.Augment = new Augment(JewelTags.HastenVT, new HastenVTAugment(this));
armor.Augment = new Augment(JewelTags.HastenVT, new HastenVTAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.ReviveUserOnce:
armor.Augment = new Augment(JewelTags.ReviveUserOnce, new RevivePlayerAugment(this));
armor.Augment = new Augment(JewelTags.ReviveUserOnce, new RevivePlayerAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.IncreaseHPRecovery:
armor.Augment = new Augment(JewelTags.IncreaseHPRecovery, new HPRecoverySpeedAugment(this));
armor.Augment = new Augment(JewelTags.IncreaseHPRecovery, new HPRecoverySpeedAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.LowerEXPGain:
armor.Augment = new Augment(JewelTags.LowerEXPGain, new LowerEXPRateAugment(this));
armor.Augment = new Augment(JewelTags.LowerEXPGain, new LowerEXPRateAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.ItemRescue:
Inventory.Remove(armor);
@@ -472,55 +480,55 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
if (!EquipmentComponent.IsItemEquipped(armor))
break;
armor.Glued = true;
armor.Augment = new Augment(JewelTags.Glue, new BasicAugment());
armor.Augment = new Augment(JewelTags.Glue, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.TelluricElement:
armor.Stats.TelluricResistance += 25;
armor.Augment = new Augment(JewelTags.TelluricElement, new BasicAugment());
armor.Stats.TelluricResistance += jewel.Stats.TelluricResistance;
armor.Augment = new Augment(JewelTags.TelluricElement, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.AutoIdentifyAllItems:
armor.Augment = new Augment(JewelTags.AutoIdentifyAllItems, new IdentifyAllItemsAugment(this));
armor.Augment = new Augment(JewelTags.AutoIdentifyAllItems, new IdentifyAllItemsAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.IncreaseAtkDefLuck:
armor.IncreaseAttack(2);
armor.IncreaseDefense(2);
armor.IncreaseLuck(10);
armor.Augment = new Augment(JewelTags.IncreaseAtkDefLuck, new BasicAugment());
armor.IncreaseAttack(jewel.Stats.BonusAttack);
armor.IncreaseDefense(jewel.Stats.BonusDefense);
armor.IncreaseLuck(jewel.Stats.BonusLuck);
armor.Augment = new Augment(JewelTags.IncreaseAtkDefLuck, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.IncreaseLuck:
armor.IncreaseLuck(25);
armor.Augment = new Augment(JewelTags.IncreaseLuck, new BasicAugment());
armor.IncreaseLuck(jewel.Stats.BonusLuck);
armor.Augment = new Augment(JewelTags.IncreaseLuck, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
}
EquipmentComponent.UpdateEquipment(armor);
}
private void ApplyNewAugment(Accessory accessory, JewelTags tag)
private void ApplyNewAugment(Accessory accessory, Jewel jewel)
{
switch (tag)
switch (jewel.Stats.JewelTag)
{
case JewelTags.AeolicElement:
accessory.Stats.AeolicResistance += 25;
accessory.Augment = new Augment(JewelTags.AeolicElement, new BasicAugment());
accessory.Stats.AeolicResistance += jewel.Stats.AeolicResistance;
accessory.Augment = new Augment(JewelTags.AeolicElement, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.HydricElement:
accessory.Stats.HydricResistance += 25;
accessory.Augment = new Augment(JewelTags.HydricElement, new BasicAugment());
accessory.Stats.HydricResistance += jewel.Stats.HydricResistance;
accessory.Augment = new Augment(JewelTags.HydricElement, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.SlowVTReduction:
accessory.Augment = new Augment(JewelTags.SlowVTReduction, new SlowVTReductionAugment(this));
accessory.Augment = new Augment(JewelTags.SlowVTReduction, new SlowVTReductionAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.HastenVT:
accessory.Augment = new Augment(JewelTags.HastenVT, new HastenVTAugment(this));
accessory.Augment = new Augment(JewelTags.HastenVT, new HastenVTAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.ReviveUserOnce:
accessory.Augment = new Augment(JewelTags.ReviveUserOnce, new RevivePlayerAugment(this));
accessory.Augment = new Augment(JewelTags.ReviveUserOnce, new RevivePlayerAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.IncreaseHPRecovery:
accessory.Augment = new Augment(JewelTags.IncreaseHPRecovery, new HPRecoverySpeedAugment(this));
accessory.Augment = new Augment(JewelTags.IncreaseHPRecovery, new HPRecoverySpeedAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.LowerEXPGain:
accessory.Augment = new Augment(JewelTags.LowerEXPGain, new LowerEXPRateAugment(this));
accessory.Augment = new Augment(JewelTags.LowerEXPGain, new LowerEXPRateAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.ItemRescue:
Inventory.Remove(accessory);
@@ -529,24 +537,24 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
if (!EquipmentComponent.IsItemEquipped(accessory))
break;
accessory.Glued = true;
accessory.Augment = new Augment(JewelTags.Glue, new BasicAugment());
accessory.Augment = new Augment(JewelTags.Glue, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.TelluricElement:
accessory.Stats.TelluricResistance += 25;
accessory.Augment = new Augment(JewelTags.TelluricElement, new BasicAugment());
accessory.Stats.TelluricResistance += jewel.Stats.TelluricResistance;
accessory.Augment = new Augment(JewelTags.TelluricElement, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.AutoIdentifyAllItems:
accessory.Augment = new Augment(JewelTags.AutoIdentifyAllItems, new IdentifyAllItemsAugment(this));
accessory.Augment = new Augment(JewelTags.AutoIdentifyAllItems, new IdentifyAllItemsAugment(this), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.IncreaseAtkDefLuck:
accessory.IncreaseAttack(2);
accessory.IncreaseDefense(2);
accessory.IncreaseLuck(10);
accessory.Augment = new Augment(JewelTags.IncreaseAtkDefLuck, new BasicAugment());
accessory.IncreaseAttack(jewel.Stats.BonusAttack);
accessory.IncreaseDefense(jewel.Stats.BonusDefense);
accessory.IncreaseLuck(jewel.Stats.BonusLuck);
accessory.Augment = new Augment(JewelTags.IncreaseAtkDefLuck, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
case JewelTags.IncreaseLuck:
accessory.IncreaseLuck(25);
accessory.Augment = new Augment(JewelTags.IncreaseLuck, new BasicAugment());
accessory.IncreaseLuck(jewel.Stats.BonusLuck);
accessory.Augment = new Augment(JewelTags.IncreaseLuck, new BasicAugment(), jewel.ItemName, jewel.StatDescription, jewel.GetTexture());
break;
}
EquipmentComponent.UpdateEquipment(accessory);