@@ -43,7 +43,7 @@ export default class Actordsa5 extends Actor {
43
43
}
44
44
45
45
_getArmorCompensation ( actor , wornArmors , itemModifiers ) {
46
- const armorCompensation = SpecialabilityRulesDSA5 . abilityStep ( actor , game . i18n . localize ( 'LocalizedIDs.inuredToEncumbrance' ) ) ;
46
+ const armorCompensation = SpecialabilityRulesDSA5 . abilityStep ( actor , 'LocalizedIDs.inuredToEncumbrance' ) ;
47
47
const armorEncumbrance = wornArmors . reduce ( ( sum , x ) => {
48
48
return ( sum += Number ( x . system . encumbrance . value ) ) ;
49
49
} , 0 ) ;
@@ -264,7 +264,7 @@ export default class Actordsa5 extends Actor {
264
264
const data = actor . system ;
265
265
const isMerchant = actor . isMerchant ( ) ;
266
266
267
- if ( ! TraitRulesDSA5 . hasTrait ( actor , game . i18n . localize ( 'LocalizedIDs.painImmunity' ) ) ) {
267
+ if ( ! TraitRulesDSA5 . hasTrait ( actor , 'LocalizedIDs.painImmunity' ) ) {
268
268
const pain = actor . woundPain ( data ) ;
269
269
await this . deferredEffectAddition ( 'inpain' , actor , pain ) ;
270
270
}
@@ -279,9 +279,9 @@ export default class Actordsa5 extends Actor {
279
279
const brawlingPoints = actor . woundPain ( data , 'temporaryLeP' ) ;
280
280
await this . deferredEffectAddition ( 'stunned' , actor , brawlingPoints ) ;
281
281
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' ) ;
285
285
286
286
if ( isMerchant ) await actor . prepareMerchant ( ) ;
287
287
}
@@ -321,13 +321,13 @@ export default class Actordsa5 extends Actor {
321
321
let pain = data . condition . inpain || 0 ;
322
322
if ( pain < 4 )
323
323
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 ) ;
327
327
if ( pain > 0 )
328
328
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' ) ;
331
331
332
332
pain = Math . clamp ( pain , 0 , 4 ) ;
333
333
data . condition . inpain = pain ;
@@ -716,6 +716,19 @@ export default class Actordsa5 extends Actor {
716
716
botch : 20 ,
717
717
crit : 1 ,
718
718
} ,
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
+ }
719
732
} ) ;
720
733
721
734
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 {
1163
1176
break ;
1164
1177
}
1165
1178
traits [ i . system . traitType . value ] . push ( i ) ;
1179
+ this . _setOnUseEffect ( i ) ;
1166
1180
hasTrait = true ;
1167
1181
break ;
1168
1182
case 'combatskill' :
@@ -1407,7 +1421,7 @@ export default class Actordsa5 extends Actor {
1407
1421
return ( sum += a . system . calculatedEncumbrance ) ;
1408
1422
} , 0 ) ;
1409
1423
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 ) ;
1411
1425
}
1412
1426
1413
1427
_calcBagweight ( elem , containers , topLevel = true ) {
@@ -1576,7 +1590,7 @@ export default class Actordsa5 extends Actor {
1576
1590
1577
1591
const hasWeaponThrow =
1578
1592
[ 'Daggers' , 'Fencing Weapons' , 'Impact Weapons' , 'Swords' , 'Polearms' ] . includes ( localizedCT ) &&
1579
- SpecialabilityRulesDSA5 . hasAbility ( this , game . i18n . localize ( 'LocalizedIDs.weaponThrow' ) ) ;
1593
+ SpecialabilityRulesDSA5 . hasAbility ( this , 'LocalizedIDs.weaponThrow' ) ;
1580
1594
const name = item . name + ' (' + throwingWeapons + ')' ;
1581
1595
const range = new Itemdsa5 ( {
1582
1596
name,
@@ -1605,21 +1619,23 @@ export default class Actordsa5 extends Actor {
1605
1619
1606
1620
setupWeaponless ( statusId , options = { } , tokenId ) {
1607
1621
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' ) ) ;
1610
1624
1611
- const item = DSA5 . defaultWeapon ( {
1625
+ const weaponData = mergeObject ( {
1612
1626
name : game . i18n . localize ( `${ statusId } Weaponless` ) ,
1627
+ type : 'meleeweapon' ,
1613
1628
system : {
1614
1629
combatskill : {
1615
1630
value : game . i18n . localize ( 'LocalizedIDs.wrestle' ) ,
1616
1631
} ,
1617
1632
effect : {
1618
1633
attributes : attributes . join ( ', ' ) ,
1619
1634
} ,
1620
- } ,
1621
- } ) ;
1635
+ }
1636
+ } , this . system . defaultWeapon )
1622
1637
1638
+ const item = new Item ( weaponData ) ;
1623
1639
options . mode = statusId ;
1624
1640
return Itemdsa5 . getSubClass ( item . type ) . setupDialog ( null , options , item , this , tokenId ) ;
1625
1641
}
@@ -2588,14 +2604,14 @@ export default class Actordsa5 extends Actor {
2588
2604
let factor = 1 ;
2589
2605
let modifier = 0 ;
2590
2606
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 ;
2592
2608
else if (
2593
2609
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 )
2595
2611
)
2596
2612
factor = 0.5 ;
2597
2613
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 ;
2599
2615
}
2600
2616
2601
2617
let reloadTime = `${ item . system . reloadTime . value } ` . split ( '/' ) ;
@@ -2854,7 +2870,7 @@ export default class Actordsa5 extends Actor {
2854
2870
let max = 0 ;
2855
2871
const maxBonus = AdvantageRulesDSA5 . vantageStep (
2856
2872
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
2858
2874
) ;
2859
2875
switch ( item . type ) {
2860
2876
case 'combatskill' :
@@ -2867,7 +2883,7 @@ export default class Actordsa5 extends Actor {
2867
2883
. replace ( / \( a - z ä ö ü - \) / gi, '' )
2868
2884
. split ( ',' )
2869
2885
. 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 ) ) {
2871
2887
focusValue = this . maxByAttr ( item , maxBonus ) ;
2872
2888
break ;
2873
2889
}
0 commit comments