Fix crit calculation and bonus attack/def/luck
This commit is contained in:
@@ -388,13 +388,13 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
weapon.Augment = new Augment(JewelTags.AutoIdentifyAllItems, new IdentifyAllItemsAugment(this));
|
||||
break;
|
||||
case JewelTags.IncreaseAtkDefLuck:
|
||||
weapon.Stats.BonusAttack += 2;
|
||||
weapon.Stats.BonusDefense += 2;
|
||||
weapon.Stats.BonusLuck += 10;
|
||||
weapon.IncreaseAttack(2);
|
||||
weapon.IncreaseDefense(2);
|
||||
weapon.IncreaseLuck(10);
|
||||
weapon.Augment = new Augment(JewelTags.IncreaseAtkDefLuck, new BasicAugment());
|
||||
break;
|
||||
case JewelTags.IncreaseLuck:
|
||||
weapon.Stats.BonusLuck += 25;
|
||||
weapon.IncreaseLuck(25);
|
||||
weapon.Augment = new Augment(JewelTags.IncreaseLuck, new BasicAugment());
|
||||
break;
|
||||
}
|
||||
@@ -442,13 +442,13 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
armor.Augment = new Augment(JewelTags.AutoIdentifyAllItems, new IdentifyAllItemsAugment(this));
|
||||
break;
|
||||
case JewelTags.IncreaseAtkDefLuck:
|
||||
armor.Stats.BonusAttack += 2;
|
||||
armor.Stats.BonusDefense += 2;
|
||||
armor.Stats.BonusLuck += 10;
|
||||
armor.IncreaseAttack(2);
|
||||
armor.IncreaseDefense(2);
|
||||
armor.IncreaseLuck(10);
|
||||
armor.Augment = new Augment(JewelTags.IncreaseAtkDefLuck, new BasicAugment());
|
||||
break;
|
||||
case JewelTags.IncreaseLuck:
|
||||
armor.Stats.BonusLuck += 25;
|
||||
armor.IncreaseLuck(25);
|
||||
armor.Augment = new Augment(JewelTags.IncreaseLuck, new BasicAugment());
|
||||
break;
|
||||
}
|
||||
@@ -496,13 +496,13 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
accessory.Augment = new Augment(JewelTags.AutoIdentifyAllItems, new IdentifyAllItemsAugment(this));
|
||||
break;
|
||||
case JewelTags.IncreaseAtkDefLuck:
|
||||
accessory.Stats.BonusAttack += 2;
|
||||
accessory.Stats.BonusDefense += 2;
|
||||
accessory.Stats.BonusLuck += 10;
|
||||
accessory.IncreaseAttack(2);
|
||||
accessory.IncreaseDefense(2);
|
||||
accessory.IncreaseLuck(10);
|
||||
accessory.Augment = new Augment(JewelTags.IncreaseAtkDefLuck, new BasicAugment());
|
||||
break;
|
||||
case JewelTags.IncreaseLuck:
|
||||
accessory.Stats.BonusLuck += 25;
|
||||
accessory.IncreaseLuck(25);
|
||||
accessory.Augment = new Augment(JewelTags.IncreaseLuck, new BasicAugment());
|
||||
break;
|
||||
}
|
||||
@@ -672,7 +672,7 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
|
||||
if (weapon.WeaponTag == WeaponTag.InverseHPAttackPower)
|
||||
{
|
||||
var healthPercentage = (HealthComponent.CurrentHP.Value * 10) / HealthComponent.MaximumHP.Value;
|
||||
weapon.SetWeaponAttack(10 - healthPercentage);
|
||||
weapon.SetAttack(10 - healthPercentage);
|
||||
EquipmentComponent.Equip(weapon);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ internal class PlayerEffectService
|
||||
{
|
||||
var weapon = _player.EquipmentComponent.EquippedWeapon.Value as Weapon;
|
||||
var newAttack = Mathf.Max(weapon.BonusAttack - 1, 0);
|
||||
weapon.SetWeaponAttack(newAttack);
|
||||
weapon.SetAttack(newAttack);
|
||||
_player.EquipmentComponent.UpdateEquipment(weapon);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user