Rome team bonus in the current version affects also ally champion infantry for a -20% training time which is quite relevant in a team game, thus this patch limits the effect to ally citizen soldiers only.
- rP21268: Only apply Roman team bonus to citizen-soldiers
Test checking infantry champions training time in the barracks before and after applying the patch.
Besides the fact we need to agree on that we really want such a patch (seems ok to me but my ack is not enough). The patch should be correct also: aura.affects is a classlist and matched vs another with MatchesClassList, there it says where spaces are handled as OR and '+'-signs as AND thus the patch is now giving the bonus to all units with either CitizenSoldier or Infantry, instead units having both.
nope has been like that for a long time (MatchesClassList works like that from before rP18000), it is probably just how you define "AND" since now the aura is added to CitizenSoldier and Infantry, which means that a unit needs to be CitizenSoldier OR Infantry (or both), not that the unit need to have CitizenSoldier AND Infantry as class.
standing at this aura then the iberian bonus should affect CitizenSoldiers or Javelin thus it should be applied also to Champion Javelin ( like briton javelin skirmisher champion cavalry)? actually it doesn't.
hmmpf you are right, however that is a bug (maybe the behaviour is wanted be still) caused by he array around the string. Also related to a comment from leper at D869. There either shouldn't be that array or we should use the proper array structure defined in the comment from MatchesClassList in Templates.js
Agree to nerf in the proposed approach.
So you're saying ["CitizenSoldier Infantry"] means Citizen and Infantry, but "CitizenSoldier Infantry" means Citizen or Infantry`?
Who would we be able to yell at?
|9 ↗||(On Diff #3441)|
No the code in this manner is not consistent with the rest of the codebase. I have been working on a patch fixing the stuff, but ran into the limitations of the MatchingClasses function (it doesn't allow braces). So whatever is done here doesn't matter as about everything is AND here.
according to: https://trac.wildfiregames.com/wiki/Aura_Templates
affects determines the classes it affects, listed as ["Class1 Class2", "Class3"], which means the target needs to have (Class1 AND Class2) OR Class3 to benefit from the aura.
the code syntax is right.