guardian: new page night after self protect
This commit is contained in:
parent
fc4da3bcc5
commit
ac864a5fa5
|
|
@ -165,20 +165,32 @@ impl RolePage for ActionPrompt {
|
|||
character_id,
|
||||
previous: Some(PreviousGuardianAction::Protect(target)),
|
||||
..
|
||||
} => Rc::new([
|
||||
html! {
|
||||
<>
|
||||
{ident(character_id)}
|
||||
<GuardianPagePreviousProtect1 previous={target.clone()}/>
|
||||
</>
|
||||
},
|
||||
html! {
|
||||
<>
|
||||
{ident(character_id)}
|
||||
<GuardianPagePreviousProtect2 previous={target.clone()}/>
|
||||
</>
|
||||
},
|
||||
]),
|
||||
} => {
|
||||
if character_id.character_id == target.character_id {
|
||||
Rc::new([html! {
|
||||
<>
|
||||
{ident(character_id)}
|
||||
<GuardianPagePreviousProtectSelf />
|
||||
</>
|
||||
}])
|
||||
} else {
|
||||
Rc::new([
|
||||
html! {
|
||||
<>
|
||||
{ident(character_id)}
|
||||
<GuardianPagePreviousProtect1 previous={target.clone()}/>
|
||||
</>
|
||||
},
|
||||
html! {
|
||||
<>
|
||||
{ident(character_id)}
|
||||
<GuardianPagePreviousProtect2 previous={target.clone()}/>
|
||||
</>
|
||||
},
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
ActionPrompt::Guardian {
|
||||
character_id,
|
||||
previous: Some(PreviousGuardianAction::Guard(target)),
|
||||
|
|
|
|||
|
|
@ -38,6 +38,19 @@ pub fn GuardianPageNoPrevProtect() -> Html {
|
|||
}
|
||||
}
|
||||
|
||||
#[function_component]
|
||||
pub fn GuardianPagePreviousProtectSelf() -> Html {
|
||||
html! {
|
||||
<div class="role-page">
|
||||
<h1 class="defensive">{"GUARDIAN"}</h1>
|
||||
<div class="information defensive faint">
|
||||
<h2>{"LAST TIME YOU PROTECTED YOURSELF"}</h2>
|
||||
<h3 class="yellow">{"YOU CANNOT PROTECT YOURSELF AGAIN TONIGHT"}</h3>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
#[function_component]
|
||||
pub fn GuardianPagePreviousProtect1(GuardianPageProps { previous }: &GuardianPageProps) -> Html {
|
||||
html! {
|
||||
|
|
|
|||
Loading…
Reference in New Issue