Commit graph

75233 commits

Author SHA1 Message Date
Severin Glöckner
2c06fb587e ANL: using second portrait for flavor
In this scenario, the player has only two types. Chances are
that the message for freeing a trapped unit may be spoken by
two Spearmans.
2019-06-15 23:32:49 +02:00
Severin Glöckner
b849adb0da ANL: switch Drake and Gryphon
Drake has an weakness to pierce, which the goblins use.
On the other hand, it has impact resist and does fire damage,
good against WC and skeletons. Thus the side switch.
Because both are quick units and close to each other it won't
confuse players either.
2019-06-15 22:26:52 +02:00
josteph
bf8d5a14d0 Make it possible to use the "unit description" command in replay mode on fogged/shrouded units.
Fixes #3687
2019-06-15 19:39:04 +00:00
Nils Kneuper
8491204c64 updated Turkish translation 2019-06-15 17:33:52 +02:00
josteph
6befb68e46 statistics_dialog: Optimize a little 2019-06-14 13:23:50 +00:00
josteph
9e0000a021 statistics_dialog: Show a single value for the quantile. 2019-06-14 13:23:48 +00:00
Severin Glöckner
8eaeecfd25 ANL: clear more variables on exit 2019-06-14 04:45:18 +02:00
Severin Glöckner
bdbb9664fc ANL: disable diplomacy actions towards yourself 2019-06-14 04:45:18 +02:00
Severin Glöckner
3925acd82f ANL: applying refactoring changes to other files
Changes from the research refactoring can also be applied here:
- only storing sides gold instead of the whole side
- removing helper variable for loop
2019-06-14 04:45:18 +02:00
Severin Glöckner
04d32e5d96 ANL: research options – check if choosen option is a change
Don't consume MP if the same option was choosen.
Also removed unneccessary code by using 1.13 additions.
2019-06-14 04:45:18 +02:00
Severin Glöckner
acc17f310c ANL: refactor variable
- store only what is needed
- free variable
2019-06-14 04:45:17 +02:00
Severin Glöckner
2683563fb3 ANL: use loyal trait to mark the lack of upkeep
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.
2019-06-14 04:45:17 +02:00
Severin Glöckner
69b293ce91 ANL: use core macros within anl macros 2019-06-14 04:45:17 +02:00
Severin Glöckner
238f07c779 ANL: use seperate side for spiders
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
2019-06-14 04:45:17 +02:00
Severin Glöckner
213ba8585c ANL: use loyal guardians and adjust income in return
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.
2019-06-14 04:45:17 +02:00
Severin Glöckner
e5ba221c7a ANL: income lock no longer required 2019-06-14 04:45:16 +02:00
Severin Glöckner
b2b9a90022 ANL: refactor income change
This opens up the possibility to change the income
2019-06-14 04:45:16 +02:00
Severin Glöckner
25a5633303 ANL: remove bottleneck from map (spider-area)
It's not the intention that players hide there for 20 turns without
putting up a fight.
2019-06-14 04:45:16 +02:00
Severin Glöckner
f11020db51 ANL: avoid unnecessary unstoring 2019-06-14 04:45:16 +02:00
Severin Glöckner
9042ced2a4 ANL: leaders take advantage of player's castles / villages 2019-06-14 04:45:16 +02:00
Severin Glöckner
48e2493359 ANL: disable swamp trick
- 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
2019-06-14 04:45:15 +02:00
Severin Glöckner
e258bea9bd ANL: code cleanup 2019-06-14 04:45:15 +02:00
Severin Glöckner
036d5e0732 ANL: new objectives screen 2019-06-14 04:45:15 +02:00
Severin Glöckner
0263189ea1 ANL: simplified help
- looks better without image
- no options where they are not needed
2019-06-14 04:45:15 +02:00
Severin Glöckner
c25c22098e ANL: use unsynced help menu 2019-06-14 04:45:15 +02:00
Severin Glöckner
cf102bd161 manpages: document how to set an empty side
[ci skip]
2019-06-14 01:59:20 +02:00
josteph
8fd251b5da statistics: Move the hitrate_t ostream formatter to the correct namespace, to match the declaration. 2019-06-13 19:15:29 +00:00
Steve Cotton
d6cac0c4e7 wmllint: Handle nested events and other things with filters in the death check (closes #4085)
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 7e69da7f68)
2019-06-13 19:26:50 +02:00
Steve Cotton
269b89f2e3 wmllint: Make a separate function for checking for units speaking in their die events
This just moves the existing code, and adds a todo for handling in a later commit.

(cherry picked from commit a3cf683348)
2019-06-13 19:26:50 +02:00
Severin Glöckner
055e793da6 wmllint: fix error in orcish leader rules
introduced in aa71482
[ci_skip]
2019-06-13 18:27:34 +02:00
Nils Kneuper
fc2ba5be24 updated Turkish translation 2019-06-13 15:21:45 +02:00
josteph
a4da90f921 statistics_dialog: Hide the "This Turn" header when no data is shown in that column 2019-06-13 10:54:52 +00:00
Alexander van Gessel
414160263d Restore 3-significant-digit si_string (closes #3871)
Behaviour for MSVC remains the same (fixed with 1 decimal).
Fix a corner-case where [999.5, 1000) would not trigger 4-digit precision,
but would be rounded to 1000 during printing, resulting in 1e+3.
2019-06-11 21:29:29 +02:00
Reuben Rakete
aa901478c2 Fix crash when adding/removing hotkeys with no matches 2019-06-11 14:39:58 +00:00
jostephd
e27ddf7535
Merge pull request #4070 from jostephd/hit-rate-histogram
Add actual/expected hit count stats to stats dialog
2019-06-11 08:51:03 +00:00
josteph
68f8e5fb16 fixup! statistics_dialog: Attempt to fix missing left padding before the first column
Fixes validation errors: "Invalid value '-5' in key 'border_size=' in tag [column]"
2019-06-11 08:36:15 +00:00
Niall Burton
a471392c37 Fixed weapon specials text not displaying in correct color: Issue #4071 (#4107) 2019-06-08 08:02:17 +03:00
doofus-01
3fb552396b dread bat portrait 2019-06-06 21:42:49 +02:00
doofus-01
5071800a48 adding cuttlefish and bat portraits 2019-06-06 21:42:49 +02:00
doofus-01
c5e5902534 adding new great wolf portrait, re-assigning wolf portrait 2019-06-06 21:42:49 +02:00
doofus-01
311c139203 adding mudcrawler portrait 2019-06-06 21:42:49 +02:00
Alexander van Gessel
f5991ecb48 Add negative support to si_string (closes #1396) 2019-06-06 17:32:11 +02:00
josteph
4fb2aaa7ab Another code style change.
https://github.com/wesnoth/wesnoth/pull/4070#discussion_r290087743
2019-06-05 10:31:10 +00:00
josteph
541956343b Code formatting changes.
https://github.com/wesnoth/wesnoth/pull/4070#discussion_r290087376
https://github.com/wesnoth/wesnoth/pull/4070#discussion_r290087461
2019-06-05 10:31:10 +00:00
josteph
869c5a43a5 statistics_dialog: More of "Don't reference temporaries".
https://github.com/wesnoth/wesnoth/pull/4070#discussion_r290087271
2019-06-05 10:31:10 +00:00
josteph
d6b30f044d statistics_dialog: Don't reference temporaries.
https://github.com/wesnoth/wesnoth/pull/4070#discussion_r290087271
2019-06-05 10:31:10 +00:00
josteph
111cb0f188 statistics_dialog: Use uppercase for macro arguments.
https://github.com/wesnoth/wesnoth/pull/4070#discussion_r290086918
2019-06-05 10:31:10 +00:00
josteph
e64c7ed591 statistics_dialog: Attempt to fix missing left padding before the first column
Currently warns: "error validation: Invalid value '-5' in key 'border_size=' in tag [column]"

... but it looks correct.
2019-06-05 10:31:10 +00:00
josteph
e2638c9d84 statistics_dialog: Don't show probability of the actual result
To simplify the stats dialog, show two percentages, instead of three
percentages that add up to 100%.

https://github.com/wesnoth/wesnoth/pull/4070#discussion_r285874571
2019-06-05 10:31:10 +00:00
josteph
061edc2bb3 statistics_dialog: Restore color in the hits table
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.
2019-06-05 10:31:09 +00:00