guardian: new page night after self protect
This commit is contained in:
parent
fc4da3bcc5
commit
ac864a5fa5
|
|
@ -165,7 +165,16 @@ impl RolePage for ActionPrompt {
|
||||||
character_id,
|
character_id,
|
||||||
previous: Some(PreviousGuardianAction::Protect(target)),
|
previous: Some(PreviousGuardianAction::Protect(target)),
|
||||||
..
|
..
|
||||||
} => Rc::new([
|
} => {
|
||||||
|
if character_id.character_id == target.character_id {
|
||||||
|
Rc::new([html! {
|
||||||
|
<>
|
||||||
|
{ident(character_id)}
|
||||||
|
<GuardianPagePreviousProtectSelf />
|
||||||
|
</>
|
||||||
|
}])
|
||||||
|
} else {
|
||||||
|
Rc::new([
|
||||||
html! {
|
html! {
|
||||||
<>
|
<>
|
||||||
{ident(character_id)}
|
{ident(character_id)}
|
||||||
|
|
@ -178,7 +187,10 @@ impl RolePage for ActionPrompt {
|
||||||
<GuardianPagePreviousProtect2 previous={target.clone()}/>
|
<GuardianPagePreviousProtect2 previous={target.clone()}/>
|
||||||
</>
|
</>
|
||||||
},
|
},
|
||||||
]),
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ActionPrompt::Guardian {
|
ActionPrompt::Guardian {
|
||||||
character_id,
|
character_id,
|
||||||
previous: Some(PreviousGuardianAction::Guard(target)),
|
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]
|
#[function_component]
|
||||||
pub fn GuardianPagePreviousProtect1(GuardianPageProps { previous }: &GuardianPageProps) -> Html {
|
pub fn GuardianPagePreviousProtect1(GuardianPageProps { previous }: &GuardianPageProps) -> Html {
|
||||||
html! {
|
html! {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue