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

792 Commits

Author SHA1 Message Date
Ivan Savenko
a9866bb5c6 Added RandomGeneratorUtil::nextItemWeighted convenience method 2024-01-31 00:17:40 +02:00
Ivan Savenko
5d8b65befd
Merge pull request #3575 from Laserlicht/infobox_pos
fix infobox position while disabling
2024-01-30 17:36:30 +02:00
Laserlicht
7cc004e139
code review 2024-01-29 21:33:20 +01:00
Laserlicht
7ddc87f4a2
removed unused param; optimized pos 2024-01-29 21:11:18 +01:00
Laserlicht
36881c226f
fix infobox position while disabling 2024-01-27 22:08:15 +01:00
Laserlicht
cad0d5db16
consider unlimited replay (or not) 2024-01-27 15:02:03 +01:00
Laserlicht
3e71cbcc39
Block feature is battle against human 2024-01-27 14:35:54 +01:00
Laserlicht
a2fd5039ab
setting 2024-01-27 01:16:55 +01:00
Laserlicht
e8c541f873
end with auto combat 2024-01-26 23:15:56 +01:00
Ivan Savenko
2a193effcc Merge branch 'master' into 'develop' 2024-01-25 16:23:13 +02:00
Ivan Savenko
d8a96066c6
Merge pull request #3533 from Laserlicht/battle_text
fix battle text position
2024-01-21 10:10:26 +02:00
Ivan Savenko
24d25730ad Changed checks for null with checks for hasValue 2024-01-20 16:41:10 +02:00
Laserlicht
3084cb2e46 fix battle text position
fix space
2024-01-20 14:35:21 +01: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
bd5682ecc3 Merge remote-tracking branch 'vcmi/master' into develop 2024-01-19 13:49:54 +02: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
0d0d3d8c80 Renamed speed -> getMovementRange, remove misleading default parameter 2024-01-14 17:14:36 +02:00
Ivan Savenko
f6e0f46040
Merge pull request #3467 from dydzio0614/hota-fixes
Fix HotA creature abilities (add bonuses allowing implementing them)
2024-01-12 21:55:18 +02:00
M
815fa26fb3 Change nix rounding, revert assert comment 2024-01-10 22:18:53 +01:00
Dydzio
d309a00025 Extra fix: fix amount position in battle creature labels 2024-01-07 21:45:39 +01:00
Dydzio
bb925e4cb0 First version of sea witch / sorceress ability 2024-01-07 19:27:32 +01:00
Laserlicht
7a6722bc45
fix spell hover 2024-01-07 18:12:17 +01:00
Laserlicht
f4bff876d5
make queue interactable 2024-01-07 16:38:37 +01:00
Laserlicht
cb9c4bbaf0 unlimited replay option 2023-12-28 20:48:19 +01:00
Laserlicht
f577f4cf6b
bugfix: enable first, then set text 2023-12-28 17:17:01 +01:00
Ivan Savenko
a9005da01e
Merge pull request #3366 from Laserlicht/battle_informations
Battle stacks informations
2023-12-28 12:39:26 +02:00
Ivan Savenko
172e385f67
Merge pull request #3375 from Laserlicht/round_counter
turn indicator
2023-12-24 16:25:04 +02:00
Laserlicht
4f8dcb0f33
fix wrong value if unit dead 2023-12-24 01:06:02 +01:00
Ivan Savenko
85de3143ff Fixed Genie spellcasting logic to account for spell immunities 2023-12-24 01:13:19 +02:00
Laserlicht
fe8bf92a20
only a bar in small mode 2023-12-23 22:00:28 +01:00
Laserlicht
c540dd1183
round_counter 2023-12-23 19:57:19 +01:00
Laserlicht
f0c97b344a
add duration + morale/luck 2023-12-23 16:07:12 +01:00
Laserlicht
7a541c7a42
implement spells 2023-12-23 14:51:26 +01:00
Laserlicht
8c14509d72
spell area 2023-12-23 03:32:42 +01:00
Laserlicht
0b4cf14a3d
basic functionality 2023-12-23 03:06:48 +01:00
Laserlicht
56e1265097
use stacks 2023-12-22 22:26:35 +01:00
Ivan Savenko
9bf1e72a19
Merge pull request #3346 from IvanSavenko/better_timers
[1.4.2] Better timers
2023-12-22 23:19:20 +02:00
Ivan Savenko
0a8b81b2c4 Fix deactivation of current stack if player does not acts in time 2023-12-22 22:46:09 +02:00
Laserlicht
72911ec9a3
Army window 2023-12-22 21:26:40 +01:00
Ivan Savenko
ebbba0029f Fix positioning and size of turn timers widget with English fonts 2023-12-22 18:40:29 +02:00
Ivan Savenko
241add394c Fixed timer widget in pvp battle 2023-12-22 18:40:28 +02:00
Ivan Savenko
f834cb3d99 Display different timers separately when applicable 2023-12-22 18:40:28 +02:00
Dydzio
39c3db04f3 Add missing antimagic functionality to antimagic garrisons 2023-12-21 18:09:33 +01:00
Ivan Savenko
a1f34e059a Fix possible crash on starting 2nd battle while intro sound from 1st one
is still playing
2023-12-13 19:35:02 +02:00
Ivan Savenko
e21e3f8386 Do not display "Spell Cancelled" message on right-click when no stack is
active
2023-11-27 14:09:08 +02:00
Ivan Savenko
d06ae15c6e Fix teleporting animation 2023-11-27 14:08:49 +02:00
Laserlicht
f7a31865f3
basic touch introduction implementation 2023-11-14 21:52:30 +01:00
Andrii Danylchenko
3b27e07385 #3003 - fix hypnotize 2023-11-03 13:50:16 +02:00
Andrii Danylchenko
73b89d4e84 #2977 - fix obstackle path deserialization 2023-10-29 16:07:00 +02:00
Ivan Savenko
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00