Sure.. you use simple conditions to check for a limited number of situations which provide advantage or penalty, based on the very specific unit bonuses per terrain, in the game file, as shipped.
If you want the engine to adapt to a flexible bonus, which a player changes, then you need to calculate it dynamically... which is costly.
You could save a tiny bit by using a flat modifier instead of a coefficient, in the final weighting, but you'd need to assume X units, for that approach, and if there are more or less in a particular defense or attack, that will lead to poor technique by the AI.
If you want the engine to adapt to a flexible bonus, which a player changes, then you need to calculate it dynamically... which is costly.
You could save a tiny bit by using a flat modifier instead of a coefficient, in the final weighting, but you'd need to assume X units, for that approach, and if there are more or less in a particular defense or attack, that will lead to poor technique by the AI.
Comment