diff --git a/werewolves/src/pages/role_page.rs b/werewolves/src/pages/role_page.rs index e62fe28..fb01276 100644 --- a/werewolves/src/pages/role_page.rs +++ b/werewolves/src/pages/role_page.rs @@ -165,20 +165,32 @@ impl RolePage for ActionPrompt { character_id, previous: Some(PreviousGuardianAction::Protect(target)), .. - } => Rc::new([ - html! { - <> - {ident(character_id)} - - - }, - html! { - <> - {ident(character_id)} - - - }, - ]), + } => { + if character_id.character_id == target.character_id { + Rc::new([html! { + <> + {ident(character_id)} + + + }]) + } else { + Rc::new([ + html! { + <> + {ident(character_id)} + + + }, + html! { + <> + {ident(character_id)} + + + }, + ]) + } + } + ActionPrompt::Guardian { character_id, previous: Some(PreviousGuardianAction::Guard(target)), diff --git a/werewolves/src/pages/role_page/guardian.rs b/werewolves/src/pages/role_page/guardian.rs index b5b8c45..81d8076 100644 --- a/werewolves/src/pages/role_page/guardian.rs +++ b/werewolves/src/pages/role_page/guardian.rs @@ -38,6 +38,19 @@ pub fn GuardianPageNoPrevProtect() -> Html { } } +#[function_component] +pub fn GuardianPagePreviousProtectSelf() -> Html { + html! { +
+

{"GUARDIAN"}

+
+

{"LAST TIME YOU PROTECTED YOURSELF"}

+

{"YOU CANNOT PROTECT YOURSELF AGAIN TONIGHT"}

+
+
+ } +} + #[function_component] pub fn GuardianPagePreviousProtect1(GuardianPageProps { previous }: &GuardianPageProps) -> Html { html! {