42 Commits

Author SHA1 Message Date
guiyomu-dev
83eb8adf29 more changes 2026-02-16 22:22:47 +01:00
crazywh1t3
802393def0 Move typeAliases var in its own file.
+ new item types.
2026-02-16 22:22:47 +01:00
guiyomu-dev
50eb39853c remove unecessary code due to bad game update 2026-02-15 00:04:18 +01:00
guiyomu-dev
48aa3aee66 adjustement 2026-02-14 21:10:31 +01:00
guiyomu-dev
828db2029f adjustment 2026-02-13 12:34:48 +01:00
guiyomu-dev
8815c4d519 add tests 2026-02-04 21:23:26 +01:00
guiyomu-dev
f73256478a fix chance to cast attribute parsing 2026-02-04 21:23:26 +01:00
guiyomu-dev
6f3df0e7ba fix tests and add new ones 2026-01-29 08:33:24 +01:00
guiyomu-dev
d0987cb9e9 add aliases validation 2026-01-29 08:33:24 +01:00
Genqila
b510968f7d style: fix codegen formatting and run gofmt after generation 2026-01-15 22:17:32 +01:00
0481a1408c add runeword flag 2025-12-21 09:51:13 +01:00
Polivox
4f2a29e3f1 Update to handle sunder charms with resist handling logic. 2025-11-30 00:27:04 +02:00
Polivox
c4edf8452e Bugfix for evaluating resists as part of complex rules. 2025-11-27 14:26:41 +02:00
guiyomu-dev
199ed03b8c fix magic numbers 2025-11-14 21:39:06 +01:00
a5e3194e3c Implement handling for itemaddskilltab and itemaddclassskills
Added special handling for skill tabs and class skills in rule evaluation.
2025-11-14 21:39:06 +01:00
adpist
f3263ba4f8 add function to skip tier rules when evaluating 2025-10-16 23:33:18 +02:00
adpist
cfcc94c874 add support for fixed values tier and merc tier in nip files 2025-10-16 21:40:21 +02:00
elb
b8765f634f Repair Broken rules ( white base items mostly) (#88)
* Repair Broken rules  ( white base items mostly)

* Removed double find stat check
2025-03-13 18:48:18 +02:00
elb
5455fd9772 Fix broken negative stats, update some stat description (#79)
* Fix broken negative stats, update some stat description

* ###

* #2

* curses is necro, frw on armor is velocity percent ( unused)

* Update rules to accept negative value

fix a bug with unique grand charm tz

[name] == grandcharm && [quality] == unique # ([fireresist] + [coldresist] + [lightresist]) >= -75

Single stat rules like [coldresist] >= -75 require the stat to exist

expressions like ([fireresist] + [coldresist] + [lightresist]) >= -75 treat missing stats as 0

Unidentified items with any stat requirements need identification first

* LevelReq + identifiedName added for all Crafted items

* Fix issue with rule.go

* Update stat throw damage and basename: GrandCharm -- Grand Charm

* Adjusting rule for ItemLevelReq  = 0

* update rule again
2025-02-21 18:11:27 +02:00
elb
1aa957dd96 Linking Item.LevelReq to stat(92) stat.LevelRequire + nip parser, Upped item levelreq (#78)
* Linking Item.LevelReq to stat(92) stat.LevelRequire . Update nip parser

* LevelReq for upgraded items

LevelReq is now accurate for upgraded and double upgraded set/unique items

Fixed an issue with levelreq not working with socketed jewels on items.
2025-02-17 19:28:27 +02:00
elb
120c2ba144 Prefix,Suffix,LevelReq Socketed items on bases, bodyloc, Merc equipment (#74)
* Prefix,Suffix, Socketed with base, bodyloc, Merc equipment

Will add better description later:

Item that has socketed items now display their linked runes/jewels/gems in accurate order

Rare prefix, rare suffix id
Magic prefix1,2,3  magic suffix1,2,3
Prefix1 also used to tell wich runeword it is
Spirit 20635, cta 20519 , infinity 20566 see : getlocalestring.txt

Mercenary equipment now displaying in inventory list . Also has custom location : mercenary instead of equipped

Bodyloc :
	// Body locations
	LocNone              LocationType = "none"
	LocHead              LocationType = "head"
	LocNeck              LocationType = "neck"
	LocTorso             LocationType = "torso"
	LocLeftArm           LocationType = "left_arm"
	LocRightArm          LocationType = "right_arm"
	LocLeftRing          LocationType = "left_ring"
	LocRightRing         LocationType = "right_ring"
	LocBelt              LocationType = "belt"
	LocFeet              LocationType = "feet"
	LocGloves            LocationType = "gloves"
	LocLeftArmSecondary  LocationType = "left_arm_secondary"
	LocRightArmSecondary LocationType = "right_arm_secondary"

	Note that if you begin game on secondary slot it will be left_arm  then primary will be  left_arm_secondary (inversed):  With pr 62 (activeweaponslot) we will be able to solve this potential issue.

* small optimization

* Socketed items to base from pointer

new helper functions.
AutoAffix offset.

* remove helpers fnc, flag isEquipped to HasBeenEquipped

* Runewords names mapped

* helper function not needed

* Optimization

* adjust pre-allocations

* readd removed itemloc comment

* Addex prefix/suffix to rules .nip

new structure:
[Type], [Quality],[Class], [Name], [Flag], [Color], [Prefix], [Suffix]  #  Stats

Exemple : [name] == ring && [quality] == rare && [suffix] == 174 #

Any magic ring with suffix 'of The Apprentice'  ( 10 faster cast rate)

Will be useful for trophy items with fool/cruel  [prefix] == 1416 [prefix] == 1273

* LevelReq + Affixes mapping rare/magic/base/runewords. Nip parser LevelReq

* Unique and set items mapping + LevelReq
2025-02-16 23:02:03 +02:00
SoundsLegit
938bfeb753 Minimum value per level and enhanced damage item stats fix (#26)
* Added a temporary fix to have a minimum value of 1 for per level mods

* Expose Stat Aliases and Type Aliases (#25)

* Fixed setting a minimum value of 1 for per level item stats

* Added minimum value of attack rating per level to be 15

* Added min value for replenish durability/quantity

* Added fix for reading item modifiers - enhanced damage now works

* Delete .idea/.gitignore

* Delete .idea/d2go.iml

* Delete .idea/modules.xml

* Delete .idea/vcs.xml

* Added gitignore file

* Refactored code

---------

Co-authored-by: dmeli <d.melia@outlook.fr>
Co-authored-by: Arto Simonyan <artosimonyan@protonmail.com>
2024-08-05 17:48:06 +03:00
Arto Simonyan
9d801c51df Expose Stat Aliases and Type Aliases (#25) 2024-07-05 15:53:26 +03:00
Héctor Giménez
c398062b57 bugfixing, performance improvements and added casting frames formula 2024-05-09 20:27:31 +09:00
Héctor Giménez
aa2a1aaeb3 fetch static data from txt files and properly get all the item stats... maybe? 2024-05-08 21:31:40 +09:00
Héctor Giménez
c03c40d385 oops 2024-05-06 10:33:28 +09:00
Héctor Giménez
ffac5edff5 refactor rule evaluator to make use of expr envs 2024-05-06 10:15:37 +09:00
Héctor Giménez
8315e55594 stop further evaluation if first rule stage is not matching 2024-05-06 08:10:57 +09:00
Héctor Giménez
54bc4a7e68 added extra test case and revert multiple dummy items 2024-05-05 14:06:14 +09:00
Héctor Giménez
7af19bd16a add more items for the dummy load evaluation 2024-05-05 14:00:30 +09:00
Héctor Giménez
aff05aa9ed fix test and failed map access 2024-05-05 13:49:47 +09:00
Héctor Giménez
638f3047f8 allow partial rules for specific item types 2024-05-05 13:43:19 +09:00
Héctor Giménez
753f303978 we should not ceil the value 2024-05-05 12:21:41 +09:00
Héctor Giménez
bb0ec2555d NIP parser v2 (#17) 2024-05-05 12:15:08 +09:00
Arto Simonyan
345e37bbf9 Extend rule structure and nip rule parser (#16) 2024-05-01 07:34:57 +09:00
Héctor Giménez
15880f3942 Added file and line on NIP parsing error 2023-03-14 23:06:15 +09:00
Héctor Giménez
bc4402a6a1 chain evaluation returns true in case of nothing to eval, also fixed stat layer comparison 2023-03-13 21:49:46 +09:00
Héctor Giménez
a1a86b9e05 Add stats on itemfilter 2023-03-13 21:28:49 +09:00
Héctor Giménez
09886b92ac add small and useless test 2023-03-12 19:42:13 +09:00
Héctor Giménez
66dd506ba7 basic item filter wip 2023-03-12 19:32:50 +09:00
Héctor Giménez
73978a702c Regex cleanup 2023-03-11 19:43:42 +09:00
Héctor Giménez
d71894a044 Super basic NIP file parser 2023-03-11 19:41:51 +09:00