Quote:The only place where I see there might be a problem is if the colossus has higher garrison priority than magician.Which it does.
Quote:In that case, all we need to do is do a check for if the required garrison is already met. If it has, just push it out. Any other units weaker than Colossus but higher priority than magician can go into garrison, and push the magician out.I don't understand. So first you are saying the 4th best unit goes out now you say the 4th best unit stays. That's impossible.
Quote:Summon a hell hound --> over9 pushes it out of garrison because it's weaker than magician --> run stackbuilding and it takes the hell hound
Summon a 4th colossus --> over9 pushes it out of garrison because there is already 3 colossus and we are peaceful --> run stackbuilding and it takes the colossus.
This basically says :
1. Send the lowest garrison priority unit out
2. Send the strongest unit out that's weaker than the mandatory garrison.
Which is 100% identical to the existing one, you only changed which function handles which rule by moving both to the same function.
Yes if we have two rules and we always apply the correct one then that works, I have been trying to ask "define which rule to use when" the whole time. You haven't defined it.
(this is true regardless of unit strength and garrison priority being different metrics. If both used the same metrics it still means we need to select one rule from the two to use on a case by case basis.)