Bluemofia
F=ma
Oni Ryuu,
Disclaimer: I don't know how exactly the coding is done, but I do have coding background and I have played around with the default behavior.
That being said, either:
*Flat out impossible (the unit type is set to 1, 2, or 3, with 1 corresponding to land, 2 to water, and 3 to air, so you literally can't pick multiple types)
*This will behave as whatever the game checks for and finds first (such as, if it has an air flag at all, it will always be treated as an air unit regardless of the other types checked)
*This crashes the game
*It behaves as if it were a mix of unit types, but in an unpredictable way, and the game's code will have to be highly inefficient.
There are two primary properties units of land/water/air types have. Legal movement tiles, and "priority victory". For legal movement tiles, you need to have some way to determine what tiles the units can move on. Land units can only move on land tiles, water units can only move on water tiles, and air units can move on all tiles. Water and air units also cannot capture cities, only land units. Also water units can only be built in coastal cities as a further restriction.
Other than legal movement tiles, the class of unit is used to determine who will win when attacked, where it goes as Land beats Water beats Air units. For example, if you removed immobile from a fighter, you can fly around and directly attack land and water units, but if you are attacked in turn, it automatically is destroyed. For water units there isn't an equivalent, as you can't use water units to attack cities directly, the only places where land units can interact with them, but if a land unit attacks a city with a water unit, it automatically destroys them. Same with air units.
The movement system and priority victory system will run into problems if a unit belongs to multiple types, and how it will probably work, is that either one of the types is a default type (probably land) and the others are flagged as non-default and thus will take priority if it is checked. If two non-default types are checked (such as water and air) then one of them will take priority over the other present because code can only check for the presence or absence of one flag at a time.
For example, assume there is a default type, and assume it is land (it doesn't matter which, just swap land with water or land with air). Now assume the code checks for the "air" flag before it checks for the "water" flag when executing unit actions, before defaulting to land behavior. If the unit is checked as land, water, and air, it will first check for the air flag, find the air flag present, and treat it as an air unit, ignoring the water flag. If it was land and air flag checked, same thing. If it was land and water, it will not find the air flag, and then find the water flag, and execute it as if it were a water unit.
Now assume there is no default type, so each unit has a flag, rather than a default type, but it still checks it in the same order (first for air, then water, then land). Same thing will result. This is pretty sloppy coding though, because of the case if no type is chosen, and one of two things will happen. Either, it will crash the game because there is no default behavior for none-flags, and the game won't know what to do, or it will not be allowed to move on any terrain, and for the priority victory it will either be at the very top of the list (assuming it can even attack at all), or at the very bottom, leading to instant destruction (so basically a Piñata unit which does nothing but die when attacked).
The only possibility of it behaving differently from these would be if it applies the "property of water units", or "property of air units", or "property of land units" based on the presence of the flags when doing actions. This is *very* sloppy code, as you are doing stupidly huge amounts of unnecessary calculations for every action, and this has many possibilities. Either it overwrites it, behaving similar to the first example, it will crash the game because of some weird interaction between the code (such as simultaneously being able and unable to attack cities), or it will move as an air unit (it can move anywhere) but not be destroyed upon attack like a land unit (if it has at least the air and land flags checked), or some mix of actions based on however the natural attributes of each flag come into play. Oh, and in the null types selected case, you will also have the Piñata unit again.
Disclaimer: I don't know how exactly the coding is done, but I do have coding background and I have played around with the default behavior.
That being said, either:
*Flat out impossible (the unit type is set to 1, 2, or 3, with 1 corresponding to land, 2 to water, and 3 to air, so you literally can't pick multiple types)
*This will behave as whatever the game checks for and finds first (such as, if it has an air flag at all, it will always be treated as an air unit regardless of the other types checked)
*This crashes the game
*It behaves as if it were a mix of unit types, but in an unpredictable way, and the game's code will have to be highly inefficient.
There are two primary properties units of land/water/air types have. Legal movement tiles, and "priority victory". For legal movement tiles, you need to have some way to determine what tiles the units can move on. Land units can only move on land tiles, water units can only move on water tiles, and air units can move on all tiles. Water and air units also cannot capture cities, only land units. Also water units can only be built in coastal cities as a further restriction.
Other than legal movement tiles, the class of unit is used to determine who will win when attacked, where it goes as Land beats Water beats Air units. For example, if you removed immobile from a fighter, you can fly around and directly attack land and water units, but if you are attacked in turn, it automatically is destroyed. For water units there isn't an equivalent, as you can't use water units to attack cities directly, the only places where land units can interact with them, but if a land unit attacks a city with a water unit, it automatically destroys them. Same with air units.
The movement system and priority victory system will run into problems if a unit belongs to multiple types, and how it will probably work, is that either one of the types is a default type (probably land) and the others are flagged as non-default and thus will take priority if it is checked. If two non-default types are checked (such as water and air) then one of them will take priority over the other present because code can only check for the presence or absence of one flag at a time.
For example, assume there is a default type, and assume it is land (it doesn't matter which, just swap land with water or land with air). Now assume the code checks for the "air" flag before it checks for the "water" flag when executing unit actions, before defaulting to land behavior. If the unit is checked as land, water, and air, it will first check for the air flag, find the air flag present, and treat it as an air unit, ignoring the water flag. If it was land and air flag checked, same thing. If it was land and water, it will not find the air flag, and then find the water flag, and execute it as if it were a water unit.
Now assume there is no default type, so each unit has a flag, rather than a default type, but it still checks it in the same order (first for air, then water, then land). Same thing will result. This is pretty sloppy coding though, because of the case if no type is chosen, and one of two things will happen. Either, it will crash the game because there is no default behavior for none-flags, and the game won't know what to do, or it will not be allowed to move on any terrain, and for the priority victory it will either be at the very top of the list (assuming it can even attack at all), or at the very bottom, leading to instant destruction (so basically a Piñata unit which does nothing but die when attacked).
The only possibility of it behaving differently from these would be if it applies the "property of water units", or "property of air units", or "property of land units" based on the presence of the flags when doing actions. This is *very* sloppy code, as you are doing stupidly huge amounts of unnecessary calculations for every action, and this has many possibilities. Either it overwrites it, behaving similar to the first example, it will crash the game because of some weird interaction between the code (such as simultaneously being able and unable to attack cities), or it will move as an air unit (it can move anywhere) but not be destroyed upon attack like a land unit (if it has at least the air and land flags checked), or some mix of actions based on however the natural attributes of each flag come into play. Oh, and in the null types selected case, you will also have the Piñata unit again.