FIX: Manifest, plus added slow
parent
a684e456c5
commit
987f2e228e
Binary file not shown.
|
|
@ -11,6 +11,7 @@ export class OseActor extends Actor {
|
||||||
|
|
||||||
// Compute modifiers from actor scores
|
// Compute modifiers from actor scores
|
||||||
this.computeModifiers();
|
this.computeModifiers();
|
||||||
|
this._isSlow();
|
||||||
|
|
||||||
// Determine Initiative
|
// Determine Initiative
|
||||||
if (game.settings.get("ose", "individualInit")) {
|
if (game.settings.get("ose", "individualInit")) {
|
||||||
|
|
@ -362,6 +363,19 @@ export class OseActor extends Actor {
|
||||||
return mod;
|
return mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_isSlow() {
|
||||||
|
this.data.data.isSlow = false;
|
||||||
|
if (this.data.type != 'character') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.data.items.forEach(item => {
|
||||||
|
if (item.type == 'weapon' && item.data.slow && item.data.equipped) {
|
||||||
|
this.data.data.isSlow = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
computeModifiers() {
|
computeModifiers() {
|
||||||
if (this.data.type != "character") {
|
if (this.data.type != "character") {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,14 @@ export class OseCombat {
|
||||||
|
|
||||||
// Set init
|
// Set init
|
||||||
for (let i = 0; i < data.combatants.length; ++i) {
|
for (let i = 0; i < data.combatants.length; ++i) {
|
||||||
|
console.log(data.combatants[i]);
|
||||||
|
if (data.combatants[i].actor.data.data.isSlow) {
|
||||||
|
data.combatants[i].initiative = -1;
|
||||||
|
} else {
|
||||||
data.combatants[i].initiative = groups[data.combatants[i].flags.ose.group].initiative;
|
data.combatants[i].initiative = groups[data.combatants[i].flags.ose.group].initiative;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static format(object, html, user) {
|
static format(object, html, user) {
|
||||||
html.find('.combat-control[data-control="rollNPC"]').remove();
|
html.find('.combat-control[data-control="rollNPC"]').remove();
|
||||||
|
|
|
||||||
|
|
@ -34,5 +34,5 @@
|
||||||
"gridUnits": "ft",
|
"gridUnits": "ft",
|
||||||
"url": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose",
|
"url": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose",
|
||||||
"manifest": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/raw/master/src/system.json",
|
"manifest": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/raw/master/src/system.json",
|
||||||
"download": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/-/raw/master/package/ose-v0.5.zip"
|
"download": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/-/raw/master/package/ose-v0.6.zip"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue