Fix for rounded vigilance (now ceil instead of floor)
Fix for symbol replaced once Added 20Q 2nd die skill or tech/item...
This commit is contained in:
@@ -253,8 +253,8 @@
|
||||
"composuretip": "(Earth + Water) x2",
|
||||
"focus": "Focus",
|
||||
"focustip": "Air + Fire",
|
||||
"vigilante": "Vigilante",
|
||||
"vigilantetip": "(Air + Water) /2",
|
||||
"vigilance": "Vigilante",
|
||||
"vigilancetip": "(Air + Water) /2",
|
||||
"voidpoints": "Void Points",
|
||||
"fatigue": "Fatigue",
|
||||
"strife": "Strife"
|
||||
@@ -371,6 +371,7 @@
|
||||
"q18": "18. Who was your character named to honor ? (p. 95)",
|
||||
"d10r1": "D10 Result (1/2)",
|
||||
"d10r2": "D10 Result (2/2)",
|
||||
"d10r2_choice": "2nd D10 Effect:",
|
||||
"q19": "19. What is your character’s personal name ? (p. 95)"
|
||||
},
|
||||
"part7": {
|
||||
|
||||
@@ -253,8 +253,8 @@
|
||||
"composuretip": "(Tierra + Agua) x2",
|
||||
"focus": "Concentración",
|
||||
"focustip": "Aire + Fuego",
|
||||
"vigilante": "Alerta",
|
||||
"vigilantetip": "(Aire + Agua) /2",
|
||||
"vigilance": "Alerta",
|
||||
"vigilancetip": "(Aire + Agua) /2",
|
||||
"voidpoints": "P. Vacío",
|
||||
"fatigue": "Fatiga",
|
||||
"strife": "Conflicto"
|
||||
@@ -371,6 +371,7 @@
|
||||
"q18": "18. Who was your character named to honor ? (p. 95)",
|
||||
"d10r1": "D10 Result (1/2)",
|
||||
"d10r2": "D10 Result (2/2)",
|
||||
"d10r2_choice": "2nd D10 Effect:",
|
||||
"q19": "19. What is your character’s personal name ? (p. 95)"
|
||||
},
|
||||
"part7": {
|
||||
|
||||
@@ -253,8 +253,8 @@
|
||||
"composuretip": "(Terre + Eau) x2",
|
||||
"focus": "Attention",
|
||||
"focustip": "Air + Feu",
|
||||
"vigilante": "Vigilance",
|
||||
"vigilantetip": "(Air + Eau) /2",
|
||||
"vigilance": "Vigilance",
|
||||
"vigilancetip": "(Air + Eau) /2",
|
||||
"voidpoints": "Points de Vide",
|
||||
"fatigue": "Fatigue",
|
||||
"strife": "Conflit"
|
||||
@@ -371,6 +371,7 @@
|
||||
"q18": "18. En l’honneur de qui votre personnage a-t-il été prénommé ? (p. 95)",
|
||||
"d10r1": "Résultat du 1er D10",
|
||||
"d10r2": "Résultat du 2eme D10",
|
||||
"d10r2_choice": "Effet du 2ème D10:",
|
||||
"q19": "19. Quel est le prénom de votre personnage ? (p. 95)"
|
||||
},
|
||||
"part7": {
|
||||
|
||||
@@ -79,7 +79,7 @@ export class ActorL5r5e extends Actor {
|
||||
data.endurance = (Number(data.rings.earth) + Number(data.rings.fire)) * 2;
|
||||
data.composure = (Number(data.rings.earth) + Number(data.rings.water)) * 2;
|
||||
data.focus = Number(data.rings.air) + Number(data.rings.fire);
|
||||
data.vigilante = Math.floor((Number(data.rings.air) + Number(data.rings.water)) / 2);
|
||||
data.vigilance = Math.ceil((Number(data.rings.air) + Number(data.rings.water)) / 2);
|
||||
|
||||
// Attributes bars
|
||||
data.void_points.max = data.rings.void;
|
||||
|
||||
@@ -193,13 +193,20 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
console.warn("event stepKey is undefined");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// Get item
|
||||
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||
if (item.entity !== "Item" || !item) {
|
||||
console.warn("forbidden item for this drop zone", type, item.data.type);
|
||||
return;
|
||||
}
|
||||
|
||||
// Specific step18_heritage, all item/tech allowed
|
||||
if (stepKey === "step18.heritage_item") {
|
||||
type = item.data.type;
|
||||
}
|
||||
|
||||
if (
|
||||
item.entity !== "Item" ||
|
||||
!item ||
|
||||
(type !== "item" && item.data.type !== type) ||
|
||||
(type === "item" && !["item", "weapon", "armor"].includes(item.data.type))
|
||||
) {
|
||||
|
||||
@@ -23,6 +23,7 @@ export class TwentyQuestions {
|
||||
"step8.skill",
|
||||
"step13.skill",
|
||||
"step17.skill",
|
||||
"step18.skill",
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -40,6 +41,7 @@ export class TwentyQuestions {
|
||||
"step13.disadvantage",
|
||||
"step14.special_features",
|
||||
"step16.item",
|
||||
"step18.heritage_item",
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -146,6 +148,7 @@ export class TwentyQuestions {
|
||||
heritage_name: "",
|
||||
heritage_1: null,
|
||||
heritage_2: null,
|
||||
heritage_item: [],
|
||||
},
|
||||
step19: {
|
||||
firstname: "",
|
||||
|
||||
@@ -149,11 +149,21 @@ export class HelpersL5r5e {
|
||||
static convertSymbols(text, toSymbol) {
|
||||
CONFIG.l5r5e.symbols.forEach((cfg, tag) => {
|
||||
if (toSymbol) {
|
||||
text = text.replace(tag, `<i class="${cfg.class}" title="${game.i18n.localize(cfg.label)}"></i>`);
|
||||
text = text.replace(
|
||||
new RegExp(HelpersL5r5e.escapeRegExp(tag), "gi"),
|
||||
`<i class="${cfg.class}" title="${game.i18n.localize(cfg.label)}"></i>`
|
||||
);
|
||||
} else {
|
||||
text = text.replace(new RegExp(`<i class="${cfg.class}" title="[^"]*"></i>`, "gi"), tag);
|
||||
}
|
||||
});
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape Regx characters
|
||||
*/
|
||||
static escapeRegExp(str) {
|
||||
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,11 +141,6 @@
|
||||
"lang": "es",
|
||||
"name": "Spanish (Spain)",
|
||||
"path": "lang/es-es.json"
|
||||
},
|
||||
{
|
||||
"lang": "pt-br",
|
||||
"name": "Português (Brasil)",
|
||||
"path": "lang/pt-br.json"
|
||||
}
|
||||
],
|
||||
"url": "https://gitlab.com/teaml5r/l5r5e",
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"endurance": 0,
|
||||
"composure": 0,
|
||||
"focus": 0,
|
||||
"vigilante": 0,
|
||||
"vigilance": 0,
|
||||
"void_points": {
|
||||
"max": 1,
|
||||
"value": 0
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
</label>
|
||||
<p class="item-description"> {{ localize 'l5r5e.attributes.focustip' }}</p>
|
||||
</li>
|
||||
<li class="vigilante-content">
|
||||
<li class="vigilance-content">
|
||||
<label class="attribute-label">
|
||||
<strong>{{ localize 'l5r5e.attributes.vigilante' }}</strong>
|
||||
<input class="centered-input" type="text" name="data.vigilante" value="{{data.vigilante}}" data-dtype="Number" disabled/>
|
||||
<strong>{{ localize 'l5r5e.attributes.vigilance' }}</strong>
|
||||
<input class="centered-input" type="text" name="data.vigilance" value="{{data.vigilance}}" data-dtype="Number" disabled/>
|
||||
</label>
|
||||
<p class="item-description"> {{ localize 'l5r5e.attributes.vigilantetip' }}</p>
|
||||
<p class="item-description"> {{ localize 'l5r5e.attributes.vigilancetip' }}</p>
|
||||
</li>
|
||||
<li class="void-content">
|
||||
<label class="attribute-label">
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
</label>
|
||||
<p class="item-description"> {{ localize 'l5r5e.attributes.focustip' }}</p>
|
||||
</li>
|
||||
<li class="vigilante-content">
|
||||
<li class="vigilance-content">
|
||||
<label class="attribute-label">
|
||||
<strong>{{ localize 'l5r5e.attributes.vigilante' }}</strong>
|
||||
<input class="centered-input" type="text" name="data.vigilante" value="{{data.vigilante}}" data-dtype="Number" disabled/>
|
||||
<input class="centered-input" type="text" name="data.vigilance" value="{{data.vigilance}}" data-dtype="Number" disabled/>
|
||||
</label>
|
||||
<p class="item-description"> {{ localize 'l5r5e.attributes.vigilantetip' }}</p>
|
||||
<p class="item-description"> {{ localize 'l5r5e.attributes.vigilancetip' }}</p>
|
||||
</li>
|
||||
<li class="void-content">
|
||||
<label class="attribute-label">
|
||||
|
||||
@@ -578,7 +578,7 @@
|
||||
<label>
|
||||
{{localize 'l5r5e.twenty_questions.part6.d10r1'}}
|
||||
<a class="inline-roll roll" title="1d10" data-mode="roll"
|
||||
data-flavor="{{localize 'l5r5e.twenty_questions.d10r1'}}" data-formula="1d10" data-step="step18.heritage_1">
|
||||
data-flavor="{{localize 'l5r5e.twenty_questions.part6.d10r1'}}" data-formula="1d10" data-step="step18.heritage_1">
|
||||
<i class="fas fa-dice-d20"></i> 1d10
|
||||
</a>
|
||||
<br>
|
||||
@@ -589,7 +589,7 @@
|
||||
<label>
|
||||
{{localize 'l5r5e.twenty_questions.part6.d10r2'}}
|
||||
<a class="inline-roll roll" title="1d10" data-mode="roll"
|
||||
data-flavor="{{localize 'l5r5e.twenty_questions.d10r2'}}" data-formula="1d10" data-step="step18.heritage_2">
|
||||
data-flavor="{{localize 'l5r5e.twenty_questions.part6.d10r2'}}" data-formula="1d10" data-step="step18.heritage_2">
|
||||
<i class="fas fa-dice-d20"></i> 1d10
|
||||
</a>
|
||||
<br>
|
||||
@@ -598,6 +598,39 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
{{localize 'l5r5e.twenty_questions.part6.d10r2_choice'}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="third">
|
||||
<label>
|
||||
{{localize 'l5r5e.twenty_questions.increase_skill1'}}
|
||||
<br>
|
||||
<select name="step18.skill" class="skill-select">
|
||||
{{#select data.step18.skill}}
|
||||
<option value="none">{{localize 'l5r5e.twenty_questions.choose_one_skill'}}</option>
|
||||
{{#each skillsList as |skills catId|}}
|
||||
<optgroup label="{{localizeSkill catId 'title'}}">
|
||||
{{#each skills as |obj|}}
|
||||
<option value="{{obj.id}}">{{obj.label}}</option>
|
||||
{{/each}}
|
||||
</optgroup>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</label>
|
||||
</td>
|
||||
<td class="or">
|
||||
{{localize 'l5r5e.twenty_questions.or'}}
|
||||
</td>
|
||||
<td class="">
|
||||
{{> 'systems/l5r5e/templates/actors/character/twenty-questions-item.html' itemsList=cache.step18.heritage_item stepName='step18.heritage_item' itemType='items' hideDndAt=1 }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user