Test masks and finish implementing armor
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -10637,6 +10637,7 @@ animations = [{
|
||||
collision_layer = 802
|
||||
collision_mask = 775
|
||||
script = ExtResource("1_xcol5")
|
||||
HealthTimerIsActive = true
|
||||
|
||||
[node name="MainCollision" type="CollisionShape3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
Reference in New Issue
Block a user