From 6fba9d9f4daa6f333b725f79442c9b7a53a9c8d6 Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 20 Sep 2019 13:03:13 +1000 Subject: [PATCH] show skill delay on info --- WORKLOG.md | 1 - client/src/components/info.component.jsx | 4 +++- server/src/item.rs | 11 ++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index 4debb7b2..f4230f25 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -27,7 +27,6 @@ * fuck magic * empower on ko -var / skill info rpc -> cooldown * rework vecs into sets * remove names so games/instances are copy diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index d0e85c25..372de462 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -50,11 +50,13 @@ function InfoComponent(args) { ? (24 + (itemSpeed(itemSource[0].components[0]) + itemSpeed(itemSource[0].components[1])) * itemSpeed(itemSource[0].components[2])) * 4 : (24 + itemSpeed(info)) * 4; const speed =
Speed {shapes.SpeedStat()} multiplier {calcSpeed}%
; + const cooldown = fullInfo.cooldown ? `${fullInfo.cooldown} Turn delay` : null; return (

{fullInfo.item} - {fullInfo.cost}b

-

SKILL

+

SKILL

{itemSourceDescription} +
{cooldown}
{infoDescription}
{speed}
diff --git a/server/src/item.rs b/server/src/item.rs index 80a8f6f2..56ba9968 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -1439,8 +1439,9 @@ pub struct ItemInfo { pub item: Item, pub cost: usize, pub spec: bool, - pub skill: bool, pub values: Option, + pub skill: bool, + pub cooldown: Option, pub description: String, } @@ -1470,12 +1471,16 @@ pub fn item_info() -> ItemInfoCtr { item: v, cost: v.cost(), spec: v.into_spec().is_some(), - skill: v.into_skill().is_some(), - description: v.into_description(), values: match v.into_spec() { Some(s) => Some(s.values()), None => None }, + skill: v.into_skill().is_some(), + description: v.into_description(), + cooldown: match v.into_skill() { + Some(s) => s.base_cd(), + None => None + }, }) .collect::>();