JanusTalaiini
Prince
- Joined
- Dec 12, 2005
- Messages
- 340
Redirected from the bug thread so as not to clog that thread with this discussion.
Recap of discussion thus far:
Recap of discussion thus far:
Playing .32, patch a:
the guardsman promotion is not working as advertised. My archmages that were in the same stack as phalanx units with the guardsman promotion were attacked and killed by svartalfar assassins and shadows, phalanx units were untouched.
That's the whole point of using assassins and shadows... they can do "precision strikes" and kill physically weak units first.
I realize that, but I was under the impression that the Bannor's "guardsman" promotion was designed to counter that. Am I mistaken? And if so, what's the point of the promotion?
Taken from the pedia entry on the guardsman promotion: Guards against enemy marksman units. So, Janus Talaiini was in fact correct in reporting said bug.
Yeah, well, the promotion doesn't actually make the unit always defend against marksmen, it just makes this much more likely. The fact that Phalanxes ' strength is so much higher than an Archmages, and the fact that Archmages have channeling 1-3 (all of which make them better targets for marksmen), make their failure to defend the archmage reasonable.
I don't think it is a bug, but it among the many things that could use better documentation
Given that, the next turn, my Chalid hero was attacked by ten assassins in the same stack with the guardsman-phalanxes and defended each and every time, I would question how often "much more likely" is. As I've observed it, it's having absolutely no effect whatsoever.
Hearing this, it sounds quite likely that your Archmages and Chalid have the Guarsdman promotion, too. In that case, it wouldn't help at all, or, at the very least, not much.
The idea of the Guardsman promotion is to have units with Guardsman in a stack with other weak units who don't have it, therefore increasing their chance to defend in relation to those units without the Guardsman promotion.
It might also have become buggy somehow, though.
The Guardsman promotion isn't supposed to be random as far as I know. But it's possible that it wouldn't be able to counter Channeling I, II and III. In that case, you'd still have to put Hawks, Workers, Scouts etc. into your stacks.
That was one of the first things I checked, actually. The archmages and Chalid did not have the guardsman promotion.
The problem is in how the defender is selected. If the attacker has the Marksman Promotion, then it uses this pass to get the defender:
Code:if (pBestUnit == NULL || (pBestUnit->isBetterDefenderThan(pLoopUnit, pAttacker) && !pBestUnit->isTargetWeakestUnitCounter())) { pBestUnit = pLoopUnit; }
That IF statement says that if there is nothing targetted yet, to target whatever unit is being tested. But if there already is a potential Victim, then it checks to see if the new checked unit is weaker. If the new unit is weaker, it becomes the best target Unless the old target was set to block the Marksman Promotion.
Now, this works perfectly well in the cases where the attacker attempts to target the Guardsman Unit first. But if it attempts to target some other unit instead, then the Guardsman Unit will never be weaker than that unit, so will never be selected (notice that there wasn't a statement in the IF line to check if the new unit we are looking at was set to Guardsman).
Example: Assassin Attacks, first unit checked is an Archmage, barring a Hawk, Worker or Corlindale in the stack, nothing will ever be a worse defender option, so the target will never change. If instead the first unit checked was the Warrior with Guardsman, then since he has Guardsman, the target would never change (not even if the Mithril Golem himself was on the tile and happened to have Guardsman somehow)
What should work in place of this would be:
Code:if (pBestUnit == NULL || (pBestUnit->isBetterDefenderThan(pLoopUnit, pAttacker) && !pBestUnit->isTargetWeakestUnitCounter()) [COLOR="Red"]|| (pLoopUnit->isTargetWeakestUnitCounter() && (pLoopUnit->isBetterDefenderThan(pBestUnit, pAttacker) || !pBestUnit->isTargetWeakestUnitCounter()))[/COLOR]) { pBestUnit = pLoopUnit; }
This way if the attacker has the Marksman Promotion and any defender in the stack has Guardsman, it will select the strongest of the Guardsman units to defend, but no matter what it WILL select a unit with Guardsman every time.
I don't think that makes much sense. The more raw strength a unit has, the more it will have to focus on the frontlines - it certainly won't be able to keep assassins at bay. The Guardsman promotion shouldn't make 100% of Assassins, etc. useless, I think.
Totally reworking the Guardsman promotion (random suggestion: change it into a spell that applies a promotion that decreases strength but further increases chance to defend against assassins, wears off after one turn/wears off when deactived, but I don't like that one, either) might work better, but I don't see the point of having one Guardsman Paladin in the stack obsoleting 10 Assassins (which cannot even use Bronze/Iron/Mithril weapons exactly because they aren't supposed to attack T4 units with high strength values)). If that was the case, I think the promotion would become too strong or at the very least make another game mechanic useless. (Which is the definition of a balancing problem.)
Yes, it needs to be changed, but certainly not in a way that makes Guardsman useful and another mechanic useless. (Besides, it's supposed to make defending more likely in every case, whereas Channeling is supposed to make defending less likely. I don't see why Guardsman should be able to counter Channeling I, II and III on a unit and then still select a 10+ strength unit against the Marksman promotion which is supposed to target the weakest unit in the stack.)
If it was changed like that, one would probably have to change the Marksman promotion so that choosing one's targets becomes possible (if the opponent has Guardsman you can only select units with Guardsman), but that would probably be a micromanagement hassle.