Beeg fixpack
This commit is contained in:
@@ -15,6 +15,4 @@ public interface IAttackComponent : IEntityComponent
|
||||
public void SetAttack(int attack);
|
||||
|
||||
public void RaiseMaximumAttack(int raiseAmount);
|
||||
|
||||
public void LowerMaximumAttack(int lowerAmount);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,4 @@ public interface IDefenseComponent : IEntityComponent
|
||||
public void SetDefense(int attack);
|
||||
|
||||
public void RaiseMaximumDefense(int raiseAmount);
|
||||
|
||||
public void LowerMaximumDefense(int lowerAmount);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
public interface ILuckComponent : IEntityComponent
|
||||
{
|
||||
public int InitialLuck { get; }
|
||||
|
||||
public IAutoProp<int> Luck { get; }
|
||||
|
||||
public void IncreaseLuck(int value);
|
||||
|
||||
@@ -14,6 +14,7 @@ public enum UsableItemTag
|
||||
DealElementalDamageToAllEnemiesInRoom,
|
||||
RaiseCurrentWeaponAttack,
|
||||
RaiseCurrentDefenseArmor,
|
||||
LowerCurrentDefenseArmor,
|
||||
RaiseLevel,
|
||||
LowerLevel,
|
||||
RandomEffect,
|
||||
@@ -30,5 +31,6 @@ public enum UsableItemTag
|
||||
DecreaseAttack,
|
||||
DecreaseAllStats,
|
||||
Clone,
|
||||
MeltAllEquipment
|
||||
MeltAllEquipment,
|
||||
RestoreStats
|
||||
}
|
||||
|
||||
@@ -16,10 +16,6 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
event Action<string>? AnnounceMessageInInventoryEvent;
|
||||
|
||||
event Action<int>? DoubleExpTimeStart;
|
||||
|
||||
event Action? DoubleExpTimeEnd;
|
||||
|
||||
event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent;
|
||||
|
||||
event Action? PlayerAttack;
|
||||
@@ -40,10 +36,6 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
IAutoProp<bool> IsPaused { get; }
|
||||
|
||||
public void StartDoubleEXP(TimeSpan lengthOfEffect);
|
||||
|
||||
public void EndDoubleExp();
|
||||
|
||||
public void AnnounceMessageOnMainScreen(string message);
|
||||
|
||||
public void AnnounceMessageInInventory(string message);
|
||||
@@ -63,8 +55,6 @@ public interface IGameRepo : IDisposable
|
||||
public void OnUnequippedItem(IEquipableItem item);
|
||||
|
||||
public void OnEnemyDied(IEnemy enemy);
|
||||
|
||||
public double ExpRate { get; }
|
||||
}
|
||||
|
||||
public class GameRepo : IGameRepo
|
||||
@@ -73,8 +63,6 @@ public class GameRepo : IGameRepo
|
||||
public event Action? CloseInventoryEvent;
|
||||
public event Action<string>? AnnounceMessageOnMainScreenEvent;
|
||||
public event Action<string>? AnnounceMessageInInventoryEvent;
|
||||
public event Action<int>? DoubleExpTimeStart;
|
||||
public event Action? DoubleExpTimeEnd;
|
||||
public event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent;
|
||||
public event Action? PlayerAttack;
|
||||
public event Action? PlayerAttackedWall;
|
||||
@@ -85,14 +73,11 @@ public class GameRepo : IGameRepo
|
||||
public IAutoProp<bool> IsPaused => _isPaused;
|
||||
private readonly AutoProp<bool> _isPaused;
|
||||
|
||||
public double ExpRate { get; private set; }
|
||||
|
||||
private bool _disposedValue;
|
||||
|
||||
public GameRepo()
|
||||
{
|
||||
_isPaused = new AutoProp<bool>(true);
|
||||
ExpRate = 1;
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
@@ -107,20 +92,6 @@ public class GameRepo : IGameRepo
|
||||
GD.Print("Resume");
|
||||
}
|
||||
|
||||
public void StartDoubleEXP(TimeSpan lengthOfEffect)
|
||||
{
|
||||
AnnounceMessageInInventory("Experience points temporarily doubled.");
|
||||
DoubleExpTimeStart?.Invoke(lengthOfEffect.Seconds);
|
||||
ExpRate *= 2;
|
||||
}
|
||||
|
||||
public void EndDoubleExp()
|
||||
{
|
||||
AnnounceMessageOnMainScreen("Experience points effect wore off.");
|
||||
DoubleExpTimeEnd?.Invoke();
|
||||
ExpRate /= 2;
|
||||
}
|
||||
|
||||
public void AnnounceMessageOnMainScreen(string message)
|
||||
{
|
||||
AnnounceMessageOnMainScreenEvent?.Invoke(message);
|
||||
|
||||
@@ -2,4 +2,7 @@
|
||||
|
||||
public interface IArmor : IEquipableItem, IAugmentableItem
|
||||
{
|
||||
public void IncreaseArmorDefense(int bonus);
|
||||
|
||||
public void DecreaseArmorDefense(int lowerAmount);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user