fix stuff n tings

This commit is contained in:
ntr 2019-06-10 21:45:24 +10:00
parent b250860eb2
commit 2596b88b75
8 changed files with 28 additions and 30 deletions

View File

@ -5,7 +5,7 @@
.instance { .instance {
overflow-x: hidden; overflow-x: hidden;
display: grid; display: grid;
grid-template-columns: 2fr 1fr; grid-template-columns: 2fr minmax(min-content, 1fr);
grid-template-rows: min-content min-content min-content 1fr; grid-template-rows: min-content min-content min-content 1fr;
grid-template-areas: grid-template-areas:
@ -29,8 +29,8 @@
grid-area: top; grid-area: top;
} }
.instance .scoreboard { .instance.lobby {
grid-area: constructs; align-content: center;
} }
.scoreboard .ready { .scoreboard .ready {
@ -406,7 +406,7 @@
} }
.thresholds figure svg { .thresholds figure svg {
height: 2em; height: 1.5em;
} }
.thresholds .unmet { .thresholds .unmet {

View File

@ -35,15 +35,18 @@ function Instance(args) {
} = args; } = args;
if (!instance) return false; if (!instance) return false;
if (instance.phase !== 'InProgress') {
return (
<main class="instance lobby" onMouseOver={() => setInfo(null)} >
<ScoreBoard />
</main>
);
}
const instanceClasses = `instance ${nav === 'constructs' ? 'constructs-visible' : ''}`; const instanceClasses = `instance ${nav === 'constructs' ? 'constructs-visible' : ''}`;
const lobbyInfo = (instance.phase === 'InProgress')
? null
: <ScoreBoard />;
return ( return (
<main class={instanceClasses} onMouseOver={() => setInfo(null)} > <main class={instanceClasses} onMouseOver={() => setInfo(null)} >
{lobbyInfo}
<Vbox /> <Vbox />
<InfoContainer /> <InfoContainer />
<EquipmentContainer /> <EquipmentContainer />

View File

@ -24,9 +24,9 @@ module.exports = function circle(colours) {
<ellipse clip-path="url(#firstColour)" class={colours[0]} cx="100" cy="100" rx="60" ry="60"/> <ellipse clip-path="url(#firstColour)" class={colours[0]} cx="100" cy="100" rx="60" ry="60"/>
<ellipse clip-path="url(#firstColour)" class={colours[0]} cx="100" cy="100" rx="90" ry="90"/> <ellipse clip-path="url(#firstColour)" class={colours[0]} cx="100" cy="100" rx="90" ry="90"/>
<ellipse clip-path="url(#secondColour)" class={colours[0]} cx="100" cy="100" rx="30" ry="30"/> <ellipse clip-path="url(#secondColour)" class={colours[1]} cx="100" cy="100" rx="30" ry="30"/>
<ellipse clip-path="url(#secondColour)" class={colours[0]} cx="100" cy="100" rx="60" ry="60"/> <ellipse clip-path="url(#secondColour)" class={colours[1]} cx="100" cy="100" rx="60" ry="60"/>
<ellipse clip-path="url(#secondColour)" class={colours[0]} cx="100" cy="100" rx="90" ry="90"/> <ellipse clip-path="url(#secondColour)" class={colours[1]} cx="100" cy="100" rx="90" ry="90"/>
</svg> </svg>
); );
}; };

View File

@ -26,9 +26,9 @@ module.exports = function square(colours) {
<rect clip-path="url(#firstColour)" x="40" y="40" class={colours[0]} width="120" height="120"/> <rect clip-path="url(#firstColour)" x="40" y="40" class={colours[0]} width="120" height="120"/>
<rect clip-path="url(#firstColour)" x="70" y="70" class={colours[0]} width="60" height="60"/> <rect clip-path="url(#firstColour)" x="70" y="70" class={colours[0]} width="60" height="60"/>
<rect clip-path="url(#secondColour)" x="10" y="10" class={colours[0]} width="180" height="180"/> <rect clip-path="url(#secondColour)" x="10" y="10" class={colours[1]} width="180" height="180"/>
<rect clip-path="url(#secondColour)" x="40" y="40" class={colours[0]} width="120" height="120"/> <rect clip-path="url(#secondColour)" x="40" y="40" class={colours[1]} width="120" height="120"/>
<rect clip-path="url(#secondColour)" x="70" y="70" class={colours[0]} width="60" height="60"/> <rect clip-path="url(#secondColour)" x="70" y="70" class={colours[1]} width="60" height="60"/>
</svg> </svg>
); );
} }

View File

@ -21,17 +21,13 @@ module.exports = function triangle(colours) {
<rect x="100" y="0" width="100" height="200" /> <rect x="100" y="0" width="100" height="200" />
</clipPath> </clipPath>
<polygon clip-path="url(#firstColour)" class={colours[0]} points="1.77,176.25 100.7,2.08 200.9,176.25 "/> <polygon clip-path="url(#firstColour)" class={colours[0]} points="10,190 100,10 190,190"/>
<polygon clip-path="url(#firstColour)" class={colours[0]} points="23.99,163.23 100.78,28.05 178.54,163.23 "/> <polygon clip-path="url(#firstColour)" class={colours[0]} points="40,170 100,50 160,170"/>
<polygon clip-path="url(#firstColour)" class={colours[0]} points="46.21,150.21 100.85,54.03 156.18,150.21 "/> <polygon clip-path="url(#firstColour)" class={colours[0]} points="70,150 100,90 130,150"/>
<polygon clip-path="url(#firstColour)" class={colours[0]} points="68.43,137.19 100.92,80 133.82,137.19 "/>
<polygon clip-path="url(#firstColour)" class={colours[0]} points="90.65,124.17 100.99,105.98 111.46,124.17 "/>
<polygon clip-path="url(#secondColour)" class={colours[1]} points="1.77,176.25 100.7,2.08 200.9,176.25 "/> <polygon clip-path="url(#secondColour)" class={colours[1]} points="10,190 100,10 190,190"/>
<polygon clip-path="url(#secondColour)" class={colours[1]} points="23.99,163.23 100.78,28.05 178.54,163.23 "/> <polygon clip-path="url(#secondColour)" class={colours[1]} points="40,170 100,50 160,170"/>
<polygon clip-path="url(#secondColour)" class={colours[1]} points="46.21,150.21 100.85,54.03 156.18,150.21 "/> <polygon clip-path="url(#secondColour)" class={colours[1]} points="70,150 100,90 130,150"/>
<polygon clip-path="url(#secondColour)" class={colours[1]} points="68.43,137.19 100.92,80 133.82,137.19 "/>
<polygon clip-path="url(#secondColour)" class={colours[1]} points="90.65,124.17 100.99,105.98 111.46,124.17 "/>
</svg> </svg>
); );
}; };

View File

@ -95,7 +95,6 @@ function Vbox(args) {
} = args; } = args;
if (!player) return false; if (!player) return false;
if (instance.phase === 'Lobby') return false;
const { vbox } = player; const { vbox } = player;
// function setHighlight(type) { // function setHighlight(type) {

View File

@ -52,7 +52,7 @@ pub enum TimeControl {
impl TimeControl { impl TimeControl {
fn vbox_time_seconds(&self) -> i64 { fn vbox_time_seconds(&self) -> i64 {
match self { match self {
TimeControl::Standard => 120, TimeControl::Standard => 180,
TimeControl::Slow => 240, TimeControl::Slow => 240,
TimeControl::Practice => panic!("practice vbox seconds called"), TimeControl::Practice => panic!("practice vbox seconds called"),
} }
@ -85,7 +85,7 @@ impl TimeControl {
match self { match self {
TimeControl::Practice => None, TimeControl::Practice => None,
_ => Some(Utc::now() _ => Some(Utc::now()
.checked_add_signed(Duration::milliseconds(self.vbox_time_seconds() * 1000 + resolution_time_ms)) .checked_add_signed(Duration::milliseconds(self.game_time_seconds() * 1000 + resolution_time_ms))
.expect("could not set game phase end")), .expect("could not set game phase end")),
} }
} }

View File

@ -1251,7 +1251,7 @@ fn bash(source: &mut Construct, target: &mut Construct, mut results: Resolutions
} }
} }
let amount = source.red_power().pct(skill.multiplier().saturating_mul(cds)); let amount = source.red_power().pct(skill.multiplier().pct(100 + 45u64.saturating_mul(cds)));
target.deal_red_damage(skill, amount) target.deal_red_damage(skill, amount)
.into_iter() .into_iter()
.for_each(|e| results.push(Resolution::new(source, target).event(e).stages(LogStages::PostOnly))); .for_each(|e| results.push(Resolution::new(source, target).event(e).stages(LogStages::PostOnly)));