Added properties antagonists (ex : Sacred remove Unholy on drop).
This commit is contained in:
@@ -8,6 +8,21 @@ L5R5E.paths = {
|
||||
L5R5E.money = [50, 10];
|
||||
L5R5E.stances = ["earth", "air", "water", "fire", "void"];
|
||||
|
||||
L5R5E.xp = {
|
||||
costPerRank: [0, 20, 24, 32, 44, 60],
|
||||
bondCostPerRank: [0, 3, 4, 6, 8, 10],
|
||||
ringCostMultiplier: 3,
|
||||
skillCostMultiplier: 2,
|
||||
techniqueCost: 3,
|
||||
};
|
||||
|
||||
L5R5E.initiativeSkills = {
|
||||
intrigue: "sentiment",
|
||||
duel: "meditation",
|
||||
skirmish: "tactics",
|
||||
mass_battle: "command",
|
||||
};
|
||||
|
||||
// *** Techniques ***
|
||||
L5R5E.techniques = new Map();
|
||||
// Core
|
||||
@@ -27,21 +42,6 @@ L5R5E.techniques.set("title_ability", { type: "title", displayInTypes: false });
|
||||
// Custom
|
||||
L5R5E.techniques.set("specificity", { type: "custom", displayInTypes: false });
|
||||
|
||||
L5R5E.xp = {
|
||||
costPerRank: [0, 20, 24, 32, 44, 60],
|
||||
bondCostPerRank: [0, 3, 4, 6, 8, 10],
|
||||
ringCostMultiplier: 3,
|
||||
skillCostMultiplier: 2,
|
||||
techniqueCost: 3,
|
||||
};
|
||||
|
||||
L5R5E.initiativeSkills = {
|
||||
intrigue: "sentiment",
|
||||
duel: "meditation",
|
||||
skirmish: "tactics",
|
||||
mass_battle: "command",
|
||||
};
|
||||
|
||||
// Map SkillId - CategoryId
|
||||
L5R5E.skills = new Map();
|
||||
L5R5E.skills.set("aesthetics", "artisan");
|
||||
|
||||
@@ -140,7 +140,10 @@ export class HelpersL5r5e {
|
||||
document.data.update({ "flags.core.sourceId": document.uuid });
|
||||
}
|
||||
|
||||
await HelpersL5r5e.refreshItemProperties(document);
|
||||
// Care to infinite loop in properties
|
||||
if (document.type !== "property") {
|
||||
await HelpersL5r5e.refreshItemProperties(document);
|
||||
}
|
||||
document.prepareData();
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
@@ -136,7 +136,12 @@ export class ItemSheetL5r5e extends ItemSheet {
|
||||
|
||||
// Check item type and subtype
|
||||
let item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||
if (!item || item.documentName !== "Item" || this.item.type === "property") {
|
||||
if (!item || item.documentName !== "Item") {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we are a property, the child id need to be different to parent
|
||||
if (this.item.type === "property" && this.item.id === item.data._id) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -173,6 +178,14 @@ export class ItemSheetL5r5e extends ItemSheet {
|
||||
|
||||
this.document.data.data.properties.push({ id: item.id, name: item.name });
|
||||
|
||||
// This props remove others ?
|
||||
if (Array.isArray(item.data.data.properties) && item.data.data.properties.length > 0) {
|
||||
const idsToRemove = item.data.data.properties.map((e) => e.id);
|
||||
this.document.data.data.properties = this.document.data.data.properties.filter(
|
||||
(p) => !idsToRemove.includes(p.id)
|
||||
);
|
||||
}
|
||||
|
||||
this.document.update({
|
||||
data: {
|
||||
properties: this.document.data.data.properties,
|
||||
|
||||
@@ -14,11 +14,4 @@ export class PropertySheetL5r5e extends ItemSheetL5r5e {
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||
});
|
||||
}
|
||||
// TODO Some properties cancel others :
|
||||
// Concealable and Cumbersome
|
||||
// Ceremonial and Mundane
|
||||
// Damaged and Durable
|
||||
// Resplendent and Subtle
|
||||
// Subtle and Wargear
|
||||
// Sacred and Unholy
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user