Add item spawn menu
Fix game over bug Start adding more implementation for jewels
This commit is contained in:
@@ -6,7 +6,7 @@ using Zennysoft.Game.Ma;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
[Meta(typeof(IAutoNode)), Id("jewel")]
|
||||
public partial class Jewel : InventoryItem
|
||||
public partial class Jewel : InventoryItem, IAugmentItem
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
@@ -34,4 +34,42 @@ public partial class Jewel : InventoryItem
|
||||
[Export]
|
||||
[Save("jewel_stats")]
|
||||
public JewelStats Stats { get; set; } = new JewelStats();
|
||||
|
||||
public JewelTags Augment => Stats.JewelTag;
|
||||
|
||||
public void ApplyAugment(Weapon weapon)
|
||||
{
|
||||
weapon.Augment = new Augment(Stats.JewelTag);
|
||||
switch (Stats.JewelTag)
|
||||
{
|
||||
case JewelTags.AeolicElement:
|
||||
weapon.Stats.WeaponElement = ElementType.Aeolic;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void ApplyAugment(Armor armor)
|
||||
{
|
||||
armor.Augment = new Augment(Stats.JewelTag);
|
||||
switch (Stats.JewelTag)
|
||||
{
|
||||
case JewelTags.AeolicElement:
|
||||
armor.Stats.AeolicResistance += 25;
|
||||
break;
|
||||
case JewelTags.HydricElement:
|
||||
armor.Stats.HydricResistance += 25;
|
||||
break;
|
||||
case JewelTags.IgneousElement:
|
||||
armor.Stats.IgneousResistance += 25;
|
||||
break;
|
||||
case JewelTags.TelluricElement:
|
||||
armor.Stats.TelluricResistance += 25;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void ApplyAugment(Accessory accessory)
|
||||
{
|
||||
accessory.Augment = new Augment(Stats.JewelTag);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user