Critical tables page

This commit is contained in:
2026-03-14 12:38:19 +01:00
parent b399840671
commit e4e8995fd8
10 changed files with 828 additions and 103 deletions

View File

@@ -0,0 +1,7 @@
namespace RolemasterDb.App.Domain;
public sealed record AffixDisplayInfo(
string Label,
string Symbol,
string Description,
string Tooltip);

View File

@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace RolemasterDb.App.Domain;
public static class AffixDisplayMap
{
private static readonly IReadOnlyDictionary<string, AffixDisplayInfo> Map = new Dictionary<string, AffixDisplayInfo>(StringComparer.Ordinal)
{
[CriticalEffectCodes.StunnedRounds] = new(
"Stunned",
"💫",
"Cannot act for the indicated rounds.",
"Stunned for the displayed duration."),
[CriticalEffectCodes.MustParryRounds] = new(
"Must Parry",
"🛡️",
"Forced parry for the indicated rounds.",
"Must parry until the duration ends."),
[CriticalEffectCodes.NoParryRounds] = new(
"No Parry",
"🚫🛡️",
"Cannot parry for the indicated rounds.",
"No parry for the displayed duration."),
[CriticalEffectCodes.BleedPerRound] = new(
"Bleed",
"🩸",
"Bleeds the displayed hits each round.",
"Bleeds the shown hits per round."),
[CriticalEffectCodes.DirectHits] = new(
"Direct Hits",
"🗡️",
"Additional direct hits.",
"Direct hits equal to the listed value."),
[CriticalEffectCodes.FoePenalty] = new(
"Foe Penalty",
"🔻",
"Penalty applied to the foe.",
"Foe penalty of the displayed value."),
[CriticalEffectCodes.AttackerBonusNextRound] = new(
"Attacker Bonus",
"✨",
"Attacker bonus next round.",
"Adds the shown bonus next round."),
[CriticalEffectCodes.PowerPointModifier] = new(
"Power Point Mod",
"⚡",
"Adjusts the foe's power points.",
"Power-point modifier per the expression.")
};
public static bool TryGet(string effectCode, [NotNullWhen(true)] out AffixDisplayInfo? info) =>
Map.TryGetValue(effectCode, out info);
public static IReadOnlyDictionary<string, AffixDisplayInfo> Entries => Map;
}