Ticket #44769

Fix illegal movements by edit.unit_move()

Open Date: 2022-06-07 04:01 Last Update: 2022-12-04 07:52

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
2

Details

I was pretty sure that calling (Archers):move(TileNearbyWithEnemyMigrants, 1) will make the Archers capture the Migrants, or at worst case it will be blocked, but in fact it puts the archers on the same tile with enemy units without capturing them. Likely, it can create other illegal positions. Btw, I can't understand, would 3.0 or later method ever do some actions you'd expect from emulating arrow key pressed by Lua.

Ticket History (3/8 Histories)

2022-06-07 04:01 Updated by: ihnatus
  • New Ticket "Fix illegal movements by edit.unit_move()" created
2022-06-07 04:10 Updated by: cazfi
Comment

Reply To ihnatus

would 3.0 or later method ever do some actions you'd expect from emulating arrow key pressed by Lua.

Given how goto-moves cannot handle them (e.g. #44496), I'm not overly optimistic.

2022-08-05 08:59 Updated by: cazfi
2022-10-07 09:29 Updated by: cazfi
2022-11-26 23:01 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
Comment

Attached patches should do it - not properly tested yet. For S3_0 will need also to check that passing NULL as embark_to isn't compatibility break (is the traditional behavior to embark to automatically selected transport?)

2022-12-04 07:52 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login