1002 Commits
Author SHA1 Message Date
obligaron 2da492d203 Change some functions to Player reference 2023-12-05 20:40:30 +01:00
Gleb Mazovetskiy f566359e4f Migrate item data to txtdata/ 2023-11-14 00:20:17 +00:00
Gleb Mazovetskiy a2b94cc03c Lua: Migrate and organize the rest of debug cmds
Fully migrates debug commands to Lua and organizes them into logical
groups.

The CLI `+` syntax now runs Lua, e.g.:

```bash
build/devilutionx '+dev.player.trn.plr("infra")'
```

Chat hotkeys run Lua code if they start with `/lua`, e.g.:

```ini
[NetMsg]
QuickMessage1=/lua message(dev.player.info())
```
2023-11-07 22:27:48 +00:00
Gleb Mazovetskiy c5a5dc9f5c Fix a few MSVC warnings 2023-11-05 12:57:59 +00:00
Anders Jenbo bb2e189327 Convert _sfx_id in to class enum 2023-11-02 14:34:24 +01:00
Gleb Mazovetskiy 17d5f05ada Fix some compilation warnings 2023-11-02 00:42:44 +00:00
Gleb Mazovetskiy e5881688f4 text_render: Replace optional args with struct
4 options args are a bit unwieldy, especially when you want
to pass only the first and the last one.

With a struct, there is no need to specify the default values
for the args in between.
2023-10-25 09:19:14 +01:00
ephphatha 4e6517e54c load starting loadout dynamically 2023-09-20 05:49:54 +02:00
ephphatha 56a6889225 Use generic code to create starting items for new characters 2023-09-20 05:49:54 +02:00
ephphatha d13bed2a78 Fix broken test case 2023-09-20 05:49:54 +02:00
ephphatha 24a20ce8e2 Extract uses of MyPlayer to prevent future crashes in tests/game init 2023-09-20 05:49:54 +02:00
ephphatha 5d50b5520d Add PlayerData lookup helper to avoid manual casts
This lets us remove the PlayersData global, and we can use a helper in the player class for convenience.
2023-09-20 05:49:54 +02:00
ephphatha c1f3dcb705 Use safer versions of random number functions instead of GenerateRnd 2023-09-19 16:52:40 +02:00
Eric Robinson bc3a421622 Debug: Revise Text (#6625) 2023-09-19 00:43:30 +00:00
Gleb Mazovetskiy e090c8bf31 Extract some player attributes to data files 2023-09-17 14:49:12 +01:00
staphen 4a1da5a777 Fix minlvl when generating translated names for staves 2023-09-17 15:25:51 +02:00
ephphatha da76e131e4 Add getter/setter for character levels to ensure _pNextExper stays synced 2023-08-24 05:46:44 +02:00
ephphatha d92d152576 Use unsigned type for character levels 2023-08-24 05:46:44 +02:00
Gleb Mazovetskiy 8c1a847f41 Remove utils/stdcompat/string_view.hpp 2023-08-14 09:59:14 +01:00
Gleb Mazovetskiy c19bfe87fa Remove utils/stdcompat/algorithm.hpp 2023-08-14 01:54:29 +01:00
staphen 470c028c17 Make Bucklers available in shareware 2023-07-21 04:19:34 +02:00
Anders Jenbo 01d2a46a8d Validate items when unpacking importing 2023-07-10 17:12:34 +02:00
KPhoenix 3354689a5d Fix Book requirements not updating 2023-07-05 23:54:45 +02:00
Gleb Mazovetskiy 1167b92692 Remove uses of std::tolower
`std::tolower` relies on the C locale, which we try to avoid.
2023-06-18 04:55:47 +01:00
staphen 81a034132a Find valid target when casting scroll from inventory 2023-06-18 04:52:22 +02:00
staphen 26bf9be89d Fix Item::getName() for Doppelganger's prefix 2023-06-07 15:48:06 +02:00
Anders Jenbo e707bd0c4a Drop quest item based on difficulty 2023-06-02 20:48:07 +02:00
obligaron c8f1804d04 Spawn Optic Amulet and Arkaine's Valor always at the same tile (#6167)
* Spawn Optic Amulet and Arkaine's Valor always at the same tile

* Multiplayer: To complete Halls of Blind and Arkaine's Valor also check drop position, because quest rewards items can be randomized
2023-06-02 20:12:39 +02:00
obligaron 571e770e68 In multiplayer randomly drop unique quest reward or magic item of same type 2023-05-31 22:55:38 +02:00
obligaron 4ce6413db1 Spawn butcher's cleaver and undead crown 2023-05-30 23:17:41 +02:00
obligaron bac8535564 Sync Little Girl Quest 2023-05-28 01:51:56 +02:00
obligaron 31fe55a161 Prevent hellfire quests from disapearing from quest log 2023-05-28 01:51:56 +02:00
obligaron 3f195ae29b Use CMD_SPAWNITEM to spawn Ghardbards first item 2023-05-24 00:57:12 +02:00
obligaron e1082126a3 Use CMD_SPAWNITEM to spawn Zhars first book 2023-05-24 00:57:12 +02:00
ephphatha 9987bb6be2 Avoid unnecessary item initialisation and copy 2023-05-12 06:27:12 +02:00
ephphatha 4f3c70aa95 Move PlaceItemInWorld to items.h/cpp
Seems like a more appropriate home
2023-05-12 06:27:12 +02:00
ephphatha 3bbb80d849 Introduce temporary function to advance the global rng state and discard results 2023-05-07 16:35:03 +02:00
ephphatha 3a7ae732cd use unsigned types for item seeds 2023-05-06 18:02:54 +02:00
obligaron bf86114ec3 Sync learned/changed spells 2023-04-24 18:19:27 +02:00
Anders Jenbo e969a8ad01 Invert player to vision relation 2023-04-21 21:25:19 +02:00
Anders Jenbo 13c5c09990 Clean up Light related naming
A few are left unchanged as they will be removed in a later commit
2023-04-21 21:25:19 +02:00
Anders Jenbo 6c893e4977 Remove unused code 2023-04-18 21:21:53 +02:00
DakkJaniels 64d5a328e7 modify SpawnOnePremium in items.dat for readability (#4095) 2023-04-18 03:12:21 +02:00
obligaron 1a3e72bf17 Unify normal casting and casting from inventory 2023-04-17 03:22:50 +02:00
obligaron b87711bc08 Reintroduce Player::spellFrom to seperate teleport cursor from queued spell 2023-04-17 03:22:50 +02:00
obligaron e9e959cc7c Improve debug drop(u) command (multiplayer compatible, support quest uniques and don't drop items on failure) 2023-04-15 13:13:13 +02:00
obligaron be82cff1ef Ensure we don't load graphics for players that aren't on our level 2023-04-14 23:40:08 +02:00
obligaron 1522dc7031 Multiplayer: Add arena potions 2023-04-13 21:20:53 +02:00
obligaron eeca953615 Introduce UpdateHellfireFlag to set missing CF_HELLFIRE flag 2023-04-13 00:07:00 +02:00
obligaron 2f5a236c4c Store only none translated names in Item::_iName/_iIName 2023-04-13 00:07:00 +02:00