ephphatha
55a21b7467
Move the base hit amount to a table in playerData.cpp
...
Bringing blockBonus along for the ride as it seems to fit (and renaming to align with the current convention)
3 years ago
ephphatha
6a8f4b12da
Get base block bonus from data struct instead of storing a copy
3 years ago
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.
3 years ago
DakkJaniels
ef87664403
refactor cleaving: added in player method to determine if character can cleave and if an item is equipped.
3 years ago
ephphatha
8ed451b051
Move AddPlrExperience to class member function of Player
3 years ago
ephphatha
e6890cc5cc
Move MaxCharacterLevel to playerdat and add helpers for the various uses
3 years ago
ephphatha
14639cd096
Replace _pNextExper with getter method
...
No real need to persist this value
3 years ago
ephphatha
da76e131e4
Add getter/setter for character levels to ensure _pNextExper stays synced
3 years ago
ephphatha
d92d152576
Use unsigned type for character levels
3 years ago
Gleb Mazovetskiy
cbf51cd5ab
`DrawStringFormatArg`: Use `std::variant`
3 years ago
Gleb Mazovetskiy
c19bfe87fa
Remove utils/stdcompat/algorithm.hpp
3 years ago
obligaron
578ce01432
Introduce Towner/Player/Object/Item/Monster::currentSprite/getRenderingOffset
3 years ago
ephphatha
4e3f46603a
Remove unused attribute _pMaxLvl
3 years ago
Eric Robinson
a2af3b5942
Refactor CreatePlayer() ( #6288 )
3 years ago
Anders Jenbo
8e7c29ecd3
Remove unused player property _pISplDur
3 years ago
Anders Jenbo
63277a842d
Clean up player packing
3 years ago
qndel
ddd0f1b051
dont always force staff recharge to change spell
3 years ago
qndel
c362808165
debug path command ( #6101 )
3 years ago
Anders Jenbo
5a12f7b0d5
Always spawn players in a valid location
3 years ago
obligaron
7985a9211d
Change Player::_pSplLvl to uint8_t
3 years ago
Anders Jenbo
e969a8ad01
Invert player to vision relation
3 years ago
Anders Jenbo
13c5c09990
Clean up Light related naming
...
A few are left unchanged as they will be removed in a later commit
3 years ago
obligaron
b87711bc08
Reintroduce Player::spellFrom to seperate teleport cursor from queued spell
3 years ago
obligaron
40bb3aeb45
Replace earflag with DeathReason
3 years ago
qndel
ce2ce86070
inspect players command
3 years ago
obligaron
8b64546b21
Move spectral elixir special logic from Player::CanUseItem to Item::isUsable
3 years ago
Eric Robinson
f75f66d54b
Add `playerdat` ( #5763 )
3 years ago
obligaron
6edae7cf6c
Ensure Spectral Elixir is only usable after black mushroom quest is finished
3 years ago
KPhoenix
d813f13700
`enum spell_id` -> `enum class SpellID`
3 years ago
Eric Robinson
ef3a57b7d9
`enum spell_type` -> `enum class SpellType` ( #5674 )
3 years ago
Anders Jenbo
c99f7cf644
Floating numbers ( #5639 )
...
Co-authored-by: qndel <stefan551@o2.pl>
Co-authored-by: Stephen C. Wills <staphen@gmail.com>
3 years ago
Anders Jenbo
a29fc3a074
Correct casing for Player::isWalking()
3 years ago
obligaron
eca1a68bec
AnimationInfo: Use fixed point math for fractions
3 years ago
obligaron
795a43dd89
Add Arena Support
3 years ago
Gleb Mazovetskiy
41f43ea3f5
Support unpacked MPQs from devilutionx-mpq-tools
...
https://github.com/diasurgical/devilutionx-mpq-tools produces an unpacked MPQ
with all the graphics converted to CLX and the unused files removed.
This is primarily useful on RAM-constrained platforms, such as PS2,
because it eliminates the MPQ overhead.
Adds a build option to load from such unpacked directories instead of the MPQ.
These directories are searched for in the same locations
where the MPQs would be searched for otherwise.
Example directory layout:
* /usr/local/share/diasurgical/devilutionx/diabdat/ -- unpacked and converted diabdat.mpq
* /usr/local/share/diasurgical/devilutionx/hellfire/ -- unpacked and converted hellfire MPQs (all of them merged into 1 directory)
* /usr/local/share/diasurgical/devilutionx/fonts/ -- unpacked fonts.mpq
* /usr/local/share/diasurgical/devilutionx/pl/ -- unpacked pl.mpq
These directory structure is produced by calling `unpack_and_minify_mpq`
3 years ago
Gleb Mazovetskiy
ec12d7ce44
Player: Optimize to save 40 bytes
3 years ago
obligaron
a2ec22667f
Use AnimationInfo::isLastFrame in more places
4 years ago
obligaron
5b6beac375
Introduce Player::getAnimationFramesAndTicksPerFrame
4 years ago
Gleb Mazovetskiy
188dc79f6e
Make `Players` a vector
4 years ago
qndel
ef5a4de227
typos + code cleanup
4 years ago
Gleb Mazovetskiy
961866e1c4
CLX: A new graphics format
...
The format is almost identical to CL2, except it uses the frame header
to store frame width and height instead of 5 32-line offsets.
This means we always have access to frame dimensions, so we can use it
as an on-disk format for our graphics as well.
Additionally, we may be able to optimize the rendering even more
in the future now that we have guaranteed knowledge of frame dimensions.
4 years ago
obligaron
6804221199
Store scroll/rune location in SpellCastInfo.spellFrom and remove the scroll/rune only after the spell is casted
4 years ago
obligaron
1cfd1ca99d
Fix double casting bug - use separated info for casted and queued spells
4 years ago
Gleb Mazovetskiy
b21ebffaf2
Clean up player graphic loading
4 years ago
Anders Jenbo
d1189388f5
Use user by reference
4 years ago
Anders Jenbo
6a8fd04067
Use player by references ( #4938 )
4 years ago
ephphatha
1fb45a7f25
Take Player reference in FixPlrWalkTags
4 years ago
staphen
cab75ded6b
Check both SPL_NULL and SPL_INVALID to determine spell validity
4 years ago
Cesar Canassa
e538acb248
📝 Fixes Doxygen warnings ( #4904 )
4 years ago
Mikołaj Piróg
dda0b96ea5
Remove #defines in player.h and add constexpr where applicable ( #4896 )
...
* Change defines to constexpr int in player.h
* Add const or constexpr to player.h/cpp where applicable
* Update tests with changed names of player constatns
* remove unecessary variable
4 years ago