Add item spawn menu
Fix game over bug Start adding more implementation for jewels
This commit is contained in:
@@ -25,7 +25,7 @@ namespace Zennysoft.Ma.Adapter
|
||||
int incomingDamage,
|
||||
double elementalResistance)
|
||||
{
|
||||
var result = incomingDamage - (int)(incomingDamage * elementalResistance);
|
||||
var result = incomingDamage - (int)(incomingDamage * (elementalResistance / 100));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ public interface IExperiencePointsComponent : IEntityComponent
|
||||
|
||||
public IAutoProp<int> Level { get; }
|
||||
|
||||
public void ModifyExpGainRate(double newRate);
|
||||
|
||||
public void Gain(int baseExpGain);
|
||||
|
||||
public void LevelUp();
|
||||
|
||||
9
Zennysoft.Game.Ma.Implementation/Equipment/Augment.cs
Normal file
9
Zennysoft.Game.Ma.Implementation/Equipment/Augment.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
public class Augment
|
||||
{
|
||||
public JewelTags AugmentTag;
|
||||
|
||||
public Augment(JewelTags tag)
|
||||
{
|
||||
AugmentTag = tag;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using Chickensoft.Collections;
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Zennysoft.Ma.Adapter.Entity;
|
||||
|
||||
@@ -22,6 +21,8 @@ public abstract partial class EquipableItem : InventoryItem
|
||||
[Save("equipment_is_glued")]
|
||||
public bool Glued { get; set; }
|
||||
|
||||
public virtual Augment? Augment { get; set; }
|
||||
|
||||
[Save("bonus_elemental_resist_stats")]
|
||||
public virtual ElementalResistanceSet ElementalResistance { get; } = new ElementalResistanceSet(0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
19
Zennysoft.Game.Ma.Implementation/Equipment/Tags/JewelTags.cs
Normal file
19
Zennysoft.Game.Ma.Implementation/Equipment/Tags/JewelTags.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
public enum JewelTags
|
||||
{
|
||||
None,
|
||||
AeolicElement,
|
||||
IncreaseHPRecovery,
|
||||
HastenVT,
|
||||
LowerEXPGain,
|
||||
Glue,
|
||||
ItemRescue,
|
||||
HydricElement,
|
||||
IgneousElement,
|
||||
IncreaseEXPGain,
|
||||
LowerHPRecovery,
|
||||
SlowVTReduction,
|
||||
AutoIdentifyAllItems,
|
||||
ReviveUserOnce,
|
||||
TelluricElement
|
||||
}
|
||||
@@ -110,14 +110,14 @@ public class GameRepo : IGameRepo
|
||||
{
|
||||
AnnounceMessageInInventory("Experience points temporarily doubled.");
|
||||
DoubleExpTimeStart?.Invoke(lengthOfEffect.Seconds);
|
||||
ExpRate = 2;
|
||||
ExpRate *= 2;
|
||||
}
|
||||
|
||||
public void EndDoubleExp()
|
||||
{
|
||||
AnnounceMessageOnMainScreen("Experience points effect wore off.");
|
||||
DoubleExpTimeEnd?.Invoke();
|
||||
ExpRate = 1;
|
||||
ExpRate /= 2;
|
||||
}
|
||||
|
||||
public void AnnounceMessageOnMainScreen(string message)
|
||||
|
||||
@@ -8,13 +8,20 @@ public partial class GameState
|
||||
public partial record State
|
||||
{
|
||||
[Meta, LogicBlock(typeof(State), Diagram = true)]
|
||||
public partial record GameOver : State, IGet<Input.NewGame>
|
||||
public partial record GameOver : InGame, IGet<Input.NewGame>, IGet<Input.ExitGame>
|
||||
{
|
||||
public Transition On(in Input.NewGame input)
|
||||
{
|
||||
Output(new Output.InitializeGame());
|
||||
return To<InGame>();
|
||||
}
|
||||
|
||||
public Transition On(in Input.ExitGame input)
|
||||
{
|
||||
Output(new Output.ClosePauseScreen());
|
||||
Output(new Output.ExitGame());
|
||||
return To<State>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
7
Zennysoft.Game.Ma.Implementation/Item/IAugmentItem.cs
Normal file
7
Zennysoft.Game.Ma.Implementation/Item/IAugmentItem.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Zennysoft.Ma.Adapter
|
||||
{
|
||||
public interface IAugmentItem
|
||||
{
|
||||
public JewelTags Augment { get; }
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,8 @@ public interface IInventory
|
||||
|
||||
public bool Sort(EquipableItem currentWeapon, EquipableItem currentArmor, EquipableItem currentAccessory, EquipableItem ammo);
|
||||
|
||||
public bool AtCapacity();
|
||||
|
||||
public event Action<string> BroadcastMessage;
|
||||
public event Action InventoryChanged;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ public interface IPlayer : IKillable, ICharacterBody3D
|
||||
|
||||
public void PlayJumpScareAnimation();
|
||||
|
||||
//public void AugmentItem(IAugmentItem jewel, EquipableItem equipableItem);
|
||||
|
||||
public IInventory Inventory { get; }
|
||||
|
||||
public IHealthComponent HealthComponent { get; }
|
||||
|
||||
Reference in New Issue
Block a user