Legend_of_the_Invincibles
Legend_of_the_Invincibles copied to clipboard
Make cataclysmal Demon Lords use their firestorm
The AI picks the highest damage, and doesn't know about the storm special. Normal fireball damage is 123, 156, 195, which is higher than firestorm. That means it always picks normal fireball and never picks firestorm. Upgrade firestorm damage so it will get used.
Side note: Shouldn't the specially coded version of storm be replaced by {WEAPON_SPECIAL_STORM} ? I don't know if there is some reason for it to be the way it is.
It's probably some forgotten legacy code, abilities now check who is whose enemy instead of using lists of enemy sides and there's no problem with enemies having special attacks originally designed to be used by side 1.
"What attack will AI choose" can be prioritized by setting attack_weight= for the attack. There is no need to change the damage, etc.
I believe attack_weight doesn't actually work correctly, except for zero vs non-zero. I know I tried messing with defense_weight / attack_weight for various things a long time ago (over a year ago with 1.12) and it didn't work properly. Maybe see Wesnoth github issue 1360. When I try just now, it doesn't work. Demon Lord with 110-1 firestorm, but attack_weight=2, (so 220) uses fireball instead (195).
I think it is a value that can be in range between 1 and 0 and some time ago, all values between 0 and 1 were rounded, so it could only be used to disable attacks. However, I don't know how is it now.
I believe attack_weight doesn't actually work correctly, except for zero vs non-zero.
How about attack_weight=0 for fireball then?
Could be done, I think.