25183 Commits

Author SHA1 Message Date
Celtic Minstrel
55a6c16810 Lua API reorganization: interface module deprecations 2018-11-15 21:06:55 -05:00
Celtic Minstrel
e3e80b4a99 Lua API reorganization: interface module 2018-11-15 21:06:55 -05:00
mattsc
8c8cafaa70 Deprecate EXPERIMENTAL_AI macro 2018-11-15 06:46:41 -08:00
Severin Glöckner
eb1ebe1cd8 Help: cut portraits of monsters, bats and zombies
This will less often wrap the text of the descriptions.

For many of the zombies is more possible, but it has been taken care to have the
linebreak for 'required xp' and in the variation list the same on all their pages.

The reason for the 319px height on some of them is:
- It's still taking enough space to have 'required xp' on a new line.
- It does for both the WC and Soulless not interfere with the description text.
- The swimmer can't be smaller than 319px without cutting any non-tranaparent
  pixel. To have more structure the goblin/dwarf/dog use the same.

[ci skip]
2018-11-14 23:45:45 +01:00
josteph
e642223017 wmlxgettext: Fix crash if no *.cfg file is found
fixes #3719
[ci skip]
2018-11-14 20:14:44 +01:00
josteph
815ded47dd Themes: Fix unit status icons not showing
When [unit_status] shows two or more images, only the first showed and
there was no indication that there were further statuses. Now an
ellipsis is shown and the tooltip contains the information about the
second and further statuses.

Fixes #3197
2018-11-13 22:16:07 +00:00
mattsc
59397a40b5 ExpAI recruiting: fix AI crash for unit type with unknown race 2018-11-13 06:53:20 -08:00
josteph
711434d571 wmlparser3: Fix [+foo] without preceding [foo] in toplevel 2018-11-12 02:53:52 +00:00
Celtic Minstrel
b94ccf9020 Rewrite helper.modify_unit to not use a WML variable 2018-11-11 20:03:05 -05:00
Celtic Minstrel
9885932011 Use wml.tag in helper.get_user_choice 2018-11-11 20:03:05 -05:00
Celtic Minstrel
40bf04ec8e Rewrite helper.move_unit_fake to not use a WML variable 2018-11-11 19:51:29 -05:00
Celtic Minstrel
20e85aa417 Lua API: Add wml.load and wml.parse functions 2018-11-11 16:01:08 -05:00
Celtic Minstrel
639787e1c9 Merge pull request #2562 from wesnoth/schema 2018-11-11 13:52:19 -05:00
ProditorMagnus
e3da41335e fix modify_unit split_to_array function 2018-11-11 17:30:28 +01:00
gfgtdf
3c63b1e6de optimize modify_unit
now modify_unit no longer causes the full rebuild of the unit unless it
is really needed, this is not only faster, it also prepares a future
optimisation in reducing the units size in savegame files.
2018-11-10 22:26:59 +01:00
newfrenchy83
dbaf402393 Revert #3669 (#3698)
We are reverting the change because it causes an error to be logged.
2018-11-10 15:36:01 +02:00
mattsc
30e1fd1742 Bottleneck Micro AI: simplify a conditional
Use elseif and no need to check experience again, that is already done earlier.
2018-11-09 06:57:07 -08:00
mattsc
bc956b3e7f Lua AIs: fix experience for killing level 0 units 2018-11-09 06:52:08 -08:00
Severin Glöckner
d743a5b9f2 NR S7: debug mode safety
[ci skip]
2018-11-09 00:46:26 +01:00
Severin Glöckner
0e34455cfe NR S7a: revert 52c22b1, add alternative fix
[ci skip]
2018-11-09 00:46:26 +01:00
josteph
c6b2be5ca6 wmlparser3: Parse [+foo][/foo] as append to [foo]. 2018-11-08 22:57:39 +00:00
mattsc
e7e9a6fe45
Merge pull request #3655 from mattsc/lua_ai_changes
Lua AI changes
2018-11-08 07:31:58 -08:00
mattsc
23d313949d Remove AI Controller from campaign scenarios (addresses #3668)
Ideally we would replace it with a more effective and intuitive version at some point, but currently we do not know how to set up AI behavior that both makes sense and is usable in a general setting (without consisting of unit-level control).
2018-11-08 07:15:40 -08:00
DisherProject
a4d963eaf5 NR S2: Filter units by id in micro_ai 2018-11-07 15:40:55 -06:00
DisherProject
aa59d1561c NR S13a: Improvement to the AIs
1) Rakshas's units will not idle around him anymore
2) Hamel will play more carefully, and his recruits will be
chosen according to the ToD (i.e. aggressive during the day,
defensive at night)
2018-11-07 15:40:55 -06:00
DisherProject
caeada5fd5 NR S7a: Store Ro'Sothian into a variable
... instead of killing him and creating him from scratch
every time
2018-11-07 15:40:55 -06:00
DisherProject
4c5e6bfd4c NR: Fix ignored gender on fake units' moves 2018-11-07 15:40:55 -06:00
DisherProject
5d6d51d623 NR: Put show_if tag inside objectives 2018-11-07 15:40:55 -06:00
DisherProject
52c22b12f7 NR S7: Fix some loyal heroes costing support
Loyal trait seems not to work with previous implementation.
This should be also more readable
2018-11-07 15:40:55 -06:00
DisherProject
b1a436cd28 NR S6a: Give the orc leaders their own portrait
Just because there is more than one Orcish Warlord speaking
2018-11-07 15:40:55 -06:00
DisherProject
7ffa224234 NR S5a_01: Fix some event filters
1) Now Tallin shows surprise when Thera dies too
3) Only Malifor will scream when hit
Also add a redraw
2018-11-07 15:40:55 -06:00
DisherProject
85bd82ef07 NR S4: Add a sound effect when Malifor flees 2018-11-07 15:40:55 -06:00
DisherProject
274608ab4e NR S4: Give the enemies starting villages 2018-11-07 15:40:55 -06:00
DisherProject
e1335672a2 NR S2: Have Hamel speak about Camerin if he's not shrouded 2018-11-07 15:40:55 -06:00
DisherProject
e2743d0fa5 NR S2: Avoid using filter_wml 2018-11-07 15:40:55 -06:00
newfrenchy83
5d6a6c0de1
Fix grammar in cth macro
Also fix whitespace errors from edab243b9d4e5bbac8b10e28fb0237e201392071 -- GL

Closes #3694
2018-11-07 15:32:22 -06:00
George
a5b22568de
EI S02: Dialogue improvement
Implemented long-standing TODO. The trolls are now hidden until sighted by the player. When interacting with the dwarfs, Gweddry will now respond according to whether the trolls have been sighted or not.

Closes #3689
2018-11-07 15:03:34 -06:00
mattsc
1856377d35 Lua AIs: distinguish between healing locations and villages
There are rating contributions for hexes which heal (not all of which are villages) and others for hexes that provide income (villages). Previously only villages were considered for both types of hexes.
2018-11-07 12:24:31 -08:00
mattsc
8bca955ad5 ai_helper: new function get_healing_locations() 2018-11-07 12:17:55 -08:00
newfrenchy83
edab243b9d
Fix rare bug in FORCE_CHANCE_TO_HIT
If in attack end in FORCE_CHANCE_TO_HIT macro, unit or second unit doesn't exist anymore because rare case where unit disapear before attack end event was calledthen we have an error message like "Invalid WML found: [unstore_unit]: variable 'second_unit' doesn't exist" because presence of unit not condition of execution of event.
2018-11-06 15:15:40 -06:00
Steve Cotton
5fa2ba279e
Tutorial S2: Don't allow the orc to recruit wolves on turn 1
If the wolves are recruited on the first turn then Galdrad's turn 3 hint about
getting to the island before them is too difficult for a tutorial, and his hint
about holding the village on turn 4 hint may be a turn too late.

Some have to be recruited on turn 2 to fit the turn 3 hint about them, so rig
the AI's recruitment to do that.
2018-11-06 15:07:49 -06:00
George
82308c7a2c
SoF S01a Add snow to map
Implemented long-standing TODO, adding some snow to the map by hand.

Closes #3676
2018-11-06 15:03:29 -06:00
mattsc
c1343227e2 Generic recruit engine: cache pathfinding data
This results in a significant speed-up starting from the second recruit each turn.
2018-11-06 09:44:03 -08:00
mattsc
e379cf7333 Generic recruit engine: replace slow location filters 2018-11-06 09:38:33 -08:00
mattsc
0c57ae16e4 Lua AIs: do not use hard-coded values for modifiable parameters 2018-11-05 20:22:11 -08:00
mattsc
e3b2cbfc25 ExpAI recruiting: consider all villages not owned by allies
Instead of only the unowned villages.
2018-11-05 07:19:23 -08:00
mattsc
5e0df80ad0 ExpAI retreating: take healthy trait into account 2018-11-05 07:02:46 -08:00
mattsc
dcf951434e Micro AIs: support named locations for [micro_ai] tag keys 2018-11-05 07:02:33 -08:00
Celtic Minstrel
df4413ae66 Schema: Move list types into a separate config file 2018-11-04 18:37:51 -05:00
sigurdfdragon
eb1febb878 DM S12: Remove TODO
No point in a todo for one scenario when it could be done for half
the campaign.
2018-11-04 11:10:23 -05:00