I stumbled across this while debugging my replay parsing.
If you first remove and then upgrade a unit all on the same turn,the remove will be ignored and the upgrade will go through, but both the remove and the upgrade action show up in the replay file.
I think that in this case the remove should not be ignored. The piece should be upgraded and then removed at the end of the turn.
I agree that it would be ideal if turn submissions were commutative, IE telling the engine “I want to do X, Y, and Z” is always the same as “I want to do Z, Y, and X”
I agree that it is miss-leading that the ‘ghost’ removal appears on the replay file
I agree that it is unintuitive that a unit that we mark for removal is ‘unmarked’ after being upgraded
I am going to change it so that both the upgrade and the removal are applied to the unit regardless of what order the actions are submitted in. This change will be released at some point over the next few weeks.