Beeg fixpack
This commit is contained in:
@@ -152,6 +152,11 @@ public class EffectService
|
||||
_game.UseItem(item);
|
||||
}
|
||||
|
||||
public void DoubleExp()
|
||||
{
|
||||
_game.DoubleExp();
|
||||
}
|
||||
|
||||
public void RaiseCurrentWeaponAttack()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_player.EquipmentComponent.EquippedWeapon.Value.ItemName))
|
||||
@@ -172,6 +177,34 @@ public class EffectService
|
||||
SfxDatabase.Instance.Play(SoundEffect.IncreaseStat);
|
||||
}
|
||||
|
||||
public void LowerCurrentArmorDefense()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_player.EquipmentComponent.EquippedArmor.Value.ItemName))
|
||||
return;
|
||||
|
||||
var currentArmor = (Armor)_player.EquipmentComponent.EquippedArmor.Value;
|
||||
currentArmor.DecreaseArmorDefense(1);
|
||||
SfxDatabase.Instance.Play(SoundEffect.DecreaseStat);
|
||||
}
|
||||
|
||||
public void RestoreParameters(IPlayer player)
|
||||
{
|
||||
var hpToRestore = player.HealthComponent.MaximumHP.Value;
|
||||
player.HealthComponent.SetCurrentHealth(hpToRestore);
|
||||
|
||||
var vtToRestore = player.VTComponent.MaximumVT.Value;
|
||||
player.VTComponent.SetVT(vtToRestore);
|
||||
|
||||
var attackToRestore = player.AttackComponent.MaximumAttack.Value - player.AttackComponent.CurrentAttack.Value;
|
||||
player.AttackComponent.Restore(attackToRestore);
|
||||
|
||||
var defenseToRestore = player.DefenseComponent.MaximumDefense.Value - player.DefenseComponent.CurrentDefense.Value;
|
||||
player.DefenseComponent.Restore(defenseToRestore);
|
||||
|
||||
if (player.LuckComponent.Luck.Value < player.LuckComponent.InitialLuck)
|
||||
player.LuckComponent.IncreaseLuck(player.LuckComponent.InitialLuck - player.LuckComponent.Luck.Value);
|
||||
}
|
||||
|
||||
public void RaiseLevel()
|
||||
{
|
||||
var expToNextLevel = _player.ExperiencePointsComponent.ExpToNextLevel.Value - _player.ExperiencePointsComponent.CurrentExp.Value;
|
||||
|
||||
Reference in New Issue
Block a user