Skip to content

Commit

Permalink
Updated to latest OpenRPG
Browse files Browse the repository at this point in the history
Also updated some wonky examples
  • Loading branch information
grofit committed Sep 10, 2023
1 parent 14582de commit 0fe14f3
Show file tree
Hide file tree
Showing 57 changed files with 63 additions and 39 deletions.
Binary file modified docs/_framework/OpenRpg.Cards.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Cards.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Cards.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Combat.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Combat.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Combat.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Core.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Core.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Core.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.CurveFunctions.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.CurveFunctions.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.CurveFunctions.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Data.InMemory.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Data.InMemory.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Data.InMemory.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Data.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Data.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Data.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Infrastructure.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Infrastructure.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Infrastructure.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Infrastructure.pdb.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Web.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Web.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Web.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Web.pdb.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Genres.Fantasy.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Genres.Fantasy.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Genres.Fantasy.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Genres.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Genres.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Genres.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Items.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Items.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Items.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Localization.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Localization.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Localization.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Quests.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Quests.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Quests.dll.gz
Binary file not shown.
26 changes: 13 additions & 13 deletions docs/_framework/blazor.boot.json
Original file line number Diff line number Diff line change
Expand Up @@ -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=",
Expand Down
Binary file modified docs/_framework/blazor.boot.json.br
Binary file not shown.
Binary file modified docs/_framework/blazor.boot.json.gz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="OpenRpg.Cards" Version="0.28.205" />
<PackageReference Include="OpenRpg.Core" Version="0.28.205" />
<PackageReference Include="OpenRpg.Data" Version="0.28.205" />
<PackageReference Include="OpenRpg.Data.InMemory" Version="0.28.205" />
<PackageReference Include="OpenRpg.Genres.Fantasy" Version="0.28.81" />
<PackageReference Include="OpenRpg.Items" Version="0.28.205" />
<PackageReference Include="OpenRpg.Localization" Version="0.28.205" />
<PackageReference Include="OpenRpg.Cards" Version="0.29.217" />
<PackageReference Include="OpenRpg.Core" Version="0.29.217" />
<PackageReference Include="OpenRpg.Data" Version="0.29.217" />
<PackageReference Include="OpenRpg.Data.InMemory" Version="0.29.217" />
<PackageReference Include="OpenRpg.Genres.Fantasy" Version="0.29.87" />
<PackageReference Include="OpenRpg.Items" Version="0.29.217" />
<PackageReference Include="OpenRpg.Localization" Version="0.29.217" />
<PackageReference Include="RandomNameGenerator" Version="1.0.4" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -20,7 +20,7 @@

@code {
[Parameter]
public ICharacterStateVariables State { get; set; }
public IEntityStateVariables State { get; set; }


[Parameter]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
if (itemIndex >= Inventory.Items.Count)
{ return null; }

return Inventory.GetItem(itemIndex);
return Inventory.Items[itemIndex];
}

public void Refresh()
Expand Down
2 changes: 1 addition & 1 deletion src/OpenRpg.Demos.Web/Components/Items/ItemIcon.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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;}
Expand Down
20 changes: 10 additions & 10 deletions src/OpenRpg.Demos.Web/OpenRpg.Demos.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.10" PrivateAssets="all" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="OpenRpg.AdviceEngine" Version="0.24.34" />
<PackageReference Include="OpenRpg.Cards" Version="0.28.211" />
<PackageReference Include="OpenRpg.CurveFunctions" Version="0.28.211" />
<PackageReference Include="OpenRpg.Genres" Version="0.28.83" />
<PackageReference Include="OpenRpg.Genres.Fantasy" Version="0.28.83" />
<PackageReference Include="OpenRpg.Cards" Version="0.29.217" />
<PackageReference Include="OpenRpg.CurveFunctions" Version="0.29.217" />
<PackageReference Include="OpenRpg.Genres" Version="0.29.87" />
<PackageReference Include="OpenRpg.Genres.Fantasy" Version="0.29.87" />
<PackageReference Include="RandomNameGenerator" Version="1.0.4" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="OpenRpg.Combat" Version="0.28.211" />
<PackageReference Include="OpenRpg.Core" Version="0.28.211" />
<PackageReference Include="OpenRpg.Data" Version="0.28.211" />
<PackageReference Include="OpenRpg.Items" Version="0.28.211" />
<PackageReference Include="OpenRpg.Localization" Version="0.28.211" />
<PackageReference Include="OpenRpg.Quests" Version="0.28.211" />
<PackageReference Include="OpenRpg.Combat" Version="0.29.217" />
<PackageReference Include="OpenRpg.Core" Version="0.29.217" />
<PackageReference Include="OpenRpg.Data" Version="0.29.217" />
<PackageReference Include="OpenRpg.Items" Version="0.29.217" />
<PackageReference Include="OpenRpg.Localization" Version="0.29.217" />
<PackageReference Include="OpenRpg.Quests" Version="0.29.217" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

<Markdown>
#### Character Persistence
Expand Down Expand Up @@ -152,6 +154,7 @@
public void RandomizeCharacter()
{
_randomCharacter = CharacterBuilder.CreateNew().Build();
StatPopulator.Populate(_randomCharacter.Stats, _randomCharacter.GetEffects().ToArray(), null);
PersistCharacter();
StateHasChanged();
}
Expand All @@ -167,6 +170,7 @@
{
var data = JsonConvert.DeserializeObject<CharacterData>(_persistedData);
_regeneratedCharacter = CharacterMapper.Map(data);
StatPopulator.Populate(_regeneratedCharacter.Stats, _regeneratedCharacter.GetEffects().ToArray(), null);
StateHasChanged();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

<Markdown>
## Character Stats Components
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

<Markdown>
## Default Character Classes
Expand Down Expand Up @@ -177,6 +179,7 @@
public void RandomizeCharacter()
{
_randomCharacter = CharacterBuilder.CreateNew().Build();
StatPopulator.Populate(_randomCharacter.Stats, _randomCharacter.GetEffects().ToArray(), null);
StateHasChanged();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

<Markdown>
# Character Builder
Expand Down Expand Up @@ -160,6 +163,7 @@
{ builder = builder.AsFemale(); }

_generatedCharacter = builder.Build();
StatPopulator.Populate(_generatedCharacter.Stats, _generatedCharacter.GetEffects().ToArray(), null);

StateHasChanged();
}
Expand Down
4 changes: 4 additions & 0 deletions src/OpenRpg.Demos.Web/Pages/Combat/Attacking.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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;

<Markdown>
## Attacking
Expand Down Expand Up @@ -105,6 +108,7 @@
public void RandomizeCharacter()
{
_randomCharacter = CharacterBuilder.CreateNew().Build();
StatPopulator.Populate(_randomCharacter.Stats, _randomCharacter.GetEffects().ToArray(), null);
}

public string GetDamageTypeText(int damageType)
Expand Down
5 changes: 5 additions & 0 deletions src/OpenRpg.Demos.Web/Pages/Combat/Defending.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

@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 IAttackProcessor AttackProcessor
@inject ILocaleRepository LocaleRepository
@inject IStatPopulator StatPopulator;

<Markdown>
## Defending
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/OpenRpg.Demos.Web/Pages/Items/BasicItemComponents.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 }
};
Expand Down
4 changes: 4 additions & 0 deletions src/OpenRpg.Demos.Web/Pages/Items/ItemsWithRequirements.razor
Original file line number Diff line number Diff line change
Expand Up @@ -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;

<Markdown>
## Requirements In General
Expand Down Expand Up @@ -215,6 +218,7 @@
public void RandomizeCharacter()
{
_randomCharacter = CharacterBuilder.CreateNew().Build();
StatPopulator.Populate(_randomCharacter.Stats, _randomCharacter.GetEffects().ToArray(), null);
StateHasChanged();
}

Expand Down

0 comments on commit 0fe14f3

Please sign in to comment.