Skip to content

Commit bcb7dd3

Browse files
author
Johnny
committed
feat(Pilot Sheet): add bonuses to reserves
adds Skill, Talent, License, Mech Skill, and CORE Bonus point resources pilots can add to add Pilot features outside of the level schema, for houserules, special reserves, or GM fiat. This will later be expanded into the Manna-buy ruleset Closes #672
1 parent 21dd6a4 commit bcb7dd3

File tree

5 files changed

+13936
-15
lines changed

5 files changed

+13936
-15
lines changed

src/classes/pilot/Pilot.ts

+9-5
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ class Pilot {
513513
this.save()
514514
}
515515

516-
public AddCustomSkill(cs: { skill: string; description: string, detail: string }): void {
516+
public AddCustomSkill(cs: { skill: string; description: string; detail: string }): void {
517517
this.AddSkill(new CustomSkill(cs.skill, cs.description, cs.detail))
518518
}
519519

@@ -558,7 +558,8 @@ class Pilot {
558558
}
559559

560560
public get MaxTalentPoints(): number {
561-
return Rules.MinimumPilotTalents + this._level
561+
const bonus = this.Reserves.filter(x => x.ID === 'reserve_talent').length
562+
return Rules.MinimumPilotTalents + this._level + bonus
562563
}
563564

564565
public get IsMissingTalents(): boolean {
@@ -641,7 +642,8 @@ class Pilot {
641642
}
642643

643644
public get MaxCBPoints(): number {
644-
return Math.floor(this._level / 3)
645+
const bonus = this.Reserves.filter(x => x.ID === 'reserve_corebonus').length
646+
return Math.floor(this._level / 3) + bonus
645647
}
646648

647649
public get IsMissingCBs(): boolean {
@@ -712,7 +714,8 @@ class Pilot {
712714
}
713715

714716
public get MaxLicensePoints(): number {
715-
return this._level
717+
const bonus = this.Reserves.filter(x => x.ID === 'reserve_license').length
718+
return this._level + bonus
716719
}
717720

718721
public get IsMissingLicenses(): boolean {
@@ -783,7 +786,8 @@ class Pilot {
783786
}
784787

785788
public get MaxHASEPoints(): number {
786-
return Rules.MinimumMechSkills + this._level
789+
const bonus = this.Reserves.filter(x => x.ID === 'reserve_mechskill').length
790+
return Rules.MinimumMechSkills + this._level + bonus
787791
}
788792

789793
public get IsMissingHASE(): boolean {

src/features/pilot_management/PilotSheet/sections/narrative/components/DtResourcesBlock.vue

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
<template>
22
<div class="my-3">
33
<cc-title small color="pilot">
4-
<section-edit-icon label="Add Downtime Reserves" @open-selector="$refs.dtSelector.show()" />
5-
Downtime Reserves
4+
<section-edit-icon
5+
label="Add Reserves and Bonuses"
6+
@open-selector="$refs.dtSelector.show()"
7+
/>
8+
Reserves and Bonuses
69
</cc-title>
710
<cc-solo-dialog
811
ref="dtSelector"
912
icon="cci-barrage"
1013
no-confirm
11-
title="Edit Downtime Resources"
14+
title="Edit Reserves and Bonuses"
1215
fullscreen
1316
no-pad
1417
>

src/ui/components/selectors/CCReserveSelector.vue

+22-6
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
/>
77
<v-tabs background-color="primary" hide-slider grow>
88
<v-tab>
9-
<b>Resources Reserve</b>
9+
<b>Pilot Bonuses</b>
1010
</v-tab>
1111
<v-tab>
12-
<b>Tactical Reserve</b>
12+
<b>Resource Reserves</b>
1313
</v-tab>
1414
<v-tab>
15-
<b>Mech Reserve</b>
15+
<b>Tactical Reserves</b>
16+
</v-tab>
17+
<v-tab>
18+
<b>Mech Reserves</b>
1619
</v-tab>
1720
<v-tab>
1821
<b>Custom Reserve</b>
@@ -25,10 +28,23 @@
2528
</v-tab>
2629
<v-tab-item>
2730
<v-row dense class="px-12">
28-
<v-col v-for="r in reserves['Resources']" :key="`item_${r.ID}`" cols="6" class="px-4">
31+
<v-col v-for="r in reserves['Bonuses']" :key="`item_${r.ID}`" cols="6" class="px-4">
2932
<reserve-item
3033
:reserve="r"
3134
icon="cci-pilot"
35+
color="pilot"
36+
class="ma-2"
37+
@click="add(r)"
38+
/>
39+
</v-col>
40+
</v-row>
41+
</v-tab-item>
42+
<v-tab-item>
43+
<v-row dense class="px-12">
44+
<v-col v-for="r in reserves['Resources']" :key="`item_${r.ID}`" cols="6" class="px-4">
45+
<reserve-item
46+
:reserve="r"
47+
icon="cci-accuracy"
3248
color="reserve--resources"
3349
class="ma-2"
3450
@click="add(r)"
@@ -41,7 +57,7 @@
4157
<v-col v-for="r in reserves['Tactical']" :key="`item_${r.ID}`" cols="6" class="px-4">
4258
<reserve-item
4359
:reserve="r"
44-
icon="cci-barrage"
60+
icon="cci-reserve-tac"
4561
color="reserve--tactical"
4662
class="ma-1"
4763
@click="add(r)"
@@ -54,7 +70,7 @@
5470
<v-col v-for="r in reserves['Mech']" :key="`item_${r.ID}`" cols="6" class="px-4">
5571
<reserve-item
5672
:reserve="r"
57-
icon="cci-frame"
73+
icon="cci-reserve-mech"
5874
color="reserve--mech"
5975
class="ma-1"
6076
@click="add(r)"

src/ui/components/selectors/CCTalentSelector.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default Vue.extend({
113113
},
114114
enoughSelections(): boolean {
115115
// we should only care about the minimum pilot talents in non-levelup (creation)
116-
return this.levelUp || !(this.pilot.Talents.length < this.selectedMin)
116+
return this.pilot.Level === 0 || !(this.pilot.Talents.length < this.selectedMin)
117117
},
118118
selectionComplete(): boolean {
119119
return (this.newPilot || this.levelUp) && !this.pilot.IsMissingTalents

0 commit comments

Comments
 (0)