diff --git a/Server/src/SOR.Admin/Components/Pages/Website/HowToPlayEditor.razor b/Server/src/SOR.Admin/Components/Pages/Website/HowToPlayEditor.razor index 8a54d7e..52e296d 100644 --- a/Server/src/SOR.Admin/Components/Pages/Website/HowToPlayEditor.razor +++ b/Server/src/SOR.Admin/Components/Pages/Website/HowToPlayEditor.razor @@ -54,9 +54,18 @@ rows="30" placeholder="Enter full page HTML…" @bind="_bodyHtml"> -
- Full HTML for the /how-to-play page body. - Leave empty to fall back to the built-in static content. +
+ + Full HTML for the /how-to-play page body (nav + sections). + Leave empty to fall back to built-in static content. + + @if (string.IsNullOrWhiteSpace(_bodyHtml)) + { + + }
}
@@ -87,6 +96,8 @@ private WebsiteContent? _entry; + // StaticFallbackHtml is defined in HowToPlayEditor.razor.cs (partial class). + protected override async Task OnInitializedAsync() { _entry = await Catalog.WebsiteContents @@ -94,6 +105,11 @@ _bodyHtml = _entry?.BodyHtml ?? string.Empty; } + private void LoadStaticContent() + { + _bodyHtml = StaticFallbackHtml; + } + private async Task SaveAsync() { _saving = true; diff --git a/Server/src/SOR.Admin/Components/Pages/Website/HowToPlayEditor.razor.cs b/Server/src/SOR.Admin/Components/Pages/Website/HowToPlayEditor.razor.cs new file mode 100644 index 0000000..f7abfc4 --- /dev/null +++ b/Server/src/SOR.Admin/Components/Pages/Website/HowToPlayEditor.razor.cs @@ -0,0 +1,107 @@ +namespace SOR.Admin.Components.Pages.Website; + +public partial class HowToPlayEditor +{ + // Kept here (not in the .razor file) because Razor's parser mis-handles + // raw string literals that contain double-quoted HTML attributes. + private const string StaticFallbackHtml = + """ + + +
+

What is Aeternalis?

+

Aeternalis is a tactical strategy card game played in a constructed mindscape. Two Channelers face off, each commanding Archspirits, Spirits, Terramorpha, and other cards drawn from their deck. The battlefield is a grid of affinity tiles that both players shape during play.

+
+ +
+

What is a Channeler?

+

You are the Channeler — the player. You reach into the Origin Stone to summon Archspirits, cast Instincts, lay Terramorpha, and shape the battlefield. Your Channeler does not have its own card: you are the will behind every action.

+
+ +
+

How to Win

+

Reduce your opponent's Channeler to zero life points. Life is lost when your opponent's units deal unblocked damage to you directly. Build your board, control the terrain, and press the assault.

+
+ +
+

Card Types

+
+
ArchSpirit
+
Powerful multi-tier units that evolve through Ascension. The core of most strategies.
+
Spirit
+
Smaller units that can be sacrificed to fuel growth and resource mechanics.
+
Terramorpha
+
Land-shaping cards that change the affinity of tiles on the battlefield.
+
Instinct
+
Instant-speed effects that can be played during your opponent's turn.
+
Repentance
+
Slow powerful effects that require preparation and setup.
+
Ruin
+
Persistent enchantments that modify the rules of the game while in play.
+
+
+ +
+

Resources and Costs

+

Cards cost SP (Spirit Points) and ST (Soul Tokens) to play. SP regenerates each turn. ST is earned through sacrifice and specific card effects. Managing both resources is the central economic challenge of Aeternalis.

+
+ +
+

Turn Structure

+
    +
  1. Draw — Draw one card from your deck.
  2. +
  3. Upkeep — Trigger start-of-turn effects. SP regenerates.
  4. +
  5. Main Phase — Play cards, move units, use abilities.
  6. +
  7. Combat Phase — Declare attackers. Opponent declares blockers.
  8. +
  9. End Phase — Discard down to hand limit. End-of-turn effects trigger.
  10. +
+
+ +
+

Combat and Targeting

+

Units attack in the direction they face. Melee units must be adjacent to their target. Ranged units attack within their range, requiring line-of-sight unless otherwise stated. Flight units can only be blocked by other Flight units.

+
+ +
+

Terramorpha and Land Shaping

+

Terramorpha cards reshape the affinity tiles on the battlefield. Units require matching affinity tiles to be channeled. Control the terrain to control what your opponent can summon. Mono Terramorpha changes one tile; Di changes two adjacent tiles; Tri changes three.

+
+ +
+

Sacrifice and Spirit Growth

+

Spirits can be sacrificed to generate Soul Tokens and power high-cost abilities. Strategic sacrifice is a core resource loop — spending small units to fuel larger threats.

+
+ +
+

Glossary

+
+
Channeler
The player. The will behind every card played.
+
Origin Stone
The cosmic vessel that stores memories of all that has been and may yet be.
+
Archspirit
A mighty being of ages past, temporarily revived through channeling.
+
Terramorpha
The art of shaping mindscape terrain through will and memory.
+
Mindscape
The constructed psychic battlefield where all matches take place.
+
Spirit
A lesser being summoned through channeling. Can be sacrificed for resources.
+
Ruin
A persistent card type that modifies game rules while in play.
+
Instinct
An instant-speed card playable at any time, including your opponent's turn.
+
Repentance
A slow, powerful card that takes time to resolve after being played.
+
Fifth Star
The impossible new star that appeared after the first encounter with the unknown entity. A symbol of hope.
+
+
+ +
+ Create Account and Play + Browse Cards +
+ """; +} diff --git a/Server/src/SOR.Website/Pages/HowToPlay.cshtml b/Server/src/SOR.Website/Pages/HowToPlay.cshtml index cca16c6..4a9d72e 100644 --- a/Server/src/SOR.Website/Pages/HowToPlay.cshtml +++ b/Server/src/SOR.Website/Pages/HowToPlay.cshtml @@ -14,6 +14,15 @@
+ @if (Model.CustomBodyHtml is not null) + { +
+ @Html.Raw(Model.CustomBodyHtml) +
+ } + else + { +
+ }