show skill delay on info

This commit is contained in:
Mashy 2019-09-20 13:03:13 +10:00
parent 3ad679cb02
commit 6fba9d9f4d
3 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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 = <div> Speed {shapes.SpeedStat()} multiplier {calcSpeed}% </div>;
const cooldown = fullInfo.cooldown ? `${fullInfo.cooldown} Turn delay` : null;
return (
<div class="info-skill">
<h2>{fullInfo.item} - {fullInfo.cost}b</h2>
<h3>SKILL</h3>
<h3> SKILL </h3>
{itemSourceDescription}
<div> {cooldown} </div>
<div>{infoDescription}</div>
{speed}
</div>

View File

@ -1439,8 +1439,9 @@ pub struct ItemInfo {
pub item: Item,
pub cost: usize,
pub spec: bool,
pub skill: bool,
pub values: Option<SpecValues>,
pub skill: bool,
pub cooldown: Option<u8>,
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::<Vec<ItemInfo>>();