Test masks and finish implementing armor

This commit is contained in:
2026-02-17 00:50:19 -08:00
parent 0ec0ff2e23
commit 02e6ee2f70
28 changed files with 175 additions and 18 deletions

View File

@@ -248,6 +248,12 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
var damageReceived = DamageCalculator.CalculateDamage(damage, TotalDefense, EquipmentComponent.ElementalResistance);
HealthComponent.Damage(damageReceived);
SfxDatabase.Instance.Play(SoundEffect.TakeDamage);
if (EquipmentComponent.EquippedArmor.Value.ArmorTag == ArmorTag.DegradeOnHit)
{
EquipmentComponent.EquippedArmor.Value.DecreaseArmorDefense(1);
EquipmentComponent.UpdateEquipment(EquipmentComponent.EquippedArmor.Value);
}
}
public void Knockback(float impulse)
@@ -337,6 +343,12 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
if (weapon.WeaponTag == WeaponTag.InverseHPAttackPower)
InverseHPToAttackPowerSync(HealthComponent.CurrentHP.Value);
}
if (equipable is Accessory accessory)
{
if (accessory.AccessoryTag == AccessoryTag.BoostEXPGainRate)
ExperiencePointsComponent.ModifyExpGainRate(ExperiencePointsComponent.ExpGainRate.Value + 0.2f);
}
}
public void Unequip(IEquipableItem equipable)
@@ -352,6 +364,11 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
if (equipable is Weapon weapon && weapon.WeaponTag == WeaponTag.KineticProjectile)
PersuaderCrosshair.Hide();
if (equipable is Accessory accessory)
{
if (accessory.AccessoryTag == AccessoryTag.BoostEXPGainRate)
ExperiencePointsComponent.ModifyExpGainRate(ExperiencePointsComponent.ExpGainRate.Value - 0.2f);
}
}
public void ApplyNewAugment(IAugmentItem jewel, IAugmentableItem augmentableItem)