v0.1.8
This commit is contained in:
@@ -21,6 +21,7 @@ export class VermineActor extends Actor {
|
|||||||
// documents or derived data.
|
// documents or derived data.
|
||||||
|
|
||||||
if (this.type == 'character'){
|
if (this.type == 'character'){
|
||||||
|
this._setAgeType();
|
||||||
this._setCharacterEffort();
|
this._setCharacterEffort();
|
||||||
this._setCharacterSelfControl();
|
this._setCharacterSelfControl();
|
||||||
this._setCharacterThresholds();
|
this._setCharacterThresholds();
|
||||||
@@ -119,7 +120,7 @@ export class VermineActor extends Actor {
|
|||||||
_setCharacterSelfControl() {
|
_setCharacterSelfControl() {
|
||||||
let self_control = 0;
|
let self_control = 0;
|
||||||
|
|
||||||
for(let i in actor.system.abilities){
|
for(let i in this.system.abilities){
|
||||||
if (this.system.abilities[i].category == 'mental' || this.system.abilities[i].category == 'social'){
|
if (this.system.abilities[i].category == 'mental' || this.system.abilities[i].category == 'social'){
|
||||||
self_control += this.system.abilities[i].value;
|
self_control += this.system.abilities[i].value;
|
||||||
}
|
}
|
||||||
@@ -176,4 +177,12 @@ export class VermineActor extends Actor {
|
|||||||
this.system.deadlyWound.max = deadlyWounds;
|
this.system.deadlyWound.max = deadlyWounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_setAgeType(){
|
||||||
|
Object.keys(CONFIG.VERMINE.AgeTypes).forEach((type) => {
|
||||||
|
if(this.system.identity.age >= parseInt(CONFIG.VERMINE.AgeTypes[type].beginning,10)){
|
||||||
|
this.system.identity.ageType = type;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -149,21 +149,6 @@ export class VermineCharacterSheet extends VermineActorSheet {
|
|||||||
// Rollable abilities.
|
// Rollable abilities.
|
||||||
html.find('.rollable').click(this._onRoll.bind(this));
|
html.find('.rollable').click(this._onRoll.bind(this));
|
||||||
|
|
||||||
// Rollable abilities.
|
|
||||||
html.find('input[name="system.identity.age"]').change(ev => {
|
|
||||||
const age = parseInt(ev.target.value,10);
|
|
||||||
let ageType = "2";
|
|
||||||
|
|
||||||
Object.keys(CONFIG.VERMINE.AgeTypes).forEach((type) => {
|
|
||||||
if(age >= parseInt(CONFIG.VERMINE.AgeTypes[type].beginning,10)){
|
|
||||||
ageType = type;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.actor.update({ 'system.identity.ageType': ageType });
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// Choose Totem
|
// Choose Totem
|
||||||
html.find('.chooseTotem').click(this._onTotemButton.bind(this));
|
html.find('.chooseTotem').click(this._onTotemButton.bind(this));
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"id": "vermine2047",
|
"id": "vermine2047",
|
||||||
"title": "Vermine 2047",
|
"title": "Vermine 2047",
|
||||||
"description": "The Vermine 2047 system for FoundryVTT!",
|
"description": "The Vermine 2047 system for FoundryVTT!",
|
||||||
"version": "0.1.7",
|
"version": "0.1.8",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10.287",
|
"verified": "10.287",
|
||||||
|
|||||||
Reference in New Issue
Block a user