diff --git a/CHANGELOG.md b/CHANGELOG.md index 94c734a..d065ad2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,7 @@ Technique syntaxe "quick" explanation : - Or specific syntaxe "@`S`:`prop1`" or "@`T`:`prop1`|`max`" or "@`T`:`prop1`|`max`(`prop2`)" : - `@` fixed, trigger the parser - `T` or `S` : `T`arget or `S`elf, define the actor to get the value. - - `prop1` / `prop2` : Can be any property in `actor` or `actor.data.data`. Limitations: currently no `size` or `distance` (range). + - `prop1` / `prop2` : Can be any property in `actor` or `actor.data.data`. Limitations: currently no `size`, `distance` (range) or computation (a+b). - `|` separator, optional if no min/max. - `min` or `max` : Between the selected targets, search for the min/max of `prop2`. If no `prop2` provided, take `prop1` as `prop2` (irrelevant for `@S`). - `(prop2)` : define the property for the actor selection in multiple target, can be omitted if same as `prop1`. diff --git a/system/scripts/actors/twenty-questions-dialog.js b/system/scripts/actors/twenty-questions-dialog.js index 769838b..6be79b5 100644 --- a/system/scripts/actors/twenty-questions-dialog.js +++ b/system/scripts/actors/twenty-questions-dialog.js @@ -357,6 +357,16 @@ export class TwentyQuestionsDialog extends FormApplication { * @override */ async _updateObject(event, formData) { + // Clan tag trim if autocomplete in school name + if ( + formData["autoCompleteListName"] === "step3.school" && + formData["autoCompleteListSelectedIndex"] >= 0 && + !!formData["step1.clan"] && + formData["step3.school"].indexOf(` [${formData["step1.clan"]}]`) !== -1 + ) { + formData["step3.school"] = formData["step3.school"].replace(` [${formData["step1.clan"]}]`, ""); + } + // Check "Or" conditions formData["step7.social_add_glory"] = formData["step7.skill"] === "none" ? 5 : 0;