This commit is contained in:
ntr 2019-11-24 19:02:22 +11:00
parent 5f4659b6db
commit 2b1843ddb7
3 changed files with 31 additions and 29 deletions

View File

@ -38,6 +38,10 @@
"store store stash stash"
"store store combiner combiner";
> div {
padding: 0.25em;
}
.stash {
border: 0;
border-top: 0.1em solid @gray;
@ -68,15 +72,18 @@
.store-hdr {
display: grid;
grid-template-rows: min-content;
grid-template-columns: 1fr 1fr;
grid-template-columns: min-content min-content 1fr;
> * {
margin-right: 1em;
}
grid-template-areas:
"hdr btn"
"bits btn";
"hdr bits btn";
h3 {
h1 {
grid-area: hdr;
margin-bottom: 0.25em;
}
.bits {
@ -94,10 +101,6 @@
}
}
}
.avatar {
opacity: 0.1;
}
}
.game {
@ -196,21 +199,22 @@
.instance-construct {
position: relative;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr min-content min-content min-content;
grid-template-areas:
"avatar name"
"skills skills"
"specs specs"
"stats stats ";
.skills, .specs {
font-size: 75%;
}
.avatar {
grid-area: initial;
position: absolute;
top: 0;
height: 100%;
width: 100%;
z-index: -1;
}
button:not([disabled]) {
background: black;
.stats {
svg {
height: 1em;
}
}
}

View File

@ -173,9 +173,9 @@ class Vbox extends preact.Component {
onTouchStart={e => e.target.scrollIntoView(true)}
onMouseOver={e => vboxHover(e, 'store')}> STORE
</h2>
<div class={`bits ${vbox.bits < 3 ? 'red' : false}`} onMouseOver={e => vboxHover(e, 'bits')}>
<h1> {vbox.bits}b </h1>
</div>
<h1 class={`bits ${vbox.bits < 3 ? 'red' : false}`} onMouseOver={e => vboxHover(e, 'bits')}>
{vbox.bits}b
</h1>
<button
class='vbox-btn'
onMouseOver={e => vboxHover(e, 'refill')}

View File

@ -323,8 +323,6 @@ impl Construct {
}
pub fn apply_modifiers(&mut self, player_colours: &Colours) -> &mut Construct {
self.specs.sort_unstable();
self.red_power.recalculate(&self.specs, player_colours);
self.red_life.recalculate(&self.specs, player_colours);
self.blue_power.recalculate(&self.specs, player_colours);
@ -600,11 +598,11 @@ impl Construct {
self.reduce_green_life(red_remainder);
let red_damage_amount = red_current_green_life - self.green_life();
events.push(Event::Damage {
events.push(Event::Damage {
skill,
amount: red_damage_amount,
mitigation: red_mitigation,
colour: Colour::Red
colour: Colour::Red
});
}
@ -629,11 +627,11 @@ impl Construct {
self.reduce_green_life(blue_remainder);
let blue_damage_amount = blue_current_green_life - self.green_life();
events.push(Event::Damage {
events.push(Event::Damage {
skill,
amount: blue_damage_amount,
mitigation: blue_mitigation,
colour: Colour::Blue
colour: Colour::Blue
});
}
}