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

Shockwave can push units off the map #837

Open Chergnobarp opened 1 week ago

Chergnobarp commented 1 week ago

Yesterday, I pushed Achilles off the edge of the map with shockwave, which made Gehenna unwinnable.

Easy enough to check whether affected units are in bounds before unstoring them, but I wanted to check that that's the ideal solution before doing that. I'm kind of surprised that find_vacant=yes and check_passability=yes don't take care of it, so maybe it's actually a wesnoth bug.

Dugy commented 1 week ago

Placing a unit at a location outside of map boundaries is a valid operation that will move the unit to the recall list. Units on the recall list are considered alive. But good luck killing them to complete scenario objective.

I think a solution for this would be to create a WML tag for knockback that would simply not knock the unit back if there is no reasonable placement. I will do it when I finish some other thing that I am doing right now.