@@ -2991,7 +2991,7 @@ var attackMaster = (function() {
2991
2991
* Build melee weapon attack macro
2992
2992
*/
2993
2993
2994
- var buildMWattkMacros = function ( args , senderId , charCS , tableInfo , mwIndex , backstab = false ) {
2994
+ var buildMWattkMacros = function ( args , senderId , charCS , tableInfo , mwIndex , backstab = false ) { // toLowerCase()
2995
2995
2996
2996
return new Promise ( resolve => {
2997
2997
@@ -3225,7 +3225,7 @@ var attackMaster = (function() {
3225
3225
setAbility ( charCS , 'Do-not-use-DmgL-MW' + mwNumber , ( parseMWattkMacro ( args , charCS , attkType , addDmgMsg ( dmgMacroDef . obj [ 1 ] . body , dmgMsg , weapDmgMsg ) ) + attkMacro ) ) ;
3226
3226
hitCharges = ( hitCharges == '' ? 1 : hitCharges ) ;
3227
3227
attkMacro = weapCharged && hitCharges ? ( '\n!magic --mi-charges ' + tokenID + '|-' + hitCharges + '|' + miName + '||' + weapCharged ) : '' ;
3228
- attkMacro += ( ( weaponName !== miName ) && attrLookup ( charCS , fields . Items_reveal , fields . Items_table , miRowref ) . toLowerCase ( ) == 'use' ) ? ( '\n!magic --button GM-ResetSingleMI|' + tokenID + '|' + miRowref + '|silent' ) : '' ;
3228
+ attkMacro += ( ( weaponName !== miName ) && ( attrLookup ( charCS , fields . Items_reveal , fields . Items_table , miRowref ) || '' ) . toLowerCase ( ) == 'use' ) ? ( '\n!magic --button GM-ResetSingleMI|' + tokenID + '|' + miRowref + '|silent' ) : '' ;
3229
3229
attkMacro += weapCmd ? ( '\n' + weapCmd ) : '' ;
3230
3230
attkMacro += touchWeap ? ( '\n!attk --blank-weapon ' + tokenID + '|' + miName + '|silent' ) : '' ;
3231
3231
if ( abilityType == Attk . TARGET ) {
@@ -3551,8 +3551,8 @@ var attackMaster = (function() {
3551
3551
} ;
3552
3552
attkMacro += ( ( weapCharged && hitCharges ) ? ( '\n!magic --mi-charges ' + tokenID + '|-' + hitCharges + '|' + miName + '|' + weapChgType ) : '' ) ;
3553
3553
if ( abilityType === Attk . TARGET ) weapCmd = weapCmd . replace ( / @ { target\| .* ?\| ? t o k e n _ i d } / igm, '@{target|Select Target|token_id}' ) ;
3554
- attkMacro += ( ( weaponName !== miName ) && attrLookup ( charCS , fields . Items_reveal , fields . Items_table , miRowref ) . toLowerCase ( ) == 'use' ) ? ( '\n!magic --button GM-ResetSingleMI|' + tokenID + '|' + miRowref + '|silent' ) : '' ;
3555
- attkMacro += ( ( ammoName !== ammoMIname ) && attrLookup ( charCS , fields . Items_reveal , fields . Items_table , ammoRowref ) . toLowerCase ( ) == 'use' ) ? ( '\n!magic --button GM-ResetSingleMI|' + tokenID + '|' + ammoRowref + '|silent' ) : '' ;
3554
+ attkMacro += ( ( weaponName !== miName ) && ( attrLookup ( charCS , fields . Items_reveal , fields . Items_table , miRowref ) || '' ) . toLowerCase ( ) == 'use' ) ? ( '\n!magic --button GM-ResetSingleMI|' + tokenID + '|' + miRowref + '|silent' ) : '' ;
3555
+ attkMacro += ( ( ammoName !== ammoMIname ) && ( attrLookup ( charCS , fields . Items_reveal , fields . Items_table , ammoRowref ) || '' ) . toLowerCase ( ) == 'use' ) ? ( '\n!magic --button GM-ResetSingleMI|' + tokenID + '|' + ammoRowref + '|silent' ) : '' ;
3556
3556
attkMacro += weapCmd ? ( '\n' + weapCmd ) : '' ;
3557
3557
attkMacro += touchWeap ? ( '\n!attk --blank-weapon ' + tokenID + '|' + miName + '|silent' ) : '' ;
3558
3558
setAbility ( charCS , 'Do-not-use-Attk-RW' + rwNumber + '-' + dist , attkMacro ) ;
0 commit comments