Clean up events, add weapon tag for weaker on swing
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Godot;
|
||||
using Zennysoft.Game.Ma;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
using Zennysoft.Ma.Adapter.Entity;
|
||||
|
||||
@@ -23,4 +24,12 @@ internal class PlayerEffectService
|
||||
if (rand <= _player.TotalLuck)
|
||||
enemy.Die();
|
||||
}
|
||||
|
||||
public void Degrade()
|
||||
{
|
||||
var weapon = _player.EquipmentComponent.EquippedWeapon.Value as Weapon;
|
||||
var newAttack = Mathf.Max(weapon.BonusAttack - 1, 0);
|
||||
weapon.SetWeaponAttack(newAttack);
|
||||
_player.EquipmentComponent.UpdateEquipment(weapon);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user