From 39c9c8d11a9b79f27c0327c4c3b1beb94a84efb5 Mon Sep 17 00:00:00 2001 From: Logan Davidson Date: Wed, 3 Apr 2024 21:11:11 +0100 Subject: [PATCH] Add more terms (#465) * Add many new terms * Simplify the full list of wars * Add full list of families to the senator term * Fix invalid HTML chars in frontend --- frontend/classes/War.ts | 12 +- frontend/componentTables/termComponents.tsx | 22 +++ frontend/components/DetailSection.tsx | 9 +- frontend/components/FactionIcon.tsx | 7 +- frontend/components/FormattedWarName.tsx | 21 +++ frontend/components/FullListOfFamilies.tsx | 176 ++++++++++++++++++ frontend/components/FullListOfWars.tsx | 162 ++++++++++++++++ frontend/components/GamePage.tsx | 2 +- frontend/components/ScenarioListItem.tsx | 40 ++++ frontend/components/SecretList.tsx | 4 +- frontend/components/TermLink.tsx | 3 + frontend/components/WarList.tsx | 7 +- frontend/components/WarStrength.tsx | 3 +- frontend/components/WarfareTab.tsx | 46 +++-- .../ActionDialog_FaceMortality.tsx | 2 +- .../ActionDialog_InitiateSituation.tsx | 10 +- .../ActionDialog_SelectFactionLeader.tsx | 3 +- .../ActionLog_MatchedEnemyLeader.tsx | 14 +- .../actionLogs/ActionLog_MatchedWar.tsx | 11 +- .../actionLogs/ActionLog_Mortality.tsx | 2 +- .../actionLogs/ActionLog_NewEnemyLeader.tsx | 12 +- .../actionLogs/ActionLog_NewWar.tsx | 21 ++- .../actionLogs/ActionLog_PersonalRevenue.tsx | 3 +- .../entityDetails/EntityDetail_Faction.tsx | 2 +- frontend/components/terms/Term_ActiveWar.tsx | 37 ++++ .../components/terms/Term_AlignedSenator.tsx | 27 +++ .../components/terms/Term_CombatPhase.tsx | 2 +- .../components/terms/Term_EnemyLeader.tsx | 41 ++++ frontend/components/terms/Term_Faction.tsx | 20 +- .../components/terms/Term_FactionLeader.tsx | 34 ++++ .../components/terms/Term_FactionPhase.tsx | 9 +- frontend/components/terms/Term_Family.tsx | 34 ++++ .../components/terms/Term_FinalForumPhase.tsx | 4 +- frontend/components/terms/Term_ForumPhase.tsx | 17 +- frontend/components/terms/Term_Hrao.tsx | 8 +- .../components/terms/Term_ImminentWar.tsx | 38 ++++ .../components/terms/Term_InactiveWar.tsx | 32 ++++ .../Term_MatchingWarsAndEnemyLeadersTerm.tsx | 33 ++++ .../components/terms/Term_MortalityPhase.tsx | 8 +- .../components/terms/Term_PopulationPhase.tsx | 4 +- .../components/terms/Term_PriorConsul.tsx | 7 +- .../components/terms/Term_RevenuePhase.tsx | 8 +- .../components/terms/Term_RevolutionPhase.tsx | 2 +- frontend/components/terms/Term_RomeConsul.tsx | 14 +- frontend/components/terms/Term_Secret.tsx | 4 +- .../components/terms/Term_SenatePhase.tsx | 4 +- frontend/components/terms/Term_Senator.tsx | 44 ++--- frontend/components/terms/Term_Statesman.tsx | 42 +++++ frontend/components/terms/Term_Turn.tsx | 4 +- .../terms/Term_UnalignedSenator.tsx | 27 +++ frontend/components/terms/Term_War.tsx | 54 ++++++ frontend/data/skills.json | 6 +- frontend/functions/numberSuffix.ts | 8 + frontend/images/icons/secrets.svg | 2 +- frontend/styles/master.css | 7 + frontend/themes/darkTheme.ts | 2 +- roronline.code-workspace | 7 + 57 files changed, 1037 insertions(+), 147 deletions(-) create mode 100644 frontend/components/FormattedWarName.tsx create mode 100644 frontend/components/FullListOfFamilies.tsx create mode 100644 frontend/components/FullListOfWars.tsx create mode 100644 frontend/components/ScenarioListItem.tsx create mode 100644 frontend/components/terms/Term_ActiveWar.tsx create mode 100644 frontend/components/terms/Term_AlignedSenator.tsx create mode 100644 frontend/components/terms/Term_EnemyLeader.tsx create mode 100644 frontend/components/terms/Term_FactionLeader.tsx create mode 100644 frontend/components/terms/Term_Family.tsx create mode 100644 frontend/components/terms/Term_ImminentWar.tsx create mode 100644 frontend/components/terms/Term_InactiveWar.tsx create mode 100644 frontend/components/terms/Term_MatchingWarsAndEnemyLeadersTerm.tsx create mode 100644 frontend/components/terms/Term_Statesman.tsx create mode 100644 frontend/components/terms/Term_UnalignedSenator.tsx create mode 100644 frontend/components/terms/Term_War.tsx create mode 100644 frontend/functions/numberSuffix.ts diff --git a/frontend/classes/War.ts b/frontend/classes/War.ts index 7750f9ef..cc1b7624 100644 --- a/frontend/classes/War.ts +++ b/frontend/classes/War.ts @@ -1,3 +1,5 @@ +import getNumberSuffix from "@/functions/numberSuffix" + interface IWar { id: number name: string @@ -45,16 +47,10 @@ class War { this.famine = data.famine } + // Unformatted name of the war getName() { if (this.index === 0) return `${this.name} War` - return `${this.index}${this.getSuffix(this.index)} ${this.name} War` - } - - getSuffix(number: number) { - if (number === 1) return "st" - if (number === 2) return "nd" - if (number === 3) return "rd" - return "th" + return `${this.index}${getNumberSuffix(this.index)} ${this.name} War` } } diff --git a/frontend/componentTables/termComponents.tsx b/frontend/componentTables/termComponents.tsx index 19eb12b3..cb507ab6 100644 --- a/frontend/componentTables/termComponents.tsx +++ b/frontend/componentTables/termComponents.tsx @@ -14,18 +14,37 @@ import FactionPhaseTerm from "@/components/terms/Term_FactionPhase" import FinalForumPhaseTerm from "@/components/terms/Term_FinalForumPhase" import RomeConsulTerm from "@/components/terms/Term_RomeConsul" import HraoTerm from "@/components/terms/Term_Hrao" +import WarTerm from "@/components/terms/Term_War" +import ActiveWarTerm from "@/components/terms/Term_ActiveWar" +import FactionLeaderTerm from "@/components/terms/Term_FactionLeader" +import AlignedSenatorTerm from "@/components/terms/Term_AlignedSenator" +import UnalignedSenatorTerm from "@/components/terms/Term_UnalignedSenator" +import FamilyTerm from "@/components/terms/Term_Family" +import StatesmanTerm from "@/components/terms/Term_Statesman" +import ImminentWarTerm from "@/components/terms/Term_ImminentWar" +import InactiveWarTerm from "@/components/terms/Term_InactiveWar" +import EnemyLeaderTerm from "@/components/terms/Term_EnemyLeader" +import MatchingWarsAndEnemyLeadersTerm from "@/components/terms/Term_MatchingWarsAndEnemyLeadersTerm" interface TermComponents { [key: string]: JSX.Element } const termComponents: TermComponents = { + "Active War": , + "Aligned Senator": , "Combat Phase": , + "Enemy Leader": , Faction: , + "Faction Leader": , "Faction Phase": , + Family: , "Final Forum Phase": , "Forum Phase": , HRAO: , + "Imminent War": , + "Inactive War": , + "Matching Wars and Enemy Leaders": , "Mortality Phase": , "Population Phase": , "Prior Consul": , @@ -35,7 +54,10 @@ const termComponents: TermComponents = { Secret: , "Senate Phase": , Senator: , + Statesman: , Turn: , + "Unaligned Senator": , + War: , } export default termComponents diff --git a/frontend/components/DetailSection.tsx b/frontend/components/DetailSection.tsx index df6b36c9..68dc25b1 100644 --- a/frontend/components/DetailSection.tsx +++ b/frontend/components/DetailSection.tsx @@ -61,6 +61,13 @@ const DetailSection = () => { setBrowsingHistory((currentHistory) => currentHistory.slice(0, -2)) }, [browsingHistory, setSelectedDetail, setBrowsingHistory]) + // Scroll to the top of the detail section when a new item is selected + useEffect(() => { + if (detailSectionRef.current) { + detailSectionRef.current.scrollTop = 0 + } + }, [selectedDetail]) + if (!selectedDetail) return (
@@ -101,7 +108,7 @@ const DetailSection = () => {
{selectedDetail.type === "Senator" && ( diff --git a/frontend/components/FactionIcon.tsx b/frontend/components/FactionIcon.tsx index 323095da..9f0e781d 100644 --- a/frontend/components/FactionIcon.tsx +++ b/frontend/components/FactionIcon.tsx @@ -45,7 +45,7 @@ const FactionIcon = ({ ? muted ? faction.getColor(300) : faction.getColor(500) - : "#ff0000" + : "#a3a3a3" } style={ faction @@ -58,11 +58,6 @@ const FactionIcon = ({ strokeWidth="2" vectorEffect="non-scaling-stroke" /> - ) diff --git a/frontend/components/FormattedWarName.tsx b/frontend/components/FormattedWarName.tsx new file mode 100644 index 00000000..bba5fc57 --- /dev/null +++ b/frontend/components/FormattedWarName.tsx @@ -0,0 +1,21 @@ +import War from "@/classes/War" +import getNumberSuffix from "@/functions/numberSuffix" + +interface FormattedWarNameProps { + war: War +} + +// Display the formatted name of a war with its index superscripted +const FormattedWarName = ({ war }: FormattedWarNameProps) => ( + + {war.index > 0 && ( + + {war.index} + {getNumberSuffix(war.index)}{" "} + + )} + {war.name} War + +) + +export default FormattedWarName diff --git a/frontend/components/FullListOfFamilies.tsx b/frontend/components/FullListOfFamilies.tsx new file mode 100644 index 00000000..aab4c743 --- /dev/null +++ b/frontend/components/FullListOfFamilies.tsx @@ -0,0 +1,176 @@ +import { Tooltip } from "@mui/material" +import ScenarioListItem from "@/components/ScenarioListItem" + +const FullListOfFamilies = () => ( +
+
List of Families and Statesmen
+
    + Acilius +
  • + Aemilius{" "} + + E + +
      + + L. Aemilius Paullus Macedonicus + +
    +
  • + Aelius + Aurelius + Calpurnius + Claudius +
  • + Cornelius{" "} + + E + +
      + + P. Cornelius Scipio Africanus + + + P. Cornelius Scipio Aemilianus Africanus + + P. Cornelius Sulla +
    +
  • +
  • + Fabius{" "} + + E + +
      + + Q. Fabius Maximus Verrucosus Cunctator + +
    +
  • + Flaminius +
  • + Fulvius{" "} + + E + +
      + M. Fulvius Flaccus +
    +
  • + Furius +
  • + Julius{" "} + + E + +
      + C. Julius Caesar +
    +
  • + Manlius + Papirius + Plautius +
  • + Quinctius{" "} + + E + +
      + + T. Quinctius Flamininus + +
    +
  • + Sulpicius + Terentius + Valerius + Cassius +
  • + Porcius{" "} + + M + +
      + + M. Porcius Cato the Elder + + + M. Porcius Cato the Younger + +
    +
  • +
  • + Popillius{" "} + + M + +
      + P. Popillius Laenas +
    +
  • +
  • + Sempronius{" "} + + M + +
      + + T. Sempronius Gracchus + + + C. Sempronius Gracchus + +
    +
  • +
  • + Servilius{" "} + + M + +
      + C. Servilius Glaucia +
    +
  • +
  • + Licinius{" "} + + L + +
      + M. Licinius Crassus + L. Licinius Lucullus +
    +
  • +
  • + Marius{" "} + + L + +
      + C. Marius +
    +
  • + Octavius +
  • + Pompeius{" "} + + L + +
      + Cn. Pompeius Magnus +
    +
  • +
  • + Tullius{" "} + + L + +
      + M. Tullius Cicero +
    +
  • +
+
+) + +export default FullListOfFamilies diff --git a/frontend/components/FullListOfWars.tsx b/frontend/components/FullListOfWars.tsx new file mode 100644 index 00000000..d9f0d7a2 --- /dev/null +++ b/frontend/components/FullListOfWars.tsx @@ -0,0 +1,162 @@ +import { Tooltip } from "@mui/material" +import ScenarioListItem from "@/components/ScenarioListItem" + +const FullListOfWars = () => ( +
+
List of Wars and Enemy Leaders
+
    +
  • + Illyrian Wars +
      + + 1st Illyrian War + + + 2nd Illyrian War + +
    +
  • +
  • + Punic Wars +
      + + 1st Punic War + + + 2nd Punic War + + + 3rd Punic War + + + Hamilcar (Enemy Leader) + + + Hannibal (Enemy Leader) + +
    +
  • +
  • + Macedonian Wars +
      + + 1st Macedonian War + + + 2nd Macedonian War + + + 3rd Macedonian War + + + 4th Macedonian War + + + Philip V (Enemy Leader) + +
    +
  • +
  • + Syrian War{" "} + + E + +
      + + Antiochus III (Enemy Leader) + +
    +
  • +
  • + Spanish Revolts +
      + Lusitanian War + Numantine War + Sertorian War + + Viriathus (Enemy Leader) + +
    +
  • +
  • + Slave Revolts +
      + + 1st Sicilian Slave Revolt + + + 2nd Sicilian Slave Revolt + + Gladiator Revolt + + Spartacus (Enemy Leader) + +
    +
  • + Germanic Migrations + Jugurthine War +
  • + Cilician Pirates +
      + + 1st Cilician Pirates + + + 2nd Cilician Pirates + +
    +
  • +
  • + Gallic Wars +
      + + 1st Gallic War + + + 2nd Gallic War + + + 3rd Gallic War + + + Vercingetorix (Enemy Leader) + +
    +
  • + Social War +
  • + Mithridatic Wars +
      + + 1st Mithridatic War + + + 2nd Mithridatic War + + + 3rd Mithridatic War + + + Mithridates VI (Enemy Leader) + +
    +
  • + Invasion of Germania + Invasion of Britannia + Parthian War +
  • + Alexandrine War{" "} + + L + +
      + + Cleopatra VII (Enemy Leader) + +
    +
  • +
+
+) + +export default FullListOfWars diff --git a/frontend/components/GamePage.tsx b/frontend/components/GamePage.tsx index 8e9e47e0..6180edf0 100644 --- a/frontend/components/GamePage.tsx +++ b/frontend/components/GamePage.tsx @@ -308,7 +308,7 @@ const GamePage = (props: GamePageProps) => { setLatestActions(new Collection()) } ) - }, [setLatestActions, fetchData]) + }, [props.gameId, setLatestActions, fetchData]) const fetchSecrets = useCallback(async () => { fetchData( diff --git a/frontend/components/ScenarioListItem.tsx b/frontend/components/ScenarioListItem.tsx new file mode 100644 index 00000000..1af9e135 --- /dev/null +++ b/frontend/components/ScenarioListItem.tsx @@ -0,0 +1,40 @@ +import { Tooltip } from "@mui/material" +import { ReactNode } from "react" + +interface ScenarioListItemProps { + children: ReactNode + scenario: "E" | "M" | "L" +} + +const ScenarioListItem = ({ children, scenario }: ScenarioListItemProps) => { + if (scenario === "E") { + return ( +
  • + {children}{" "} + + E + +
  • + ) + } else if (scenario === "M") { + return ( +
  • + {children}{" "} + + M + +
  • + ) + } else { + return ( +
  • + {children}{" "} + + L + +
  • + ) + } +} + +export default ScenarioListItem diff --git a/frontend/components/SecretList.tsx b/frontend/components/SecretList.tsx index 793408a1..af980e2d 100644 --- a/frontend/components/SecretList.tsx +++ b/frontend/components/SecretList.tsx @@ -17,11 +17,11 @@ const SecretList = ({ faction }: { faction: Faction }) => { return (
  • {capitalize(secret.type as string)}
    -
    +
    Hidden from others
    diff --git a/frontend/components/TermLink.tsx b/frontend/components/TermLink.tsx index a120a60b..bb683873 100644 --- a/frontend/components/TermLink.tsx +++ b/frontend/components/TermLink.tsx @@ -24,6 +24,7 @@ interface TermLinkProps { includeIcon?: boolean disabled?: boolean unstyled?: boolean + plural?: boolean } // Icon link for a game term @@ -33,6 +34,7 @@ const TermLink = ({ tooltipTitle, includeIcon, disabled, + plural, }: TermLinkProps) => { const { setSelectedDetail, setDialog } = useGameContext() @@ -62,6 +64,7 @@ const TermLink = ({ /> )} {displayName ?? name} + {plural ? "s" : ""} ) diff --git a/frontend/components/WarList.tsx b/frontend/components/WarList.tsx index 22081da5..df53ad14 100644 --- a/frontend/components/WarList.tsx +++ b/frontend/components/WarList.tsx @@ -5,7 +5,8 @@ import WarStrength from "@/components/WarStrength" import { capitalize } from "@mui/material" import WarPortrait from "@/components/WarPortrait" import EnemyLeaderPortrait from "@/components/EnemyLeaderPortrait" -import WarDisasterStandoff from "./WarDisasterStandoff" +import WarDisasterStandoff from "@/components/WarDisasterStandoff" +import FormattedWarName from "@/components/FormattedWarName" interface WarListProps { wars: Collection @@ -20,7 +21,7 @@ const WarList = ({ wars }: WarListProps) => { return a.index - b.index }) .sort((a, b) => { - return a.getName().localeCompare(b.getName()) + return a.name.localeCompare(b.name) }) const getWarStatus = (war: War) => { @@ -66,7 +67,7 @@ const WarList = ({ wars }: WarListProps) => {
    -

    {war.getName()}

    +

    {getWarStatus(war)}
    diff --git a/frontend/components/WarStrength.tsx b/frontend/components/WarStrength.tsx index c1861faf..748613b9 100644 --- a/frontend/components/WarStrength.tsx +++ b/frontend/components/WarStrength.tsx @@ -3,6 +3,7 @@ import EnemyLeader from "@/classes/EnemyLeader" import War from "@/classes/War" import { useGameContext } from "@/contexts/GameContext" import { Popover, capitalize } from "@mui/material" +import FormattedWarName from "@/components/FormattedWarName" interface WarStrengthProps { war: War @@ -81,7 +82,7 @@ const WarStrength = ({ war, type }: WarStrengthProps) => { {matchingActiveWars.length > 0 && matchingActiveWars.map((matchingWar) => (

    - {matchingWar.getName()}{" "} + {" "} + {baseStrength} diff --git a/frontend/components/WarfareTab.tsx b/frontend/components/WarfareTab.tsx index 1521edf8..c6ba371c 100644 --- a/frontend/components/WarfareTab.tsx +++ b/frontend/components/WarfareTab.tsx @@ -5,6 +5,7 @@ import War from "@/classes/War" import EnemyLeader from "@/classes/EnemyLeader" import { List, ListItem, ListSubheader } from "@mui/material" import EnemyLeaderPortrait from "@/components/EnemyLeaderPortrait" +import TermLink from "./TermLink" const WarfareTab = () => { const { wars, enemyLeaders } = useGameContext() @@ -26,7 +27,10 @@ const WarfareTab = () => {

    - Active Wars {activeWars.allIds.length > 0 && ({activeWars.allIds.length})} + Active Wars{" "} + {activeWars.allIds.length > 0 && ( + ({activeWars.allIds.length}) + )}

    @@ -37,8 +41,12 @@ const WarfareTab = () => {

    ) : (

    - Rome is engaged in {activeWars.allIds.length} Active{" "} - {activeWars.allIds.length > 1 ? "Wars" : "War"}. + Rome is engaged in {activeWars.allIds.length}{" "} + 1} + /> + .

    )} @@ -46,30 +54,29 @@ const WarfareTab = () => {

    - Potential Wars {potentialWars.allIds.length > 0 && ({potentialWars.allIds.length})} + Inactive or Imminent Wars{" "} + {potentialWars.allIds.length > 0 && ( + ({potentialWars.allIds.length}) + )}

    - {potentialWars.allIds.length === 0 ? ( -

    - Rome is not facing any Potential Wars. -

    - ) : ( -

    - Rome is facing {potentialWars.allIds.length} Potential{" "} - {potentialWars.allIds.length > 1 - ? "Wars that have" - : "War that has"}{" "} - not yet started. -

    - )} +

    + Rome is facing {potentialWars.allIds.length}{" "} + or{" "} + War + {potentialWars.allIds.length !== 1 ? "s" : ""}. +

    - Idle Leaders {idleEnemyLeaders.allIds.length > 0 && ({idleEnemyLeaders.allIds.length})} + Idle Leaders{" "} + {idleEnemyLeaders.allIds.length > 0 && ( + ({idleEnemyLeaders.allIds.length}) + )}

    @@ -87,7 +94,8 @@ const WarfareTab = () => { ) : ( is 1 Enemy Leader )}{" "} - who is currently idle but prepared to engage in a Matching War if one appears. + who is currently idle but prepared to engage in a Matching War + if one appears.

    {enemyLeaders.asArray.map( diff --git a/frontend/components/actionDialogs/ActionDialog_FaceMortality.tsx b/frontend/components/actionDialogs/ActionDialog_FaceMortality.tsx index 45b7b704..38546b85 100644 --- a/frontend/components/actionDialogs/ActionDialog_FaceMortality.tsx +++ b/frontend/components/actionDialogs/ActionDialog_FaceMortality.tsx @@ -81,7 +81,7 @@ const FaceMortalityDialog = ({ Skull and crossbones icon

    - One or more may + One or more may randomly die. When a Family Senator dies, their Heir may appear later as an Unaligned Senator. When a Statesman dies, they never return. diff --git a/frontend/components/actionDialogs/ActionDialog_InitiateSituation.tsx b/frontend/components/actionDialogs/ActionDialog_InitiateSituation.tsx index 79200f65..17bab18b 100644 --- a/frontend/components/actionDialogs/ActionDialog_InitiateSituation.tsx +++ b/frontend/components/actionDialogs/ActionDialog_InitiateSituation.tsx @@ -82,10 +82,14 @@ const InitiateSituationDialog = ({ Your gains a

  • - The Senate is joined by a new Unaligned + The Senate is joined by a new +
  • +
  • + Rome faces a new +
  • +
  • + Rome faces a new
  • -
  • Rome faces a new War
  • -
  • Rome faces a new Enemy Leader
  • An Event occurs
  • diff --git a/frontend/components/actionDialogs/ActionDialog_SelectFactionLeader.tsx b/frontend/components/actionDialogs/ActionDialog_SelectFactionLeader.tsx index 1e0fe1b8..78b1a5e9 100644 --- a/frontend/components/actionDialogs/ActionDialog_SelectFactionLeader.tsx +++ b/frontend/components/actionDialogs/ActionDialog_SelectFactionLeader.tsx @@ -95,7 +95,8 @@ const SelectFactionLeaderDialog = ({

    Your Faction Leader will be immune from Persuasion Attempts. In the unfortunate event of the death of your Faction Leader, his heir will - immediately assume the role of Faction Leader within your . + immediately assume the role of Faction Leader within your{" "} + .

    {/* 365 pixels is enough height to show 3 senators */} diff --git a/frontend/components/actionLogs/ActionLog_MatchedEnemyLeader.tsx b/frontend/components/actionLogs/ActionLog_MatchedEnemyLeader.tsx index 78ad6acc..1cde4e5d 100644 --- a/frontend/components/actionLogs/ActionLog_MatchedEnemyLeader.tsx +++ b/frontend/components/actionLogs/ActionLog_MatchedEnemyLeader.tsx @@ -5,15 +5,15 @@ import War from "@/classes/War" import EnemyLeader from "@/classes/EnemyLeader" import { useGameContext } from "@/contexts/GameContext" import ActionLogLayout from "@/components/ActionLogLayout" +import TermLink from "@/components/TermLink" +import FormattedWarName from "@/components/FormattedWarName" interface ActionLogProps { notification: ActionLog } // ActionLog for when an existing enemy leader is matched by a war during the forum phase -const MatchedEnemyLeaderActionLog = ({ - notification, -}: ActionLogProps) => { +const MatchedEnemyLeaderActionLog = ({ notification }: ActionLogProps) => { const { wars, enemyLeaders } = useGameContext() // Get notification-specific data @@ -39,8 +39,12 @@ const MatchedEnemyLeaderActionLog = ({ title="New War Matches Enemy Leader" >

    - The {newWar.getName()} is a Matching War for {enemyLeader.name}. His - involvement will make it harder to defeat. + The is a{" "} + {" "} + for {enemyLeader.name}. His involvement will make it harder to defeat.

    ) diff --git a/frontend/components/actionLogs/ActionLog_MatchedWar.tsx b/frontend/components/actionLogs/ActionLog_MatchedWar.tsx index a5c06714..e49c7642 100644 --- a/frontend/components/actionLogs/ActionLog_MatchedWar.tsx +++ b/frontend/components/actionLogs/ActionLog_MatchedWar.tsx @@ -5,6 +5,8 @@ import War from "@/classes/War" import { useGameContext } from "@/contexts/GameContext" import { capitalize } from "@mui/material/utils" import ActionLogLayout from "@/components/ActionLogLayout" +import TermLink from "@/components/TermLink" +import FormattedWarName from "@/components/FormattedWarName" interface ActionLogProps { notification: ActionLog @@ -41,10 +43,13 @@ const MatchedWarActionLog = ({ notification }: ActionLogProps) => { title={`Matched War is now ${capitalize(newStatus)}`} >

    - The {war.getName()} is has developed from Inactive to{" "} - {capitalize(newStatus)} because it was Matched by{" "} + The has developed from{" "} + to{" "} + {} because it was{" "} + {" "} + by{" "} {newWar ? ( - the {newWar.getName()} + the ) : ( newEnemyLeader && newEnemyLeader.name )} diff --git a/frontend/components/actionLogs/ActionLog_Mortality.tsx b/frontend/components/actionLogs/ActionLog_Mortality.tsx index 19fca505..32e4efe5 100644 --- a/frontend/components/actionLogs/ActionLog_Mortality.tsx +++ b/frontend/components/actionLogs/ActionLog_Mortality.tsx @@ -44,7 +44,7 @@ const MortalityActionLog = ({ if (!senator) { return (

    - All have survived + All have survived the .

    ) diff --git a/frontend/components/actionLogs/ActionLog_NewEnemyLeader.tsx b/frontend/components/actionLogs/ActionLog_NewEnemyLeader.tsx index 6b738c65..0b237947 100644 --- a/frontend/components/actionLogs/ActionLog_NewEnemyLeader.tsx +++ b/frontend/components/actionLogs/ActionLog_NewEnemyLeader.tsx @@ -9,6 +9,8 @@ import EnemyLeaderDataCollection from "@/data/enemyLeaders.json" import EnemyLeaderDataCollectionType from "@/types/EnemyLeader" import FactionLink from "@/components/FactionLink" import ActionLogLayout from "@/components/ActionLogLayout" +import TermLink from "@/components/TermLink" +import FormattedWarName from "../FormattedWarName" const typedEnemyLeaderDataCollection: EnemyLeaderDataCollectionType = EnemyLeaderDataCollection @@ -25,7 +27,7 @@ const NewEnemyLeaderActionLog = ({ notification }: ActionLogProps) => { const enemyLeader: EnemyLeader | null = notification.data ? enemyLeaders.byId[notification.data.enemy_leader] ?? null : null - const matching_war: War | null = notification.data + const matchingWar: War | null = notification.data ? wars.byId[notification.data.matching_war] ?? null : null const initiatingFaction: Faction | null = notification.data @@ -47,12 +49,12 @@ const NewEnemyLeaderActionLog = ({ notification }: ActionLogProps) => { title="New Enemy Leader" >

    - In {typedEnemyLeaderDataCollection[enemyLeader.name]["location"]}, an - Enemy Leader named {enemyLeader.name} has{" "} + In {typedEnemyLeaderDataCollection[enemyLeader.name]["location"]}, an{" "} + named {enemyLeader.name} has{" "} {typedEnemyLeaderDataCollection[enemyLeader.name]["new_description"]}.{" "} - {matching_war ? ( + {matchingWar ? ( - His involvement with the {matching_war?.getName()} will make it + His involvement with the will make it harder to defeat ) : ( diff --git a/frontend/components/actionLogs/ActionLog_NewWar.tsx b/frontend/components/actionLogs/ActionLog_NewWar.tsx index cedf514f..1fd84659 100644 --- a/frontend/components/actionLogs/ActionLog_NewWar.tsx +++ b/frontend/components/actionLogs/ActionLog_NewWar.tsx @@ -3,11 +3,13 @@ import WarIcon from "@/images/icons/war.svg" import ActionLog from "@/classes/ActionLog" import War from "@/classes/War" import { useGameContext } from "@/contexts/GameContext" -import FactionLink from "../FactionLink" +import FactionLink from "@/components/FactionLink" import Faction from "@/classes/Faction" import { capitalize } from "@mui/material/utils" import EnemyLeader from "@/classes/EnemyLeader" import ActionLogLayout from "@/components/ActionLogLayout" +import TermLink from "@/components/TermLink" +import FormattedWarName from "../FormattedWarName" interface ActionLogProps { notification: ActionLog @@ -49,12 +51,17 @@ const NewWarActionLog = ({ notification }: ActionLogProps) => { const getStatusAndExplanation = () => { switch (initialStatus) { case "imminent": - return `Imminent due to ${ - isMatchedByMultiple ? "Matching Wars" : "a Matching War" - }` + return ( + + Imminent due to{" "}{isMatchedByMultiple ? "" : "a "} + + + ) case "active": return activatingEnemyLeaders.length == 0 ? ( - "inherently Active" + + inherently + ) : ( Active due to{" "} @@ -84,8 +91,8 @@ const NewWarActionLog = ({ notification }: ActionLogProps) => { title={`New ${capitalize(initialStatus)} War`} >

    - Rome faces a new threat in the {newWar.getName()}. This War is{" "} - {getStatusAndExplanation()}.{" "} + Rome faces a new threat in the . This{" "} + is {getStatusAndExplanation()}.{" "} Situation initiated by diff --git a/frontend/components/actionLogs/ActionLog_PersonalRevenue.tsx b/frontend/components/actionLogs/ActionLog_PersonalRevenue.tsx index 16e6d6e5..a2e1ad5e 100644 --- a/frontend/components/actionLogs/ActionLog_PersonalRevenue.tsx +++ b/frontend/components/actionLogs/ActionLog_PersonalRevenue.tsx @@ -23,8 +23,7 @@ const PersonalRevenueActionLog = ({ notification }: ActionLogProps) => { title="Personal Revenue" >

    - Aligned have earned - Personal Revenue. + have earned Personal Revenue.

    ) diff --git a/frontend/components/entityDetails/EntityDetail_Faction.tsx b/frontend/components/entityDetails/EntityDetail_Faction.tsx index d9fcbdff..e730c360 100644 --- a/frontend/components/entityDetails/EntityDetail_Faction.tsx +++ b/frontend/components/entityDetails/EntityDetail_Faction.tsx @@ -245,7 +245,7 @@ const FactionDetails = () => { Your faction has {secrets.length}{" "} .
    diff --git a/frontend/components/terms/Term_ActiveWar.tsx b/frontend/components/terms/Term_ActiveWar.tsx new file mode 100644 index 00000000..a05d1be7 --- /dev/null +++ b/frontend/components/terms/Term_ActiveWar.tsx @@ -0,0 +1,37 @@ +import Image from "next/image" +import { Avatar } from "@mui/material" +import WarIcon from "@/images/icons/war.svg" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" + +// Description of the game term: Active War +const ActiveWarTerm = () => ( + + War icon + + } + > +

    + An Active War is a that is currently attacking + Rome. A critical threat posed by Active Wars is their ability to defeat + Rome, causing all players to lose, if 4 or more of them remain undefeated + at the end of the . +

    +

    + An Active War that Rome doesn't engage in Battle against during the Combat + Phase becomes known as an Unprosecuted War. +

    +
    Negative Effects
    +

    + During the , the State Treasury loses 20 + Talents for each Active War. During the{" "} + , Rome's Unrest Level increases by 1 + for each Unprosecuted War. +

    +
    +) + +export default ActiveWarTerm diff --git a/frontend/components/terms/Term_AlignedSenator.tsx b/frontend/components/terms/Term_AlignedSenator.tsx new file mode 100644 index 00000000..eaf532c1 --- /dev/null +++ b/frontend/components/terms/Term_AlignedSenator.tsx @@ -0,0 +1,27 @@ +import Image from "next/image" + +import SenatorIcon from "@/images/icons/senator.svg" +import { Avatar } from "@mui/material" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" + +// Description of the game term: Aligned Senator +const AlignedSenatorTerm = () => ( + + Senator icon + + } + > +

    + An Aligned Senator is a that is a member of a{" "} + . Unlike{" "} + , they can collect Personal + Revenue, Vote on Proposals and hold Office. +

    +
    +) + +export default AlignedSenatorTerm diff --git a/frontend/components/terms/Term_CombatPhase.tsx b/frontend/components/terms/Term_CombatPhase.tsx index 745d5461..9c9dac73 100644 --- a/frontend/components/terms/Term_CombatPhase.tsx +++ b/frontend/components/terms/Term_CombatPhase.tsx @@ -11,7 +11,7 @@ const CombatPhaseTerm = () => ( title="Combat Phase" icon={ - Time icon + Time icon } > diff --git a/frontend/components/terms/Term_EnemyLeader.tsx b/frontend/components/terms/Term_EnemyLeader.tsx new file mode 100644 index 00000000..52720b11 --- /dev/null +++ b/frontend/components/terms/Term_EnemyLeader.tsx @@ -0,0 +1,41 @@ +import Image from "next/image" +import { Avatar } from "@mui/material" +import WarIcon from "@/images/icons/war.svg" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" +import FullListOfWars from "@/components/FullListOfWars" + +// Description of the game term: Enemy Leader +const EnemyLeaderTerm = () => ( + + War icon + + } + > +

    + An Enemy Leader is a historical enemy of Rome with the power to strengthen{" "} + , making them more difficult to defeat. Some + have unique abilities. Each Enemy Leader is associated with a specific{" "} + series of Wars or an individual War. +

    +

    + The appearance of a new Enemy Leader is one of several possible Situations + that can be initiated during the . +

    +

    + If there are no{" "} + + , an Enemy Leader will be idle. However, as soon as a Matching War + appears, the Enemy Leader will activate and strengthen the War. +

    + +
    +) + +export default EnemyLeaderTerm diff --git a/frontend/components/terms/Term_Faction.tsx b/frontend/components/terms/Term_Faction.tsx index 5ca89133..53c313d2 100644 --- a/frontend/components/terms/Term_Faction.tsx +++ b/frontend/components/terms/Term_Faction.tsx @@ -16,27 +16,27 @@ const FactionTerm = () => ( } >

    - A Faction is a group of Aligned{" "} - controlled by a Player. - Each Faction can be led by a Faction Leader chosen from among the Faction - Members. + A Faction is a group of {" "} + controlled by a player. Each Faction can be led by a{" "} + chosen from among the Faction members.

    • - In the Senate, Members typically Vote as a block to maximize their + In the Senate, members typically Vote as a block to maximize their impact on Proposals.
    • - Members can grow the Faction by making Persuasion Attempts against - Unaligned Senators or Senators Aligned to a rival Faction. + Members can grow the Faction by making Persuasion Attempts against{" "} + or Senators Aligned to a + rival Faction.
    • Each Faction has a Faction Treasury, which is a hidden pool of Talents - primarily used to defend Members from Persuasion Attempts. + primarily used to defend members from Persuasion Attempts.
    • - Factions can acquire , - which may be revealed and activated to give the Faction an advantage. + Factions can acquire , which may be + revealed and activated to give the Faction an advantage.
    • Only one Faction can win the game—there are no shared victories.
    diff --git a/frontend/components/terms/Term_FactionLeader.tsx b/frontend/components/terms/Term_FactionLeader.tsx new file mode 100644 index 00000000..136b6c5f --- /dev/null +++ b/frontend/components/terms/Term_FactionLeader.tsx @@ -0,0 +1,34 @@ +import { Avatar } from "@mui/material" +import FactionIcon from "@/components/FactionIcon" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" + +// Description of the game term: Faction Leader +const FactionLeaderTerm = () => ( + +
    + +
    + + } + > +

    + A Faction Leader is a chosen from among a{" "} + Members. Faction Leaders are immune from + Persuasion Attempts, making their Loyalty irrelevant. +

    +
    Succession
    +

    + If a Faction Leader dies, his Heir will immediately assume the role of + Faction Leader. The new Faction Leader will inherit his predecessor's + Military, Oratory and Loyalty, but not his Influence, Talents, Popularity + or Knights. +

    +
    +) + +export default FactionLeaderTerm diff --git a/frontend/components/terms/Term_FactionPhase.tsx b/frontend/components/terms/Term_FactionPhase.tsx index ed16a7b1..8ff267b4 100644 --- a/frontend/components/terms/Term_FactionPhase.tsx +++ b/frontend/components/terms/Term_FactionPhase.tsx @@ -4,13 +4,13 @@ import TermLayout from "@/components/TermLayout" import TimeIcon from "@/images/icons/time.svg" import TermLink from "@/components/TermLink" -// Description of the game term: Secret +// Description of the game term: Faction Phase const FactionPhaseTerm = () => ( - Time icon + Time icon } > @@ -21,8 +21,9 @@ const FactionPhaseTerm = () => (

    During this phase, each Faction must select a{" "} - . They may also reveal their statesmen - and concession . + . They may also reveal their{" "} + and concession{" "} + .

    ) diff --git a/frontend/components/terms/Term_Family.tsx b/frontend/components/terms/Term_Family.tsx new file mode 100644 index 00000000..4f3282a8 --- /dev/null +++ b/frontend/components/terms/Term_Family.tsx @@ -0,0 +1,34 @@ +import Image from "next/image" + +import SenatorIcon from "@/images/icons/senator.svg" +import { Avatar } from "@mui/material" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" +import FullListOfFamilies from "@/components/FullListOfFamilies" + +// Description of the game term: Family +const FamilyTerm = () => ( + + Senator icon + + } + > +

    + Each belongs to a specific Family. 30 Roman + families are represented in the game, along with 16{" "} + , each of whom is a + member of a Family. +

    +

    + Each Family Senator is associated with one of the 3 Scenarios. Each + Scenario features Family Senators associated with that scenario, as well + as Families from earlier Scenarios. +

    + +
    +) + +export default FamilyTerm diff --git a/frontend/components/terms/Term_FinalForumPhase.tsx b/frontend/components/terms/Term_FinalForumPhase.tsx index 2e75c8c0..b514910a 100644 --- a/frontend/components/terms/Term_FinalForumPhase.tsx +++ b/frontend/components/terms/Term_FinalForumPhase.tsx @@ -4,13 +4,13 @@ import TermLayout from "@/components/TermLayout" import TimeIcon from "@/images/icons/time.svg" import TermLink from "@/components/TermLink" -// Description of the game term: Secret +// Description of the game term: Final Forum Phase const FinalForumPhaseTerm = () => ( - Time icon + Time icon } > diff --git a/frontend/components/terms/Term_ForumPhase.tsx b/frontend/components/terms/Term_ForumPhase.tsx index db21dc14..45a3168d 100644 --- a/frontend/components/terms/Term_ForumPhase.tsx +++ b/frontend/components/terms/Term_ForumPhase.tsx @@ -5,13 +5,13 @@ import TimeIcon from "@/images/icons/time.svg" import SequenceOfPlayDiagram from "@/components/SequenceOfPlayDiagram" import TermLink from "@/components/TermLink" -// Description of the game term: Secret +// Description of the game term: Forum Phase const ForumPhaseTerm = () => ( - Time icon + Time icon } > @@ -22,8 +22,19 @@ const ForumPhaseTerm = () => ( />

    The Forum Phase is the 3rd phase of a . During - this phase, each must take an Initiative. + this phase, 6 Initiatives must be taken, beginning with the 's and proceeding in Chromatic Order. Once all{" "} + Factions have taken an Initiative, any remaining + Initiatives are auctioned.

    +
    Initiative Sequence
    +

    The initiative sequence consists of the following steps:

    +
      +
    1. Initiate a Situation
    2. +
    3. Make a Persuasion Attempt
    4. +
    5. Attempt to Attract a Knight or Pressure Knights
    6. +
    7. Sponsor Games
    8. +
    9. Select a
    10. +
    ) diff --git a/frontend/components/terms/Term_Hrao.tsx b/frontend/components/terms/Term_Hrao.tsx index 875fd12b..afee7b84 100644 --- a/frontend/components/terms/Term_Hrao.tsx +++ b/frontend/components/terms/Term_Hrao.tsx @@ -10,7 +10,7 @@ const HraoTerm = () => ( title="HRAO: Highest Ranking Available Official" icon={ - {`HRAO + HRAO icon } category="Title" @@ -35,9 +35,9 @@ const HraoTerm = () => (
  • Master of Horse
  • - If none of these officials are available, an aligned Senator in Rome will - be selected based on Influence (using Oratory and lowest Senator ID to - break ties). + If none of these officials are available, an{" "} + in Rome will be selected based on + Influence (using Oratory and lowest Senator ID to break ties).

    ) diff --git a/frontend/components/terms/Term_ImminentWar.tsx b/frontend/components/terms/Term_ImminentWar.tsx new file mode 100644 index 00000000..81e17c68 --- /dev/null +++ b/frontend/components/terms/Term_ImminentWar.tsx @@ -0,0 +1,38 @@ +import Image from "next/image" +import { Avatar } from "@mui/material" +import WarIcon from "@/images/icons/war.svg" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" + +// Description of the game term: Imminent War +const ImminentWarTerm = () => ( + + War icon + + } + > +

    + An Imminent War is a that will attack Rome soon, + but otherwise behaves the same as an . +

    +

    + When a new War appears during the , it will + be Imminent if there is an existing War that{" "} + {" "} + it. +

    +
    Activation
    +

    + During the , one Imminent War (if there + are any) from each Series of Wars will become{" "} + . The order of + activation is chronological. +

    +

    Rome can activate an Imminent War by prosecuting it.

    +
    +) + +export default ImminentWarTerm diff --git a/frontend/components/terms/Term_InactiveWar.tsx b/frontend/components/terms/Term_InactiveWar.tsx new file mode 100644 index 00000000..0d2b9e56 --- /dev/null +++ b/frontend/components/terms/Term_InactiveWar.tsx @@ -0,0 +1,32 @@ +import Image from "next/image" +import { Avatar } from "@mui/material" +import WarIcon from "@/images/icons/war.svg" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" + +// Description of the game term: Inactive War +const InactiveWarTerm = () => ( + + War icon + + } + > +

    + An Inactive War is a that has not yet attacked + Rome but represents a future threat. +

    +
    Activation
    +

    + Inactive Wars will develop to an{" "} + state upon the + appearance of a during + the . +

    +

    Rome can activate an Inactive War by prosecuting it.

    +
    +) + +export default InactiveWarTerm diff --git a/frontend/components/terms/Term_MatchingWarsAndEnemyLeadersTerm.tsx b/frontend/components/terms/Term_MatchingWarsAndEnemyLeadersTerm.tsx new file mode 100644 index 00000000..a5a89500 --- /dev/null +++ b/frontend/components/terms/Term_MatchingWarsAndEnemyLeadersTerm.tsx @@ -0,0 +1,33 @@ +import Image from "next/image" +import { Avatar } from "@mui/material" +import WarIcon from "@/images/icons/war.svg" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" +import FullListOfWars from "@/components/FullListOfWars" + +// Description of the game term: Matching Wars and Enemy Leaders +const MatchingWarsAndEnemyLeadersTerm = () => ( + + War icon + + } + > +

    + Matching Wars and Enemy Leaders are sets of two or more{" "} + and {" "} + that are related to each other. +

    +

    + During the , the appearance of a new War or + Enemy Leader causes an or Enemy Leader to + be activated upon the appearance of a new War or new Enemy Leader of the + same series of Wars. +

    + +
    +) + +export default MatchingWarsAndEnemyLeadersTerm diff --git a/frontend/components/terms/Term_MortalityPhase.tsx b/frontend/components/terms/Term_MortalityPhase.tsx index 0d9983cc..339e801b 100644 --- a/frontend/components/terms/Term_MortalityPhase.tsx +++ b/frontend/components/terms/Term_MortalityPhase.tsx @@ -5,7 +5,7 @@ import TermLayout from "@/components/TermLayout" import SequenceOfPlayDiagram from "@/components/SequenceOfPlayDiagram" import TermLink from "@/components/TermLink" -// Description of the game term: Secret +// Description of the game term: Mortality Phase const MortalityPhaseTerm = () => ( ( Mortality icon @@ -28,8 +28,8 @@ const MortalityPhaseTerm = () => ( />

    The Mortality Phase is the 1st phase of a . During - this phase, one or more {" "} - may randomly die. + this phase, one or more may randomly + die.

    When a Family Senator dies, their Heir may appear later as an Unaligned diff --git a/frontend/components/terms/Term_PopulationPhase.tsx b/frontend/components/terms/Term_PopulationPhase.tsx index bf8f2a5f..6a3d2d5b 100644 --- a/frontend/components/terms/Term_PopulationPhase.tsx +++ b/frontend/components/terms/Term_PopulationPhase.tsx @@ -5,13 +5,13 @@ import TimeIcon from "@/images/icons/time.svg" import SequenceOfPlayDiagram from "@/components/SequenceOfPlayDiagram" import TermLink from "@/components/TermLink" -// Description of the game term: Secret +// Description of the game term: Population Phase const PopulationPhaseTerm = () => ( - Time icon + Time icon } > diff --git a/frontend/components/terms/Term_PriorConsul.tsx b/frontend/components/terms/Term_PriorConsul.tsx index e2d7380a..ecc029c0 100644 --- a/frontend/components/terms/Term_PriorConsul.tsx +++ b/frontend/components/terms/Term_PriorConsul.tsx @@ -13,7 +13,7 @@ const PriorConsulTerm = () => ( src={PriorConsulIcon} height={64} width={64} - alt={`HRAO Icon`} + alt="Prior consul icon" className="m-[-4px]" /> @@ -21,9 +21,8 @@ const PriorConsulTerm = () => ( category="Title" >

    - Prior Consuls are experienced{" "} - who have served as{" "} - , Field Consul or Dictator. + Prior Consuls are experienced who have + served as , Field Consul or Dictator.

    The title of Prior Consul is held for life unless lost during a diff --git a/frontend/components/terms/Term_RevenuePhase.tsx b/frontend/components/terms/Term_RevenuePhase.tsx index 0b643f66..65a34395 100644 --- a/frontend/components/terms/Term_RevenuePhase.tsx +++ b/frontend/components/terms/Term_RevenuePhase.tsx @@ -1,17 +1,17 @@ import Image from "next/image" import { Avatar } from "@mui/material" import TermLayout from "@/components/TermLayout" -import TimeIcon from "@/images/icons/time.svg" +import TalentsIcon from "@/images/icons/talents.svg" import SequenceOfPlayDiagram from "@/components/SequenceOfPlayDiagram" import TermLink from "@/components/TermLink" -// Description of the game term: Secret +// Description of the game term: Revenue Phase const RevenuePhaseTerm = () => ( - Time icon + Talents icon } > @@ -21,7 +21,7 @@ const RevenuePhaseTerm = () => ( phaseAfter="Forum" />

    - The Revenue Phase is the 2nd phase of a . + The Revenue Phase is the 2nd phase of a . During this phase, earn Personal Revenue.

    ) diff --git a/frontend/components/terms/Term_RevolutionPhase.tsx b/frontend/components/terms/Term_RevolutionPhase.tsx index 7809447b..9861f2ed 100644 --- a/frontend/components/terms/Term_RevolutionPhase.tsx +++ b/frontend/components/terms/Term_RevolutionPhase.tsx @@ -11,7 +11,7 @@ const RevolutionPhaseTerm = () => ( title="Revolution Phase" icon={ - Time icon + Time icon } > diff --git a/frontend/components/terms/Term_RomeConsul.tsx b/frontend/components/terms/Term_RomeConsul.tsx index 3ea6473b..535b1f2e 100644 --- a/frontend/components/terms/Term_RomeConsul.tsx +++ b/frontend/components/terms/Term_RomeConsul.tsx @@ -10,7 +10,12 @@ const RomeConsulTerm = () => ( title="Rome Consul" icon={ - {`HRAO + Rome consul icon } category="Major Office" @@ -18,11 +23,8 @@ const RomeConsulTerm = () => ( >

    The Rome Consulship is the second{" "} - {" "} - Office, after the Dictator (if there is one). + Office, after the + Dictator (if there is one).

    After being elected, the Rome Consul will become the Presiding Magistrate diff --git a/frontend/components/terms/Term_Secret.tsx b/frontend/components/terms/Term_Secret.tsx index edb62c51..dc573c28 100644 --- a/frontend/components/terms/Term_Secret.tsx +++ b/frontend/components/terms/Term_Secret.tsx @@ -10,7 +10,7 @@ const SecretTerm = () => ( title="Secret" icon={ - {`HRAO + Secret icon } > @@ -24,7 +24,7 @@ const SecretTerm = () => (

  • Statesman Secrets can be revealed during the Faction Phase or the Forum Phase to immediately bring the - named into the game. + named into the game.
  • Concession Secrets can be revealed diff --git a/frontend/components/terms/Term_SenatePhase.tsx b/frontend/components/terms/Term_SenatePhase.tsx index c0f629a1..486f7044 100644 --- a/frontend/components/terms/Term_SenatePhase.tsx +++ b/frontend/components/terms/Term_SenatePhase.tsx @@ -5,13 +5,13 @@ import TimeIcon from "@/images/icons/time.svg" import SequenceOfPlayDiagram from "@/components/SequenceOfPlayDiagram" import TermLink from "@/components/TermLink" -// Description of the game term: Secret +// Description of the game term: Senate Phase const SenatePhaseTerm = () => ( - Time icon + Time icon } > diff --git a/frontend/components/terms/Term_Senator.tsx b/frontend/components/terms/Term_Senator.tsx index af6f4253..7ef8fa13 100644 --- a/frontend/components/terms/Term_Senator.tsx +++ b/frontend/components/terms/Term_Senator.tsx @@ -4,14 +4,15 @@ import SenatorIcon from "@/images/icons/senator.svg" import { Avatar } from "@mui/material" import TermLink from "@/components/TermLink" import TermLayout from "@/components/TermLayout" +import FullListOfFamilies from "@/components/FullListOfFamilies" -// Description of the game term: Rome Consul +// Description of the game term: Senator const SenatorTerm = () => ( - {`HRAO + Senator icon } > @@ -20,25 +21,29 @@ const SenatorTerm = () => ( of the State, primarily by Voting on Proposals and taking Office.

    Attributes
    -

    Each Senator has three fixed skills:

    +

    Senators have 3 fixed attributes:

    • Military
    • Oratory
    • Loyalty
    -

    They also have resources that can be gained or lost:

    -
      +

      They also have 5 variable attributes:

      +
      • Influence
      • Talents
      • Popularity
      • Knights
      • -
      • Votes
      • +
      +

      Senators have a calculated attribute:

      +
        +
      • Votes = Oratory + Knights
      Alignment

      - Senators may only take Office or Vote if they are Aligned to a{" "} - . Unaligned Senators will always Abstain from - Voting and can't be assigned an Office. + Senators may only collect Personal Revenue, Vote or hold Office if they + are to a{" "} + . {" "} + cannot do these things.

      Aligned Senators can grow their Faction by making Persuasion Attempts @@ -46,22 +51,19 @@ const SenatorTerm = () => (

      Family

      - Most Senators are Family Senators, who are identified by their Family name - (e.g. “Cornelius”). Each living Family Senator is the current leader of - their Family. When a Family Senator dies, their Heir may return later as - an Unaligned Senator. + Most Senators are Family Senators, who are identified by their{" "} + name (e.g. “Cornelius”). Each living Family + Senator is the current leader of their Family. When a Family Senator dies, + their Heir may return later as an Unaligned Senator.

      Statesmen

      - A Statesman is a special type of Senator—a famous historical figure with a - unique ability. They are identified by their full names (e.g. “P. - Cornelius Scipio Africanus”). Statesmen can only appear when a Faction - reveals a Statesman . -

      -

      - Statesmen are always Aligned to a Faction, but they are still vulnerable - to Persuasion Attempts. When they die, they never return. + A is a special type of Senator—a famous + historical figure with a unique ability. They are identified by their full + names (e.g. “P. Cornelius Scipio Africanus”). Statesmen can only appear + when a Faction reveals a Statesman .

      + ) diff --git a/frontend/components/terms/Term_Statesman.tsx b/frontend/components/terms/Term_Statesman.tsx new file mode 100644 index 00000000..40dbef2c --- /dev/null +++ b/frontend/components/terms/Term_Statesman.tsx @@ -0,0 +1,42 @@ +import Image from "next/image" + +import SenatorIcon from "@/images/icons/senator.svg" +import { Avatar } from "@mui/material" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" +import FullListOfFamilies from "@/components/FullListOfFamilies" + +// Description of the game term: Statesman +const StatesmanTerm = () => ( + + Senator icon + + } + > +

      + A is a special type of{" "} + + —a famous historical figure with a unique ability. They are identified by + their full names (e.g. “P. Cornelius Scipio Africanus”). Statesmen can + only appear when a Faction reveals a Statesman {" "} + during the or{" "} + . +

      +

      + Statesmen are always{" "} + to a{" "} + , but they are still vulnerable to Persuasion + Attempts. When they die, they never return. +

      +

      + Each Statesman is associated with one of the 3 Scenarios, and they will + usually only be found in the Scenario they are associated with. +

      + +
      +) + +export default StatesmanTerm diff --git a/frontend/components/terms/Term_Turn.tsx b/frontend/components/terms/Term_Turn.tsx index 29cb8d96..35d370a9 100644 --- a/frontend/components/terms/Term_Turn.tsx +++ b/frontend/components/terms/Term_Turn.tsx @@ -4,13 +4,13 @@ import TermLayout from "@/components/TermLayout" import TimeIcon from "@/images/icons/time.svg" import TermLink from "../TermLink" -// Description of the game term: Secret +// Description of the game term: Turn const TurnTerm = () => ( - Time icon + Time icon } > diff --git a/frontend/components/terms/Term_UnalignedSenator.tsx b/frontend/components/terms/Term_UnalignedSenator.tsx new file mode 100644 index 00000000..a5e41309 --- /dev/null +++ b/frontend/components/terms/Term_UnalignedSenator.tsx @@ -0,0 +1,27 @@ +import Image from "next/image" + +import SenatorIcon from "@/images/icons/senator.svg" +import { Avatar } from "@mui/material" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" + +// Description of the game term: Unaligned Senator +const UnalignedSenatorTerm = () => ( + + Senator icon + + } + > +

      + An Unaligned Senator is a with no ties to any + particular . Unlike{" "} + , they cannot collect Personal + Revenue, Vote on Proposals or hold Office. +

      +
      +) + +export default UnalignedSenatorTerm diff --git a/frontend/components/terms/Term_War.tsx b/frontend/components/terms/Term_War.tsx new file mode 100644 index 00000000..1ba6bfe6 --- /dev/null +++ b/frontend/components/terms/Term_War.tsx @@ -0,0 +1,54 @@ +import Image from "next/image" +import { Avatar } from "@mui/material" +import WarIcon from "@/images/icons/war.svg" +import TermLink from "@/components/TermLink" +import TermLayout from "@/components/TermLayout" +import FullListOfWars from "@/components/FullListOfWars" + +// Description of the game term: War +const WarTerm = () => ( + + War icon + + } + > +

      + A War represents a military threat to Rome. If there are 4 or more{" "} + at the end of the{" "} + , Rome is defeated and all players lose. +

      +

      + The appearance of a new War is one of several possible Situations that can + be initiated during the . +

      +

      + During the , Rome can raise and deploy + Forces to prosecute Wars, the outcomes of which are resolved in Battles + during the Combat Phase. +

      +
      Status
      +

      + Wars can be in one of three statuses:{" "} + ,{" "} + or{" "} + . Inactive and Imminent + Wars are not yet attacking Rome, but they represent future threats. Active + Wars are currently attacking Rome. +

      +
      Activation
      +

      + Some Wars are inherently Active, while others will become Active due to + the appearance of a . +

      +

      + Rome can prosecute Inactive and Imminent Wars, but this will immediately + activate them. +

      + +
      +) + +export default WarTerm diff --git a/frontend/data/skills.json b/frontend/data/skills.json index ff5f6342..2002f0be 100644 --- a/frontend/data/skills.json +++ b/frontend/data/skills.json @@ -26,18 +26,18 @@ "number": { "military": "#ff4c4c", "oratory": "#4cc44c", - "loyalty": "#ed66dc" + "loyalty": "#6681ed" }, "bar": { "light": { "military": "#ff3f3f", "oratory": "#009e00", - "loyalty": "#d947c6" + "loyalty": "#6080ff" }, "dark": { "military": "#ff4c4c", "oratory": "#4cc44c", - "loyalty": "#ed66dc" + "loyalty": "#7792ff" } } } diff --git a/frontend/functions/numberSuffix.ts b/frontend/functions/numberSuffix.ts new file mode 100644 index 00000000..61cb66df --- /dev/null +++ b/frontend/functions/numberSuffix.ts @@ -0,0 +1,8 @@ +const getNumberSuffix = (number: number) => { + if (number === 1) return "st" + if (number === 2) return "nd" + if (number === 3) return "rd" + return "th" +} + +export default getNumberSuffix diff --git a/frontend/images/icons/secrets.svg b/frontend/images/icons/secrets.svg index b8cae778..0a4cadd9 100644 --- a/frontend/images/icons/secrets.svg +++ b/frontend/images/icons/secrets.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/styles/master.css b/frontend/styles/master.css index d7fa3244..df2f5f5e 100644 --- a/frontend/styles/master.css +++ b/frontend/styles/master.css @@ -137,3 +137,10 @@ figure { margin-inline-start: 0; margin-inline-end: 0; } + +sup { + line-height: 0; + vertical-align: top; + position: relative; + top: 0.6em; +} diff --git a/frontend/themes/darkTheme.ts b/frontend/themes/darkTheme.ts index 5f135fa9..f04908fd 100644 --- a/frontend/themes/darkTheme.ts +++ b/frontend/themes/darkTheme.ts @@ -31,7 +31,7 @@ const darkTheme = createTheme({ dark: Tyrian300, }, secondary: { - light: "white", + light: "#ffffff", main: Neutral50, dark: Neutral100, }, diff --git a/roronline.code-workspace b/roronline.code-workspace index 633c0a36..f64b1064 100644 --- a/roronline.code-workspace +++ b/roronline.code-workspace @@ -28,6 +28,7 @@ "authtoken", "awseb", "calpurnius", + "cilician", "cunctator", "fabius", "flaccus", @@ -41,12 +42,16 @@ "hrao", "illyrain", "inventa", + "jugurthine", "laenas", "licinius", + "lusitanian", "macedonicus", "magnus", "manlius", "Maximus", + "mithridatic", + "numantine", "pagina", "papirius", "paullus", @@ -59,6 +64,7 @@ "roronline", "rorsite", "sempronius", + "sertorian", "servilius", "simplejwt", "sulpicius", @@ -70,6 +76,7 @@ "verrucosus", "viewset", "viewsets", + "viriathus", "waitlist", "xmark" ],