Ivan Savenko
1ac98e305f
Fix potential data race if two threads attempt to select bonuses with
...
different durations
2024-06-12 18:11:22 +00:00
Ivan Savenko
e32b6bd807
Fix potentially uninitialized members
2024-06-12 18:10:38 +00:00
Ivan Savenko
28081085a8
Create separate instance of updater for every bonus
2024-05-28 16:43:28 +00:00
Tomasz Zieliński
914cea5877
Tweaks
2024-04-26 19:33:26 +02:00
Tomasz Zieliński
04691c851f
Fixes issue of bonuses not correctly removed
2024-04-26 19:22:20 +02:00
Dydzio
b351946afd
Add some utility bonuses for player resources boosting
2024-04-15 21:18:45 +02:00
Ivan Savenko
50e8d1fd82
Add save compatibility check
2024-04-09 16:42:20 +03:00
Ivan Savenko
42616cf4e8
Fix text formatting, fix todo's
2024-04-09 16:13:30 +03:00
Ivan Savenko
18ece6dcf6
Remove some usages of server-side translations
2024-04-09 16:13:30 +03:00
Ivan Savenko
9e49587749
Replace bonus string description with metastring that can properly
...
handle translations
2024-04-09 16:13:30 +03:00
Evgeny Malygin
25125f96da
Fix: licenses, pragma guards, StdInc
2024-03-29 07:48:52 +02:00
Kris-Ja
27ba4f10be
Fix BonusLimitEffect #3070
...
Change BonusList::getBonus() to return bonuses with any BonusLimitEffect by default (returned only bonuses with BonusLimitEffect::NO_LIMIT previously)
2024-03-25 23:31:58 +01:00
Kris-Ja
ff35a27176
Fix loading saved games (add ESerializationVersion)
2024-03-23 22:03:06 +01:00
Kris-Ja
05bbb45824
change MANA_PER_KNOWLEGDE to percentage
2024-03-23 20:28:49 +01:00
Ivan Savenko
922966dcf8
Renamed JsonNode::meta to more logical modScope. Member is now private
2024-02-26 12:55:49 +02:00
Ivan Savenko
08a27663f9
Reworked JsonNode constructors to more logical form
2024-02-26 12:55:49 +02:00
Ivan Savenko
54796c7c56
Rename toJson to toString/toCompactString for consistency
2024-02-26 12:55:49 +02:00
Ivan Savenko
c3957c2c2a
Moved json files to new directory, split on per-class basis
2024-02-14 13:08:24 +02:00
Alexander Wilms
678cacbd25
Remove more redundant virtual
specifiers
...
`grep -nr "virtual " | grep -v googletest | grep " override" | grep -v overriden > ../redundant_virtual.txt`
```python
import os
with open("../redundant_virtual.txt") as f:
for line in f:
print()
line: str = line.strip()
print(line)
tmp = line.split(":",2)
file = tmp[0].strip()
code = tmp[-1].strip()
print(file)
print(code)
new_code = code.replace("virtual ", "", 1)
# https://superuser.com/a/802490/578501
command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
os.system(command)
```
2024-02-13 15:21:30 +01:00
Alexander Wilms
522cb571b3
Remove redundant virtual
specifiers
...
`grep -nr virtual | grep -v googletest | grep override > ../redundant_virtual.txt`
```python
import os
with open("../redundant_virtual.txt") as f:
for line in f:
print()
line: str = line.strip()
print(line)
tmp = line.split(":")
file = tmp[0].strip()
code = tmp[-1].strip()
print(file)
print(code)
new_code = code.replace("virtual ", "", 1)
# https://superuser.com/a/802490/578501
command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
os.system(command)
```
2024-02-10 20:46:13 +01:00
Ivan Savenko
0c07384293
Refactoring of serialization versioning handling
...
- Removed 'version' field from serialize() method
- Handler classes - Binary(De)Serializer now have 'version' field
- Serialization versioning now uses named enum
Save compatibility with 1.4.X saves should be intact
2024-01-20 20:34:51 +02:00
Ivan Savenko
d04241b10a
Code cleanup
2024-01-19 23:02:00 +02:00
Ivan Savenko
6e629a6a5f
split getBonusLocalFirst into two distinct method:
...
- const method getFirstBonus that returns single matching bonusToString
- non-const method getLocalBonus that returns bonus from current node
2024-01-19 13:56:06 +02:00
Ivan Savenko
ea1f05d15a
Stabilization
2024-01-19 13:55:22 +02:00
Ivan Savenko
e67e4430ba
Removed most of non-const static fields in lib. Reduced header includes.
2024-01-19 13:55:22 +02:00
Ivan Savenko
c37ce05d06
Attempt to make constant bonus system nodes (CCreature / CArtifact)
...
fully constant
2024-01-19 13:54:49 +02:00
Ivan Savenko
2c4cad7d9c
Slight simplification of bonus system node class
2024-01-19 13:54:49 +02:00
Ivan Savenko
bd5682ecc3
Merge remote-tracking branch 'vcmi/master' into develop
2024-01-19 13:49:54 +02:00
Alexander Wilms
7a1cee1a60
Fix error: 'auto' not allowed in non-static struct member
2024-01-17 14:49:28 +00:00
Alexander Wilms
73019c204d
Replace redundant types with auto
for the lvalues of template factory functions for smart pointers
...
grep -r --include \*.h --include \*.cpp "= std::" * | grep -v auto | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return" | grep -v double | grep -v si64 | grep -v si32 | grep -v ui32 | grep \< | grep -v float | tr -d '\t' | grep -v assert > redundant_types.txt
import re
with open("redundant_types.txt") as f:
for line in f:
line = line.strip()
path = line.split(":", 1)[0]
original_code = ":".join(line.split(":")[1:]).strip()
print()
print(path)
print(original_code)
prefix = "auto "
if original_code.startswith("static"):
static = True
else:
static = False
cpp_type = " ".join(original_code.split("=")[0].strip().split(" ")[0:-1])
print(cpp_type)
if static:
new_code = "static auto "+ " ".join(original_code.split(" ")[2:])
else:
new_code = "auto "+ " ".join(original_code.split(" ")[1:])
print(new_code)
if True:
with open(path, "r") as f:
filedata = f.read()
filedata = filedata.replace(original_code, new_code)
with open(path, "w") as f:
f.write(filedata)
2024-01-17 12:50:00 +00:00
Ivan Savenko
bb670cfb82
Merged accurate shot bonus into death stare bonus
2024-01-13 15:55:07 +02:00
Alexander Wilms
f3277b7953
Define each identifier in a dedicated statement
2024-01-10 00:22:23 +00:00
M
67f18729fa
REVENGE bonus that matches HotA haspid ability
2024-01-09 19:10:43 +01:00
Dydzio
675f9b11fa
Add ENEMY_ATTACK_REDUCTION bonus - fixes HotA Nix
2024-01-08 19:37:04 +01:00
Dydzio
3c95f92c59
Update documentation
2024-01-07 21:22:10 +01:00
Dydzio
bb925e4cb0
First version of sea witch / sorceress ability
2024-01-07 19:27:32 +01:00
Dydzio
7283a4861e
Initial version of ACCURATE_SHOT implementation
2024-01-04 22:27:51 +01:00
Dydzio
fbd988df42
Bit better documentation wording
2024-01-01 21:19:25 +01:00
Dydzio
7cf7543747
Configurable ferocity bonus
2024-01-01 21:16:38 +01:00
Dydzio
898b8f3c71
Add initial version of Ferocity ability (for Ayssids)
2024-01-01 19:58:32 +01:00
Dydzio
9e9849b741
Fix commander ability accumulation, change commander ability bonus
2023-12-23 20:16:29 +01:00
Ivan Savenko
4ed283a357
Merge pull request #3359 from IvanSavenko/crashfixes
...
Crashfixes
2023-12-22 15:17:59 +02:00
Ivan Savenko
ec89e7fa62
Move UNLIMITED_MOVEMENT bonus to very end of the list
2023-12-22 14:20:32 +02:00
Ivan Savenko
171044359d
Fixed crash on connection to 1.4.1 game
2023-12-22 14:03:05 +02:00
Dydzio
fe39faf36c
Add UNTIL_OWN_ATTACK bonus duration and use for berserk
2023-12-19 19:52:40 +01:00
Laserlicht
a24e78a210
real unlimited movement (like in OH3)
2023-12-09 13:42:09 +01:00
Laserlicht
4bad88f141
implement luck and morale cheats from OH3
2023-12-08 19:20:53 +01:00
Ivan Savenko
843e97349a
Identifiers that can be added by mods are now serialized as string
2023-11-17 00:48:55 +02:00
Ivan Savenko
c6f9434c8e
Merge pull request #3170 from gamestales/gamestales/2903-morale-description-1442
...
#2903-morale-description-#1442
2023-11-13 01:53:29 +02:00
gamestales-com
a574f18e69
#2903-morale-description-#1442
2023-11-10 15:58:19 +01:00