1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-02 09:02:03 +02:00
Commit Graph

3818 Commits

Author SHA1 Message Date
Dmitry Orlov
5e0023704b Fix PQ issues while calculating paths 2020-09-22 00:19:40 +03:00
laikh
edc1d06f4e Random Map Generator Option: Allow having more computer only players than human/computer players
Remove unused variable humanPlayersCount and function getHumanOnlyPlayerCount()
2020-07-07 19:45:53 +08:00
Andrii Danylchenko
d782ee39df hacks to optimize a few bonus requests 2020-07-04 17:52:22 +03:00
Alexander Shishkin
cc75b859d4
Merge pull request #609 from viciious/improve_battleai
Improve battle AI
2020-05-25 05:50:40 +03:00
Victor Luchits
f68b449e5e More formatting 2020-05-17 11:21:49 +03:00
Victor Luchits
b4025fa1d6 More formatting 2020-05-16 16:14:58 +03:00
Victor Luchits
618d521407 Fix CMP_stack to follow strict weak ordering of elements 2020-05-11 18:14:36 +03:00
Victor Luchits
be10694b73 Some changes to make the battle AI smarter
- the AI will now consider attacking multiple units
- the preferred strategy now is to minimize collateral damage rather than to maximize damage to enemy units alone
- attacks that block enemy shooters will be prioritized over other attacks in cases when shooters have weaker melee attacks
2020-05-05 17:53:03 +03:00
Victor Luchits
d6e6182e65 Close the target file in CLogFileTarget's destructor 2020-05-05 15:25:02 +03:00
Victor Luchits
0fe71b7c44 Add CBasicLogConfigurator::deconfigure method to clear the global log targets 2020-05-04 18:56:15 +03:00
Toney Sui
dca5d86e7a
Fix bug: LandMine is not exploding to enemies. (#630)
* The reason is,

the mine has attribute hidden=true;
when enemy unit moves, the code in BattleInfo.cpp MoveUnit() (line 817) will update the revealed to true;
then in the CGameHandler.cpp handleDamageFromObstacle() (line 4846) is checking , and the condition battleIsObstacleVisibleForSide() will return true, so the effect will not be triggerred.

Resolution:
1. Remove the "revealed=true" in moveUnit(), and in handleDamageFromObstacle, remove the "const" restrict for obstacle, and then update revealed to true;
2. After the takeDamage function, add a pack "BattleObstaclesChanged" to update the obstacle to be "revealed=true".
2020-02-12 20:12:12 +03:00
Andrii Danylchenko
42cab00c38 Fix quest handling 2020-01-31 00:48:01 +02:00
Alexander Shishkin
00de1fd734
Merge pull request #625 from Toneyisnow/toneyisnow/Battle_Clone_Effect
Implement the Clone Effect in battle.
2020-01-27 13:42:58 +03:00
toneyisnow
0f3dabab9a Initialize the change:
1. Make color shifter for CAnimation, and use that in the clone effect.
2. Update the original position of the cloned object.
2020-01-25 01:21:26 -08:00
krkos
ac81d0f7b4 Fix build with Boost versioni >= 1.70 (#615) 2020-01-21 11:55:28 +03:00
toneyisnow
8bfe510e9c Fix one space issue. 2020-01-19 04:12:59 +00:00
toneyisnow
a1ea72d84a Update according to comments. 2020-01-19 04:12:59 +00:00
toneyisnow
0fe3c0a569 Initialize the change. 2020-01-19 04:12:59 +00:00
Arseniy Shestakov
905d31b8d7 CModHandler: remove hardcoded wog mod integrity check
Now we have unpacked WoG mod version that dont need specific data files.
As far as I can tell only texts for commanders not going through proper mod system
2020-01-15 18:20:51 +00:00
Dydzio
f8c294ad0b Fix attack cursor on guarded visitable object 2019-07-14 13:25:06 +03:00
AlexVinS
e7bced112c Fixed https://bugs.vcmi.eu/view.php?id=3059 2019-06-09 22:46:29 +03:00
Dydzio
54550b50de Update VS files to 2019, partially fix test project 2019-06-09 17:28:55 +02:00
Dydzio
2f15ca9406 Do not build pseudo-buildings explicitly with events 2019-06-04 22:29:07 +02:00
AlexVinS
1f2ee843aa [C::B] Switched to boost shared linkage 2019-05-30 20:55:40 +03:00
Alexander Shishkin
21f74a9968
Merge pull request #590 from Ewilhan/fixCombatOrder
Fixed Battle Creature Ordering
2019-05-29 17:51:52 +03:00
Alexander Shishkin
40d65b40a2
Merge pull request #591 from dydzio0614/ShipyardCrashFix
Spawn ship placed outside map if it has visitable position inside map
2019-05-21 09:47:51 +03:00
Dydzio
cd78779d9c Remove false warning indicating something is wrong 2019-05-19 12:22:41 +02:00
Dydzio
618cb29ae7 Spawn ship placed outside map if it has visitable position inside map 2019-05-18 20:57:33 +02:00
Ewilhan
cba94f8bb3
Code style
Co-Authored-By: Alexander Shishkin <alexvins@users.noreply.github.com>
2019-05-18 18:37:02 +02:00
Ewilhan
023d6c88fd Code style and improved readability 2019-05-17 09:34:59 +01:00
Ewilhan
ab1c598d4e Fixed Battle Creature Order
Fixed the messy creature order. It now follows correctly all creature ordering rules.
2019-05-16 14:41:02 +01:00
Alexander Shishkin
49404bfa24
Merge pull request #579 from vcmi/dydzio0614-patch-1
Hackfix crash on "victory by town capture"
2019-05-04 10:35:13 +03:00
Dydzio
e50efdc279 Creature spellcast refactor (#569)
* Move some logic to lib
* Mouse action priority queue enhancement
* Get rid of siegehandler dependency
* Improve AI offensive spellcasting
* CBattleInterface cleanup
2019-05-04 06:42:55 +03:00
Ewilhan
91177c412c Fixed Crypt/Pyramid double visit sound.
Removed sound call from CBank to avoid two sounds from being launched at same time. Gave priority to JSON files.
2019-05-02 23:46:18 +01:00
Dydzio
4a21841ce2 Check other players startinfo for random hero pick (#580) 2019-04-29 08:45:30 +03:00
Dydzio
a79f11bed2
Hackfix crash on "victory by town capture" 2019-04-23 20:04:07 +02:00
Michał Kalinowski
97a8380d07 Simplification fixes
Return statement fixes
2019-03-31 09:43:14 +03:00
Michał Kalinowski
ac6b477aa2 Simplify statements
-Simplify return statements across the code
2019-03-31 09:43:14 +03:00
Michał Kalinowski
ec536e613c CMake more transitive
-Moving AIs cmake to target focusing code
-Beign explicit when link libraries
2019-03-28 16:56:51 +03:00
Dydzio
df11e851ef Acid breath should have absolute dispel immunity 2019-03-25 02:19:07 +03:00
Alexander Shishkin
34f934370b
Merge pull request #565 from dydzio0614/moralewaitfix
Fix lack of unit action with morale+wait
2019-03-24 10:49:49 +03:00
Alexander Shishkin
87f216ac0d
Merge pull request #560 from dydzio0614/bug2814
Fix for arrow cart at bank fights
2019-03-24 10:20:58 +03:00
Dydzio
9e4619c08d Fix lack of unit action with morale+wait 2019-03-23 23:51:50 +01:00
Dydzio
9e5abeec35 Fix for arrow cart at bank fights 2019-03-22 00:02:32 +01:00
Alexander Shishkin
549d8c97df
Merge pull request #557 from dydzio0614/CrystalDragonAbility
Fix crystal dragon ability to match H3
2019-03-21 17:02:20 +03:00
Dydzio
53f4ba6464 Fix crystal dragon ability to match H3 2019-03-17 19:48:47 +01:00
Dydzio
36cb9f11c4 Hardcoded feature: no random week/month effects 2019-03-17 18:27:05 +01:00
Dydzio
5718048752 Fix magic school gold payment 2019-03-11 18:56:05 +01:00
AlexVinS
1855af9ed3 Fixed error handling in TownPortalMechanics::applyAdventureEffects 2019-02-23 20:51:03 +03:00
AlexVinS
9311966706 [C::B] Switch to MinGW 7.3 2019-02-19 14:59:10 +03:00
Dydzio
aafad18121 Style fixes 2019-02-12 19:47:19 +01:00
AlexVinS
14e294553d Enabled GIF format for images (not GIF-animations) as requested by user. 2019-02-07 03:23:14 +03:00
AlexVinS
b3c26615df Fixed map format regression: there is no default difficulty. 2019-01-26 17:05:35 +03:00
Mikko
ae7821462d
Update ISpellMechanics.cpp 2019-01-24 15:09:01 +00:00
Mikko
a77cbc311e
Update JsonSerializer.cpp 2019-01-24 14:49:30 +00:00
Mikko
eba4f1b514
Update CBattleInfoEssentials.cpp 2019-01-24 14:48:38 +00:00
Michał Kalinowski
a0d1808b62 CMake transitive compile dependency
Moving to more target focusing code that provides better transitive scope
2019-01-19 17:38:54 +03:00
Alexander Shishkin
b00e935e4d
Warnings fixes (#538)
Warnings fixes
* Suppress `missing-braces` for Clang
* Fixed many C4275 warnings
* Fixed almost all Clang/GCC warnings
* Silence most frequent MSVC warning.
* Fixed some pessimizing-move warnings
* Fixed some unused capture warnings
2019-01-19 13:52:02 +03:00
AlexVinS
da20aa2388 Use the same cost value in Pathfinder and fuzzy evaluations. 2019-01-17 10:54:41 +03:00
AlexVinS
4b5910c2f4 VCAI performance improvements
* Node graph initialization optimized.
* Fixed "Unathorized obstacle access".
* Pathfinding tracing disabled with ifdef.
* Misc bonus calculation optimizations.
* Removed timestamp from log lines. Date formatting eats too much CPU.
* Paths for all heroes in Client are now cached
2019-01-17 10:50:56 +03:00
Andrii Danylchenko
8fee46de7c AI: town portal support 2019-01-17 10:40:23 +03:00
Dydzio
216d50788b Fix AI build, update default Windows SDK version for projects 2018-12-31 15:18:42 +01:00
Andrii Danylchenko
035d279ae8 Refactor CGHeroInstance, make spells private 2018-12-23 15:49:26 +03:00
DJWarmonger
f4a8a1294e Optimizations based on MSVS profiler. 2018-12-16 15:46:48 +01:00
Andrii Danylchenko
83531f4355 Rename typo in NetPacksServer.cpp 2018-11-17 21:58:54 +02:00
Alexander Shishkin
845f0fbf5c
Merge pull request #512 from godric3/jsonSchemas
Support for using relative file path in json schema references
2018-11-02 13:07:34 +03:00
Arseniy Shestakov
708705aa96 CGLighthouse: workaround crash on map initialization. Fix issue 3020
Dirty hack here since proper fix would require to break saves
2018-11-01 23:31:23 +03:00
Michał Janiszewski
0ff2e1180d Throw std::runtime_exception instead of a pointer to new one
cf. https://isocpp.org/wiki/faq/exceptions#what-to-throw
2018-10-31 07:27:54 +01:00
Alexander Shishkin
2a282c9a8e
Merge pull request #509 from godric3/bonusDescription
Skill and hero specialty bonus description
2018-10-31 00:59:05 +03:00
godric3
8650a8eea8 allow json schema references to use relative file path 2018-10-30 22:30:56 +01:00
godric3
1586868a5d make source id optional in functions converting deprecated specialty bonuses 2018-10-30 20:58:22 +01:00
Alexander Shishkin
e26f6ff15f
Merge pull request #505 from janisozaur/catch-by-ref
Catch exceptions by const-ref, not by value
2018-10-30 05:08:30 +03:00
godric3
f9ac46576b Add description for bonuses from hero specialty 2018-10-29 21:33:13 +01:00
godric3
c8ba3de821 Change skill bonuses description to use name instead of identifier 2018-10-29 20:53:13 +01:00
Michał Janiszewski
7be9aa4868 Prevent shadowing of function arguments by local vars 2018-10-29 16:56:14 +01:00
Michał Janiszewski
9822a8f2df Catch exceptions by const-ref, not by value 2018-10-29 16:41:54 +01:00
Alexander Shishkin
e814aca29f
Merge pull request #500 from godric3/rmgCrash
Fix crash when generating random map with random number of players
2018-10-29 01:38:10 +03:00
Alexander Shishkin
f563712782
fix formatting
Co-Authored-By: godric3 <godric3@users.noreply.github.com>
2018-10-28 16:36:11 +01:00
godric3
7ded9dbda8 Fix crash when generating random map with random number of players 2018-10-27 18:18:08 +02:00
Andrii Danylchenko
72aff02418 AI pathfinding: buy boat 2018-10-21 14:17:55 +03:00
Andrii Danylchenko
cbaa834589 AI pathfinding: bug fix after refactoring 2018-10-10 14:51:57 +03:00
Andrii Danylchenko
f327c46fa3 AI pathfinding: rename and add const to functions 2018-10-07 14:51:27 +03:00
Andrii Danylchenko
49c872e4ec AI: replace SectorMap with new PathfinderManager 2018-10-06 16:35:31 +03:00
Andrii Danylchenko
eb17313f7f AI: pathfinder extensibility - add one more rule for movement to destination and some refactoring 2018-09-23 15:26:53 +03:00
Andrii Danylchenko
7150fc9f71 AI: pathfinder api supports configuration 2018-09-23 15:26:53 +03:00
Andrii Danylchenko
9ab44b950a AI: pathfinder rework, rules refactored a bit. 2018-09-23 15:26:53 +03:00
Andrii Danylchenko
24221f3fb4 AI: move teleportation handling to pathfinder helper and neighbour finder 2018-09-23 15:26:53 +03:00
Andrii Danylchenko
6ac987794c AI: first rule extracted for pathfinder 2018-09-23 15:26:53 +03:00
Andrii Danylchenko
9af0032f84 AI: try to add some pathfinder extensibility. Extracted neighbour nodes finder 2018-09-23 15:26:53 +03:00
Fior.in
cca46e311d Fixed schemas for battle animation overwritting an solo attribute instead images attribute dependant. Now working for replacing battle sprites on pre-existant heroes too (#490) 2018-09-13 02:33:34 +03:00
Fior.in
47ba3b2476 Hero scheme: allow each hero to have a unique battle animation (#480)
* attribute for battle image added on hero class, allowing on hero schemes each hero have a unique battle .def in 'images' structures sided with portraits and specialties images
2018-08-27 09:42:36 +03:00
Dydzio
1471043cae Update visual studio project files 2018-08-22 17:31:48 +03:00
Konstantin Vukolov
96215233bc macOS: fix packet deserialization (#479) 2018-08-14 01:03:45 +03:00
Aleksei Iupinov
7ed318d156 Stop awarding single scenario bonuses in campaigns 2018-08-05 05:42:54 +03:00
Dydzio
2288e9b8aa
Merge branch 'develop' into AIMapObjectEvaluation 2018-07-30 01:33:49 +02:00
Dydzio
393b25eb7f Minor tweaks/fixes 2018-07-29 19:31:01 +02:00
Dydzio
b37ba8e046 Initial version of AI object value config 2018-07-28 00:43:56 +02:00
Dydzio
615df6203d Oprator overload correction... 2018-07-26 16:43:40 +02:00
DJWarmonger
273802c92c I have no idea what I'm doing 2018-07-26 12:14:29 +02:00
Dydzio
21c1f47a78 Fixes 2018-07-22 19:12:11 +02:00