Vladimir Olteanu
4d6ff58c22
Reduce reliance on bool done for control flow (part 1 of x) ( #4720 )
2022-06-17 13:13:39 +02:00
Anders Jenbo
d17d7e018d
Use common function for loading .dun tile data
2022-06-15 14:18:06 +02:00
Gleb Mazovetskiy
1fc8ecb6f6
Add fmt::runtime annotations for C++20 support
...
`fmt` requires non-contexpr format string arguments to be wrapped in
`fmt::runtime` in C++20.
2022-06-14 12:46:36 +01:00
Gleb Mazovetskiy
779ccaca17
Overhaul translation fetching
...
1. Do not modify the map after loading. Instead, return string views
(guaranteed to be null-terminated) from look up functions and return
the key directly if not found.
2. Use an `unorded_map` instead of `map` where available (C++20).
Saves a bit of RAM (~50 KiB) and improves lookup performance.
2022-06-14 12:46:36 +01:00
Anders Jenbo
1203514383
Clean up use of currlevel
2022-06-07 21:35:01 +02:00
k-bar
3ab94ebdb4
Berserk melee unsquelch fix
2022-06-06 06:38:47 +02:00
Gleb Mazovetskiy
628406a44c
Refactor inventory/belt item presence and removal
...
Introduces new functions to check for presence of and remove player items.
These functions do not rely on or expose item indices.
They're implemented as free functions instead of Player methods due to
complicated include dependencies between `player.h`, `inv.h`, and
`inv_iterators.h`. We should probably look into cleaning this up at some
point.
2022-06-05 13:30:26 +02:00
qndel
354e329644
Players[MyPlayerId] -> MyPlayer
2022-05-31 05:35:52 +02:00
k-bar
bc2c13e8ef
fix for monster melee hit monster ( #4617 )
2022-05-30 04:27:53 +02:00
Anders Jenbo
c89d28fe47
Remove leftover firemen code
2022-05-23 07:31:50 +02:00
Anders Jenbo
d6b258926e
Apply type checking on monster type
2022-05-23 07:31:50 +02:00
Anders Jenbo
8c03e4a73b
Fix code style in IsPossibleToHit
2022-05-21 21:01:32 +02:00
Anders Jenbo
fcfb701ba0
Extract identical MonsterDeath code
2022-05-21 21:01:32 +02:00
Anders Jenbo
5f51092f15
[hellfire] Fix spiderloard not leaving acid when killed by monsters
2022-05-21 21:01:32 +02:00
Anders Jenbo
b99521b376
Do not change animation state for petrified monsters during death
2022-05-21 21:01:32 +02:00
k-bar
4a4e3a5404
Unwindle If-Elses around petrify monster
2022-05-21 19:57:02 +02:00
k-bar
5b29eda518
Remove of CheckMonsterHit (aka LiftGargoylesAndIgnoreMages)
2022-05-21 19:57:02 +02:00
k-bar
417c4c9ce2
Extract duplicated code to functions related to monster
2022-05-21 19:57:02 +02:00
Anders Jenbo
457f804f10
[vanilla] Fix missing tource light in Lazarus' chamber
2022-05-12 21:39:00 +02:00
Anders Jenbo
134791af3f
Remove pointless math related to finding monsters for levels
2022-05-11 11:28:05 +02:00
Anders Jenbo
0645d9b2a1
Correct missing hellfire level mapping in leveltype
...
Hellfire never added the 2 new dungion types, instead it makes
additional checks on currlevel. This is confusing and mess, so cleaned
it up.
2022-05-10 15:16:38 +02:00
qndel
89109dc9f4
HP bar tweaks and fixes ( #4525 )
...
* HP bar tweaks and fixes
2022-04-29 08:06:59 +02:00
DakkJaniels
dad46e1905
Item special effect enum ( #4129 )
2022-04-19 15:44:46 +02:00
Gleb Mazovetskiy
a66ca44695
Zero-based frame indexing
...
Index frames starting at 0 instead of 1.
2022-04-14 04:39:26 +01:00
Gleb Mazovetskiy
ade8aba822
Fix some more warnings
2022-04-14 01:26:29 +02:00
staphen
32311d4835
Fix Diablo's HP
2022-04-06 01:37:48 +02:00
obligaron
7d1e2d738e
Ensure Reflect + Thorn don't kill a monster twice ( #4318 )
2022-04-03 10:27:08 +02:00
Anders Jenbo
55a0b71b1c
Only spawn loot once
2022-03-20 11:12:08 +01:00
Anders Jenbo
1409e604f5
Reduce string conversions
2022-03-20 11:04:15 +01:00
Anders Jenbo
718c46e7fe
Remove use of tempstr
2022-03-19 06:03:19 +01:00
obligaron
e0ef3a2307
Init monster TRN after monster load
2022-03-09 20:23:49 +01:00
Gleb Mazovetskiy
7fede6c4cb
Clean up owned/unowned CelSprite ambiguity
...
Makes `CelSprite` unowned and adds a new `OwnedCelSprite` class for
owned sprites.
This clarifies ownership and makes the code cleaner in a number of
places.
Additionally, because the `CelSprite` class is now tiny (1 less
pointer), we can pass it by-value instead of by-reference, removing a
pointer indirection in the rendering functions.
2022-03-06 04:49:13 +01:00
DakkJaniels
7bc19ee91a
add enum for the spell flags. Adjust code to use them.
2022-03-06 02:09:19 +01:00
qndel
d3995736b9
fix spawning unique monsters
2022-02-23 22:37:12 +01:00
qndel
9ba64ad08b
TRN rewrite + bugfix ( #4056 )
...
* working new TRN system
* apply TRNs to all unique missiles
2022-02-20 14:28:51 +01:00
Gleb Mazovetskiy
48ff656dc0
Load monster graphics into a single buffer
...
Follow-up to a5e1fa5bbe , which loaded
the missiles into a single buffer.
2022-02-17 22:02:41 +00:00
DakkJaniels
0790416781
Unique Monster Variable Rename ( #4060 )
...
* fix variable name to reflect what it is modifying (unique monster custom to hit, not custom hit points)
* align UniqueMonstersData table
2022-02-14 13:38:31 +01:00
staphen
30a9595020
Fix Hork Demon and Nakrul drops in multiplayer
2022-02-04 18:44:26 +01:00
ephphatha
32d397eb2a
Add max_size checks when adding missiles to allow for limited size containers
...
This doesn't handle failed allocations (e.g. if the platform runs out of memory) but makes it easier to use a fixed size container on limited memory devices.
2022-01-23 05:02:57 +01:00
obligaron
234a053863
Change Missiles Array to std::list
2022-01-20 23:12:48 +01:00
SoundChaser83 and Stephen C. Wills
b52724a15e
Fix monster damage potentially being off by 63/64th
...
Monster damage values from melee/missile hits could potentially add or subtract up to 63/64ths of damage over and above a monster's usual damage range
Co-authored-by: Stephen C. Wills <[email protected] >
2022-01-09 02:29:08 +01:00
staphen
bd0470994a
Initialize golems before objects
2021-12-12 19:16:59 +01:00
obligaron
f2f764ed68
Fix Knockback checks wrong position when a monster is moving
2021-12-12 00:02:05 +01:00
obligaron
f58a42ca97
Check that monsters aren't placed in doors
2021-12-12 00:01:01 +01:00
Anders Jenbo
ffae6d805b
Clean up check for borken monster position in DirOK
2021-12-11 04:55:24 +01:00
obligaron
ff5de056fa
Add all (boolean) Game Settings to Settingsmenu ( #3616 )
2021-11-26 23:43:46 +01:00
qndel
7b82c52da9
add _mai_id enums in comment
2021-11-24 12:51:56 +01:00
Gleb Mazovetskiy
3aa8149d3e
PrintMonstHistory: Fix string manipulation
...
The code previously assumed that there is an ASCII separator after each
resistance type.
Different languages may use something else entirely. Relaxes the
assumption to any single code point to avoid producing malformed
UTF-8.
2021-11-14 07:35:10 +00:00
qndel
1110927057
make berserked monsters fight each other
2021-11-10 20:43:22 +01:00
Andrew James
796e2813cf
Use scoped enums for DungeonFlags/BFLAG ( #3135 )
2021-11-07 03:11:16 +01:00