Move stress and resolve out of Other

This commit is contained in:
Chris Schmalz
2023-09-17 14:26:06 -07:00
parent 77ff17a8fd
commit 3cd71cdbba
5 changed files with 38 additions and 32 deletions
+1 -1
View File
@@ -356,7 +356,7 @@ export class MothershipActorSheet extends ActorSheet {
// Rollable Item/Anything with a description that we want to click on.
html.find('.calm-roll').click(ev => {
const attribute = this.actor.system.other.stress;
const attribute = this.actor.system.stress;
attribute.label = "Calm";
this.actor.rollStress(attribute);
});
+10 -7
View File
@@ -833,13 +833,8 @@ export class MothershipActor extends Actor {
//exit function
return;
}
//////////////////////////need to update choose XYZ functions to respect rollString if its passed
//////////////////////////find a way to make the above 3 functions just return the needed information
/////////////////////////////// need to get the relevant stats and prepare for rolling SET ROLLTARGET
//retrieve the attribute (and its mod if available)
let rollTarget = this.actor.system.stats[attribute].value + this.actor.system.stats[attribute].mod;
//roll the dice
//parse the roll string
let parsedRollString = this.parseRollString(rollString,aimFor);
@@ -853,6 +848,14 @@ export class MothershipActor extends Actor {
//I LEFT OFF HERE :)///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////need to update choose XYZ functions to respect rollString if its passed
//////////////////////////find a way to make the above 3 functions just return the needed information
/////////////////////////////// need to get the relevant stats and prepare for rolling SET ROLLTARGET
//push chat message
//make message
let macroMsg = await rollResult.toMessage({
+1 -1
View File
@@ -70,7 +70,7 @@
"gridDistance": 1,
"gridUnits": "meter",
"primaryTokenAttribute": "health",
"secondaryTokenAttribute": "other.stress",
"secondaryTokenAttribute": "stress",
"url": "https://github.com/Futil/foundry-mothership",
"manifest": "https://raw.githubusercontent.com/Futil/foundry-mothership/dev/system.json",
"download": "https://github.com/Futil/foundry-mothership/archive/dev.zip",
+16 -13
View File
@@ -10,11 +10,13 @@
"health": {
"value": 10,
"min": 0,
"max": 10
"max": 10,
"label" : "Health"
},
"hits": {
"value" : 0,
"max" : 2
"max" : 2,
"label" : "Wounds"
}
}
},
@@ -22,6 +24,18 @@
"templates": [
"base"
],
"stress": {
"value": 2,
"min": 2,
"max": 20,
"label" : "Stress"
},
"resolve": {
"value": 0,
"min": 0,
"max": 85,
"label" : "Resolve"
},
"biography": "",
"notes": "",
"weight" : {
@@ -98,17 +112,6 @@
"damageReduction": 0,
"label": "Armor"
}
},
"other": {
"stress": {
"value": 2,
"min": 2,
"max": 20,
"label" : "Stress"
},
"resolve": {
"value": 0
}
}
},
"creature": {
+10 -10
View File
@@ -112,14 +112,14 @@
{{#if system.settings.useCalm}}
<!-- Calm -->
<div class="resource healthspread minmaxtopstat">
<label for="system.other.stress.value" class="resource-label minmaxtext rollable calm-roll">Calm</label>
<label for="system.stress.value" class="resource-label minmaxtext rollable calm-roll">Calm</label>
<div class="minmaxwrapper">
<input class="maxhealth-input darkGreyText" type="text" name="system.other.stress.value" value="{{system.other.stress.value}}"
<input class="maxhealth-input darkGreyText" type="text" name="system.stress.value" value="{{system.stress.value}}"
data-dtype="Number" />
<div class="slant" style="transform: skewX(0deg);"></div>
<input class="maxhealth-input darkGreyText" type="text" name="system.other.stress.min"
value="{{system.other.stress.min}}" data-dtype="Number" />
<input class="maxhealth-input darkGreyText" type="text" name="system.stress.min"
value="{{system.stress.min}}" data-dtype="Number" />
</div>
<div class="healthmaxtext">Current</div>
@@ -128,13 +128,13 @@
{{else}}
<!-- Stress -->
<div class="resource healthspread minmaxtopstat">
<label for="system.other.stress.value" class="resource-label minmaxtext rollable stress-roll">Stress</label>
<label for="system.stress.value" class="resource-label minmaxtext rollable stress-roll">Stress</label>
<div class="minmaxwrapper">
<input class="maxhealth-input darkGreyText" type="text" name="system.other.stress.value" value="{{system.other.stress.value}}"
<input class="maxhealth-input darkGreyText" type="text" name="system.stress.value" value="{{system.stress.value}}"
data-dtype="Number" />
<div class="slant"></div>
<input class="maxhealth-input darkGreyText" type="text" name="system.other.stress.min"
value="{{system.other.stress.min}}" data-dtype="Number" />
<input class="maxhealth-input darkGreyText" type="text" name="system.stress.min"
value="{{system.stress.min}}" data-dtype="Number" />
</div>
<div class="healthmaxtext">Current</div>
<div class="healthmaxtext">Minimum</div>
@@ -145,10 +145,10 @@
{{else}}
<!-- Resolve -->
<div class="resource healthspread minmaxtopstat">
<label for="system.other.stress.value" class="resource-label minmaxtext">Resolve</label>
<label for="system.stress.value" class="resource-label minmaxtext">Resolve</label>
<div class="valuewrapper">
<input class="maxhealth-input darkGreyText" type="text" name="system.other.resolve.value" value="{{system.other.resolve.value}}"
<input class="maxhealth-input darkGreyText" type="text" name="system.resolve.value" value="{{system.resolve.value}}"
data-dtype="Number" />
</div>
</div>