forked from GitHub-Mirrors/foundry-sw5e
SotG Update #1
+ Adds compendia for Deployments, Deployment Features, Starship Armor, Starship Equipment, Starship Weapons, and Ventures and associated artwork + Adds Starship actor sheet (very, very rough draft, somewhat unpredictable, not fully functional) + Adds function to Character sheet to collapse/expand Feature tab rows (major assist from Cyr) + Adds function to Character sheet to increment/decrement class levels directly from character sheet (another major assist from Cyr)
This commit is contained in:
parent
3297d9bd8c
commit
c793949b37
57 changed files with 1682 additions and 70 deletions
|
@ -25,6 +25,8 @@ export default class Actor5e extends Actor {
|
|||
return this._prepareCharacterData(this.data);
|
||||
case "npc":
|
||||
return this._prepareNPCData(this.data);
|
||||
case "starship":
|
||||
return this._prepareStarshipData(this.data);
|
||||
case "vehicle":
|
||||
return this._prepareVehicleData(this.data);
|
||||
}
|
||||
|
@ -304,6 +306,23 @@ export default class Actor5e extends Actor {
|
|||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Prepare starship type-specific data
|
||||
* @param actorData
|
||||
* @private
|
||||
*/
|
||||
_prepareStarshipData(actorData) {
|
||||
const data = actorData.data;
|
||||
|
||||
// Proficiency
|
||||
data.attributes.prof = Math.floor((Math.max(data.details.cr, 1) + 7) / 4);
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Prepare skill checks.
|
||||
* @param actorData
|
||||
|
@ -1256,14 +1275,14 @@ export default class Actor5e extends Actor {
|
|||
const dfp = data.attributes.force.points.max - data.attributes.force.points.value;
|
||||
const updateData = {
|
||||
"data.attributes.hp.value": data.attributes.hp.max,
|
||||
"data.attributes.hp.temp": null,
|
||||
"data.attributes.hp.tempmax": null,
|
||||
"data.attributes.hp.temp": 0,
|
||||
"data.attributes.hp.tempmax": 0,
|
||||
"data.attributes.tech.points.value": data.attributes.tech.points.max,
|
||||
"data.attributes.tech.points.temp": null,
|
||||
"data.attributes.tech.points.tempmax": null,
|
||||
"data.attributes.tech.points.temp": 0,
|
||||
"data.attributes.tech.points.tempmax": 0,
|
||||
"data.attributes.force.points.value": data.attributes.force.points.max,
|
||||
"data.attributes.force.points.temp": null,
|
||||
"data.attributes.force.points.tempmax": null
|
||||
"data.attributes.force.points.temp": 0,
|
||||
"data.attributes.force.points.tempmax": 0
|
||||
};
|
||||
|
||||
// Recover character resources
|
||||
|
@ -1597,4 +1616,4 @@ export default class Actor5e extends Actor {
|
|||
if ( item.data.type !== "power" ) throw new Error("Wrong Item type");
|
||||
return item.roll();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue