Who defends when multiple units?

jamison170

Chieftain
Joined
Jun 30, 2009
Messages
12
I had infantry and SAM infantry on square. I got attacked by Gunship. Why did my infantry defend first? Both were at full HP
 
I long ago gave up trying to figure that one out. I think only TMIT understands it. Last night a C1 axeman attacked one of my cities. The plains city had a CR2 swordsman and a C1/Shock chariot in it. The machine chose to have the Sword defend who of course died. I can't believe that the chariot didn't have much better combat odds but who am I to say. To be honest it generally does a pretty good job but sometimes you just shake your head.
 
If your Infantry had a few City Garrison promotions, it likely had a higher chance to win. That's really the only reasoning that I can think of.

I long ago gave up trying to figure that one out. I think only TMIT understands it. Last night a C1 axeman attacked one of my cities. The plains city had a CR2 swordsman and a C1/Shock chariot in it. The machine chose to have the Sword defend who of course died. I can't believe that the chariot didn't have much better combat odds but who am I to say. To be honest it generally does a pretty good job but sometimes you just shake your head.

I'd be willing to bet the Swordsman had a much higher chance to win than the Chariot. The Chariot's +100% vs Axemen is only for attacking, not defending. Plus on top of that, Chariots receive no defensive bonuses.
 
Ah I forgot that, that makes more sense. So a chariot with C1/Shock would be a 5.4 versus a 5.5 for the axeman. A CR2 sword is a 6.6 (not fortified, in a plains city, I think a city bonus is 10% but I could be wrong) while the C1 axe is an 8. Nope the chariot is still better but he would probably lose the fight. I'm sure I am just not taking into account all the modifiers somehow but it's still annoying. Actually I am most annoyed at myself for not seeing the axeman approaching the city or else I would have mowed him down with the chariot. Lesson 212, always take the choice away from the computer if you can. Thanks.
 
what was the culture bonus for the city? how long had the sword been fortified?

combat 1 axe vs. c1/shock chariot is 33.15%.

C1 axe vs. sword in a 20% culture city with a 25% fortification is 30.93, so the sword would be picked first
 
Sword was not fortified. It had just moved in. I'll have to check the culture. I don't think more than a few %. I had taken the city only a little before and it had just gotten out of unrest. I think I just completed a monument 3 or 4 turns previously. Might be enough to throw the Sword over the top after the city terrain benefit.
 
I long ago gave up trying to figure that one out. I think only TMIT understands it. Last night a C1 axeman attacked one of my cities. The plains city had a CR2 swordsman and a C1/Shock chariot in it. The machine chose to have the Sword defend who of course died. I can't believe that the chariot didn't have much better combat odds but who am I to say. To be honest it generally does a pretty good job but sometimes you just shake your head.

:lol:. I'm flattered but there are so many people who understand the code of this game better than me. Due to lots of games and lots of warfare, I do, however have a good feel for what units will defend and why.

The sword was likely chosen over the chariot due to some form of defensive bonus. It could be anything. A hill, culture, fortification, and so on.

However, the mechanics of chosen defender are quite complex. Caravels will defend (and probably should defend) loaded galleons, and there's some interesting situations where units with first strikes will be called first even if damaged and having lower odds due to defensive terrain.

Still, chariots make for poor defenders. In a lot of instances the swords will function better. I actually hate attacking AI swords early in the game, because even axes start losing if it's a hill city with some culture D or a wall, and other than spears they're the worst thing for mounted to run into that early (elephants are a bit later/easier to plan to fight).
 
I had infantry and SAM infantry on square. I got attacked by Gunship. Why did my infantry defend first? Both were at full HP

Infantry have a strength of 20, SAM only have 18. Of course it would come up as a defender, it's the strongest unit. Gunships are not air units, they're land units with extra movement points.
 
Infantry have a strength of 20, SAM only have 18. Of course it would come up as a defender, it's the strongest unit. Gunships are not air units, they're land units with extra movement points.

Gunships are Helicopter Units. Basicly the same as land Units with extra movement points.

But I thought SAMs had a bonus against them.
 
Gunships are Helicopter Units. Basicly the same as land Units with extra movement points.

But I thought SAMs had a bonus against them.

Yeah you're right, they get a 75% bonus. I guess it was a good question after all, that does seem odd.
 
I had infantry and SAM infantry on square. I got attacked by Gunship. Why did my infantry defend first? Both were at full HP

The infantry probably had better promotions than the SAM and/or the infantry was fortified longer than the SAM and had a higher fortify bonus.
 
The infantry probably had better promotions than the SAM and/or the infantry was fortified longer than the SAM and had a higher fortify bonus.

That's my gut feeling also. For example, guerrilla II or better infantry on a hill or high CG infantry in a city will come up as better defenders. SAMs defend at a little bit more than 31 str on flat terrain w/o promotions if they have a 75% bonus. Give an infantry 50% hill defense and some fortification and it's better (unless SAM also has fortification). Generally though, infantry defending instead should be pretty rare.
 
However, the mechanics of chosen defender are quite complex. Caravels will defend (and probably should defend) loaded galleons,
I'd agree with that, but the same logic also means that empty transport after empty transport get sunk while a full-health upgraded missile cruiser that happens to have missiles on board stands by, even though it would have >99% odds against the attacker.

It should only pick weaker empty units if the combat odds for the loaded stronger unit are below some threshold.
 
The defender will always be the unit that has the biggest chance to win, period. If it was ONLY a gunship attacking, then the SAM infantry -would- have defended. However, if the SAM infantry defended, then the AI would have attacked with another unit which would have steamrolled your SAM infantry.
 
The defender will always be the unit that has the biggest chance to win, period. If it was ONLY a gunship attacking, then the SAM infantry -would- have defended. However, if the SAM infantry defended, then the AI would have attacked with another unit which would have steamrolled your SAM infantry.
Well, that's just about exactly how it does *not* work.

Only one unit can attack at a time (stack attack doesn't change that). The defender is the unit with the best combat odds against that specific attacker.
 
That's entirely untrue. The defender always gets to put the best unit forward, first. It's always been like that, and is proven by the OP's scenario.
 
That's entirely untrue. The defender always gets to put the best unit forward, first. It's always been like that, and is proven by the OP's scenario.
You're wrong. It's as simple as that. The defender is chosen based on the specific attacker, because there is no best defender in general.

Take a stack of unpromoted units like this:

Gunship
SAM Infantry
Modern Armor

If you attack this stack with a Modern Armor, the Gunship will defend, since it has a built-in bonus against tanks that makes it a stronger defender than the other MA. If you attack it with a Gunship, the SAM will defend, because its built-in bonus against helicopters makes it stronger than the other Gunship (and the built-in weakness against helicopters makes the MA a poor defender). If you attack with a Marine unit, then the Modern Armor will defend, because there are no special bonuses in play, which allows its inherent strength advantage to win out. Adding promotions to the mix can easily change the results. But the overriding rule is that the chosen defender is always the unit with the best defensive combat odds against the attacker (which aren't always the same as the odds while attacking, so you can't check them by pretending to attack).

That's how it has always worked. The original poster is simply not presenting his situation accurately, one way or the other.

The rule is broken in ocean combat with container units, where the presence of cargo demotes a potential defender (excessively so, hence my earlier comment about Missile Cruisers).
 
That's entirely untrue. The defender always gets to put the best unit forward, first. It's always been like that, and is proven by the OP's scenario.

No it does not. The AI will usually protect its seige and transports to a degree before putting them up as the defending unit (at least in the later versions of BtS). The AI would defend with a half-dead infentry before it risks defending with a full health art. I've rarely, if ever, seen a cat defend while there is another unit with any more than 2 str on the tile.
 
But the overriding rule is that the chosen defender is always the unit with the best defensive combat odds against the attacker (which aren't always the same as the odds while attacking, so you can't check them by pretending to attack).

That's my point! But you can order an entire stack of units to attack, and the one with the best odds will attack first...but the best defender will fight against that.
 
Back
Top Bottom