Fix up equipping inventory items, fill out the rest of the inventory labels

This commit is contained in:
2024-09-09 23:05:44 -07:00
parent 4986cca661
commit b5798e7bc0
17 changed files with 340 additions and 108 deletions

View File

@@ -181,9 +181,9 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLogic>
var rng = new RandomNumberGenerator();
rng.Randomize();
var roll = rng.Randf();
if (roll <= GameRepo.EquippedWeapon.WeaponInfo.Luck)
if (roll <= GameRepo.EquippedWeapon.Value.WeaponInfo.Luck)
isCriticalHit = true;
var damage = DamageCalculator.CalculatePlayerDamage(hitBox.Damage, hitBox.GetParent<IPlayer>().PlayerStatInfo, EnemyStatInfo, GameRepo.EquippedWeapon.WeaponInfo, isCriticalHit);
var damage = DamageCalculator.CalculatePlayerDamage(hitBox.Damage, hitBox.GetParent<IPlayer>().PlayerStatInfo, EnemyStatInfo, GameRepo.EquippedWeapon.Value.WeaponInfo, isCriticalHit);
GD.Print($"Enemy Hit for {damage} damage.");
EnemyLogic.Input(new EnemyLogic.Input.HitByPlayer(damage));
}