Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor EotE Improvements #83

Merged
merged 2 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client/components/systems/eote/criticals.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@
</b-input-group>

<b-input-group class="mt-2">
<b-form-input v-model.number="rollBonus" type="number" min="0" step="1" placeholder="Roll bonus"></b-form-input>
<b-form-input v-model.number="rollBonus" type="number" min="0" step="1" placeholder="Crit. bonus"></b-form-input>
<b-input-group-append>
<b-btn
variant="primary"
style="max-width: 48px; min-width: 48px;"
style="min-width: 48px;"
title="Roll for a random Critical"
:disabled="readonly"
@click="rollCritical()"
>
<fa icon="dice"></fa>
Roll Crit.
</b-btn>
</b-input-group-append>
</b-input-group>
Expand Down
34 changes: 26 additions & 8 deletions client/components/systems/eote/wounds.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,39 @@
</b-card>
</div>
<b-btn-group class="mt-1 w-100">
<b-btn variant="outline-secondary" title="Use a stimpack" @click="useStim">
<b-btn v-b-tooltip.hover variant="outline-secondary" title="Use a stimpack" @click="useStim">
<span v-if="mode === 'eote'">Stimpacks</span>
<span v-else>Painkillers</span>
({{ stims }})
</b-btn>
<b-btn variant="outline-secondary" style="max-width: 48px" title="Reset Usages" @click="resetStims">
<b-btn v-b-tooltip.hover variant="outline-secondary" style="max-width: 48px" title="Reset Usages" @click="resetStims">
<fa icon="sync"></fa>
</b-btn>
</b-btn-group>
<b-input-group class="mt-1 text-nowrap flex-nowrap">
<b-input v-model.number="woundsInput" type="number" min="0" step="1" placeholder="Wounds" autocomplete="off"></b-input>
<b-input-group-append>
<b-btn variant="outline-secondary" title="Soak" @click="soakWounds()">
<b-btn v-b-tooltip.hover variant="outline-secondary" title="Deal damage, applying soak" @click="soakWounds()">
<fa icon="shield-alt"></fa>
</b-btn>
<b-btn variant="outline-secondary" title="Deal" @click="dealWounds()">
<b-btn v-b-tooltip.hover variant="outline-secondary" title="Deal damage directly" @click="dealWounds()">
<fa :icon="mode === 'eote' ? 'swords-laser' : 'swords'"></fa>
</b-btn>
<b-btn variant="outline-secondary" title="Heal" @click="healWounds()">
<b-btn v-b-tooltip.hover variant="outline-secondary" title="Heal wounds" @click="healWounds()">
<fa icon="first-aid"></fa>
</b-btn>
</b-input-group-append>
</b-input-group>
<b-input-group class="mt-1">
<b-input v-model.number="strainInput" type="number" min="0" step="1" placeholder="Strain" autocomplete="off"></b-input>
<b-input-group-append>
<b-btn variant="outline-secondary" title="Soak" @click="soakStrain()">
<b-btn v-b-tooltip.hover variant="outline-secondary" title="Deal damage, applying soak" @click="soakStrain()">
<fa icon="shield-alt"></fa>
</b-btn>
<b-btn variant="outline-secondary" title="Deal" @click="dealStrain()">
<b-btn v-b-tooltip.hover variant="outline-secondary" title="Deal damage directly" @click="dealStrain()">
<fa :icon="mode === 'eote' ? 'swords-laser' : 'swords'"></fa>
</b-btn>
<b-btn variant="outline-secondary" title="Heal" @click="healStrain()">
<b-btn v-b-tooltip.hover variant="outline-secondary" title="Heal strain" @click="healStrain()">
<fa icon="first-aid"></fa>
</b-btn>
</b-input-group-append>
Expand All @@ -78,24 +78,30 @@

<b-btn-group class="w-100">
<b-btn
v-b-tooltip.hover.html
:variant="health.staggered ? 'warning' : 'outline-secondary'"
size="sm"
:title="staggeredText"
:pressed.sync="health.staggered"
@click="saveChar"
>
Stagg.
</b-btn>
<b-btn
v-b-tooltip.hover.html
:variant="health.immobilized ? 'warning' : 'outline-secondary'"
size="sm"
:title="immobilizedText"
:pressed.sync="health.immobilized"
@click="saveChar"
>
Immob.
</b-btn>
<b-btn
v-b-tooltip.hover.html
:variant="health.disoriented ? 'warning' : 'outline-secondary'"
size="sm"
:title="disorientedText"
:pressed.sync="health.disoriented"
@click="saveChar"
>
Expand Down Expand Up @@ -202,6 +208,18 @@

return undefined;
},
staggeredText()
{
return `A <b>staggered</b> character cannot perform actions (including downgrading actions to maneuvers).`;
},
immobilizedText()
{
return `<span class="${ this.mode }-system">An <b>immobilized</b> character cannot perform maneuvers (including maneuvers purchased via strain or by spending <advantage></advantage>)</span>`;
},
disorientedText()
{
return `<span class="${ this.mode }-system">A <b>disoriented</b> character adds <setback></setback> (setback) to all checks they make.</span>`;
},
stims()
{
// This is just here in case there's ever a desire to make the maximum flexible.
Expand Down
4 changes: 2 additions & 2 deletions client/pages/character.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@
isAuthorized()
{
return !!this.account
&& !!this.character
&& (this.account.id || 'nope!') === this.character.account_id;
&& !!this.char
&& (this.account.id || 'nope!') === this.char.account_id;
}
},
subscriptions: {
Expand Down
12 changes: 10 additions & 2 deletions client/scss/_eote.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $force-color: #ffffff;
}
} // end makeSymbol

@mixin makeDie($dieName, $color, $beforeContent)
@mixin makeDie($dieName, $color, $beforeContent, $tooltip-color: $color)
{
.genesys-system,
.eote-system {
Expand All @@ -58,6 +58,14 @@ $force-color: #ffffff;
}
}
}

.tooltip-inner {
.#{$dieName},
#{$dieName}
{
color: $tooltip-color;
}
}
} // end makeDie

//----------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -87,7 +95,7 @@ $force-color: #ffffff;
@include makeDie('difficulty', $difficulty-color, 'd');

// Setback Die
@include makeDie('setback', $setback-color, 'b');
@include makeDie('setback', $setback-color, 'b', invert($setback-color));

//----------------------------------------------------------------------------------------------------------------------
// Positive Symbols
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"express-session": "^1.17.1",
"gravatar": "^1.3.1",
"knex": "^0.21.1",
"lodash": "^4.17.15",
"lodash": "^4.17.19",
"lru-cache": "^5.1.1",
"mailgun": "^0.5.0",
"passport": "^0.4.0",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4952,6 +4952,11 @@ lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.5.1
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==

lodash@^4.17.19:
version "4.17.19"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==

log-symbols@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
Expand Down