mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
Neater code for critical
This commit is contained in:
parent
4459ee00e0
commit
1c6c3e7736
1 changed files with 9 additions and 9 deletions
|
|
@ -778,17 +778,17 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
|
|||
const fearResourceMap = actorResourceMaps[tagTeamData.initiator.memberId];
|
||||
for (const memberId in tagTeamData.members) {
|
||||
const resourceMap = actorResourceMaps[memberId];
|
||||
if (finalRoll.isCritical || finalRoll.withHope) {
|
||||
if (finalRoll.withHope) {
|
||||
resourceMap.addResources([{ key: 'hope', value: 1, enabled: true }]);
|
||||
}
|
||||
if (finalRoll.isCritical)
|
||||
resourceMap.addResources([{ key: 'stress', value: -1, enabled: true }]);
|
||||
if (finalRoll.withFear) {
|
||||
fearResourceMap.addResources([{
|
||||
key: 'fear',
|
||||
value: 1,
|
||||
enabled: true
|
||||
}]);
|
||||
if (finalRoll.isCritical) {
|
||||
resourceMap.addResources([
|
||||
{ key: 'stress', value: -1, enabled: true },
|
||||
{ key: 'hope', value: 1, enabled: true }
|
||||
]);
|
||||
}
|
||||
else if (finalRoll.withFear) {
|
||||
fearResourceMap.addResources([{ key: 'fear', value: 1, enabled: true }]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue