1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
Commit Graph

1388 Commits

Author SHA1 Message Date
Ivan Savenko
c661419897
Merge pull request #1700 from rilian-la-te/resource-array
Modernize resourceSet.
2023-04-02 20:12:45 +03:00
Ivan Savenko
6dac15c5b2
Merge pull request #1706 from rilian-la-te/moats-landmines
Proper moats: mechanincs
2023-04-02 20:12:33 +03:00
Ivan Savenko
efbc5cf581
Merge pull request #1815 from IvanSavenko/beta_fixes
Beta fixes
2023-04-02 20:02:41 +03:00
Andrii Danylchenko
ab84cb9931 NKAI: fix defense tasks priority evaluation 2023-04-02 10:10:17 +03:00
Andrii Danylchenko
34abc9f82d NKAI: disallow using allied shipyard 2023-04-02 10:04:10 +03:00
Andrii Danylchenko
06fcbf891b Fix battle AI using Fire elementals (had score 0) 2023-04-02 10:02:33 +03:00
Andrii Danylchenko
88fb532d90 NKAI: more fixes to defense and pandora 2023-04-02 10:02:33 +03:00
Andrii Danylchenko
ebfebfd535 VCAI: hard limit on iterations per turn 2023-04-01 00:24:47 +03:00
Ivan Savenko
06b35ce533
Merge pull request #1595 from vcmi/vkai-hack-to-workaround-freezes
VCAI: hard limit on iterations per turn
2023-03-31 18:15:58 +03:00
Konstantin
d8a237ba46 vcmi: add getTrigger method to obstacles
Fixes advanced remove obstacle spell
2023-03-31 01:01:26 +03:00
Konstantin
6c5f5dba75 BattleAI: check negative obstacles instead of moat.
This will work for fire walls too (and if someone will summon elementals
after placing land mines). But will not work for Tower's landmines.
2023-03-31 01:01:25 +03:00
Ivan Savenko
970981cfc9 Show information on potential kills in attack tooltip 2023-03-24 17:18:47 +02:00
Ivan Savenko
31147ac83b refactoring: TDmgRange pair -> DamageRange struct 2023-03-23 17:49:33 +02:00
Andrey Filipenkov
3602645a30 improve iterating over EPathfindingLayer 2023-03-20 11:35:19 +03:00
Konstantin
bbbbfe00f0 Modernize resourceSet 2023-03-17 02:26:54 +03:00
Ivan Savenko
a0e9e01b48 Renamed & reorganized all game mechanics settings names 2023-03-16 18:11:35 +02:00
Ivan Savenko
383387ef29 Integrated defaultMods into mod system 2023-03-16 17:55:09 +02:00
Konstantin
c4a3216288 NKAI: evaluate speciality correctly
With removal of SECONDARY_SKILL_PREMY, we need to
evaluate speciality by using TargetSourceType.
Just do it.
2023-03-16 16:46:41 +03:00
Konstantin
95503d0623 vcmi: unify movement
1. Now there is only one bonus: MOVEMENT, with 2 subtypes: 0 is sea, 1 is land
   For movement value on land depends on creature speed we use a new
   ARMY_MOVEMENT updater with global bonus. If we does not like such
   dependency, we can just remove this updater from json.
2. All specialities and secondary skills for movement moved to new
   system AFAIK
2023-03-16 16:46:41 +03:00
Andrii Danylchenko
fa9e1d2d83 NKAI: fix crash 2023-03-12 16:31:15 +02:00
Andrii Danylchenko
4bf570763a NKAI: improve neutral town priority handling, reduce priority of objects like star axis 2023-03-12 16:31:15 +02:00
Andrii Danylchenko
87638aafc0 NKAI: improve build behavior 2023-03-12 16:31:15 +02:00
Konstantin
bc228a938a vcmi: use enum class for EComponentType
There is really no reason not to use it
2023-03-11 21:41:57 +03:00
Konstantin
4617ce10e5 vcmi: allow showing more than one components in infobar
Up to 8, AFAIK. So, we can show multi-reward in infobox now.
One issue remain - cannot dynamically choose components size
based on text size.
2023-03-11 21:41:57 +03:00
Konstantin
5366f9190e vcmi: reduce boost::lexical_cast usage 2023-03-09 16:36:46 +03:00
Andrii Danylchenko
148c3436df NKAI: improve army gathering 2023-03-08 11:53:26 +02:00
Andrii Danylchenko
8b0c7b6601 NKAI improve defence and some fixes 2023-03-07 20:10:58 +02:00
Ivan Savenko
144ddba97d Replaced AI assertion failure with error in log 2023-03-07 00:06:58 +02:00
Ivan Savenko
aeb653c919 Fix typos 2023-03-07 00:06:58 +02:00
Ivan Savenko
11e4d84749 Implemented View Earth / View Air spells 2023-03-05 17:48:02 +02:00
Ivan Savenko
84fa19dadf
Merge pull request #1547 from dydzio0614/game-start-unrandomization
Hardcoded features for HotA-like starting conditions
2023-03-05 17:29:49 +02:00
Andrii Danylchenko
59d612fc2d
Merge pull request #1616 from kambala-decapitator/conan-android
move Android code to the main repo
2023-03-05 08:13:41 +02:00
Andrey Filipenkov
0294a8b063 enable StupidAI and EmptyAI for static AI 2023-03-02 12:09:49 +03:00
Andrey Filipenkov
71d51beab2 change static AI approach to use static libvcmi
- now links to static AI lib targets
- solves uncaught boost exception on closing server
2023-03-02 12:09:48 +03:00
Andrey Filipenkov
4c19d8794d add option to compile AI code into libvcmi directly
- used on Android by default
- AI sources and libs are propagated to upper level with set(... PARENT_SCOPE)
2023-03-02 12:09:48 +03:00
Andrey Filipenkov
2a28109f2d fix indentation 2023-03-02 12:09:47 +03:00
Andrey Filipenkov
970bd6ed34 adjust project for Android (except AI) 2023-03-02 12:09:47 +03:00
Andrii Danylchenko
5cab8ede90 Fix battle ai trying to act with killed stack 2023-02-28 23:10:22 +02:00
Andrii Danylchenko
2630fb2330 VCAI: hard limit on iterations per turn 2023-02-18 22:08:08 +02:00
Dydzio
7095e9d8f9 Allow heroes to start with empty armies if configured properly 2023-02-05 00:36:51 +01:00
Ivan Savenko
4d1c338503
Merge pull request #1498 from rilian-la-te/conan-v2
Conan as MXE replacement
2023-01-27 23:14:37 +02:00
Ivan Savenko
6c472339ce Refactoring of ObjectClassesHandler 2023-01-26 23:26:49 +02:00
Konstantin
3ea4e8c249 AI/CMakeLists.txt: disable some errors for FuzzyLite
It generates false positives on MinGW due to Fuzzylite errorneous
assuming than Windows=MSVC.
2023-01-26 23:49:00 +03:00
Ivan Savenko
f8f6df02f3 Removed remaining hardcoded objects 2023-01-23 15:27:27 +02:00
Ivan Savenko
62e127fb59 Bonusing objects are now configured in json 2023-01-23 01:05:10 +02:00
Ivan Savenko
bfd6c40f25 Moved all once-per-hero visitable (sans Tree) to config 2023-01-22 22:58:53 +02:00
Ivan Savenko
47c1803c42 Finalization of refactoring:
- Entity interface now has getNameTranslated & getNameTextID methods
- Entity interface no longer has getName method
- removed (most) usages of normalizeIndentifier workaround method
- all moddable objects have identifier in form of mod:name
- all moddable object register strings in form of mod.type.name
2023-01-20 15:18:36 +02:00
Ivan Savenko
05a1d7c6e3 All text for factions/towns/building are passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
388ed88b5d All artifact strings now pass through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
d2b837b116 All creature-related texts go through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
fa6f7513e8 All heroes-related strings are passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
5da407e822 All spell texts are now passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
b86969909a Fixes compilation due to changes in callback interface 2023-01-20 15:18:10 +02:00
Ivan Savenko
17fc9d8d8f Merge with vcmi/develop 2023-01-18 01:04:34 +02:00
Ivan Savenko
246281e62a Merged vcmi/beta with vcmi/develop 2023-01-15 17:46:42 +02:00
Andrey Filipenkov
efbed6000b fix typo 2023-01-15 17:28:09 +02:00
Ivan Savenko
1d7f004658 Implemented reinforced walls in towns with Castle 2023-01-13 01:09:24 +02:00
Ivan Savenko
500cf7f15d EWallPart & EWallState are now enum class 2023-01-13 00:35:58 +02:00
Ivan Savenko
1fece0ce18
Merge pull request #1229 from IvanSavenko/battle_improvements
Battle: Fixing bugs & Implementation of missing features
2023-01-09 22:07:13 +02:00
Ivan Savenko
33a9aa8ee5 Reduced log to console 2023-01-01 20:55:26 +02:00
Ivan Savenko
5d80457eda Merge with vcmi/develop branch 2022-12-30 00:52:23 +02:00
Ivan Savenko
370e92a90a Added workaround for no longer accessible hero in MoveHero 2022-12-25 16:12:26 +02:00
Ivan Savenko
405b2976d5 Renamed getUpgradeInfo -> fillUpgradeInfo 2022-12-25 14:03:43 +02:00
Ivan Savenko
325c29da0d Merge remote-tracking branch 'vcmi/develop' into battle_improvements 2022-12-23 14:51:34 +02:00
Ivan Savenko
eb20a4b208 Merge remote-tracking branch 'vcmi/develop' into warnings_fix 2022-12-23 14:40:45 +02:00
Ivan Savenko
f073c676f9 Merge 1.1 release into develop 2022-12-23 14:17:18 +02:00
Ivan Savenko
b2279484fc
Merge pull request #1227 from Shatur/opendingux
Port to OpenDingux handhelds
2022-12-22 16:56:55 +02:00
Ivan Savenko
e9e549148d Implemented teleportation animation effect 2022-12-18 18:26:43 +02:00
Sergei Trofimovich
c2c352c6dd AI/Nullkiller/Goals/ExecuteHeroChain.cpp: catch polymorphic exceptions by reference
The suspicious code was detected by `gcc-13` as:

    AI/Nullkiller/Goals/ExecuteHeroChain.cpp: In member function 'virtual void NKAI::Goals::ExecuteHeroChain::accept(NKAI::AIGateway*)':
    AI/Nullkiller/Goals/ExecuteHeroChain.cpp:130:47: warning: catching polymorphic type 'class NKAI::cannotFulfillGoalException' by value [-Wcatch-value=]
      130 |                                         catch(cannotFulfillGoalException)
          |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
    AI/Nullkiller/Goals/ExecuteHeroChain.cpp:176:23: warning: catching polymorphic type 'class NKAI::goalFulfilledException' by value [-Wcatch-value=]
      176 |                 catch(goalFulfilledException)
          |                       ^~~~~~~~~~~~~~~~~~~~~~

Similar to object passing by value and reference passing polymorphic
exceptions by reference likely destroys them when copy-constructed to
a base class. Let's catch them by reference.
2022-12-17 21:50:57 +00:00
Hennadii Chernyshchyk
d7fbd4aa66
Call install_vcpkg_imported_tgt after initializing BIN_DIR
Call it inside AI/CMakeLists.txt as it was before.
2022-12-15 12:16:28 +02:00
Hennadii Chernyshchyk
3322ad9501
Move find_package for TBB on top for consistency with other 2022-12-15 02:21:44 +02:00
Hennadii Chernyshchyk
37068a75b3
Make ENABLE_NULLKILLER_AI top level option 2022-12-15 02:18:17 +02:00
Andrii Danylchenko
56bf8ec2c4 #1228 - prevent second AI activation on AI defeat due to wrong EndTurn packet 2022-12-14 22:13:26 +02:00
Hennadii Chernyshchyk
3c948b1488
Fix typo 2022-12-14 10:12:16 +02:00
Hennadii Chernyshchyk
1ccbc209a4
Add an option to disable Nullkiller AI 2022-12-13 22:16:48 +02:00
Ivan Savenko
c79634b6a7 Moved all animation ordering logic to callers
Previously, CBattleAnimation & inheritors were controlling animation
ordering - e.g. which animations should play after which.
Now, this is controlled by caller, e.g. BattleInterface & its
controllers.
H3 animations are fairly linear and can be split in stages which are
already somewhat implemented via waitForAnims
2022-12-13 21:31:49 +02:00
Hennadii Chernyshchyk
de33eb44f9
Port to OpenDingux handhelds 2022-12-13 03:55:54 +02:00
Andrii Danylchenko
01980f4310 Small optimization of NKAI pathfinder 2022-12-10 22:08:16 +02:00
Andrii Danylchenko
59c3962e9c BattleAI: fix camera obscura 2022-12-10 22:08:16 +02:00
Ivan Savenko
25bceda4ea Added convertToVisitablePos/convertFromVisitablePos to CGHeroInstance
This method replaces old convertPosition, but with more clear names and
without hardcoded magic constants.
2022-12-09 14:42:47 +02:00
Ivan Savenko
8dcecdc235 Fix deprecation warning 2022-12-09 14:16:23 +02:00
Ivan Savenko
db2a40600d Fixed some of the warnings detected by CI run 2022-12-08 23:20:42 +02:00
Ivan Savenko
facf77b3ae vstd::unique -> std::unique 2022-12-07 23:36:20 +02:00
Ivan Savenko
d85ee019ec Removed CGHeroInstance::convertPosition method 2022-12-07 22:51:32 +02:00
Ivan Savenko
49cbd5adc9 CGHeroInstance::convertPosition is no longer static method 2022-12-07 22:34:08 +02:00
Ivan Savenko
908e6892f3 Removed CGHeroInstance::getPosition pseudo-override
Now access to hero visible position is always done via visitablePos
2022-12-07 22:10:08 +02:00
Ivan Savenko
2855606a88 Enabled & fixed -Woverloaded-virtual warning from gcc/cland
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
Ivan Savenko
3219e322ae Fixed all non-silenced gcc/clang warnings 2022-12-07 18:05:47 +02:00
nordsoft
d4c9b8f6b5 Absolute threshold for retreat decision 2022-12-06 16:11:52 +04:00
Ivan Savenko
6463e906d5 vcmi can be compiled as single app on Linux
TODO: check compilation on Win/Mac using Github Actions
2022-12-05 21:36:02 +02:00
SoundSSGood
909dcb82fa use ArtifactID 2022-11-29 00:32:18 +02:00
Andrii Danylchenko
e31beafa17 #1100 - fix visiting allied dwellings 2022-11-23 02:40:56 +04:00
Andrii Danylchenko
8b964be71f
Merge pull request #1111 from GermanAizek/develop
Code refactor and fix condition bug
2022-11-15 09:23:16 +02:00
lainon
7fdad4e0f6 Code refactor following C++ standard and condition fixes 2022-11-15 03:20:55 +03:00
Andrii Danylchenko
3676152644 #1102 - NKAI: one more freeze - no mains with strong army 2022-11-10 21:12:08 +02:00
Andrii Danylchenko
233b850daf NKAI: a few crash/hang fixes 2022-11-07 13:58:20 +02:00
Andrii Danylchenko
ebf4854801 Battle AI: add some comments + refactoring 2022-10-23 11:41:03 +03:00
Andrii Danylchenko
601ced3749 BattleAI: rework movement when no targtes 2022-10-23 11:41:03 +03:00
Andrii Danylchenko
033a585e4b Battle AI 2 turns attacks recalculation 2022-10-23 11:41:03 +03:00
Andrii Danylchenko
c2cc801f60
Merge pull request #1073 from kambala-decapitator/ios-conan
[Conan] add iOS support, bump dependencies, improvements
2022-10-22 12:40:48 +03:00