Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c180365a61 | |||
| ace607d05c | |||
| 8a5d1cc1d8 |
@@ -1359,6 +1359,10 @@ i.fvtt-ftl-nomad {
|
||||
min-width: 25rem;
|
||||
max-width: 25rem;
|
||||
}
|
||||
.fvtt-ftl-nomad .robot-main .robot-pc .robot-right .main-stats .encumbered {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
.fvtt-ftl-nomad .robot-main .robot-pc .robot-right .cargo label,
|
||||
.fvtt-ftl-nomad .robot-main .robot-pc .robot-right .capacity label {
|
||||
min-width: 4rem;
|
||||
|
||||
10
lang/en.json
10
lang/en.json
@@ -304,6 +304,15 @@
|
||||
"Gargantuan": "Gargantuan"
|
||||
},
|
||||
"FIELDS": {
|
||||
"enc": {
|
||||
"label": "Enc",
|
||||
"value": {
|
||||
"label": "Enc Curr."
|
||||
},
|
||||
"max": {
|
||||
"label": "Enc Max"
|
||||
}
|
||||
},
|
||||
"brain": {
|
||||
"label": "Brain"
|
||||
},
|
||||
@@ -486,6 +495,7 @@
|
||||
"max": "Max",
|
||||
"maximum": "Maximum",
|
||||
"modifier": "Modifier",
|
||||
"numericModifier": "Additionnal Modifier",
|
||||
"multiplier": "Multiplier",
|
||||
"newArmor": "New Armor",
|
||||
"newWeapon": "New Weapon",
|
||||
|
||||
@@ -144,6 +144,20 @@ export const MODIFIER_CHOICES = {
|
||||
"impossible6": { id: "impossible6", label: "FTLNOMAD.Label.Impossible6", value: "-6" }
|
||||
}
|
||||
|
||||
export const NUMERIC_MODIFIER_CHOICES = {
|
||||
"-5": { label: "-5", value: -5 },
|
||||
"-4": { label: "-4", value: -4 },
|
||||
"-3": { label: "-3", value: -3 },
|
||||
"-2": { label: "-2", value: -2 },
|
||||
"-1": { label: "-1", value: -1 },
|
||||
"0": { label: "0", value: 0 },
|
||||
"+1": { label: "+1", value: 1 },
|
||||
"+2": { label: "+2", value: 2 },
|
||||
"+3": { label: "+3", value: 3 },
|
||||
"+4": { label: "+4", value: 4 },
|
||||
"+5": { label: "+5", value: 5 }
|
||||
}
|
||||
|
||||
export const STARSHIP_HULL = {
|
||||
"pod": { id: "pod", label: "FTLNOMAD.Starship.Hull.Pod" },
|
||||
"micro": { id: "micro", label: "FTLNOMAD.Starship.Hull.Micro" },
|
||||
@@ -163,6 +177,7 @@ export const STARSHIP_HULL = {
|
||||
export const SYSTEM = {
|
||||
id: SYSTEM_ID,
|
||||
MODIFIER_CHOICES,
|
||||
NUMERIC_MODIFIER_CHOICES,
|
||||
ATTACK_MODIFIERS,
|
||||
TECH_AGES,
|
||||
WEAPON_TYPES,
|
||||
|
||||
@@ -66,7 +66,7 @@ export default class FTLNomadRoll extends Roll {
|
||||
fullFormula = `${options.formula} + ${options.damageModifier}D6 `
|
||||
} else {
|
||||
let mod = options.rollItem?.value || 0
|
||||
fullFormula = `${options.formula} + ${options.skillModifier}D + ${mod} + ${options.rangeModifier}D + ${options.numericModifier}D`
|
||||
fullFormula = `${options.formula} + ${options.skillModifier}D + ${mod} + ${options.rangeModifier}D + ${options.numericModifier}D + ${options.numericModifierSelect}`
|
||||
}
|
||||
// Replace all the "+ -" with "-"
|
||||
fullFormula = fullFormula.replace(/\+\s*\-/g, "- ")
|
||||
@@ -116,6 +116,7 @@ export default class FTLNomadRoll extends Roll {
|
||||
})
|
||||
|
||||
const choiceModifier = SYSTEM.MODIFIER_CHOICES
|
||||
const choiceNumericModifier = SYSTEM.NUMERIC_MODIFIER_CHOICES
|
||||
let choiceRangeModifier = {}
|
||||
let rangeModifier = 0
|
||||
if (options.weapon) {
|
||||
@@ -129,8 +130,10 @@ export default class FTLNomadRoll extends Roll {
|
||||
let damageModifier = "0"
|
||||
|
||||
let modifier = "0"
|
||||
let numericModifierSelect = 0
|
||||
options.skillModifier = 0
|
||||
options.numericModifier = 0
|
||||
options.numericModifierSelect = 0
|
||||
options.rangeModifier = rangeModifier
|
||||
options.damageModifier = damageModifier
|
||||
let fullFormula = `${formula} + ${options.rollItem.value}`
|
||||
@@ -152,6 +155,7 @@ export default class FTLNomadRoll extends Roll {
|
||||
rollModes,
|
||||
fieldRollMode,
|
||||
choiceModifier,
|
||||
choiceNumericModifier,
|
||||
choiceRangeModifier,
|
||||
choiceDamageModifier,
|
||||
rangeModifier,
|
||||
@@ -159,6 +163,7 @@ export default class FTLNomadRoll extends Roll {
|
||||
formula,
|
||||
hasTarget: options.hasTarget,
|
||||
modifier,
|
||||
numericModifierSelect,
|
||||
}
|
||||
const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-ftl-nomad/templates/roll-dialog.hbs", dialogContext)
|
||||
|
||||
@@ -189,6 +194,10 @@ export default class FTLNomadRoll extends Roll {
|
||||
options.skillModifier = Number(event.target.value)
|
||||
FTLNomadRoll.updateFullFormula(options)
|
||||
})
|
||||
$(".roll-numeric-modifier").change(event => {
|
||||
options.numericModifierSelect = Number(event.target.value)
|
||||
FTLNomadRoll.updateFullFormula(options)
|
||||
})
|
||||
$(".roll-damage-modifier").change(event => {
|
||||
options.damageModifier = Number(event.target.value)
|
||||
FTLNomadRoll.updateFullFormula(options)
|
||||
@@ -223,8 +232,10 @@ export default class FTLNomadRoll extends Roll {
|
||||
options.numericModifier = Number(rollData.numericModifier) || 0
|
||||
options.skillModifier = Number(rollData.skillModifier) || 0
|
||||
options.rangeModifier = Number(rollData.rangeModifier) || 0
|
||||
options.numericModifierSelect = Number(rollData.numericModifierSelect) || 0
|
||||
options.finalModifier = options.numericModifier + options.skillModifier + options.rangeModifier
|
||||
let mod = options.rollItem?.value || 0
|
||||
mod += options.numericModifierSelect
|
||||
|
||||
// Build the dice formula
|
||||
let diceFormula = "2d6"
|
||||
|
||||
@@ -49,7 +49,19 @@ export default class FTLNomadRobot extends foundry.abstract.TypeDataModel {
|
||||
|
||||
prepareDerivedData() {
|
||||
super.prepareDerivedData();
|
||||
|
||||
let encMax = this.durability + (2 * this.skills.physical.value)
|
||||
if (encMax !== this.enc.max) {
|
||||
this.enc.max = encMax
|
||||
}
|
||||
let enc = 0
|
||||
for (let i of this.parent.items) {
|
||||
if (i.system?.enc) {
|
||||
enc += i.system.enc
|
||||
}
|
||||
}
|
||||
if (enc !== this.enc.value) {
|
||||
this.enc.value = enc
|
||||
}
|
||||
}
|
||||
|
||||
isEncumbered() {
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000095
|
||||
MANIFEST-000107
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2025/10/16-19:48:48.571698 7f18a4ffa6c0 Recovering log #93
|
||||
2025/10/16-19:48:48.582163 7f18a4ffa6c0 Delete type=3 #91
|
||||
2025/10/16-19:48:48.582233 7f18a4ffa6c0 Delete type=0 #93
|
||||
2025/10/16-19:50:49.674486 7f189e7fc6c0 Level-0 table #98: started
|
||||
2025/10/16-19:50:49.674520 7f189e7fc6c0 Level-0 table #98: 0 bytes OK
|
||||
2025/10/16-19:50:49.681475 7f189e7fc6c0 Delete type=0 #96
|
||||
2025/10/16-19:50:49.691929 7f189e7fc6c0 Manual compaction at level-0 from '!folders!AuBtSOj1mJmh88qx' @ 72057594037927935 : 1 .. '!items!zv9dwgL3p7ThQn7j' @ 0 : 0; will stop at (end)
|
||||
2025/10/27-20:06:28.536125 7f2a23fff6c0 Recovering log #105
|
||||
2025/10/27-20:06:28.547660 7f2a23fff6c0 Delete type=3 #103
|
||||
2025/10/27-20:06:28.547796 7f2a23fff6c0 Delete type=0 #105
|
||||
2025/10/27-20:07:11.806730 7f2a213ff6c0 Level-0 table #110: started
|
||||
2025/10/27-20:07:11.806798 7f2a213ff6c0 Level-0 table #110: 0 bytes OK
|
||||
2025/10/27-20:07:11.813240 7f2a213ff6c0 Delete type=0 #108
|
||||
2025/10/27-20:07:11.813543 7f2a213ff6c0 Manual compaction at level-0 from '!folders!AuBtSOj1mJmh88qx' @ 72057594037927935 : 1 .. '!items!zv9dwgL3p7ThQn7j' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2025/10/15-21:50:26.265715 7f189ffff6c0 Recovering log #88
|
||||
2025/10/15-21:50:26.325136 7f189ffff6c0 Delete type=3 #86
|
||||
2025/10/15-21:50:26.325207 7f189ffff6c0 Delete type=0 #88
|
||||
2025/10/15-22:19:29.836460 7f189e7fc6c0 Level-0 table #94: started
|
||||
2025/10/15-22:19:29.836492 7f189e7fc6c0 Level-0 table #94: 0 bytes OK
|
||||
2025/10/15-22:19:29.881737 7f189e7fc6c0 Delete type=0 #92
|
||||
2025/10/15-22:19:29.944478 7f189e7fc6c0 Manual compaction at level-0 from '!folders!AuBtSOj1mJmh88qx' @ 72057594037927935 : 1 .. '!items!zv9dwgL3p7ThQn7j' @ 0 : 0; will stop at (end)
|
||||
2025/10/27-20:03:18.716726 7f2a22ffd6c0 Recovering log #101
|
||||
2025/10/27-20:03:18.728612 7f2a22ffd6c0 Delete type=3 #99
|
||||
2025/10/27-20:03:18.728755 7f2a22ffd6c0 Delete type=0 #101
|
||||
2025/10/27-20:06:09.635606 7f2a213ff6c0 Level-0 table #106: started
|
||||
2025/10/27-20:06:09.635675 7f2a213ff6c0 Level-0 table #106: 0 bytes OK
|
||||
2025/10/27-20:06:09.644064 7f2a213ff6c0 Delete type=0 #104
|
||||
2025/10/27-20:06:09.658912 7f2a213ff6c0 Manual compaction at level-0 from '!folders!AuBtSOj1mJmh88qx' @ 72057594037927935 : 1 .. '!items!zv9dwgL3p7ThQn7j' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000073
|
||||
MANIFEST-000085
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2025/10/16-19:48:48.588685 7f189f7fe6c0 Recovering log #71
|
||||
2025/10/16-19:48:48.599841 7f189f7fe6c0 Delete type=3 #69
|
||||
2025/10/16-19:48:48.599924 7f189f7fe6c0 Delete type=0 #71
|
||||
2025/10/16-19:50:49.586198 7f189e7fc6c0 Level-0 table #76: started
|
||||
2025/10/16-19:50:49.586239 7f189e7fc6c0 Level-0 table #76: 0 bytes OK
|
||||
2025/10/16-19:50:49.598518 7f189e7fc6c0 Delete type=0 #74
|
||||
2025/10/16-19:50:49.610365 7f189e7fc6c0 Manual compaction at level-0 from '!actors!0FQ6XaRi24OorI21' @ 72057594037927935 : 1 .. '!folders!vRnrOJqSMlxbSgyX' @ 0 : 0; will stop at (end)
|
||||
2025/10/27-20:06:28.555946 7f2a227fc6c0 Recovering log #83
|
||||
2025/10/27-20:06:28.567241 7f2a227fc6c0 Delete type=3 #81
|
||||
2025/10/27-20:06:28.567394 7f2a227fc6c0 Delete type=0 #83
|
||||
2025/10/27-20:07:11.791873 7f2a213ff6c0 Level-0 table #88: started
|
||||
2025/10/27-20:07:11.791940 7f2a213ff6c0 Level-0 table #88: 0 bytes OK
|
||||
2025/10/27-20:07:11.799353 7f2a213ff6c0 Delete type=0 #86
|
||||
2025/10/27-20:07:11.813499 7f2a213ff6c0 Manual compaction at level-0 from '!actors!0FQ6XaRi24OorI21' @ 72057594037927935 : 1 .. '!folders!vRnrOJqSMlxbSgyX' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
2025/10/15-21:50:26.444225 7f18a4ffa6c0 Recovering log #66
|
||||
2025/10/15-21:50:26.495317 7f18a4ffa6c0 Delete type=3 #64
|
||||
2025/10/15-21:50:26.495386 7f18a4ffa6c0 Delete type=0 #66
|
||||
2025/10/15-22:19:30.067316 7f189e7fc6c0 Level-0 table #72: started
|
||||
2025/10/15-22:19:30.067349 7f189e7fc6c0 Level-0 table #72: 0 bytes OK
|
||||
2025/10/15-22:19:30.103968 7f189e7fc6c0 Delete type=0 #70
|
||||
2025/10/15-22:19:30.104104 7f189e7fc6c0 Manual compaction at level-0 from '!actors!0FQ6XaRi24OorI21' @ 72057594037927935 : 1 .. '!folders!vRnrOJqSMlxbSgyX' @ 0 : 0; will stop at (end)
|
||||
2025/10/27-20:03:18.738218 7f2a23fff6c0 Recovering log #79
|
||||
2025/10/27-20:03:18.749460 7f2a23fff6c0 Delete type=3 #77
|
||||
2025/10/27-20:03:18.749597 7f2a23fff6c0 Delete type=0 #79
|
||||
2025/10/27-20:06:09.651196 7f2a213ff6c0 Level-0 table #84: started
|
||||
2025/10/27-20:06:09.651261 7f2a213ff6c0 Level-0 table #84: 0 bytes OK
|
||||
2025/10/27-20:06:09.658656 7f2a213ff6c0 Delete type=0 #82
|
||||
2025/10/27-20:06:09.658955 7f2a213ff6c0 Manual compaction at level-0 from '!actors!0FQ6XaRi24OorI21' @ 72057594037927935 : 1 .. '!folders!vRnrOJqSMlxbSgyX' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -75,6 +75,10 @@
|
||||
.main-stats {
|
||||
min-width: 25rem;
|
||||
max-width: 25rem;
|
||||
.encumbered {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.cargo,
|
||||
.capacity {
|
||||
|
||||
@@ -79,6 +79,31 @@
|
||||
disabled=isPlayMode
|
||||
}}
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
{{#if isEncumbered}}
|
||||
{{formField
|
||||
systemFields.enc.fields.value
|
||||
value=system.enc.value
|
||||
rootId=partId
|
||||
disabled=true
|
||||
classes="encumbered"
|
||||
}}
|
||||
{{else}}
|
||||
{{formField
|
||||
systemFields.enc.fields.value
|
||||
value=system.enc.value
|
||||
rootId=partId
|
||||
disabled=true
|
||||
}}
|
||||
{{/if}}
|
||||
|
||||
{{formField
|
||||
systemFields.enc.fields.max
|
||||
value=system.enc.max
|
||||
rootId=partId
|
||||
disabled=isPlayMode
|
||||
}}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="robot-brain">
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
<select name="modifier" class="roll-skill-modifier">
|
||||
{{selectOptions choiceModifier selected=modifier localize=true}}
|
||||
</select>
|
||||
<label>{{localize "FTLNOMAD.Label.numericModifier"}}</label>
|
||||
<select name="numericModifierSelect" class="roll-numeric-modifier">
|
||||
{{selectOptions choiceNumericModifier selected=numericModifierSelect}}
|
||||
</select>
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq rollType "weapon")}}
|
||||
|
||||
Reference in New Issue
Block a user