1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00
Commit Graph

55 Commits

Author SHA1 Message Date
61fba1fedd Merge remote-tracking branch 'upstream/develop' into develop 2024-10-10 17:23:39 +02:00
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
06f894140c Update BuildAnalyzer.cpp
Modified goldPressure-formula to no longer use completely arbitrary part of lockedresources/5000.
Lockedresources is now just divided by a factor of the free gold like everything else.
2024-09-06 21:42:15 +02:00
0c488145b9 Update BuildAnalyzer.cpp
Revert unintentionally commited changes
2024-09-01 00:02:47 +02:00
72597b549b hero spread
Prefer hiring heroes at towns that don't have heroes nearby.
2024-08-31 23:00:27 +02:00
aea05b3fb8 Merge remote-tracking branch 'upstream/develop' into develop 2024-08-29 14:42:37 +02:00
0fd9dbf240 Unified income handling, added IOwnableObject interface 2024-08-28 12:40:44 +00:00
e6d907af55 Merge remote-tracking branch 'upstream/develop' into develop 2024-08-18 09:52:59 +02:00
f0ca1c6112 Update BuildAnalyzer.cpp
Removed the restrictions of the greedy-playstyle.
Only count forts as gold-producing prerequisites when no same- or higher-level fort exists somewhere else in the empire.
2024-08-15 18:13:44 +02:00
c10c04779f Adaptive Build-order
When not threatened by nearby enemies the AI adds missing gold-income-buildings towards gold-pressure. This impacts the build-order in a way that they try to rush these more and get up a good economy more quickly.
2024-08-14 22:52:19 +02:00
170f375179 code review 2024-08-10 00:29:30 +02:00
475b769eef fix ToW 2024-08-07 01:35:50 +02:00
14bcfad7b0 fix upgrade 2024-08-06 23:28:45 +02:00
ebeeff5aa3 abstraction layer 2024-08-05 23:51:07 +02:00
3afddbbf29 replaced constant 2024-08-05 23:03:19 +02:00
f4c0bee003 Merge remote-tracking branch 'upstream/develop' into develop 2024-08-05 21:53:59 +02:00
bfd1e8a7c8 calculate income 2024-07-25 02:51:00 +02:00
aade79720f Update BuildAnalyzer.cpp
Allow queuing citadels and castles on other days than satur- and sunday.
2024-07-24 21:14:27 +02:00
69efe9cfda Merge remote-tracking branch 'upstream/develop' into develop 2024-07-22 20:15:40 +02:00
4aa73b40c9 Split CTownHandler into smaller chunks 2024-07-21 18:21:48 +00:00
2bf7b3200b Merge remote-tracking branch 'upstream/develop' into develop 2024-07-19 22:05:58 +02:00
f094bf9602 Added marketplace to buildable buildings
Before marketplaces could only be built as part of a requirement for other buildings but not on their own when that other building already existed like it is the case in certain campaign-missions.
2024-07-19 15:19:27 +02:00
e9e5948d61 NKAI: take into account 7lvl creature cost when we consider what resources we need 2024-07-18 20:24:24 +03:00
53c51b4278 Allow all buildings
Added resource-silo and special buildings to things that AI can theoretically build.
2024-07-15 17:26:06 +02:00
3fed58c47b Gold-pressure 2024-07-12 15:36:29 +02:00
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
e70411bf1a Fix typo: preasure -> pressure 2024-04-16 21:10:49 +00:00
7d925b3689 Fix typo: Preasure -> Pressure 2024-04-16 21:10:15 +00:00
35429eab52 NKAI: moddable configuration 2024-03-01 22:03:07 +02:00
8346d71c98 Remove more subID access 2023-11-01 14:44:05 +02:00
a005829a57 NKAI: cancel checking building which needs itself as prerequisite 2023-09-16 11:04:28 +03:00
e54287ea5d Converted remaining identifier to new system 2023-08-25 13:38:02 +03:00
0240ee886d Converted (almost) all namespace enum's to enum classes 2023-08-25 13:38:02 +03:00
f1a9ae99ee NKAI: various behavior fixes, undo max_gold_preasure 2023-07-31 22:01:12 +03:00
fb7477047a NKAI: loosen gold presure on build system. 2023-07-31 22:01:12 +03:00
c93bb0a502 nkai: fixes and skill rewards 2023-07-31 22:01:11 +03:00
acac42291e Remove excessive CMap.h includes 2023-05-31 23:18:38 +03:00
3738171b21 Refactoring of H3M loader to make HotA format support easier
- extracted low-level reader from MapFormatH3M class
- added separate structure to define version-specific values
- cleared up some H3M format edge cases
- replaced witch hut skill vector with set
- converted several fields to enum type
2023-04-15 17:20:38 +03:00
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
05a1d7c6e3 All text for factions/towns/building are passed through translator 2023-01-20 15:18:36 +02:00
7fdad4e0f6 Code refactor following C++ standard and condition fixes 2022-11-15 03:20:55 +03:00
eeea01d778 NKAI: namespace 2022-10-04 08:40:14 +03:00
659be89a01 remove setting values that are never read 2022-09-24 16:52:38 +03:00
c9c79887a7 remove unused variables 2022-09-22 11:54:10 +03:00
6da233c387 NullkillerAI: fix build analyser when town has no upgrade for creature 2022-05-01 10:26:07 +03:00
b4241670ba Nullkiller: rename VCAI to AIGateway 2021-07-26 21:02:50 +03:00
9a203b8af9 Nullkiller: parallel object clusterization, stabilization 2021-07-26 21:02:50 +03:00
0d5ae20e64 Nullkiller: improved citadel priority 2021-07-26 21:02:50 +03:00
4f51d3c929 Nullkiller: fix android 2021-07-26 21:02:50 +03:00
3e9bf9b662 Nullkiller: try to fix build 2021-07-26 21:02:50 +03:00