Skip to content

Commit

Permalink
trials for player on retirement, try macos again
Browse files Browse the repository at this point in the history
  • Loading branch information
Lurkars committed Oct 26, 2024
1 parent 371da41 commit 5d6bbab
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]
os: [windows-latest, ubuntu-latest]
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Cache node modules
Expand Down
22 changes: 21 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gloomhavensecretariat",
"version": "0.102.2",
"version": "0.102.3",
"license": "AGPL3",
"description": "Gloomhaven Secretariat is a Gloomhaven/Frosthaven Companion app.",
"homepage": "https://gloomhaven-secretariat.de",
Expand Down Expand Up @@ -51,6 +51,26 @@
"github"
]
},
"mac": {
"type": "distribution",
"target": [
{
"target": "dmg",
"arch": [
"universal"
]
},
{
"target": "pkg",
"arch": [
"universal"
]
}
],
"publish": [
"github"
]
},
"win": {
"target": "nsis",
"icon": "build/icon.ico",
Expand Down
1 change: 1 addition & 0 deletions src/app/game/businesslogic/CharacterManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export class CharacterManager {
if (this.game.levelCalculation) {
gameManager.levelManager.calculateScenarioLevel();
}
gameManager.trialsManager.applyTrialCards();
}

removeCharacter(character: Character, retirement: boolean = false) {
Expand Down
14 changes: 10 additions & 4 deletions src/app/game/businesslogic/TrialsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,16 @@ export class TrialsManager {
this.game.party.trials = this.game.party.trials || -1;
if (editionData) {
this.game.figures.forEach((figure) => {
if (figure instanceof Character && !figure.progress.trial && this.game.party.trials < editionData.trials.length - 1) {
this.game.party.trials++;
const trialCard = editionData.trials[this.game.party.trials];
figure.progress.trial = new Identifier('' + trialCard.cardId, trialCard.edition);
if (figure instanceof Character && !figure.progress.trial) {
let retiredCharacter = this.game.party.retirements.find((model) => model.number == figure.number && model.progress && model.progress.trial)
if (retiredCharacter && retiredCharacter.progress && retiredCharacter.progress.trial) {
figure.progress.trial = retiredCharacter.progress.trial;
retiredCharacter.progress.trial = undefined;
} else if (this.game.party.trials < editionData.trials.length - 1) {
this.game.party.trials++;
const trialCard = editionData.trials[this.game.party.trials];
figure.progress.trial = new Identifier('' + trialCard.cardId, trialCard.edition);
}
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/ui/figures/character/sheet/character-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
<div class="trial-card">
<input #trialIndex class="card-id" [value]="character.progress.trial ? character.progress.trial.name : ''"
type="text" (change)="setTrial($event)" (keyup)="trialIndex.classList.remove('error');">
<a class="open" *ngIf="fhSheet && character.progress.trial" (click)="openTrial()"><img
<a class="open ignore-denied" *ngIf="fhSheet && character.progress.trial" (click)="openTrial()"><img
src="./assets/images/fh/trials/trial.png"></a>
</div>
</div>
Expand Down

0 comments on commit 5d6bbab

Please sign in to comment.