* wip d2items system and item properties
* added loader for TreasureClassEx.txt
* wip item spawn from treasure class records
* wip items
* add call to init item equivalencies, remove treasure class test from d2app
* made item affix records global var a map of affix codes to the records
* changed how item to item common record equivalency is determined
* changed set items records export to a map of their codes to the records, grouped property params into a struct
* changed property parameter field from calcstring to string
* fixed bug in stat value clone
* adding equipper interface as part of stat context, eventually to be used to resolve set bonus (among other things)
* made the item interface simpler, only needs name and description methods
* adding equipper interface, for anything that will equip or have active items
* handle case where min and max are swapped, removed commented code
* added property/stat resolution for magic, rare, set, and unique items
* adding item generator which can roll for items using treasure class records
* fixed item equivalency func being called in the wrong spot
* added loader for ItemTypes.txt
* added loader for bodylocs.txt
* lint fix for item_types loader
* adding loader for sets.txt
* minor edit
* adding loader for SetItems.txt
* added loader for automagic.txt
* add interface for stats, d2 is an implementation
* fix incorrect comment, remove ennecessary int
* simplified description functions, remove duplicates
* moved default stringer functions
* fixed incorrect stat combine method
* change `Create` to `New` in method names
* d2stats + diablo2stats refactored again
- simplified `NewStat` provider function
- added initializer for stat values that sets the stringer functions, value types, and combination types for values when created
- removed redundant description functions
- added stat value combination types `sum` and `static`
`static` stat values which are not altered when stats are combined. this makes sense for stats like proc-on-hit or +skills to class
example:
Stat A: `10% reanimate as: skeleton mage`
Stat B: `8% reanimate as: skeleton archer`
Stat C: `6% reanimate as: skeleton archer`
A and B can not be combined
B and C can be combined to `14% reanimate as: skeleton archer`
* entity debug rendering, with command
needed to add getter method to MapEntity interface, so that's the reasoning for changing objects/npcs/player/etc
this currently brings allocs/s up to 10 (you can check by running `fps` command, se we need to look into d2debugutils and how it handles drawing text
* reverting velocity copy, broke the map entity tests. debug display wont show velocity currently.
* adding velocity debug
* Reorganize MapEngine
This is already turning into a mess...
* Map engine selects tile index to use
Still very ugly
* Fix subtile flag combination
* Prepare randomly generated base tiles
* Restore collision viewer
* Movement works again, searches for straight paths
Paths are now d2vector slices
* Fix LOS calculation
* Fix test (I think)
* smooth camera with vectors
* add smooth cam support to map engine test
smooth cam now works in map engine test.
clicking or holding the left-mouse button will move the camera.
also works with freecam mode in single-player.
* Update ebiten_renderer.go
did not mean to edit this file
* Unnecessary constructor assignments removed.
* Position implemented in d2common.Path
* Position implemented in mapEntity.Step.
* Position implemented in d2common.PathTile.
* delint_d2networking
not sure what to do about lint error G110 on calls to `io.Copy`, warns
about gzip compression bomb possibility, leaving those.
all todo's have been left.
* removed duplicate const
- made an enum for NPCActionType to get rid of magic numbers
- moved the enum to d2enum
- fixed lint errors in npc.go
- fixed lint errors in mapstamp.go (because it was using npc.go)
* adding ranged number type, for use in stats
* Loaded Skills.txt
* asset manager only binds terminal commands if terminal != nil
* WIP stats
* cache getter and clear methods were not implemented
* asset manager handles a nil terminal pointer
* adding skilldesc.txt loader (needs work)
* ctc stat descriptions functions working
* moving description functionality out of itemstatcost loader and into stats
* stats seem like a central part of diablo, moving into d2core.
* stats seem like a central part of diablo, moving into d2core.
* delint
* adding statlist, statlist reduction, unit tests
* minor edits to stat.go
* lint error in statlist.go
* Remove dependency on actual data from mpq files
stats unit tests now use mock data
* fixing some lint errors, formatting
Co-authored-by: Maxime Lavigne (malavv) <duguigne@gmail.com>
* Reflect and ReflectSurface benchmark.
* Rotate, NinetyAnti and NinetyClock benchmark.
* Equals, EqualsApprox, CompareApprox and IsZero benchmark.
* Benchmarks for everything else.
Also removing dead functions and commented out code and correcting typos.
* Initial test and benchmark for mapEntity.Step().
* Removed `&& !m.hasPath()` from mapEntity.atTarget
* Direction is now updated when the path node changes mid-step and target is updated when path is set.
* Test improvements.
* Deleted old benchmark function and tidying.
* d2math.Abs added.
* Abs benchmark and optimisation.
* Negate and Distance benchmark.
* Length and SetLength benchmark.
* Lerp and Dot benchmark.
* Cross and Normalize benchmark.
* Angle and SignedAngle benchmark.
* Trivial change to Vector.Abs()
remove unused struct vars that were only stored in order to pass to the next screens
consolidate create game code to single method
export ScreenMode consts and SetScreenMode method to allow app to create the correct screens
Co-authored-by: carrelda <carrelda@git>