Fix bio + initiative
All checks were successful
Release Creation / build (release) Successful in 1m2s
All checks were successful
Release Creation / build (release) Successful in 1m2s
This commit is contained in:
@@ -413,10 +413,10 @@ i.fvtt-ftl-nomad {
|
|||||||
background-color: var(--color-light-1);
|
background-color: var(--color-light-1);
|
||||||
}
|
}
|
||||||
.fvtt-ftl-nomad .character-biography prose-mirror.inactive {
|
.fvtt-ftl-nomad .character-biography prose-mirror.inactive {
|
||||||
min-height: 40px;
|
min-height: 16rem;
|
||||||
}
|
}
|
||||||
.fvtt-ftl-nomad .character-biography prose-mirror.active {
|
.fvtt-ftl-nomad .character-biography prose-mirror.active {
|
||||||
min-height: 150px;
|
min-height: 16rem;
|
||||||
}
|
}
|
||||||
.fvtt-ftl-nomad .character-biography .field-label {
|
.fvtt-ftl-nomad .character-biography .field-label {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
|
|||||||
@@ -31,6 +31,13 @@ Hooks.once("init", function () {
|
|||||||
utils: FTLNomadUtils,
|
utils: FTLNomadUtils,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
// Set an initiative formula for the system
|
||||||
|
CONFIG.Combat.initiative = {
|
||||||
|
formula: "2d6 + @skills.combat.value",
|
||||||
|
decimals: 1
|
||||||
|
};
|
||||||
|
|
||||||
CONFIG.Actor.documentClass = documents.FTLNomadActor
|
CONFIG.Actor.documentClass = documents.FTLNomadActor
|
||||||
CONFIG.Actor.dataModels = {
|
CONFIG.Actor.dataModels = {
|
||||||
character: models.FTLNomadCharacter,
|
character: models.FTLNomadCharacter,
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ export default class FTLNomadProtagonist extends foundry.abstract.TypeDataModel
|
|||||||
schema.health = new fields.SchemaField({
|
schema.health = new fields.SchemaField({
|
||||||
staminaValue: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
|
staminaValue: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
|
||||||
staminaMax: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
|
staminaMax: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
|
||||||
wounds: new fields.NumberField({ ...requiredInteger, initial:0, min: 0 }),
|
wounds: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||||
triageResults: new fields.StringField({ required: true, nullable: false, initial: "none", choices: SYSTEM.TRIAGE_RESULTS })
|
triageResults: new fields.StringField({ required: true, nullable: false, initial: "none", choices: SYSTEM.TRIAGE_RESULTS })
|
||||||
})
|
})
|
||||||
|
|
||||||
schema.enc = new fields.SchemaField({
|
schema.enc = new fields.SchemaField({
|
||||||
@@ -77,17 +77,17 @@ export default class FTLNomadProtagonist extends foundry.abstract.TypeDataModel
|
|||||||
prepareDerivedData() {
|
prepareDerivedData() {
|
||||||
super.prepareDerivedData();
|
super.prepareDerivedData();
|
||||||
|
|
||||||
let encMax = 10 + (2*this.skills.physical.value)
|
let encMax = 10 + (2 * this.skills.physical.value)
|
||||||
if (encMax !== this.enc.max) {
|
if (encMax !== this.enc.max) {
|
||||||
this.enc.max = encMax
|
this.enc.max = encMax
|
||||||
}
|
}
|
||||||
let enc = 0
|
let enc = 0
|
||||||
let armor = 0
|
let armor = 0
|
||||||
for (let i of this.parent.items) {
|
for (let i of this.parent.items) {
|
||||||
if (i.system?.enc) {
|
if (i.system?.enc) {
|
||||||
enc += i.system.enc
|
enc += i.system.enc
|
||||||
}
|
}
|
||||||
if ( i.system?.protection) {
|
if (i.system?.protection) {
|
||||||
armor += i.system.protection
|
armor += i.system.protection
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ export default class FTLNomadProtagonist extends foundry.abstract.TypeDataModel
|
|||||||
if (armor !== this.armor.value) {
|
if (armor !== this.armor.value) {
|
||||||
this.armor.value = armor
|
this.armor.value = armor
|
||||||
}
|
}
|
||||||
let staminaMax = 14 + (3*this.skills.physical.value)
|
let staminaMax = 14 + (3 * this.skills.physical.value)
|
||||||
if (staminaMax !== this.health.staminaMax) {
|
if (staminaMax !== this.health.staminaMax) {
|
||||||
this.health.staminaMax = staminaMax
|
this.health.staminaMax = staminaMax
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -219,10 +219,10 @@
|
|||||||
.character-biography {
|
.character-biography {
|
||||||
background-color: var(--color-light-1);
|
background-color: var(--color-light-1);
|
||||||
prose-mirror.inactive {
|
prose-mirror.inactive {
|
||||||
min-height: 40px;
|
min-height: 16rem;
|
||||||
}
|
}
|
||||||
prose-mirror.active {
|
prose-mirror.active {
|
||||||
min-height: 150px;
|
min-height: 16rem;
|
||||||
}
|
}
|
||||||
.field-label {
|
.field-label {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
|
|||||||
@@ -23,12 +23,12 @@
|
|||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{localize "FTLNOMAD.Label.description"}}</legend>
|
<legend>{{localize "FTLNOMAD.Label.description"}}</legend>
|
||||||
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true class="character-description"}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{localize "FTLNOMAD.Label.notes"}}</legend>
|
<legend>{{localize "FTLNOMAD.Label.notes"}}</legend>
|
||||||
{{formInput systemFields.notes enriched=enrichedNotes value=system.notes name="system.notes" toggled=true}}
|
{{formInput systemFields.notes enriched=enrichedNotes value=system.notes name="system.notes" toggled=true class="character-notes"}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
Reference in New Issue
Block a user