Fixes the first problem in https://github.com/wesnoth/wesnoth/issues/3687#issuecomment-502403962:
> you played an MP game, the game is over and the map uncovered – you see now all units, but hotkeys don't work on previously shrouded ones
Note that SP linger mode, and MP linger mode when reveal_map == false,
are not affected.
Changes from the research refactoring can also be applied here:
- only storing sides gold instead of the whole side
- removing helper variable for loop
Then spiders got an extra side
The Lvl 0 ones never pay upkeep and got their own macro
The Lvl 2 Guards got the loyal trait
That way it's clearly communicated that all these units don't pay
upkeep, without being obstrusive about the fact.
not necessary, side effects:
- it's obvious that they don't cost upkeep
- no vision sharing of the caves with the enemies
- can also attack the enemies though that probably won't happen
Killing a guardian (the guards or a spider) punished the player,
because the AI then doesn't need to pay upkeep anymore for that unit.
That has been changed, and as the AI has thus less cost, the income needs
adjustments too:
The following has been taken into account:
- the guardian units had upkeep costs of 7g
- the AI has 3-4 villages, each worthy 1g of village_support
* before turn 7, the AI can't recruit Lv 1 units. From turn 9 it recruits
exclusively Lv 1 units.
* This means in the early game the AI payed just 4g upkeep for the
guardians and when it managed to recruit 3 Lv 1 units it was equal to 7g
- in the late game the AI may need more money in general, as Lv 2 units are
expensive. The fact that the AI gets 50g in turn 17 means that the income
is too low to buy the units normally.
The general idea is to have with this change same amount of money in the
early game and the same or more in the late game.
To address the above:
- 4g less income
- the Lv 3 spider is usually killed in each game, often before turn 7. It's
seen as compensation for the village_gold
- The income of the AI is increased in relation to the turns. From turn 15 on:
Each turn one of the AIs gets +1g income – in average +1g income each 4 turns.
- by building a house between the swamp and the guardian the restriction
could have been bypassed. And because attacking a unit next to the swamp
has higher priority compared to capturing the house it's not very dangerous
- also use the same macro for guardians and leaders movement restrictions
The main reason for moving this to a separate function was to make the
per-event variables local to that function.
(cherry picked from commit 7e69da7f68b10bdf231ebb785b3c73109dc378a8)
This just moves the existing code, and adds a todo for handling in a later commit.
(cherry picked from commit a3cf683348168619a299c9907fce1d1b4ee9f245)
The color scale is reversed between Taken and Inflicted:
Row Color of "hitting less than actual" Color of "hitting more than actual"
--- ----------------------------------- -----------------------------------
Inflicted green to red red to green
Taken red to green green to red
This way, in both rows green means "It could have been better" and red
means "It could have been worse". Basically, green means the RNG
favored the enemy sides, and red means the RNG favored the current side.
The _a priori_ probability of the actual result is intentionally left uncolored.
Make the contents of the table cell the same regardless of whether
actual<expected or actual>expected. For example, 2 hits out of
4 strikes at 70% now shows "8.4%, 26.5%, 65.1%", which are the
probabilities of hitting less than twice, exactly twice, and more than
twice, respectively.
Color has been temporarily removed, will be restored in the next commit.