diff --git a/docs/_framework/OpenRpg.Cards.dll b/docs/_framework/OpenRpg.Cards.dll
index 1a64545..dd77509 100644
Binary files a/docs/_framework/OpenRpg.Cards.dll and b/docs/_framework/OpenRpg.Cards.dll differ
diff --git a/docs/_framework/OpenRpg.Cards.dll.br b/docs/_framework/OpenRpg.Cards.dll.br
index f7c76ea..aa8644c 100644
Binary files a/docs/_framework/OpenRpg.Cards.dll.br and b/docs/_framework/OpenRpg.Cards.dll.br differ
diff --git a/docs/_framework/OpenRpg.Cards.dll.gz b/docs/_framework/OpenRpg.Cards.dll.gz
index ca976fb..f9740b4 100644
Binary files a/docs/_framework/OpenRpg.Cards.dll.gz and b/docs/_framework/OpenRpg.Cards.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Combat.dll b/docs/_framework/OpenRpg.Combat.dll
index da7e877..aceb025 100644
Binary files a/docs/_framework/OpenRpg.Combat.dll and b/docs/_framework/OpenRpg.Combat.dll differ
diff --git a/docs/_framework/OpenRpg.Combat.dll.br b/docs/_framework/OpenRpg.Combat.dll.br
index 0a711b7..cece2e9 100644
Binary files a/docs/_framework/OpenRpg.Combat.dll.br and b/docs/_framework/OpenRpg.Combat.dll.br differ
diff --git a/docs/_framework/OpenRpg.Combat.dll.gz b/docs/_framework/OpenRpg.Combat.dll.gz
index 638ddf3..09b1df9 100644
Binary files a/docs/_framework/OpenRpg.Combat.dll.gz and b/docs/_framework/OpenRpg.Combat.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Core.dll b/docs/_framework/OpenRpg.Core.dll
index 2031b28..c83378a 100644
Binary files a/docs/_framework/OpenRpg.Core.dll and b/docs/_framework/OpenRpg.Core.dll differ
diff --git a/docs/_framework/OpenRpg.Core.dll.br b/docs/_framework/OpenRpg.Core.dll.br
index 888e152..96b8388 100644
Binary files a/docs/_framework/OpenRpg.Core.dll.br and b/docs/_framework/OpenRpg.Core.dll.br differ
diff --git a/docs/_framework/OpenRpg.Core.dll.gz b/docs/_framework/OpenRpg.Core.dll.gz
index 537b8f3..a4da642 100644
Binary files a/docs/_framework/OpenRpg.Core.dll.gz and b/docs/_framework/OpenRpg.Core.dll.gz differ
diff --git a/docs/_framework/OpenRpg.CurveFunctions.dll b/docs/_framework/OpenRpg.CurveFunctions.dll
index 4de2014..472ccff 100644
Binary files a/docs/_framework/OpenRpg.CurveFunctions.dll and b/docs/_framework/OpenRpg.CurveFunctions.dll differ
diff --git a/docs/_framework/OpenRpg.CurveFunctions.dll.br b/docs/_framework/OpenRpg.CurveFunctions.dll.br
index cff9ca8..d0ef523 100644
Binary files a/docs/_framework/OpenRpg.CurveFunctions.dll.br and b/docs/_framework/OpenRpg.CurveFunctions.dll.br differ
diff --git a/docs/_framework/OpenRpg.CurveFunctions.dll.gz b/docs/_framework/OpenRpg.CurveFunctions.dll.gz
index daf8cd9..fd2676d 100644
Binary files a/docs/_framework/OpenRpg.CurveFunctions.dll.gz and b/docs/_framework/OpenRpg.CurveFunctions.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Data.InMemory.dll b/docs/_framework/OpenRpg.Data.InMemory.dll
index 8ccd8cd..74fbf05 100644
Binary files a/docs/_framework/OpenRpg.Data.InMemory.dll and b/docs/_framework/OpenRpg.Data.InMemory.dll differ
diff --git a/docs/_framework/OpenRpg.Data.InMemory.dll.br b/docs/_framework/OpenRpg.Data.InMemory.dll.br
index 97d06ee..6f8e798 100644
Binary files a/docs/_framework/OpenRpg.Data.InMemory.dll.br and b/docs/_framework/OpenRpg.Data.InMemory.dll.br differ
diff --git a/docs/_framework/OpenRpg.Data.InMemory.dll.gz b/docs/_framework/OpenRpg.Data.InMemory.dll.gz
index dd565e4..8d659e9 100644
Binary files a/docs/_framework/OpenRpg.Data.InMemory.dll.gz and b/docs/_framework/OpenRpg.Data.InMemory.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Data.dll b/docs/_framework/OpenRpg.Data.dll
index 8b2172f..2ddfbd8 100644
Binary files a/docs/_framework/OpenRpg.Data.dll and b/docs/_framework/OpenRpg.Data.dll differ
diff --git a/docs/_framework/OpenRpg.Data.dll.br b/docs/_framework/OpenRpg.Data.dll.br
index 28a7178..75909a5 100644
Binary files a/docs/_framework/OpenRpg.Data.dll.br and b/docs/_framework/OpenRpg.Data.dll.br differ
diff --git a/docs/_framework/OpenRpg.Data.dll.gz b/docs/_framework/OpenRpg.Data.dll.gz
index b9ac7cb..f294a2d 100644
Binary files a/docs/_framework/OpenRpg.Data.dll.gz and b/docs/_framework/OpenRpg.Data.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Demos.Infrastructure.dll b/docs/_framework/OpenRpg.Demos.Infrastructure.dll
index 8aeedde..4be83c4 100644
Binary files a/docs/_framework/OpenRpg.Demos.Infrastructure.dll and b/docs/_framework/OpenRpg.Demos.Infrastructure.dll differ
diff --git a/docs/_framework/OpenRpg.Demos.Infrastructure.dll.br b/docs/_framework/OpenRpg.Demos.Infrastructure.dll.br
index 8031124..ac99e56 100644
Binary files a/docs/_framework/OpenRpg.Demos.Infrastructure.dll.br and b/docs/_framework/OpenRpg.Demos.Infrastructure.dll.br differ
diff --git a/docs/_framework/OpenRpg.Demos.Infrastructure.dll.gz b/docs/_framework/OpenRpg.Demos.Infrastructure.dll.gz
index 1054efc..15fd529 100644
Binary files a/docs/_framework/OpenRpg.Demos.Infrastructure.dll.gz and b/docs/_framework/OpenRpg.Demos.Infrastructure.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Demos.Infrastructure.pdb.gz b/docs/_framework/OpenRpg.Demos.Infrastructure.pdb.gz
index a42fc3b..4beb9c4 100644
Binary files a/docs/_framework/OpenRpg.Demos.Infrastructure.pdb.gz and b/docs/_framework/OpenRpg.Demos.Infrastructure.pdb.gz differ
diff --git a/docs/_framework/OpenRpg.Demos.Web.dll b/docs/_framework/OpenRpg.Demos.Web.dll
index 5e496f0..cb20b7e 100644
Binary files a/docs/_framework/OpenRpg.Demos.Web.dll and b/docs/_framework/OpenRpg.Demos.Web.dll differ
diff --git a/docs/_framework/OpenRpg.Demos.Web.dll.br b/docs/_framework/OpenRpg.Demos.Web.dll.br
index af52295..7fb0560 100644
Binary files a/docs/_framework/OpenRpg.Demos.Web.dll.br and b/docs/_framework/OpenRpg.Demos.Web.dll.br differ
diff --git a/docs/_framework/OpenRpg.Demos.Web.dll.gz b/docs/_framework/OpenRpg.Demos.Web.dll.gz
index a621437..252d20a 100644
Binary files a/docs/_framework/OpenRpg.Demos.Web.dll.gz and b/docs/_framework/OpenRpg.Demos.Web.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Demos.Web.pdb.gz b/docs/_framework/OpenRpg.Demos.Web.pdb.gz
index e97e26b..c3ac40f 100644
Binary files a/docs/_framework/OpenRpg.Demos.Web.pdb.gz and b/docs/_framework/OpenRpg.Demos.Web.pdb.gz differ
diff --git a/docs/_framework/OpenRpg.Genres.Fantasy.dll b/docs/_framework/OpenRpg.Genres.Fantasy.dll
index 9d832bf..644f871 100644
Binary files a/docs/_framework/OpenRpg.Genres.Fantasy.dll and b/docs/_framework/OpenRpg.Genres.Fantasy.dll differ
diff --git a/docs/_framework/OpenRpg.Genres.Fantasy.dll.br b/docs/_framework/OpenRpg.Genres.Fantasy.dll.br
index 5f3c8c2..0bdf999 100644
Binary files a/docs/_framework/OpenRpg.Genres.Fantasy.dll.br and b/docs/_framework/OpenRpg.Genres.Fantasy.dll.br differ
diff --git a/docs/_framework/OpenRpg.Genres.Fantasy.dll.gz b/docs/_framework/OpenRpg.Genres.Fantasy.dll.gz
index 4724bc3..444a38a 100644
Binary files a/docs/_framework/OpenRpg.Genres.Fantasy.dll.gz and b/docs/_framework/OpenRpg.Genres.Fantasy.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Genres.dll b/docs/_framework/OpenRpg.Genres.dll
index 708667a..397e7b5 100644
Binary files a/docs/_framework/OpenRpg.Genres.dll and b/docs/_framework/OpenRpg.Genres.dll differ
diff --git a/docs/_framework/OpenRpg.Genres.dll.br b/docs/_framework/OpenRpg.Genres.dll.br
index e097246..196ee46 100644
Binary files a/docs/_framework/OpenRpg.Genres.dll.br and b/docs/_framework/OpenRpg.Genres.dll.br differ
diff --git a/docs/_framework/OpenRpg.Genres.dll.gz b/docs/_framework/OpenRpg.Genres.dll.gz
index 35197bd..b9f7e65 100644
Binary files a/docs/_framework/OpenRpg.Genres.dll.gz and b/docs/_framework/OpenRpg.Genres.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Items.dll b/docs/_framework/OpenRpg.Items.dll
index 5c0919a..ab20d73 100644
Binary files a/docs/_framework/OpenRpg.Items.dll and b/docs/_framework/OpenRpg.Items.dll differ
diff --git a/docs/_framework/OpenRpg.Items.dll.br b/docs/_framework/OpenRpg.Items.dll.br
index 54277b5..6e21590 100644
Binary files a/docs/_framework/OpenRpg.Items.dll.br and b/docs/_framework/OpenRpg.Items.dll.br differ
diff --git a/docs/_framework/OpenRpg.Items.dll.gz b/docs/_framework/OpenRpg.Items.dll.gz
index de36168..fbfb646 100644
Binary files a/docs/_framework/OpenRpg.Items.dll.gz and b/docs/_framework/OpenRpg.Items.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Localization.dll b/docs/_framework/OpenRpg.Localization.dll
index 158a76d..dfaeed0 100644
Binary files a/docs/_framework/OpenRpg.Localization.dll and b/docs/_framework/OpenRpg.Localization.dll differ
diff --git a/docs/_framework/OpenRpg.Localization.dll.br b/docs/_framework/OpenRpg.Localization.dll.br
index 55b351b..cd312bf 100644
Binary files a/docs/_framework/OpenRpg.Localization.dll.br and b/docs/_framework/OpenRpg.Localization.dll.br differ
diff --git a/docs/_framework/OpenRpg.Localization.dll.gz b/docs/_framework/OpenRpg.Localization.dll.gz
index d44791f..11c6934 100644
Binary files a/docs/_framework/OpenRpg.Localization.dll.gz and b/docs/_framework/OpenRpg.Localization.dll.gz differ
diff --git a/docs/_framework/OpenRpg.Quests.dll b/docs/_framework/OpenRpg.Quests.dll
index 72d3ece..920c43e 100644
Binary files a/docs/_framework/OpenRpg.Quests.dll and b/docs/_framework/OpenRpg.Quests.dll differ
diff --git a/docs/_framework/OpenRpg.Quests.dll.br b/docs/_framework/OpenRpg.Quests.dll.br
index d7cf865..f1c4118 100644
Binary files a/docs/_framework/OpenRpg.Quests.dll.br and b/docs/_framework/OpenRpg.Quests.dll.br differ
diff --git a/docs/_framework/OpenRpg.Quests.dll.gz b/docs/_framework/OpenRpg.Quests.dll.gz
index 6d6ec08..5976f28 100644
Binary files a/docs/_framework/OpenRpg.Quests.dll.gz and b/docs/_framework/OpenRpg.Quests.dll.gz differ
diff --git a/docs/_framework/blazor.boot.json b/docs/_framework/blazor.boot.json
index efdab22..fbbca7d 100644
--- a/docs/_framework/blazor.boot.json
+++ b/docs/_framework/blazor.boot.json
@@ -27,19 +27,19 @@
"netstandard.dll": "sha256-Njv4QtOTpwFKzkaMg8VFjyNAMWyB+YpphaAb1kcimkQ=",
"Newtonsoft.Json.dll": "sha256-cs8pHUurDt0IqbB8YXPh560au3q3J\/1wRL9jBddRVmE=",
"OpenRpg.AdviceEngine.dll": "sha256-mwHKE6uSy29tht26qwWS4oft9KR\/JY5+QOYRWQS\/CSQ=",
- "OpenRpg.Cards.dll": "sha256-8i\/cBidBEdO25Mn6sL4qHbPufyXh3En10qTQ+DB6xyo=",
- "OpenRpg.Combat.dll": "sha256-kdK24YJEB5gXcV4zdPhg\/dKGePYv92QGLbjTpohji0A=",
- "OpenRpg.Core.dll": "sha256-O83KlxdSIynwzvU8SpG3qtuDjXwd7UD3wejv5b1Zz0M=",
- "OpenRpg.CurveFunctions.dll": "sha256-MDxxg2Y390PQPW+dPk1YpRhoPrW+u7BIYz7qu4WMNU0=",
- "OpenRpg.Data.dll": "sha256-vYNJeVnY+8tx22UFzoZfABIIvHaRZPwz4jjzDj8gn6U=",
- "OpenRpg.Data.InMemory.dll": "sha256-XdmAB1E8NOtcztOLzz2N9INYGnN4LtoAQA2zRVjqPu8=",
- "OpenRpg.Demos.Infrastructure.dll": "sha256-\/psbVqucp0c3YlvVZD2I6JM4WqkIt99wmMt\/b37fhEk=",
- "OpenRpg.Demos.Web.dll": "sha256-fzIi2X4WyVFg9MyRnCUl7FDyfLP9IGVqXnOP7vYfPdE=",
- "OpenRpg.Genres.dll": "sha256-1rUw49xhroiRrCC5SoLs8A0YZjCiK5KVicnvEIC0I2o=",
- "OpenRpg.Genres.Fantasy.dll": "sha256-Pz1k3MUzsInOaySjOAo7rEXkDma8ZIYz\/YyNtLCDvjk=",
- "OpenRpg.Items.dll": "sha256-wJzAiKNUebP6twoR\/gVNDV2e1foQKWRL5i2SzUcyqS8=",
- "OpenRpg.Localization.dll": "sha256-yb0bP9FTvx\/d6qv1ygkGl5865FTrZ55ZlQvOiHKJUKc=",
- "OpenRpg.Quests.dll": "sha256-KNsY1KnYsgVEkTn9c4evm9Foq\/kLnBSVnfhrEZCP\/2g=",
+ "OpenRpg.Cards.dll": "sha256-nPw9zHN5kNoTHxGizlsgO7TRNz\/ttpjQdH16Qtja3CI=",
+ "OpenRpg.Combat.dll": "sha256-iq0OxHJykkeBVrO8qp+dL6pfCWIgKEPDgz\/H\/NvYXhs=",
+ "OpenRpg.Core.dll": "sha256-YyeXsEGWB18Cyp+Xv6Vejg\/XFxeJHOzJKKh0EJOx4lo=",
+ "OpenRpg.CurveFunctions.dll": "sha256-27w3mZ7rhOmzWdCMNilHiyClb\/DuxFxqxBCsIHrKXNQ=",
+ "OpenRpg.Data.dll": "sha256-xZSY4t5BS4kuthRZrvWJWsrwTFPWhAbCQwL1K0sX7qA=",
+ "OpenRpg.Data.InMemory.dll": "sha256-YI3NyB8ajwIs+U\/HrDkTO6VZhYKZJaxshu3bWhn\/amg=",
+ "OpenRpg.Demos.Infrastructure.dll": "sha256-dNTA65bF7eD5N38upVFvCfe25ahhic99yuNZed0qmng=",
+ "OpenRpg.Demos.Web.dll": "sha256-yKuWKqqWh\/sUOFM\/RXHdqzXa3GN2FYE9tlShObdxLx4=",
+ "OpenRpg.Genres.dll": "sha256-0qmEWFML4G1E4dl5w4+Ufs5p5+Kv7rN25zF4LYB987w=",
+ "OpenRpg.Genres.Fantasy.dll": "sha256-LEilWBdINMT6m7+B81V3a8bKEyOHk4QGbNoYy3\/lp\/A=",
+ "OpenRpg.Items.dll": "sha256-qmG9QiJiMcSvBVqDUFLQuuBCzG0VAXXJ1BPxfoc7tfQ=",
+ "OpenRpg.Localization.dll": "sha256-R4qEXkYOTeefrWyy6EaXvbJNj1+6lOXQ1msvarXw7K4=",
+ "OpenRpg.Quests.dll": "sha256-Na8H3vOcm23m6W0gvrfDIvJbsyl2HU5BkH7bERRTH8k=",
"RandomNameGenerator.dll": "sha256-aZenSA\/tE3jilQD1YLI2e5+lV7sZbkqT8aj+SL93+AU=",
"System.Collections.Concurrent.dll": "sha256-3U228gTvMf\/gO9hhTQZGzQ83G6FRxqNnsx\/TbQfbZUI=",
"System.Collections.dll": "sha256-4OQzh8enJT1otPCDBr0DO073OkYRSgynTt1n\/BW46pk=",
diff --git a/docs/_framework/blazor.boot.json.br b/docs/_framework/blazor.boot.json.br
index fc0e53e..1f30910 100644
Binary files a/docs/_framework/blazor.boot.json.br and b/docs/_framework/blazor.boot.json.br differ
diff --git a/docs/_framework/blazor.boot.json.gz b/docs/_framework/blazor.boot.json.gz
index a5a5108..60c1d06 100644
Binary files a/docs/_framework/blazor.boot.json.gz and b/docs/_framework/blazor.boot.json.gz differ
diff --git a/src/OpenRpg.Demos.Infrastructure/OpenRpg.Demos.Infrastructure.csproj b/src/OpenRpg.Demos.Infrastructure/OpenRpg.Demos.Infrastructure.csproj
index 9bdcc31..d817523 100644
--- a/src/OpenRpg.Demos.Infrastructure/OpenRpg.Demos.Infrastructure.csproj
+++ b/src/OpenRpg.Demos.Infrastructure/OpenRpg.Demos.Infrastructure.csproj
@@ -6,13 +6,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/src/OpenRpg.Demos.Web/Components/Characters/CharacterVitals.razor b/src/OpenRpg.Demos.Web/Components/Characters/CharacterVitals.razor
index b7a2263..a3adb81 100644
--- a/src/OpenRpg.Demos.Web/Components/Characters/CharacterVitals.razor
+++ b/src/OpenRpg.Demos.Web/Components/Characters/CharacterVitals.razor
@@ -2,7 +2,7 @@
@using OpenRpg.Core.Stats.Variables
@using OpenRpg.Genres.Extensions
@using OpenRpg.Genres.Fantasy.Extensions
-@using OpenRpg.Genres.Variables
+@using OpenRpg.Core.State.Entity
@if (State != null)
{
@@ -20,7 +20,7 @@
@code {
[Parameter]
- public ICharacterStateVariables State { get; set; }
+ public IEntityStateVariables State { get; set; }
[Parameter]
diff --git a/src/OpenRpg.Demos.Web/Components/Inventories/BasicInventory.razor b/src/OpenRpg.Demos.Web/Components/Inventories/BasicInventory.razor
index ebd1af0..cc0cce0 100644
--- a/src/OpenRpg.Demos.Web/Components/Inventories/BasicInventory.razor
+++ b/src/OpenRpg.Demos.Web/Components/Inventories/BasicInventory.razor
@@ -40,7 +40,7 @@
if (itemIndex >= Inventory.Items.Count)
{ return null; }
- return Inventory.GetItem(itemIndex);
+ return Inventory.Items[itemIndex];
}
public void Refresh()
diff --git a/src/OpenRpg.Demos.Web/Components/Items/ItemIcon.razor b/src/OpenRpg.Demos.Web/Components/Items/ItemIcon.razor
index 2fcdea2..3d7513b 100644
--- a/src/OpenRpg.Demos.Web/Components/Items/ItemIcon.razor
+++ b/src/OpenRpg.Demos.Web/Components/Items/ItemIcon.razor
@@ -31,7 +31,7 @@
protected override void OnParametersSet()
{
- if (Item.Variables != null && Item.Variables.ContainsKey(DefaultItemVariableTypes.Amount))
+ if (Item.Variables != null && Item.Variables.ContainsKey(ItemVariableTypes.Amount))
{ _itemAmount = Item.Variables.Amount(); }
else
{ _itemAmount = 0;}
diff --git a/src/OpenRpg.Demos.Web/OpenRpg.Demos.Web.csproj b/src/OpenRpg.Demos.Web/OpenRpg.Demos.Web.csproj
index d215d2e..27b93e3 100644
--- a/src/OpenRpg.Demos.Web/OpenRpg.Demos.Web.csproj
+++ b/src/OpenRpg.Demos.Web/OpenRpg.Demos.Web.csproj
@@ -12,21 +12,21 @@
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/OpenRpg.Demos.Web/Pages/Characters/CharacterPersistence.razor b/src/OpenRpg.Demos.Web/Pages/Characters/CharacterPersistence.razor
index 5b793e6..07f2f55 100644
--- a/src/OpenRpg.Demos.Web/Pages/Characters/CharacterPersistence.razor
+++ b/src/OpenRpg.Demos.Web/Pages/Characters/CharacterPersistence.razor
@@ -3,10 +3,12 @@
@using OpenRpg.Genres.Characters
@using OpenRpg.Genres.Persistence.Characters
@using Newtonsoft.Json
+@using OpenRpg.Core.Stats.Populators
@using OpenRpg.Genres.Extensions
@inject DemoCharacterBuilder CharacterBuilder;
@inject ICharacterMapper CharacterMapper;
+@inject IStatPopulator StatPopulator;
#### Character Persistence
@@ -152,6 +154,7 @@
public void RandomizeCharacter()
{
_randomCharacter = CharacterBuilder.CreateNew().Build();
+ StatPopulator.Populate(_randomCharacter.Stats, _randomCharacter.GetEffects().ToArray(), null);
PersistCharacter();
StateHasChanged();
}
@@ -167,6 +170,7 @@
{
var data = JsonConvert.DeserializeObject(_persistedData);
_regeneratedCharacter = CharacterMapper.Map(data);
+ StatPopulator.Populate(_regeneratedCharacter.Stats, _regeneratedCharacter.GetEffects().ToArray(), null);
StateHasChanged();
}
}
\ No newline at end of file
diff --git a/src/OpenRpg.Demos.Web/Pages/Characters/CharacterStatsComponents.razor b/src/OpenRpg.Demos.Web/Pages/Characters/CharacterStatsComponents.razor
index f06b35c..fae9bf8 100644
--- a/src/OpenRpg.Demos.Web/Pages/Characters/CharacterStatsComponents.razor
+++ b/src/OpenRpg.Demos.Web/Pages/Characters/CharacterStatsComponents.razor
@@ -4,11 +4,11 @@
@using OpenRpg.Core.Races
@using OpenRpg.Genres.Fantasy.Types
@using OpenRpg.Core.Classes
+@using OpenRpg.Core.State.Entity
@using OpenRpg.Core.Stats.Variables
@using OpenRpg.Genres.Extensions
@using OpenRpg.Genres.Fantasy.Extensions
@using OpenRpg.Genres.Fantasy.Stats
-@using OpenRpg.Genres.Variables
## Character Stats Components
@@ -238,7 +238,7 @@
public class StatsCharacter : BasicCharacterComponents.SimpleCharacter
{
public IStatsVariables Stats { get; set; } = new DefaultStatsVariables();
- public ICharacterStateVariables State { get; set; } = new DefaultCharacterStateVariables();
+ public IEntityStateVariables State { get; set; } = new DefaultEntityStateVariables();
}
public class AutoStatsCharacter : StatsCharacter, IHasEffects
diff --git a/src/OpenRpg.Demos.Web/Pages/Characters/DefaultCharacterClasses.razor b/src/OpenRpg.Demos.Web/Pages/Characters/DefaultCharacterClasses.razor
index 219ad12..f3ab858 100644
--- a/src/OpenRpg.Demos.Web/Pages/Characters/DefaultCharacterClasses.razor
+++ b/src/OpenRpg.Demos.Web/Pages/Characters/DefaultCharacterClasses.razor
@@ -4,8 +4,10 @@
@using OpenRpg.Genres.Fantasy.Extensions
@using OpenRpg.Genres.Extensions
@using OpenRpg.Core.Classes
+@using OpenRpg.Core.Stats.Populators
@using OpenRpg.Genres.Characters
@inject DemoCharacterBuilder CharacterBuilder;
+@inject IStatPopulator StatPopulator;
## Default Character Classes
@@ -177,6 +179,7 @@
public void RandomizeCharacter()
{
_randomCharacter = CharacterBuilder.CreateNew().Build();
+ StatPopulator.Populate(_randomCharacter.Stats, _randomCharacter.GetEffects().ToArray(), null);
StateHasChanged();
}
diff --git a/src/OpenRpg.Demos.Web/Pages/Characters/ExampleCharacterBuilder.razor b/src/OpenRpg.Demos.Web/Pages/Characters/ExampleCharacterBuilder.razor
index 6d3313e..e7e7670 100644
--- a/src/OpenRpg.Demos.Web/Pages/Characters/ExampleCharacterBuilder.razor
+++ b/src/OpenRpg.Demos.Web/Pages/Characters/ExampleCharacterBuilder.razor
@@ -5,10 +5,13 @@
@using OpenRpg.Data
@using OpenRpg.Core.Races
@using OpenRpg.Core.Classes
+@using OpenRpg.Core.Stats.Populators
@using OpenRpg.Data.Conventions.Extensions
+@using OpenRpg.Genres.Extensions
@inject DemoCharacterBuilder CharacterBuilder;
@inject IRepository Repository;
+@inject IStatPopulator StatPopulator;
# Character Builder
@@ -160,6 +163,7 @@
{ builder = builder.AsFemale(); }
_generatedCharacter = builder.Build();
+ StatPopulator.Populate(_generatedCharacter.Stats, _generatedCharacter.GetEffects().ToArray(), null);
StateHasChanged();
}
diff --git a/src/OpenRpg.Demos.Web/Pages/Combat/Attacking.razor b/src/OpenRpg.Demos.Web/Pages/Combat/Attacking.razor
index 88f103b..eea2c6c 100644
--- a/src/OpenRpg.Demos.Web/Pages/Combat/Attacking.razor
+++ b/src/OpenRpg.Demos.Web/Pages/Combat/Attacking.razor
@@ -2,14 +2,17 @@
@using OpenRpg.Combat.Attacks
@using OpenRpg.Combat.Processors.Attacks
+@using OpenRpg.Core.Stats.Populators
@using OpenRpg.Demos.Infrastructure.Locale
@using OpenRpg.Genres.Characters
+@using OpenRpg.Genres.Extensions
@using OpenRpg.Localization.Data.Extensions
@using OpenRpg.Localization.Data.Repositories
@inject DemoCharacterBuilder CharacterBuilder
@inject IAttackGenerator AttackGenerator
@inject ILocaleRepository LocaleRepository
+@inject IStatPopulator StatPopulator;
## Attacking
@@ -105,6 +108,7 @@
public void RandomizeCharacter()
{
_randomCharacter = CharacterBuilder.CreateNew().Build();
+ StatPopulator.Populate(_randomCharacter.Stats, _randomCharacter.GetEffects().ToArray(), null);
}
public string GetDamageTypeText(int damageType)
diff --git a/src/OpenRpg.Demos.Web/Pages/Combat/Defending.razor b/src/OpenRpg.Demos.Web/Pages/Combat/Defending.razor
index b93b7d5..8018e5f 100644
--- a/src/OpenRpg.Demos.Web/Pages/Combat/Defending.razor
+++ b/src/OpenRpg.Demos.Web/Pages/Combat/Defending.razor
@@ -2,8 +2,10 @@
@using OpenRpg.Combat.Attacks
@using OpenRpg.Combat.Processors.Attacks
+@using OpenRpg.Core.Stats.Populators
@using OpenRpg.Demos.Infrastructure.Locale
@using OpenRpg.Genres.Characters
+@using OpenRpg.Genres.Extensions
@using OpenRpg.Localization.Data.Extensions
@using OpenRpg.Localization.Data.Repositories
@@ -11,6 +13,7 @@
@inject IAttackGenerator AttackGenerator
@inject IAttackProcessor AttackProcessor
@inject ILocaleRepository LocaleRepository
+@inject IStatPopulator StatPopulator;
## Defending
@@ -107,11 +110,13 @@
public void RandomizeAttacker()
{
_attackingCharacter = CharacterBuilder.CreateNew().Build();
+ StatPopulator.Populate(_attackingCharacter.Stats, _attackingCharacter.GetEffects().ToArray(), null);
}
public void RandomizeDefender()
{
_defendingCharacter = CharacterBuilder.CreateNew().Build();
+ StatPopulator.Populate(_defendingCharacter.Stats, _defendingCharacter.GetEffects().ToArray(), null);
}
public string GetDamageTypeText(int damageType)
diff --git a/src/OpenRpg.Demos.Web/Pages/Items/BasicItemComponents.razor b/src/OpenRpg.Demos.Web/Pages/Items/BasicItemComponents.razor
index 358f8fd..6351ef3 100644
--- a/src/OpenRpg.Demos.Web/Pages/Items/BasicItemComponents.razor
+++ b/src/OpenRpg.Demos.Web/Pages/Items/BasicItemComponents.razor
@@ -57,7 +57,7 @@
ItemType = ItemTypes.GenericWeapon,
Effects = new []
{
- new Effect { EffectType = EffectTypes.PureDamageAmount, Potency = 30.0f }
+ new Effect { EffectType = EffectTypes.DamageBonusAmount, Potency = 30.0f }
}
};
swordTemplate.Variables.QualityType(ItemQualityTypes.JunkQuality);
@@ -94,9 +94,9 @@
```csharp
var swordEffects = new[]
{
- new Effect { EffectType = EffectTypes.PureDamageAmount, Potency = 765.5f },
+ new Effect { EffectType = EffectTypes.DamageBonusAmount, Potency = 765.5f },
new Effect { EffectType = EffectTypes.StrengthBonusAmount, Potency = 20.0f },
- new Effect { EffectType = EffectTypes.PureDamagePercentage, Potency = 10.0f },
+ new Effect { EffectType = EffectTypes.DamageBonusPercentage, Potency = 10.0f },
new Effect { EffectType = EffectTypes.ConstitutionBonusAmount, Potency = 15.0f },
new Effect { EffectType = EffectTypes.DarkDefenseAmount, Potency = 15.0f }
};
diff --git a/src/OpenRpg.Demos.Web/Pages/Items/ItemsWithRequirements.razor b/src/OpenRpg.Demos.Web/Pages/Items/ItemsWithRequirements.razor
index 1a21b78..0e244d0 100644
--- a/src/OpenRpg.Demos.Web/Pages/Items/ItemsWithRequirements.razor
+++ b/src/OpenRpg.Demos.Web/Pages/Items/ItemsWithRequirements.razor
@@ -2,15 +2,18 @@
@using OpenRpg.Core.Effects
@using OpenRpg.Core.Modifications
@using OpenRpg.Core.Requirements
+@using OpenRpg.Core.Stats.Populators
@using OpenRpg.Demos.Infrastructure.Extensions
@using OpenRpg.Demos.Infrastructure.Lookups
@using OpenRpg.Genres.Characters
+@using OpenRpg.Genres.Extensions
@using OpenRpg.Genres.Fantasy.Types
@using OpenRpg.Items
@using OpenRpg.Items.Extensions
@using OpenRpg.Items.Templates
@inject DemoCharacterBuilder CharacterBuilder;
+@inject IStatPopulator StatPopulator;
## Requirements In General
@@ -215,6 +218,7 @@
public void RandomizeCharacter()
{
_randomCharacter = CharacterBuilder.CreateNew().Build();
+ StatPopulator.Populate(_randomCharacter.Stats, _randomCharacter.GetEffects().ToArray(), null);
StateHasChanged();
}