Merge pull request 'Fix roll Odorat-goût' (#568) from VincentVk/foundryvtt-reve-de-dragon:v10 into v10

Reviewed-on: #568
This commit is contained in:
uberwald 2022-10-28 08:45:47 +02:00
commit 637be29b7b
4 changed files with 25 additions and 2 deletions

View File

@ -3142,7 +3142,12 @@ export class RdDActor extends Actor {
case 'chance-actuelle': case 'chance actuelle':
return carac.chance;
}
let entry = Misc.findFirstLike(name, Object.entries(carac), { mapper: it => it[1].label, description: 'caractéristique' });
const caracList = Object.entries(carac);
let entry = Misc.findFirstLike(name, caracList, { mapper: it => it[0], description: 'caractéristique' });
if (!entry || entry.length ==0) {
entry = Misc.findFirstLike(name, caracList, { mapper: it => it[1].label, description: 'caractéristique' });
}
return entry && entry.length > 0 ? carac[entry[0]] : undefined;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -338,5 +338,23 @@
"gridDistance": 1,
"gridUnits": "m",
"primaryTokenAttribute": "sante.vie",
"secondaryTokenAttribute": "sante.endurance"
"secondaryTokenAttribute": "sante.endurance",
"manifestPlusVersion": "1.2.0",
"media": [
{
"type": "icon",
"url": "systems/foundryvtt-reve-de-dragon/styles/img/reve-de-dragon-icon.webp",
"caption": "Logo Rêve de Dragon"
},
{
"type": "cover",
"url": "systems/foundryvtt-reve-de-dragon/styles/img/reve-de-dragon-cover.webp",
"caption": "Logo Rêve de Dragon"
},
{
"type": "screenshot",
"url": "http://www.lahiette.com/leratierbretonnien/wp-content/uploads/2020/11/Screenshot_20201128_181102.webp",
"caption": "Capture d'écran de Rêve de Dragon sur Foundry"
}
]
}