Legend_of_the_Invincibles icon indicating copy to clipboard operation
Legend_of_the_Invincibles copied to clipboard

Make cataclysmal Demon Lords use their firestorm

Open dalong76 opened this issue 6 years ago • 7 comments

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.

dalong76 avatar Jan 29 '19 14:01 dalong76

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.

dalong76 avatar Jan 29 '19 14:01 dalong76

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.

Dugy avatar Jan 29 '19 17:01 Dugy

"What attack will AI choose" can be prioritized by setting attack_weight= for the attack. There is no need to change the damage, etc.

edwardspec avatar Jan 29 '19 17:01 edwardspec

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).

dalong76 avatar Jan 29 '19 20:01 dalong76

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.

Dugy avatar Jan 29 '19 20:01 Dugy

I believe attack_weight doesn't actually work correctly, except for zero vs non-zero.

How about attack_weight=0 for fireball then?

edwardspec avatar Jan 29 '19 21:01 edwardspec

Could be done, I think.

Dugy avatar Jan 29 '19 21:01 Dugy