dai_upgrade_units() upgrades units inside action_list_iterate(), and it does not leave the iteration if one action success. It might try to apply multiple upgrade actions, and assumes that each of them would upgrade from the original unit type (old_type is set before the loop).
dai_upgrade_units() upgrades units inside action_list_iterate(), and it does not leave the iteration if one action success. It might try to apply multiple upgrade actions, and assumes that each of them would upgrade from the original unit type (old_type is set before the loop).