Skip to content

Commit

Permalink
address #242
Browse files Browse the repository at this point in the history
  • Loading branch information
Lurkars committed Feb 13, 2024
1 parent ddfd3d0 commit 85b3a08
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 35 deletions.
2 changes: 1 addition & 1 deletion data/cs/deck/harrower-aegis.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
{
"type": "specialTarget",
"value": "enemiesRangeAffect:3",
"value": "alliesRangeAffect:3",
"small": true
}
]
Expand Down
8 changes: 7 additions & 1 deletion data/toa/character/ice-meteor.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@
"effects": [
{
"type": "heal",
"value": 3
"value": 3,
"effects": [
{
"type": "specialTarget",
"value": "self"
}
]
},
{
"type": "condition",
Expand Down
2 changes: 1 addition & 1 deletion data/toa/character/spiked-ring.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
{
"type": "element",
"value": "earth",
"effectcs": [
"effects": [
{
"type": "custom",
"value": "if %game.element.light% is Strong or Waning"
Expand Down
2 changes: 1 addition & 1 deletion data/toa/character/three-eyes.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
{
"type": "custom",
"count": 1,
"custom": "You may ring one additional %game.items.slots.onehand% item into each scenario"
"custom": "You may bring one additional %game.items.slots.onehand% item into each scenario"
},
{
"type": "custom",
Expand Down
2 changes: 1 addition & 1 deletion data/toa/deck/smoke-spirit.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
},
{
"type": "custom",
"value": "Create a hazardous terrain tile in<br>all hexes occupied by a the target if<br>it contains no overlay tiles.",
"value": "Create a hazardous terrain tile in<br>all hexes occupied by a target if<br>it contains no overlay tiles.",
"small": true
}
]
Expand Down
77 changes: 57 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gloomhavensecretariat",
"version": "0.87.0",
"version": "0.87.1",
"license": "AGPL3",
"description": "Gloomhaven Secretariat is a Gloomhaven/Frosthaven Companion app.",
"homepage": "https://gloomhaven-secretariat.de",
Expand Down
15 changes: 10 additions & 5 deletions src/app/ui/figures/attackmodifier/attackmodifier-effects.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@
</span>
</ng-container>
<ng-container *ngSwitchCase="AttackModifierEffectType.element">
<img class="full"
<img class="full" [ngClass]="{'sub-effects' : effect.effects && effect.effects.length}"
[src]="'./assets/images/' + (settingsManager.settings.fhStyle ? 'fh/' : '') + 'element/' + effect.value + '.svg'" />

<div class="sub-effects" *ngIf="effect.effects && effect.effects.length">
<ghs-attackmodifier-effects [attackModifier]="attackModifier" [effects]="effect.effects"
[offsetWidth]="offsetWidth" [newStyle]="newStyle"></ghs-attackmodifier-effects>
</div>
</ng-container>

<span class="element-half-container" *ngSwitchCase="AttackModifierEffectType.elementHalf">
Expand Down Expand Up @@ -161,10 +166,10 @@
<ng-container *ngSwitchCase="AttackModifierEffectType.custom">
<ng-container *ngIf="!effect.icon">
<span *ngIf="!townGuard" class="type">{{attackModifier.value < 0 ? '-' : '+' }}{{attackModifier.value}}</span>
<span class="custom-value-container">
<span class="custom-value" [ngClass]="{'text-white' : !settingsManager.settings.fhStyle || townGuard}"
[ghs-label]="effect.value + ''"></span>
</span>
<span class="custom-value-container">
<span class="custom-value" [ngClass]="{'text-white' : !settingsManager.settings.fhStyle || townGuard}"
[ghs-label]="effect.value + ''"></span>
</span>
</ng-container>
<ng-container *ngIf="effect.icon">
<span class="effect-icon">
Expand Down
32 changes: 30 additions & 2 deletions src/app/ui/figures/attackmodifier/attackmodifier-effects.scss
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@
&.condition,
&.pull,
&.push,
&.pierce {
&.pierce,
&.heal {
&:nth-child(1) {
transform: translate(-70%, -70%) scale(0.5);
}
Expand All @@ -398,6 +399,11 @@
transform: translate(-32.5%, -32.5%) scale(0.6);
}
}

.heal-container {
border: none;
background: none;
}
}
}

Expand Down Expand Up @@ -478,7 +484,9 @@
}
}

&.changeType {
&.changeType,
&.element,
&.elementHalf {
top: 0;
left: 0;
width: 100%;
Expand All @@ -492,6 +500,26 @@
width: 135%;
height: 50%;
}

&.element img {
position: absolute;
top: 21%;
left: 31%;
width: 38%;

&.sub-effects {
top: 25%;
left: 40%;
width: 20%;
}
}

&.elementHalf .element-half-container {
position: absolute;
top: 21%;
left: 31%;
width: 38%;
}
}

&.or {
Expand Down
6 changes: 5 additions & 1 deletion src/app/ui/figures/attackmodifier/attackmodifier.scss
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,14 @@
filter: hue-rotate(168deg) saturate(150%);
}

&.wound {
&.wound:not(.heal) {
filter: hue-rotate(355deg) saturate(250%);
}

&.chill {
filter: hue-rotate(165deg) saturate(90%) brightness(120%);
}

&.push {
filter: grayscale(80%);
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/ui/helper/label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const applyPlaceholder = function (value: string, placeholder: string[] =
split.splice(0, 1);
const ghsSvg = ActionTypesIcons.indexOf(split[split.length - 1] as ActionType) != -1;
image = '<img src="./assets/images/' + (fh ? 'fh/' : '') + split.join('/') + '.svg" class="icon' + (ghsSvg ? ' ghs-svg' : '') + '">';
replace = '<span class="placeholder-action">' + (fh ? '&nbsp;' : settingsManager.getLabel(label)) + image + value + '</span>';
replace = '&nbsp;<span class="placeholder-action">' + (fh ? '&nbsp;' : settingsManager.getLabel(label)) + image + value + '</span>';
} else if (type == "element") {
let element = split[2];
if (element == "consume") {
Expand Down

0 comments on commit 85b3a08

Please sign in to comment.