Skip to content

Commit d9d04a4

Browse files
committed
6.1.7
1 parent 632bc46 commit d9d04a4

35 files changed

+165
-158
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ If you want to discuss TDE for foundry or need some assistance you can also join
143143
</a>
144144
<a href="https://www.f-shop.de/detail/index/sArticle/3907" target="_blank" title="Rahjas Diener">
145145
<img src="https://www.f-shop.de/media/image/17/40/f3/ESD043_0_0999.jpg" alt="Rahjas Diener" style="margin-right: 5px; margin-bottom: 5px; text-align:center; width:210px;">
146+
</a>
147+
<a href="https://www.f-shop.de/detail/index/sArticle/4457" target="_blank" title="Aventurische Bibliothek">
148+
<img src="https://www.f-shop.de/media/image/50/34/01/ESD052_0_0999.jpg" alt="Aventurische Bibliothek" style="margin-right: 5px; margin-bottom: 5px; text-align:center; width:210px;">
146149
</a>
147150
<h2>Abenteuer</h2>
148151
<a href="https://foundryvtt.com/packages/dsa5-introduction" title="Einführungsabenteuer">

bundle/modules/dsa5.js

+23-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lazy/patchhtml/modules_de.html

+3
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ <h2>Inhalte</h2>
8888
<a href="https://www.f-shop.de/detail/index/sArticle/3907" target="_blank" data-tooltip="Rahjas Diener">
8989
<img src="https://www.f-shop.de/media/image/17/40/f3/ESD043_0_0999.jpg" alt="Rahjas Diener" style="margin-right: 5px; margin-bottom: 5px; text-align:center; width:210px;">
9090
</a>
91+
<a href="https://www.f-shop.de/detail/index/sArticle/4457" target="_blank" data-tooltip="Aventurische Bibliothek">
92+
<img src="https://www.f-shop.de/media/image/50/34/01/ESD052_0_0999.jpg" alt="Aventurische Bibliothek" style="margin-right: 5px; margin-bottom: 5px; text-align:center; width:210px;">
93+
</a>
9194
<h2>Abenteuer</h2>
9295
<a href="https://foundryvtt.com/packages/dsa5-introduction" target="_blank" data-tooltip="Einführungsabenteuer">
9396
<img src="https://raw.githubusercontent.com/Plushtoast/dsa5_introduction/master/icons/journal/coverde.webp" alt="Einführungsabenteuer" style="margin-right: 5px; margin-bottom: 5px; text-align:center; width:210px;">

modules/actor/actor-dsa5.js

+38-22
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default class Actordsa5 extends Actor {
4343
}
4444

4545
_getArmorCompensation(actor, wornArmors, itemModifiers) {
46-
const armorCompensation = SpecialabilityRulesDSA5.abilityStep(actor, game.i18n.localize('LocalizedIDs.inuredToEncumbrance'));
46+
const armorCompensation = SpecialabilityRulesDSA5.abilityStep(actor, 'LocalizedIDs.inuredToEncumbrance');
4747
const armorEncumbrance = wornArmors.reduce((sum, x) => {
4848
return (sum += Number(x.system.encumbrance.value));
4949
}, 0);
@@ -264,7 +264,7 @@ export default class Actordsa5 extends Actor {
264264
const data = actor.system;
265265
const isMerchant = actor.isMerchant();
266266

267-
if (!TraitRulesDSA5.hasTrait(actor, game.i18n.localize('LocalizedIDs.painImmunity'))) {
267+
if (!TraitRulesDSA5.hasTrait(actor, 'LocalizedIDs.painImmunity')) {
268268
const pain = actor.woundPain(data);
269269
await this.deferredEffectAddition('inpain', actor, pain);
270270
}
@@ -279,9 +279,9 @@ export default class Actordsa5 extends Actor {
279279
const brawlingPoints = actor.woundPain(data, 'temporaryLeP');
280280
await this.deferredEffectAddition('stunned', actor, brawlingPoints);
281281

282-
if (AdvantageRulesDSA5.hasVantage(actor, game.i18n.localize('LocalizedIDs.blind'))) await actor.addCondition('blind');
283-
if (AdvantageRulesDSA5.hasVantage(actor, game.i18n.localize('LocalizedIDs.mute'))) await actor.addCondition('mute');
284-
if (AdvantageRulesDSA5.hasVantage(actor, game.i18n.localize('LocalizedIDs.deaf'))) await actor.addCondition('deaf');
282+
if (AdvantageRulesDSA5.hasVantage(actor, 'LocalizedIDs.blind')) await actor.addCondition('blind');
283+
if (AdvantageRulesDSA5.hasVantage(actor, 'LocalizedIDs.mute')) await actor.addCondition('mute');
284+
if (AdvantageRulesDSA5.hasVantage(actor, 'LocalizedIDs.deaf')) await actor.addCondition('deaf');
285285

286286
if (isMerchant) await actor.prepareMerchant();
287287
}
@@ -321,13 +321,13 @@ export default class Actordsa5 extends Actor {
321321
let pain = data.condition.inpain || 0;
322322
if (pain < 4)
323323
pain -=
324-
AdvantageRulesDSA5.vantageStep(this, game.i18n.localize('LocalizedIDs.ruggedFighter')) +
325-
AdvantageRulesDSA5.vantageStep(this, game.i18n.localize('LocalizedIDs.ruggedAnimal')) +
326-
(SpecialabilityRulesDSA5.hasAbility(this, game.i18n.localize('LocalizedIDs.traditionKor')) ? 1 : 0);
324+
AdvantageRulesDSA5.vantageStep(this, 'LocalizedIDs.ruggedFighter') +
325+
AdvantageRulesDSA5.vantageStep(this, 'LocalizedIDs.ruggedAnimal') +
326+
(SpecialabilityRulesDSA5.hasAbility(this, 'LocalizedIDs.traditionKor') ? 1 : 0);
327327
if (pain > 0)
328328
pain +=
329-
AdvantageRulesDSA5.vantageStep(this, game.i18n.localize('LocalizedIDs.sensitiveToPain')) +
330-
AdvantageRulesDSA5.vantageStep(this, game.i18n.localize('LocalizedIDs.fragileAnimal'));
329+
AdvantageRulesDSA5.vantageStep(this, 'LocalizedIDs.sensitiveToPain') +
330+
AdvantageRulesDSA5.vantageStep(this, 'LocalizedIDs.fragileAnimal');
331331

332332
pain = Math.clamp(pain, 0, 4);
333333
data.condition.inpain = pain;
@@ -716,6 +716,19 @@ export default class Actordsa5 extends Actor {
716716
botch: 20,
717717
crit: 1,
718718
},
719+
defaultWeapon: {
720+
system: {
721+
damageThreshold: {
722+
value: 14,
723+
},
724+
reach: {
725+
value: 'short',
726+
},
727+
guidevalue: {
728+
value: 'ge/kk',
729+
},
730+
},
731+
}
719732
});
720733

721734
for (const k of DSA5.gearModifyableCalculatedAttributes) if (system.status[k]) system.status[k].gearmodifier = 0;
@@ -1163,6 +1176,7 @@ export default class Actordsa5 extends Actor {
11631176
break;
11641177
}
11651178
traits[i.system.traitType.value].push(i);
1179+
this._setOnUseEffect(i);
11661180
hasTrait = true;
11671181
break;
11681182
case 'combatskill':
@@ -1407,7 +1421,7 @@ export default class Actordsa5 extends Actor {
14071421
return (sum += a.system.calculatedEncumbrance);
14081422
}, 0);
14091423
const ridingModifier = Riding.isRiding(this) ? -1 : 0;
1410-
return Math.max(0, encumbrance - SpecialabilityRulesDSA5.abilityStep(actorData, game.i18n.localize('LocalizedIDs.inuredToEncumbrance')) + ridingModifier);
1424+
return Math.max(0, encumbrance - SpecialabilityRulesDSA5.abilityStep(actorData, 'LocalizedIDs.inuredToEncumbrance') + ridingModifier);
14111425
}
14121426

14131427
_calcBagweight(elem, containers, topLevel = true) {
@@ -1576,7 +1590,7 @@ export default class Actordsa5 extends Actor {
15761590

15771591
const hasWeaponThrow =
15781592
['Daggers', 'Fencing Weapons', 'Impact Weapons', 'Swords', 'Polearms'].includes(localizedCT) &&
1579-
SpecialabilityRulesDSA5.hasAbility(this, game.i18n.localize('LocalizedIDs.weaponThrow'));
1593+
SpecialabilityRulesDSA5.hasAbility(this, 'LocalizedIDs.weaponThrow');
15801594
const name = item.name + ' (' + throwingWeapons + ')';
15811595
const range = new Itemdsa5({
15821596
name,
@@ -1605,21 +1619,23 @@ export default class Actordsa5 extends Actor {
16051619

16061620
setupWeaponless(statusId, options = {}, tokenId) {
16071621
const attributes = [];
1608-
if (SpecialabilityRulesDSA5.hasAbility(this, game.i18n.localize('LocalizedIDs.mightyAstralBody'))) attributes.push(game.i18n.localize('magical'));
1609-
if (SpecialabilityRulesDSA5.hasAbility(this, game.i18n.localize('LocalizedIDs.mightyKarmalBody'))) attributes.push(game.i18n.localize('blessed'));
1622+
if (SpecialabilityRulesDSA5.hasAbility(this, 'LocalizedIDs.mightyAstralBody')) attributes.push(game.i18n.localize('magical'));
1623+
if (SpecialabilityRulesDSA5.hasAbility(this, 'LocalizedIDs.mightyKarmalBody')) attributes.push(game.i18n.localize('blessed'));
16101624

1611-
const item = DSA5.defaultWeapon({
1625+
const weaponData = mergeObject({
16121626
name: game.i18n.localize(`${statusId}Weaponless`),
1627+
type: 'meleeweapon',
16131628
system: {
16141629
combatskill: {
16151630
value: game.i18n.localize('LocalizedIDs.wrestle'),
16161631
},
16171632
effect: {
16181633
attributes: attributes.join(', '),
16191634
},
1620-
},
1621-
});
1635+
}
1636+
}, this.system.defaultWeapon)
16221637

1638+
const item = new Item(weaponData);
16231639
options.mode = statusId;
16241640
return Itemdsa5.getSubClass(item.type).setupDialog(null, options, item, this, tokenId);
16251641
}
@@ -2588,14 +2604,14 @@ export default class Actordsa5 extends Actor {
25882604
let factor = 1;
25892605
let modifier = 0;
25902606
if (item.system.combatskill.value == game.i18n.localize('LocalizedIDs.Throwing Weapons'))
2591-
modifier = SpecialabilityRulesDSA5.abilityStep(actor, game.i18n.localize('LocalizedIDs.quickdraw')) * -1;
2607+
modifier = SpecialabilityRulesDSA5.abilityStep(actor, 'LocalizedIDs.quickdraw') * -1;
25922608
else if (
25932609
item.system.combatskill.value == game.i18n.localize('LocalizedIDs.Crossbows') &&
2594-
SpecialabilityRulesDSA5.hasAbility(actor, `${game.i18n.localize('LocalizedIDs.quickload')} (${game.i18n.localize('LocalizedIDs.Crossbows')})`)
2610+
SpecialabilityRulesDSA5.hasAbility(actor, `${game.i18n.localize('LocalizedIDs.quickload')} (${game.i18n.localize('LocalizedIDs.Crossbows')})`, false)
25952611
)
25962612
factor = 0.5;
25972613
else {
2598-
modifier = SpecialabilityRulesDSA5.abilityStep(actor, `${game.i18n.localize('LocalizedIDs.quickload')} (${game.i18n.localize(item.system.combatskill.value)})`) * -1;
2614+
modifier = SpecialabilityRulesDSA5.abilityStep(actor, `${game.i18n.localize('LocalizedIDs.quickload')} (${game.i18n.localize(item.system.combatskill.value)})`, false) * -1;
25992615
}
26002616

26012617
let reloadTime = `${item.system.reloadTime.value}`.split('/');
@@ -2854,7 +2870,7 @@ export default class Actordsa5 extends Actor {
28542870
let max = 0;
28552871
const maxBonus = AdvantageRulesDSA5.vantageStep(
28562872
this,
2857-
`${game.i18n.localize(`LocalizedIDs.${item.type == 'combatskill' ? 'exceptionalCombatTechnique' : 'exceptionalSkill'}`)} (${item.name})`,
2873+
`${game.i18n.localize(`LocalizedIDs.${item.type == 'combatskill' ? 'exceptionalCombatTechnique' : 'exceptionalSkill'}`)} (${item.name})`, false
28582874
);
28592875
switch (item.type) {
28602876
case 'combatskill':
@@ -2867,7 +2883,7 @@ export default class Actordsa5 extends Actor {
28672883
.replace(/\(a-z äöü-\)/gi, '')
28682884
.split(',')
28692885
.map((x) => x.trim())) {
2870-
if (SpecialabilityRulesDSA5.hasAbility(this, `${game.i18n.localize('LocalizedIDs.propertyKnowledge')} (${feature})`)) {
2886+
if (SpecialabilityRulesDSA5.hasAbility(this, `${game.i18n.localize('LocalizedIDs.propertyKnowledge')} (${feature})`, false)) {
28712887
focusValue = this.maxByAttr(item, maxBonus);
28722888
break;
28732889
}

modules/actor/actor-sheet.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ export default class ActorSheetDsa5 extends ActorSheet {
882882
}
883883
const hasWeaponThrow =
884884
['Daggers', 'Fencing Weapons', 'Impact Weapons', 'Swords', 'Polearms'].includes(localizedCT) &&
885-
SpecialabilityRulesDSA5.hasAbility(this.actor, game.i18n.localize('LocalizedIDs.weaponThrow'));
885+
SpecialabilityRulesDSA5.hasAbility(this.actor, 'LocalizedIDs.weaponThrow');
886886
const throwLabel = `${game.i18n.localize('TYPES.Item.rangeweapon')} ${game.i18n.localize('CHARAbbrev.AT')} -${hasWeaponThrow ? 4 : 8} ${game.i18n.localize('CHARAbbrev.RW')} ${DSA5.meleeAsRangeReach[localizedCT]}`;
887887
options.push(
888888
{

modules/dialog/dialog-combat-dsa5.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export default class DSA5CombatDialog extends DialogShared {
155155
const elem = $(ev.currentTarget);
156156
const dataset = ev.currentTarget.dataset;
157157
let step = Number(dataset.step);
158-
const maxStep = Number(dataset.maxstep);
158+
const maxStep = Number(dataset.maxStep);
159159
const subcategory = Number(dataset.category);
160160

161161
if (ev.button == 0) {
@@ -250,8 +250,8 @@ export default class DSA5CombatDialog extends DialogShared {
250250
mods += `<option value="${mod.value}"
251251
data-tooltip="${Handlebars.helpers.situationalTooltip(mod)}"
252252
${mod.type ? ' data-type=' + mod.type : ''}
253-
${mod.specAbId ? ' data-specAbId=' + mod.specAbId : ''}
254-
${mod.armorPen ? ' data-armorPen=' + mod.armorPen : ''}
253+
${mod.specAbId ? ' data-spec-ab-id=' + mod.specAbId : ''}
254+
${mod.armorPen ? ' data-armor-pen=' + mod.armorPen : ''}
255255
${mod.selected ? ' selected' : ''}>
256256
${mod.name} [${mod.value}]
257257
</option>`;

modules/dialog/dialog-spell-dsa5.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export default class DSA5SpellDialog extends DialogShared {
183183
if (newPosition < 1) {
184184
if (event) event.currentTarget.checked = false;
185185
} else {
186-
aspcost.text(newPosition);
186+
aspcost.text(Math.round(newPosition));
187187
maintainCost.text(newMaintainCost);
188188
aspcost.attr('data-mod', mod);
189189
}

modules/hooks/actor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export default function () {
217217
(Number(toCheck.inpain) || 0) > 0 &&
218218
!actor.hasCondition('bloodrush') &&
219219
actor.system.condition.inpain > 0 &&
220-
AdvantageRulesDSA5.hasVantage(actor, game.i18n.localize('LocalizedIDs.frenzy'))
220+
AdvantageRulesDSA5.hasVantage(actor, 'LocalizedIDs.frenzy')
221221
) {
222222
await actor.addCondition('bloodrush');
223223
const msg = DSA5_Utility.replaceConditions(

modules/hooks/texteditor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export function setEnrichers() {
121121
},
122122
},
123123
{
124-
pattern: /@EmbedItem\[[a-zA-ZöüäÖÜÄ&ë;'\(\):, -\.0-9âïîëßôñûé\/]+\]({[a-zA-Z=]+})?/g,
124+
pattern: /@EmbedItem\[[a-zA-ZöüäÖÜÄÔ&ë;'\(\):, -\.0-9âïîëßôñûé\/]+\]({[a-zA-Z=]+})?/g,
125125
enricher: async (match, options) => {
126126
const uuid = match[0].match(/(?:\[)(.*?)(?=\])/)[0].slice(1);
127127
let document;

modules/item/item-dsa5.js

+13-12
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export default class Itemdsa5 extends Item {
224224
selected: false,
225225
});
226226
const miracleMight = game.i18n.localize('LocalizedIDs.miracleMight');
227-
if (availableKaP >= 6 && SpecialabilityRulesDSA5.hasAbility(actor, miracleMight)) {
227+
if (availableKaP >= 6 && SpecialabilityRulesDSA5.hasAbility(actor, miracleMight, false)) {
228228
result.push({
229229
name: miracleMight,
230230
value: 3 + bonus,
@@ -507,7 +507,7 @@ export default class Itemdsa5 extends Item {
507507
}
508508

509509
static prepareRangeAttack(situationalModifiers, actor, data, source, tokenId, combatskills, currentAmmo = undefined) {
510-
situationalModifiers.push(...AdvantageRulesDSA5.getVantageAsModifier(actor, game.i18n.localize('LocalizedIDs.restrictedSenseSight'), -2));
510+
situationalModifiers.push(...AdvantageRulesDSA5.getVantageAsModifier(actor, 'LocalizedIDs.restrictedSenseSight', -2));
511511
this.getCombatSkillModifier(actor, source, situationalModifiers);
512512

513513
const targetSize = this.getTargetSizeAndModifier(actor, source, situationalModifiers);
@@ -523,11 +523,11 @@ export default class Itemdsa5 extends Item {
523523
}
524524

525525
const rangeOptions = new Set(['short', 'medium', 'long', 'rangesense', 'extreme']);
526-
rangeOptions.delete(AdvantageRulesDSA5.hasVantage(actor, game.i18n.localize('LocalizedIDs.senseOfRange')) ? 'long' : 'rangesense');
527-
if (!SpecialabilityRulesDSA5.hasAbility(actor, game.i18n.localize('LocalizedIDs.extremeShot'))) rangeOptions.delete('extreme');
526+
rangeOptions.delete(AdvantageRulesDSA5.hasVantage(actor, 'LocalizedIDs.senseOfRange') ? 'long' : 'rangesense');
527+
if (!SpecialabilityRulesDSA5.hasAbility(actor, 'LocalizedIDs.extremeShot')) rangeOptions.delete('extreme');
528528

529-
const drivingArcher = SpecialabilityRulesDSA5.hasAbility(actor, game.i18n.localize('LocalizedIDs.drivingArcher'));
530-
const mountedArcher = SpecialabilityRulesDSA5.hasAbility(actor, game.i18n.localize('LocalizedIDs.mountedArcher'));
529+
const drivingArcher = SpecialabilityRulesDSA5.hasAbility(actor, 'LocalizedIDs.drivingArcher');
530+
const mountedArcher = SpecialabilityRulesDSA5.hasAbility(actor, 'LocalizedIDs.mountedArcher');
531531
let mountedOptions;
532532
if (mountedArcher && Riding.isRiding(actor)) {
533533
mountedOptions = duplicate(DSA5.mountedRangeOptionsSpecAb);
@@ -1042,9 +1042,9 @@ class SpellItemDSA5 extends Itemdsa5 {
10421042
static getSituationalModifiers(situationalModifiers, actor, data, source) {
10431043
situationalModifiers.push(
10441044
...ItemRulesDSA5.getTalentBonus(actor, source.name, ['advantage', 'disadvantage', 'specialability', 'equipment']),
1045-
...AdvantageRulesDSA5.getVantageAsModifier(actor, game.i18n.localize('LocalizedIDs.magicalAttunement'), 1, true),
1046-
...AdvantageRulesDSA5.getVantageAsModifier(actor, game.i18n.localize('LocalizedIDs.magicalRestriction'), -1, true),
1047-
...AdvantageRulesDSA5.getVantageAsModifier(actor, game.i18n.localize('LocalizedIDs.boundToArtifact'), -1, true),
1045+
...AdvantageRulesDSA5.getVantageAsModifier(actor, 'LocalizedIDs.magicalAttunement', 1, true),
1046+
...AdvantageRulesDSA5.getVantageAsModifier(actor, 'LocalizedIDs.magicalRestriction', -1, true),
1047+
...AdvantageRulesDSA5.getVantageAsModifier(actor, 'LocalizedIDs.boundToArtifact', -1, true),
10481048
...this.getPropertyModifiers(actor, source),
10491049
...this.attackSpellMalus(source),
10501050
);
@@ -1356,7 +1356,7 @@ class DiseaseItemDSA5 extends Itemdsa5 {
13561356
if (game.user.targets.size) {
13571357
game.user.targets.forEach((target) => {
13581358
if (target.actor)
1359-
situationalModifiers.push(...AdvantageRulesDSA5.getVantageAsModifier(target.actor, game.i18n.localize('LocalizedIDs.ResistanttoDisease'), -1, false, true));
1359+
situationalModifiers.push(...AdvantageRulesDSA5.getVantageAsModifier(target.actor, 'LocalizedIDs.ResistanttoDisease', -1, false, true));
13601360
});
13611361
}
13621362
this.getSkZkModifier(data, source);
@@ -1498,7 +1498,7 @@ class MeleeweaponDSA5 extends WeaponItemDSA5 {
14981498
}
14991499

15001500
static getSituationalModifiers(situationalModifiers, actor, data, source) {
1501-
const wrongHandDisabled = AdvantageRulesDSA5.hasVantage(actor, game.i18n.localize('LocalizedIDs.ambidextrous'));
1501+
const wrongHandDisabled = AdvantageRulesDSA5.hasVantage(actor, 'LocalizedIDs.ambidextrous');
15021502
source = DSA5_Utility.toObjectIfPossible(source);
15031503
const toSearch = [source.system.combatskill.value];
15041504
const combatskills = Itemdsa5.buildCombatSpecAbs(actor, ['Combat'], toSearch, data.mode, source);
@@ -1584,7 +1584,7 @@ class PoisonItemDSA5 extends Itemdsa5 {
15841584
source = DSA5_Utility.toObjectIfPossible(source);
15851585
if (game.user.targets.size) {
15861586
game.user.targets.forEach((target) => {
1587-
if (target.actor) situationalModifiers.push(...AdvantageRulesDSA5.getVantageAsModifier(target.actor, game.i18n.localize('LocalizedIDs.poisonResistance'), -1, false, true));
1587+
if (target.actor) situationalModifiers.push(...AdvantageRulesDSA5.getVantageAsModifier(target.actor, 'LocalizedIDs.poisonResistance', -1, false, true));
15881588
});
15891589
}
15901590
this.getSkZkModifier(data, source);
@@ -1692,6 +1692,7 @@ class RangeweaponItemDSA5 extends WeaponItemDSA5 {
16921692
specAbId: source.system.currentAmmo.value,
16931693
};
16941694
if (currentAmmo.system.armorMod) dmgMod['armorPen'] = currentAmmo.system.armorMod;
1695+
16951696
situationalModifiers.push(dmgMod);
16961697
}
16971698
if (currentAmmo.effects.length) {

modules/system/advantage-rules-dsa5.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,18 @@ export default class AdvantageRulesDSA5 extends ItemRulesDSA5 {
149149
return AdvantageRulesDSA5._calculateSingularVantages(item, actor, xpCost, filter, result);
150150
}
151151

152-
static hasVantage(actor, talent) {
152+
static hasVantage(actor, talent, localize = true) {
153+
if (localize) talent = game.i18n.localize(talent);
153154
return super.hasItem(actor, talent, ['advantage', 'disadvantage']);
154155
}
155156

156-
static vantageStep(actor, talent) {
157+
static vantageStep(actor, talent, localize = true) {
158+
if (localize) talent = game.i18n.localize(talent);
157159
return super.itemStep(actor, talent, ['advantage', 'disadvantage']);
158160
}
159161

160162
static getVantageAsModifier(actor, talent, factor = 1, startsWith = false, selected = false) {
163+
talent = game.i18n.localize(talent);
161164
return super.itemAsModifier(actor, talent, factor, ['advantage', 'disadvantage'], startsWith, selected);
162165
}
163166
}

0 commit comments

Comments
 (0)