Working on 0.8.x
- NPC with all ring on strengths/weaknesses (CSS TODO). - Removed Custom tech "Links" as they are in fact "Bonds" and need more work.
This commit is contained in:
@@ -349,7 +349,13 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
case "technique": {
|
||||
// If technique, select the current type
|
||||
const techType = $(event.currentTarget).data("tech-type");
|
||||
if ([...CONFIG.l5r5e.techniques, ...CONFIG.l5r5e.techniques_school].includes(techType)) {
|
||||
if (
|
||||
[
|
||||
...CONFIG.l5r5e.techniques,
|
||||
...CONFIG.l5r5e.techniques_school,
|
||||
...CONFIG.l5r5e.techniques_custom,
|
||||
].includes(techType)
|
||||
) {
|
||||
item.data.data.technique_type = techType;
|
||||
item.data.img = `${CONFIG.l5r5e.paths.assets}icons/techs/${techType}.svg`;
|
||||
}
|
||||
|
||||
@@ -82,8 +82,7 @@ export class TwentyQuestions {
|
||||
shuji: false,
|
||||
maho: false,
|
||||
ninjutsu: false,
|
||||
link: false,
|
||||
specificity: false,
|
||||
specificity: true,
|
||||
},
|
||||
techniques: [],
|
||||
school_ability: [],
|
||||
|
||||
@@ -8,7 +8,7 @@ L5R5E.paths = {
|
||||
L5R5E.money = [50, 10];
|
||||
L5R5E.stances = ["earth", "air", "water", "fire", "void"];
|
||||
L5R5E.techniques = ["kata", "kiho", "inversion", "invocation", "ritual", "shuji", "maho", "ninjutsu"];
|
||||
L5R5E.techniques_custom = ["link", "specificity"];
|
||||
L5R5E.techniques_custom = ["specificity"];
|
||||
L5R5E.techniques_school = ["school_ability", "mastery_ability"];
|
||||
|
||||
L5R5E.xp = {
|
||||
|
||||
@@ -45,10 +45,7 @@ export class HelpersL5r5e {
|
||||
* Get Techniques for List / Select
|
||||
*/
|
||||
static getTechniquesList() {
|
||||
return [
|
||||
...CONFIG.l5r5e.techniques,
|
||||
...(game.settings.get("l5r5e", "techniques-customs") ? CONFIG.l5r5e.techniques_custom : []),
|
||||
].map((e) => ({
|
||||
return CONFIG.l5r5e.techniques.map((e) => ({
|
||||
id: e,
|
||||
label: game.i18n.localize(`l5r5e.techniques.${e}`),
|
||||
}));
|
||||
|
||||
@@ -19,8 +19,11 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
||||
async getData() {
|
||||
const sheetData = await super.getData();
|
||||
|
||||
// Add "school ability" and "mastery ability"
|
||||
CONFIG.l5r5e.techniques_school.forEach((e) => {
|
||||
// Add "school ability", "mastery ability" and customs if active
|
||||
[
|
||||
...CONFIG.l5r5e.techniques_school,
|
||||
...(game.settings.get("l5r5e", "techniques-customs") ? CONFIG.l5r5e.techniques_custom : []),
|
||||
].forEach((e) => {
|
||||
sheetData.data.techniquesList.push({
|
||||
id: e,
|
||||
label: game.i18n.localize(`l5r5e.techniques.${e}`),
|
||||
|
||||
@@ -183,6 +183,8 @@ export class MigrationL5r5e {
|
||||
const updateData = {};
|
||||
const actorData = actor.data;
|
||||
|
||||
console.log(actorData); // TODO TMP data.data ? à vérifier
|
||||
|
||||
// ***** Start of 1.1.0 *****
|
||||
// Add "Prepared" in actor
|
||||
if (actorData.prepared === undefined) {
|
||||
@@ -202,6 +204,16 @@ export class MigrationL5r5e {
|
||||
}
|
||||
// ***** End of 1.1.0 *****
|
||||
|
||||
// ***** Start of 1.3.0 *****
|
||||
// NPC have now more thant a Strength and a Weakness
|
||||
if (actor.type === "npc" && actorData.rings_affinities) {
|
||||
updateData["data.rings_affinities." + actorData.rings_affinities.strength.ring] =
|
||||
actorData.rings_affinities.strength.value;
|
||||
updateData["data.rings_affinities." + actorData.rings_affinities.weakness.ring] =
|
||||
actorData.rings_affinities.weakness.value;
|
||||
}
|
||||
// ***** End of 1.3.0 *****
|
||||
|
||||
return updateData;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user