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:
@@ -1,11 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 1.3.0 - Foundry 0.8.x compatibility
|
||||
- Updated the System to the new version of Foundry VTT (a lot of things broke)
|
||||
- Updated the System to the new version of Foundry VTT (a lot of things broke).
|
||||
- RnK button is now black in chat if no actions left in roll.
|
||||
|
||||
## 1.2.2 - Before the Change
|
||||
- Added some custom technique's types by request: Link & Specificity
|
||||
- NPC can now have strengths/weaknesses with all rings.
|
||||
- Added an optional "Specificity" technique type to serve as a catch-all (by request).
|
||||
- Fix rnkMessage not passing on actor object for NPCs (thanks to Bragma).
|
||||
- Added Mantis Clan compendium entries
|
||||
- Fixed the "Crescent Moon Style" technique rank from 4 to 2
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
},
|
||||
"CustomTechniques": {
|
||||
"Title": "Use custom techniques",
|
||||
"Hint": "Add 'Link' and 'Specificity' techniques types."
|
||||
"Hint": "Add 'Specificity' technique type to serve as a catch-all."
|
||||
}
|
||||
},
|
||||
"ACTOR": {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
},
|
||||
"CustomTechniques": {
|
||||
"Title": "Use custom techniques",
|
||||
"Hint": "Add 'Link' and 'Specificity' techniques types."
|
||||
"Hint": "Add 'Specificity' technique type to serve as a catch-all."
|
||||
}
|
||||
},
|
||||
"ACTOR": {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
},
|
||||
"CustomTechniques": {
|
||||
"Title": "Utiliser les techniques personnalisées",
|
||||
"Hint": "Ajoute les types de technique 'Lien' et 'Particularités'."
|
||||
"Hint": "Ajoute un type de technique 'Particularités' pour servir de fourre-tout."
|
||||
}
|
||||
},
|
||||
"ACTOR": {
|
||||
@@ -175,7 +175,6 @@
|
||||
"ninjutsu": "Ninjutsu",
|
||||
"school_ability": "Capacité d'école",
|
||||
"mastery_ability": "Capacité de maîtrise",
|
||||
"link": "Liens",
|
||||
"specificity": "Particularités"
|
||||
},
|
||||
"peculiarities": {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,8 +103,7 @@
|
||||
"shuji": false,
|
||||
"maho": false,
|
||||
"ninjutsu": false,
|
||||
"link": false,
|
||||
"specificity": false
|
||||
"specificity": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -124,14 +123,11 @@
|
||||
"social": 0
|
||||
},
|
||||
"rings_affinities": {
|
||||
"strength": {
|
||||
"ring": "fire",
|
||||
"value": 2
|
||||
},
|
||||
"weakness": {
|
||||
"ring": "water",
|
||||
"value": -2
|
||||
}
|
||||
"earth": 0,
|
||||
"air": 0,
|
||||
"water": 0,
|
||||
"fire": 0,
|
||||
"void": 0
|
||||
},
|
||||
"skills": {
|
||||
"artisan": 0,
|
||||
|
||||
@@ -18,24 +18,11 @@
|
||||
</label>
|
||||
</li>
|
||||
<li class="affinities">
|
||||
{{!-- Strength --}}
|
||||
<select class="attribute-dtype" name="data.rings_affinities.strength.ring">
|
||||
{{#select data.data.rings_affinities.strength.ring}}
|
||||
{{#each data.stances as |stance|}}
|
||||
<option value="{{stance}}">{{localizeRing stance}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<input class="centered-input select-on-focus" type="number" name="data.rings_affinities.strength.value" value="{{data.data.rings_affinities.strength.value}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||
{{!-- Weakness --}}
|
||||
<select class="attribute-dtype" name="data.rings_affinities.weakness.ring">
|
||||
{{#select data.data.rings_affinities.weakness.ring}}
|
||||
{{#each data.stances as |stance|}}
|
||||
<option value="{{stance}}">{{localizeRing stance}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<input class="centered-input select-on-focus" type="number" name="data.rings_affinities.weakness.value" value="{{data.data.rings_affinities.weakness.value}}" data-dtype="Number" min="-9" max="-1" placeholder="0"/>
|
||||
{{!-- Strength & Weakness --}}
|
||||
{{#each data.stances as |stance|}}
|
||||
<i class="i_{{stance}}" title="{{localizeRing stance}}"></i>
|
||||
<input class="centered-input select-on-focus" type="number" name="data.rings_affinities.{{stance}}" value="{{lookup ../data.data.rings_affinities stance}}" data-dtype="Number" min="-9" max="9" placeholder="0"/>
|
||||
{{/each}}
|
||||
{{!-- Attitude --}}
|
||||
<label class="attitude">
|
||||
<input type="text" name="data.attitude" value="{{data.data.attitude}}" data-dtype="String" placeholder=""/>
|
||||
|
||||
Reference in New Issue
Block a user