Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 61bfb188f6 | |||
| 96e72df0da | |||
| 11f45fcf74 | |||
| d6eabf4990 | |||
| beed3cfded | |||
| 7757ff9895 | |||
| 2d2d6d2250 | |||
| ab65724a96 | |||
| 7713f3b7ec | |||
| b0fdabbe67 | |||
| b6d03afe56 | |||
| 6609d911fc | |||
| e147856b57 | |||
| 1388182ebe |
@@ -3,7 +3,6 @@
|
||||
<div class="sidebar">
|
||||
<NavMenu/>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<main>
|
||||
<article class="content px-4">
|
||||
<TelerikRootComponent>
|
||||
@@ -11,8 +10,4 @@
|
||||
</TelerikRootComponent>
|
||||
</article>
|
||||
</main>
|
||||
<footer class="footer">
|
||||
<p>This website is not associated with <a href="https://earthbornegames.com/" target="_blank" rel="noopener noreferrer">Earthborne Games</a>.</p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8,13 +8,6 @@ main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-color: var(--bg-sidebar);
|
||||
border-right: 1px solid var(--border-color);
|
||||
@@ -44,14 +37,6 @@ main {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-muted, #888);
|
||||
border-top: 1px solid var(--border-color, #ddd);
|
||||
}
|
||||
|
||||
@media (max-width: 640.98px) {
|
||||
.top-row {
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
@page "/gear"
|
||||
@inject DocsService DocsService
|
||||
|
||||
<PageTitle>Gear & Equipment</PageTitle>
|
||||
|
||||
<div class="section-header d-flex align-items-center mb-4">
|
||||
<h1 class="mb-0">Gear & Equipment</h1>
|
||||
<div class="ms-3 flex-grow-1 border-bottom opacity-25"></div>
|
||||
</div>
|
||||
|
||||
@if (gearNotes == null)
|
||||
{
|
||||
<div class="d-flex justify-content-center py-5">
|
||||
<div class="spinner-border text-success" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="grid-container">
|
||||
<TelerikGrid Data="@gearNotes" Pageable="true" PageSize="50" Sortable="true" FilterMode="@GridFilterMode.FilterRow"
|
||||
Height="calc(100vh - 250px)">
|
||||
<GridColumns>
|
||||
<GridColumn Field="@(nameof(NoteInfo.Title))" Title="Item Name" Width="200px">
|
||||
<Template>
|
||||
<NavLink href="@($"docs/{(context as NoteInfo)!.Slug}")" class="fw-bold">@((context as NoteInfo)!.Title)</NavLink>
|
||||
</Template>
|
||||
</GridColumn>
|
||||
<GridColumn Field="@(nameof(NoteInfo.Cost))" Title="Cost" Width="90px" />
|
||||
<GridColumn Field="@(nameof(NoteInfo.GearCategory))" Title="Category" Width="140px"/>
|
||||
<GridColumn Field="@(nameof(NoteInfo.Effect))" Title="Effect"/>
|
||||
<GridColumn Field="@(nameof(NoteInfo.Location))" Title="Acquisition" Width="150px"/>
|
||||
</GridColumns>
|
||||
</TelerikGrid>
|
||||
</div>
|
||||
}
|
||||
|
||||
@code {
|
||||
private List<NoteInfo>? gearNotes;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var index = await DocsService.GetIndexAsync();
|
||||
gearNotes = index.Notes
|
||||
.Where(n => string.Equals(n.Category, "Gear", StringComparison.OrdinalIgnoreCase))
|
||||
.OrderBy(n => n.Title)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
|
||||
<div class="hero-section text-center">
|
||||
<div class="hero-content py-5">
|
||||
<h1 class="display-4 mb-3">Slop Game Reference - Earthborne Trailblazer</h1>
|
||||
<p class="lead mb-4">AI generated website for reference notes on playing Earthborne Trailblazer.</p>
|
||||
<h1 class="display-4 mb-3">Earthborne Trailblazer</h1>
|
||||
<p class="lead mb-4">Your essential companion guide for navigating the Valley and mastering your craft.</p>
|
||||
<div class="hero-actions">
|
||||
<NavLink href="overview" class="btn btn-primary btn-lg px-4">Begin Journey</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="simulation-layout" tabindex="0" @onkeydown="HandleKeyDown" @ref="layoutDiv">
|
||||
<div class="simulation-layout">
|
||||
<div class="sim-controls d-flex align-items-center justify-content-between mb-3 flex-wrap gap-2">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<button class="btn btn-outline-light btn-sm" @onclick="PrevTurn" disabled="@(SimService.Data.CurrentTurn <= 0)">
|
||||
@@ -109,57 +109,12 @@ else
|
||||
var dr = prev != null ? region.PreyMeeples - prev.PreyMeeples : 0;
|
||||
var df = prev != null ? region.FloraMeeples - prev.FloraMeeples : 0;
|
||||
var hasDelta = dp != 0 || dr != 0 || df != 0;
|
||||
|
||||
// Meeple dot counts (max 3 visible per type)
|
||||
var pdots = Math.Min(region.PredatorMeeples, 3);
|
||||
var rdots = Math.Min(region.PreyMeeples, 3);
|
||||
var fdots = Math.Min(region.FloraMeeples, 3);
|
||||
var dotR = 3;
|
||||
var dotGap = 7;
|
||||
|
||||
<g class="sim-region @(isActivated ? "sim-active" : "")">
|
||||
<circle cx="@region.X" cy="@region.Y" r="34" fill="url(#sg-@region.Terrain)"/>
|
||||
<circle cx="@region.X" cy="@region.Y" r="18"
|
||||
fill="@(terrainColor)cc"
|
||||
stroke="@(isActivated ? "#ffd700" : "rgba(255,255,255,0.5)")"
|
||||
stroke-width="@(isActivated ? 3 : 2)"/>
|
||||
|
||||
@* Predator dots (red, top row) *@
|
||||
@for (int d = 0; d < pdots; d++)
|
||||
{
|
||||
var dx = region.X + (d - (pdots - 1) * 0.5) * dotGap;
|
||||
var dy = region.Y - 7;
|
||||
<circle cx="@dx" cy="@dy" r="@dotR" fill="#e76f51" stroke="rgba(0,0,0,0.4)" stroke-width="0.5"/>
|
||||
}
|
||||
@if (region.PredatorMeeples > 3)
|
||||
{
|
||||
@((MarkupString)$"<text x=\"{region.X + 2 * dotGap + 2}\" y=\"{region.Y - 4}\" fill=\"#e76f51\" font-size=\"7\" font-weight=\"600\">+{region.PredatorMeeples - 3}</text>")
|
||||
}
|
||||
|
||||
@* Prey dots (yellow, middle row) *@
|
||||
@for (int d = 0; d < rdots; d++)
|
||||
{
|
||||
var dx = region.X + (d - (rdots - 1) * 0.5) * dotGap;
|
||||
var dy = region.Y;
|
||||
<circle cx="@dx" cy="@dy" r="@dotR" fill="#e9c46a" stroke="rgba(0,0,0,0.4)" stroke-width="0.5"/>
|
||||
}
|
||||
@if (region.PreyMeeples > 3)
|
||||
{
|
||||
@((MarkupString)$"<text x=\"{region.X + 2 * dotGap + 2}\" y=\"{region.Y + 3}\" fill=\"#e9c46a\" font-size=\"7\" font-weight=\"600\">+{region.PreyMeeples - 3}</text>")
|
||||
}
|
||||
|
||||
@* Flora dots (green, bottom row) *@
|
||||
@for (int d = 0; d < fdots; d++)
|
||||
{
|
||||
var dx = region.X + (d - (fdots - 1) * 0.5) * dotGap;
|
||||
var dy = region.Y + 7;
|
||||
<circle cx="@dx" cy="@dy" r="@dotR" fill="#4caf50" stroke="rgba(0,0,0,0.4)" stroke-width="0.5"/>
|
||||
}
|
||||
@if (region.FloraMeeples > 3)
|
||||
{
|
||||
@((MarkupString)$"<text x=\"{region.X + 2 * dotGap + 2}\" y=\"{region.Y + 10}\" fill=\"#4caf50\" font-size=\"7\" font-weight=\"600\">+{region.FloraMeeples - 3}</text>")
|
||||
}
|
||||
|
||||
<text x="@labelX" y="@(region.Y + 4)" fill="rgba(255,255,255,0.9)"
|
||||
font-family="system-ui,sans-serif" font-size="11" font-weight="600">
|
||||
@region.Name
|
||||
@@ -263,7 +218,6 @@ else
|
||||
|
||||
|
||||
@code {
|
||||
private ElementReference layoutDiv;
|
||||
private TurnEvent? CurrentEvent => SimService.Data.CurrentTurn > 0 && SimService.Data.CurrentTurn <= SimService.Data.Events.Count
|
||||
? SimService.Data.Events[SimService.Data.CurrentTurn - 1]
|
||||
: null;
|
||||
@@ -298,18 +252,6 @@ else
|
||||
SimService.Data.CurrentTurn++;
|
||||
}
|
||||
|
||||
private void HandleKeyDown(KeyboardEventArgs e)
|
||||
{
|
||||
if (e.Key == "ArrowLeft") PrevTurn();
|
||||
else if (e.Key == "ArrowRight") NextTurn();
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
await layoutDiv.FocusAsync();
|
||||
}
|
||||
|
||||
private void RandomizeEvents()
|
||||
{
|
||||
SimService.RandomizeEvents();
|
||||
|
||||
+1
-1
@@ -11,6 +11,6 @@ builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.
|
||||
builder.Services.AddScoped<DocsService>();
|
||||
builder.Services.AddSingleton<GameSimulationService>();
|
||||
|
||||
builder.Services.AddTelerikBlazor();
|
||||
//builder.Services.AddTelerikBlazor();
|
||||
|
||||
await builder.Build().RunAsync();
|
||||
@@ -76,7 +76,12 @@ public class GameSimulationService
|
||||
|
||||
public void RandomizeEvents()
|
||||
{
|
||||
RunSimulation();
|
||||
var initialRegions = Data.InitialRegions;
|
||||
Data = new SimulationData();
|
||||
Data.Regions = initialRegions.Select(r => r.Clone()).ToList();
|
||||
Data.InitialRegions = initialRegions;
|
||||
GenerateAndApplyEvents();
|
||||
Data.IsInitialized = true;
|
||||
}
|
||||
|
||||
public List<RegionState> GetCurrentState()
|
||||
@@ -176,25 +181,22 @@ public class GameSimulationService
|
||||
if (region.PredatorMeeples <= 0)
|
||||
return;
|
||||
|
||||
int total = region.PredatorMeeples;
|
||||
int canEat = Math.Min(total, region.PreyMeeples);
|
||||
int mustTravel = total - canEat;
|
||||
|
||||
if (canEat > 0)
|
||||
if (region.PreyMeeples > 0)
|
||||
{
|
||||
region.PreyMeeples -= canEat;
|
||||
region.PredatorMeeples += canEat;
|
||||
details.Add($"{region.Name}: {canEat} predators ate prey, +{canEat} new predators");
|
||||
int eaten = Math.Min(region.PredatorMeeples, region.PreyMeeples);
|
||||
region.PreyMeeples -= eaten;
|
||||
region.PredatorMeeples += eaten;
|
||||
details.Add($"{region.Name}: Predators ate {eaten} prey, now {region.PredatorMeeples}P / {region.PreyMeeples}R");
|
||||
}
|
||||
|
||||
if (mustTravel > 0)
|
||||
else
|
||||
{
|
||||
var target = FindBestTravelTarget(region, r => r.PreyMeeples);
|
||||
if (target != null)
|
||||
{
|
||||
region.PredatorMeeples -= mustTravel;
|
||||
target.PredatorMeeples += mustTravel;
|
||||
details.Add($"{region.Name}: {mustTravel} predators traveled to {target.Name}");
|
||||
int traveling = region.PredatorMeeples;
|
||||
target.PredatorMeeples += traveling;
|
||||
region.PredatorMeeples = 0;
|
||||
details.Add($"{region.Name}: {traveling} predators traveled to {target.Name}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -204,25 +206,22 @@ public class GameSimulationService
|
||||
if (region.PreyMeeples <= 0)
|
||||
return;
|
||||
|
||||
int total = region.PreyMeeples;
|
||||
int canEat = Math.Min(total, region.FloraMeeples);
|
||||
int mustTravel = total - canEat;
|
||||
|
||||
if (canEat > 0)
|
||||
if (region.FloraMeeples > 0)
|
||||
{
|
||||
region.FloraMeeples -= canEat;
|
||||
region.PreyMeeples += canEat;
|
||||
details.Add($"{region.Name}: {canEat} prey ate flora, +{canEat} new prey");
|
||||
int consumed = Math.Min(region.PreyMeeples, region.FloraMeeples);
|
||||
region.FloraMeeples -= consumed;
|
||||
region.PreyMeeples += consumed;
|
||||
details.Add($"{region.Name}: Prey consumed {consumed} flora, now {region.PreyMeeples}R / {region.FloraMeeples}F");
|
||||
}
|
||||
|
||||
if (mustTravel > 0)
|
||||
else
|
||||
{
|
||||
var target = FindBestTravelTarget(region, r => r.FloraMeeples);
|
||||
if (target != null)
|
||||
{
|
||||
region.PreyMeeples -= mustTravel;
|
||||
target.PreyMeeples += mustTravel;
|
||||
details.Add($"{region.Name}: {mustTravel} prey traveled to {target.Name}");
|
||||
int traveling = region.PreyMeeples;
|
||||
target.PreyMeeples += traveling;
|
||||
region.PreyMeeples = 0;
|
||||
details.Add($"{region.Name}: {traveling} prey traveled to {target.Name}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -316,22 +315,13 @@ public class GameSimulationService
|
||||
}
|
||||
}
|
||||
|
||||
var excluded = new HashSet<string>
|
||||
{
|
||||
"Grass 1", "Grass 2", "Wasteland 1",
|
||||
"Mountain 1", "Mountain 2", "Mountain 3", "Mountain 4", "Mountain 5"
|
||||
};
|
||||
|
||||
var shuffled = combos.OrderBy(_ => _rng.Next()).ToList();
|
||||
for (int i = 0; i < Data.Regions.Count; i++)
|
||||
{
|
||||
if (!excluded.Contains(Data.Regions[i].Name))
|
||||
{
|
||||
var (p, r, f) = shuffled[i % shuffled.Count];
|
||||
Data.Regions[i].PredatorMeeples = p;
|
||||
Data.Regions[i].PreyMeeples = r;
|
||||
Data.Regions[i].FloraMeeples += f;
|
||||
}
|
||||
Data.Regions[i].FloraMeeples = f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<PackageReference Include="Markdig" Version="0.40.0"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.9"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.9" PrivateAssets="all"/>
|
||||
<PackageReference Include="Telerik.UI.for.Blazor" Version="14.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="SyncDocsNotes" BeforeTargets="BeforeBuild">
|
||||
|
||||
@@ -9,6 +9,4 @@
|
||||
@using Web
|
||||
@using Web.Layout
|
||||
@using Web.Models
|
||||
@using Telerik.Blazor
|
||||
@using Telerik.Blazor.Components
|
||||
@using Web.Services
|
||||
@@ -222,10 +222,6 @@
|
||||
"slug": "injury-cards",
|
||||
"title": "Injury Cards"
|
||||
},
|
||||
{
|
||||
"slug": "level-up",
|
||||
"title": "Level Up"
|
||||
},
|
||||
{
|
||||
"slug": "losing-the-game",
|
||||
"title": "Losing the Game"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
Spend exp up to current amount in a stat + 1 to get an extra stat in it.
|
||||
|
||||
Spend 4 exp to go veteran (probably)
|
||||
|
||||
Can store a max of 4 exp.
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"navigationFallback": {
|
||||
"rewrite": "/index.html",
|
||||
"exclude": ["/css/*", "/lib/*", "/_framework/*", "/_content/*", "/sample-data/*"]
|
||||
}
|
||||
}
|
||||
Vendored
+11
-11
@@ -13,12 +13,12 @@
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "Notes/Card Library.md",
|
||||
"file": "Notes/Region Types.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "Card Library"
|
||||
"title": "Region Types"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -183,18 +183,12 @@
|
||||
"bases:Create new base": false
|
||||
}
|
||||
},
|
||||
"active": "a4348c23136fecb0",
|
||||
"active": "e8ba8e9287dfab25",
|
||||
"lastOpenFiles": [
|
||||
"Notes/Level Up.md",
|
||||
"Notes/Mountain Regions.md",
|
||||
"Tasks/Add Crisis Logic.md",
|
||||
"Overview.md",
|
||||
"Tasks/Sub out all the starter Event Cards.md",
|
||||
"Tasks/Stub out all the starter Terrain Cards.md",
|
||||
"Tasks/_Tasks.base",
|
||||
"Notes/Region Types.md",
|
||||
"Tasks/Simulate the game state.md",
|
||||
"Notes/Terrain Deck.md",
|
||||
"Notes/Region Types.md",
|
||||
"Mountain Regions.md",
|
||||
"Notes/Activate Prey Ecology.md",
|
||||
"Notes/Activate Flora Ecology.md",
|
||||
"Notes/End Turn.md",
|
||||
@@ -203,9 +197,11 @@
|
||||
"Notes/Water Regions.md",
|
||||
"Rules.md",
|
||||
"Notes/Grass Regions.md",
|
||||
"Tasks/_Tasks.base",
|
||||
"Untitled",
|
||||
"Notes/Supply.md",
|
||||
"Images/Pasted image 20260609163414.png",
|
||||
"Overview.md",
|
||||
"Tasks/Generate overview page.md",
|
||||
"Notes/Event Type.md",
|
||||
"Notes/Turn Start.md",
|
||||
@@ -215,6 +211,8 @@
|
||||
"Notes/Companion Cards.md",
|
||||
"Notes/Sun.md",
|
||||
"Notes/Mountain.md",
|
||||
"Notes/Crest.md",
|
||||
"Notes/Terrain Cards.md",
|
||||
"Images/Pasted image 20260609163839.png",
|
||||
"Images/Pasted image 20260609163625.png",
|
||||
"Images/Pasted image 20260609211711.png",
|
||||
@@ -222,10 +220,12 @@
|
||||
"Images/Pasted image 20260609170252.png",
|
||||
"Images/Pasted image 20260609170321.png",
|
||||
"Images/Market Example.png",
|
||||
"Notes/Trader.md",
|
||||
"Bases/_Roles.base",
|
||||
"Bases/Regions.base",
|
||||
"Images/Map.png",
|
||||
"_Tasks.base",
|
||||
"_Overview.md",
|
||||
"Bases/_Gear.base",
|
||||
"Tasks",
|
||||
"Bases/Terrain.base",
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
Spend exp up to current amount in a stat + 1 to get an extra stat in it.
|
||||
|
||||
Spend 4 exp to go veteran (probably)
|
||||
|
||||
Can store a max of 4 exp.
|
||||
|
||||
Reference in New Issue
Block a user