Wargus / wargus

Importer and scripts for Warcraft II: Tides of Darkness, the expansion Beyond the Dark Portal, and Aleonas Tales
GNU General Public License v2.0
360 stars 55 forks source link

human mission 10: Convert attacker units with wrapped CreateUnit #459

Closed zzam closed 5 months ago

zzam commented 5 months ago

With the original TransformUnit the unit-peasant become unit-attack-peasant only in GameCycle=2. But the Defeat-Trigger that counts them is already executed in in GameCycle=1. This trigger then counts 0 units of type 'unit-attack-peasant' and the mission is lost.

This happens since https://github.com/Wargus/stratagus/pull/626 was merged: b5e5bb0c6a18ccbf ("Merge pull request #626 from zzam/trigger-each-cycle")

Before the code was fragile but it worked due to the ordering of triggers.

Closes: https://github.com/Wargus/wargus/issues/458

Dileriuml commented 5 months ago

Tested locally on mac. Works just fine. Mission doesn't fail on start anymore and you can kill up to 4 peasants until mission actually fails