Try this. Set your weapon to have some ToStun and ToMorale, and give it a value for the tag ITEM_STUN_ON_LOW_MORALE other than 0. The script will set ToStun to 0 unless the target has 0 morale. If you want it to be more complex, e.g., maybe reduced stun damage when morale is higher instead of just 0 stun damage, you'll just need to change the last 3 lines before the final 'return;' to set to_stun however you'd like.
Thks! i will try it and give feedback soon enough
--- posts merged ---so i just tested and got my mind puzzled
- type: STR_SEDUCE
requires:
- STR_ALIENS_ONLY
tags:
ITEM_STUN_ON_LOW_MORALE: 1
size: 0.2
costSell: 2050
weight: 5
bigSprite: 267
floorSprite: 150
handSprite: 480
meleeSound: 753
meleeHitSound: 709
meleeAnimation: 48
power: 30
damageAlter:
RandomType: 3 #3-> Flat [100% - 100%]
ToStun: 1.0
ToMorale: 1.0
ArmorEffectiveness: 0.0
damageType: 6
accuracyMelee: 110
tuMelee: 15
clipSize: -1
battleType: 3
twoHanded: false
invWidth: 1
invHeight: 3
armor: 12
recover: true
attraction: 7
listOrder: 3011
So Stun damage is still applied before complete depletion of moral , so i guess i´m doing something wrong , also i don´t understand why with
power: 30
RandomType: 3 #3-> Flat [100% - 100%]
ArmorEffectiveness: 0.0
also the armor damage modifier is 1.0 to stun
and the damage is not a constant 30 (does some melee dodge plays a part in this?)