Dugy / Legend_of_the_Invincibles

An add-on campaign for the Battle for Wesnoth game
GNU General Public License v3.0
40 stars 22 forks source link

I can't attack Orcish Strafer in ranged #836

Closed Discontinuum closed 1 month ago

Discontinuum commented 2 months ago

Was it supposed to be like that, for buffing, or is it an unintended side effect? image

Dugy commented 2 months ago

That looks like some weapon special on that Orcish Strafer is affecting the enemy attack count, but it's hard to tell without a save file. Also, my understanding of Russian is quite crude, so there might be something obvious that I am not noticing.

Discontinuum commented 2 months ago

I believe it's whirlwind

Dugy commented 2 months ago

Yeah, I did give him ranged whirlwind and that will make him negate attacks. But the issue is that whirlwind should be attack-only, which it isn't here.

Discontinuum commented 2 months ago

I wonder if it's fixable by just making whirlwind as a weapon special active on offense only. This has never been a problem before as whirlwind attacks in LotI always used to be attack-only, and Strafer now became the first exception

Dugy commented 2 months ago

It's totally doable now. There is a [disable] weapon special that can conditionally disable an attack, so if the weapon special is active on defence, it will prevent the attack from being used defensively. It can be just added to the weapon special's macro as another silent weapon special. Easy.

At the time I was implementing whirlwind, there was no such thing, I had to use the defense_weight= trick.

Discontinuum commented 1 month ago

Yeah, although I had in mind the strikes reduction. I guess it's some kind of a weapon special attached to whirlwind (or whirldwind itself) that makes the enemy's strikes count 0. And I thought making it active only on offense. AoE damage in LotI is triggered by "attacker hits" events so it shouldn't trigger in that case (like, the Elder Mage afaik doesn't do explosive damage if he retaliates with his explosive spell. At least I thought it worked so)

Dugy commented 1 month ago

Okay, now it should be fixed. Whirlwind is unusable in defence. It does not need the defense_wieght=0 setting on attacks.

I know that explosive affects do work defensively, but the weapon special does nothing. In whirlwind's case, the animation and the blocking of enemy retaliation would have rather odd consequences on gameplay if t was used defensively (and it would be too strong if it did work).

Existing Orcish Strafers will not be affected unless their inventory is touched.