405 Commits

Author SHA1 Message Date
Robin Eklind a103525ea6 items: add BUGFIX for RndItem, invalid logic for Scroll of Resurrect
Scroll of Resurrect occurs twice in the item data list, firstly at
IDI_RESURRECT with IDROP_NEVER, and secondly a regular item with
IDROP_REGULAR.

Since the ri-- logic only checks for spell ID, ri will be decremented
also for IDROP_NEVER; thus unintentionally removing the previously added
valid item ID in Single Player (which is this case is always gold).

Therefore, the chance for gold drop is higher in Multi Player than
Single Player.
2022-10-15 01:12:56 +02:00
Robin Eklind aa2ab57539 items: add BUGFIX for SpawnItem, uninitialized use of onlygood 2022-08-06 00:57:25 +02:00
Anders Jenbo 3fd926d544 BUGFIX: check for dObject OOB 2021-11-26 17:16:37 +01:00
Robin Eklind 045cb90dbf items: add BUGFIX for GetItemRecord when handling quest items
When spawing quest items (e.g. blood stone), no unique seed is set
for the item. Therefor two quest items may share the same seed, this
happens deterministically for the Valor quest, since three blood stones
are spawned, each with item seed 0x00000000.

For this reason, if two or more such quest items with identical seed are
looted within less than 6 seconds, the 2nd, 3rd, etc loot actions are
ignored.
2021-09-01 08:05:56 +02:00
Robin Eklind 0c50c87cf5 items: add BUGFIX, item get records not reset when resetting items
The item get record array tracks items being recently looted in an
effort to prevent the same item from being looted more than once.
Prior to this commit, the item get record array (and corresponding
item get record array length) variables were not cleared when
creating a new game. Therefore, the item get record array of a
previous game could remain in between games and prevent an item
from being looted (if it was looted in a previous), even if it was
never looted in the current game. In practice this almost never
shows up, since each item get record is valid for a total of 6
seconds before being cleared. So, you would either have to save
a game, quickly loot an item, when load the game and try to loot
the same item before 6 seconds pass. OR, you could use the demo
replay functionality to run test cases, and speed up execution to
run e.g. 10'000'000 logic ticks per second. Both would exhibit the
bug and prevent the item from being looted.

ref: diasurgical/devilutionX#2691
2021-08-24 12:56:48 +02:00
Robin da7ea7b593 items: add BUGFIX for PrintItemPower (#2241) 2021-08-04 18:45:40 -05:00
Anders Jenbo e426c38adb Correct AddInitItems 2021-07-02 23:08:43 +02:00
Anders Jenbo 4419635fcc BUGFIX wrong itype in InitItems 2021-04-02 01:32:37 +02:00
Martin Wolters baf3a4cc17 Bugfix: MaxGold shouldn't depend on auricGold. (#2218) 2021-03-28 13:54:52 +02:00
Anders Jenbo adf5f8f504 Clean up hellfire related code 2021-01-31 13:37:42 +01:00
Anders Jenbo 2b6286dd7f Clean ups and BUGFIX notes 2021-01-17 14:29:33 +01:00
Anders Jenbo 1e86577fc8 Some random cleanups 2021-01-14 00:05:30 +01:00
Anders Jenbo be917d43c2 Make diablo vegan frindly 2021-01-09 16:48:32 +01:00
Anders Jenbo c7b32ec4e4 Clean ups 2021-01-08 21:23:00 +01:00
Anders Jenbo 448281a916 [hellfire] SpawnWitch 2020-12-27 18:26:16 +01:00
Anders Jenbo 557af48363 [hellfire] SpawnBoy 2020-12-27 18:25:57 +01:00
Anders Jenbo f7a8d515fe [hellfire] CalcPlrItemVals 2020-12-27 06:27:26 +01:00
Anders Jenbo a23e039412 Clean up PrintItemPower 2020-12-27 06:27:19 +01:00
Anders Jenbo e80d87a9bc [hellfire] UseItem 2020-12-27 06:27:14 +01:00
Anders Jenbo 21d18d5c31 [hellfire] SpawnOnePremium 2020-12-27 06:27:07 +01:00
qndel e73e1fc114 some cleanup 2020-12-06 23:45:33 +01:00
Anders Jenbo 5b085ad957 [hellfire] GetItemPower 2020-12-05 22:52:38 +01:00
qndel c4c2e0420c spell defines and macros (#2162) 2020-12-04 19:18:22 +01:00
qndel 7f7ae623df Goe (#2163)
* proper random_ comparisons
* proper mienemy comparisons
* add mienemy/micaster enum
* GOE enum
2020-12-04 19:16:58 +01:00
qndel a597e6d0d5 fix compiling (#2166) 2020-12-04 08:31:45 +01:00
Anders Jenbo 38dbcf7641 Format source 2020-12-02 00:52:38 +01:00
qndel f2c7ee7dfd ids next to items 2020-11-29 13:42:31 +01:00
qndel a2dc735f6b some cleanup 2020-11-23 17:04:50 +01:00
Anders Jenbo 3b04a4d6d9 [hellfire] SpawnPremium min diff 2020-11-09 02:06:09 +01:00
Anders Jenbo 9f9a7920d4 Reorder items.cpp 2020-11-03 02:05:01 +01:00
Gleb Mazovetskiy ec329e645c Fix all "no-write-strings" warnings 2020-10-25 15:37:51 +01:00
Anders Jenbo d665dfae9a Clean up RndItem 2020-10-15 03:08:16 +02:00
Anders Jenbo e0825eb60a Clean up SaveItemPower 2020-10-15 03:03:09 +02:00
qndel 95e084dbd3 apply enums (#2088) 2020-10-12 00:23:59 +02:00
qndel 7b8dd91979 [hellfire] HealerItemOk bin exact 2020-10-12 00:14:56 +02:00
qndel b0142637b7 Ear cleanup #2 (#2100) 2020-10-12 00:14:24 +02:00
qndel 46e38e025e RechargeItem cleanup 2020-10-12 00:04:02 +02:00
qndel 1d308c5f95 CalcSelfItems cleanup 2020-10-12 00:03:50 +02:00
Anders Jenbo 7e04c63977 Merge branch 'hellfire' of github.com:diasurgical/devilution 2020-10-11 23:53:07 +02:00
qndel 01ef654093 RndItem cleanup 2020-10-11 16:12:05 +02:00
pionere f0a51ccf65 use defs instead of literals 2020-10-11 06:37:14 +02:00
Tyler c803c6aa66 Calculate position of screen elements 2020-09-27 00:21:54 +02:00
qndel 2cc494581f Add enum for icreateinfo 2020-09-01 07:02:38 +02:00
Anders Jenbo c1b4d3d8b5 Copy documentation from sanctuary/notes 2020-07-06 05:43:25 +02:00
Robin Eklind 60eb5c946c items: add BUGFIX comment for DrawULine 2020-07-03 02:19:38 +02:00
Anders Jenbo 18bec27121 Hellfire clean ups 2020-04-26 22:34:30 +02:00
Anders Jenbo 659dc41aa5 Merge branch 'master' of github.com:diasurgical/devilution into hellfire 2020-04-26 22:10:34 +02:00
Robin Eklind e6fa244fa7 items: add BUGFIX comment for SaveItemPower 2020-04-26 19:32:38 +02:00
Anders Jenbo fe82c0b1f1 Clean up GetItemPower
Thanks @tsunamistate for bringing attention to this
2020-04-15 16:52:42 +02:00
Anders Jenbo 46224337d8 Fix bin diff 2020-04-14 12:52:44 +02:00