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

1820 Commits

Author SHA1 Message Date
Ivan Savenko
08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00:00
Ivan Savenko
604e3b5c67
Merge pull request #4763 from IvanSavenko/herohandler_split
Split CHeroHandler.cpp/.h into 1 file per class
2024-10-14 19:05:48 +03:00
Ivan Savenko
cee3521f57
Merge pull request #4770 from IvanSavenko/prison_fix
Fix for loading hero types / identities
2024-10-14 18:16:53 +03:00
Ivan Savenko
10ad0fc760 Split CHeroHandler.cpp/.h into 1 file per class
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +00:00
Ivan Savenko
31095248ab Removed typeName and subtypeName properties from CGObjectInstance 2024-10-13 13:05:50 +00:00
Ivan Savenko
a8e84c55f6 Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
Ivan Savenko
3dd4fa2528 Reduce usage of pointers to VLC entities
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.

CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.

VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town

VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
Ivan Savenko
a8f8c3f4b1 Replaced most of accesses to CGObjectInstance::pos with anchorPoint() 2024-10-09 15:43:46 +00:00
Ivan Savenko
c0f5c7c0ea Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
MichalZr6
259fcedc85 Fix flying units move into damaging obstacles 2024-10-03 23:03:36 +02:00
DjWarmonger
ffed9480e0
Merge pull request #4483 from vcmi/custom_objects_per_zone
Customizable objects in RMG zones
2024-10-01 14:58:35 +02:00
Ivan Savenko
92c5fd4156
Merge pull request #4655 from IvanSavenko/bugfixing
Bugfixing
2024-09-23 18:01:27 +03:00
Ivan Savenko
76e3ca4afe Fix potential access to destroyed variable on stack 2024-09-22 20:32:20 +00:00
Andrii Danylchenko
894c88defc
Merge pull request #4612 from vcmi/nkai-treat-pandora-as-blocker
NKAI: pandora as blocker object
2024-09-22 15:30:17 +03:00
Tomasz Zieliński
79c4d7d51f Merge remote-tracking branch 'origin/develop' into custom_objects_per_zone 2024-09-21 14:20:56 +02:00
Andrii Danylchenko
ce0f51672a NKAI: replace hardcoded pandora with more flexible solution 2024-09-20 16:05:57 +03:00
Ivan Savenko
6832a5c4be
Merge pull request #4599 from MichalZr6/fix_hero_access_check
Fix error "hero access check" flooding console during quick-battle
2024-09-20 13:01:49 +03:00
Ivan Savenko
c7fc6a4c2e
Merge pull request #4625 from IvanSavenko/fix_doublevisit
Fix crash on AI double-visiting a town with new hero
2024-09-20 11:50:47 +03:00
Laserlicht
a1384bf47f defending, when not possible to attack invincible 2024-09-19 20:54:50 +02:00
Ivan Savenko
bbeaf0ad01 NKAI: Do not visit town on recruiting hero
Currently this may lead to a case where player have received a query
(such as levelup query from Battle Academy in Dungeon), but still
attempts to move
2024-09-19 16:44:48 +00:00
Andrii Danylchenko
ec6c84b0e0 NKAI: pandora as blocker object 2024-09-17 15:25:13 +03:00
MichalZr6
cb9070fb5b Fix unnecesarry error log in console from CBattleInfoEssentials::battleGetFightingHero 2024-09-15 08:51:05 +02:00
Tomasz Zieliński
2fe54504ab Merge remote-tracking branch 'origin/develop' into custom_objects_per_zone
# Conflicts:
#	lib/rmg/CRmgTemplate.cpp
2024-09-14 10:19:22 +02:00
Tomasz Zieliński
9591ce1ab4 Move CompoundMapObjectID to separate file 2024-09-14 08:55:28 +02:00
Ivan Savenko
29f393e024 Removed hardcoded checks for map objects in favor of analyzing
rewardable object content
2024-09-12 12:11:18 +00:00
Ivan Savenko
39a2c29c97 Removed creatureBank flag from battle, battles now receive BattleLayout
struct that defines how units are placed in combat
2024-09-12 12:11:18 +00:00
Ivan Savenko
503b87561e Converted all h3 banks to rewardable, remove most of hardcoded checks 2024-09-12 12:11:18 +00:00
Ivan Savenko
785036836c Rewardable objects may now define guards. Converted Crypt to rewardable. 2024-09-12 12:10:40 +00:00
Ivan Savenko
48b0a222a0
Merge pull request #4570 from kdmcser/crash_fix
fix Ballista Bank Mod auto combat crash
2024-09-12 14:16:41 +03:00
kdmcser
312403962b
Update BattleExchangeVariant.cpp
fix.compile error
2024-09-11 11:39:03 +08:00
kdmcser
bb759dc2b8 fix compile error 2024-09-11 01:43:30 +08:00
kdmcser
58cdbccf21
Update AI/BattleAI/BattleExchangeVariant.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-09-10 15:29:11 +08:00
kdmcser
c5b598b277 fix Ballista Bank Mod auto combat crash 2024-09-08 01:05:03 +08:00
Ivan Savenko
8225eb454e Added GameSettings to gamestate, potentially allowing to define game
settings per map (or in random map template)
2024-09-05 15:16:27 +00:00
Andrii Danylchenko
07ae33b8f4 BattleAI: missing lock 2024-09-03 13:02:58 +03:00
Andrii Danylchenko
f9442208da BattleAI: avoid standing in moat 2024-09-03 13:02:58 +03:00
Ivan Savenko
39e5ba32f6
Merge pull request #4530 from IvanSavenko/town_fortifications
Support for configurable town fortifications
2024-08-31 13:59:40 +03:00
Ivan Savenko
c3e76f19e1 Add workaround for very common crash in BattleAI 2024-08-30 12:25:55 +00:00
Ivan Savenko
644d6f4529
Merge pull request #4507 from vcmi/fix-battle-ai
Battle AI: fix firewall, fix haste spellcast evaluation for waits and…
2024-08-30 14:36:05 +03:00
Ivan Savenko
36c1ed670f Support for configurable town fortifications
Removed most of hardcoded checks for fort level or for presence of fort/
citadel/castle buildings.

It is now possible to define which parts of town fortifications are
provided by town buildings

Configuration for H3-like fortifications is provided in
buildingsLibrary.json and will be used automatically by mods as long as
mods have buidings named "fort", "citadel" and "castle".

Alternatively, mods can separately define:
- hitpoints of walls (shared value for all sections)
- hitpoints of central, upper and lower towers (separate values)
- presence of moat
- shooters for each tower (separate values)
2024-08-28 19:42:14 +00:00
Ivan Savenko
0fd9dbf240 Unified income handling, added IOwnableObject interface 2024-08-28 12:40:44 +00:00
Ivan Savenko
01396b62b7 Extracted handling of type ID's from serializer into a separate class 2024-08-26 19:48:46 +00:00
Ivan Savenko
b84af1a6de Significantly simplify packs applying
Apparently our logic for packs applying with types registration is
overcomplicated and by now completely unnecessary - it became redundant
after introduction of visitor pattern.
2024-08-26 19:48:46 +00:00
Ivan Savenko
11e8b04ac5
Merge pull request #4463 from SoundSSGood/IMarket-refactoring
IMarket refactoring
2024-08-26 22:48:23 +03:00
Ivan Savenko
897bc65e64
Merge pull request #4508 from kaja47/dead-code-must-die
remove never used code in CBonusSystemNode
2024-08-26 19:11:03 +03:00
Ivan Savenko
3d39963a1c Merge branch 'master' into 'develop' 2024-08-26 14:01:00 +00:00
Andrii Danylchenko
ed36b1a882 Battle AI: fix casting Implosion when it kills target stack, fix casting summon elementals 2024-08-26 16:58:27 +03:00
Andrii Danylchenko
d55996cc46 Battle AI: fix firewall, fix haste spellcast evaluation for waits and movements, allow location spells 2024-08-26 11:31:00 +03:00
K
462c79e190 remove never used code in CBonusSystemNode
Method CBonusSystemNode::getAllBonuses have 'root' parameter which is never
set to anythig else than nullptr. This patch removes the parameter and all
code that depends on it as preparatory work for further bonus system
optimization.
2024-08-25 14:15:21 +02:00
Andrii Danylchenko
01b6828df6 BattleAI: fix init env 2024-08-22 21:20:22 +03:00