Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obligatory Affixes #177

Closed
Massemassimo opened this issue Feb 12, 2024 · 4 comments
Closed

Obligatory Affixes #177

Massemassimo opened this issue Feb 12, 2024 · 4 comments

Comments

@Massemassimo
Copy link

Massemassimo commented Feb 12, 2024

I see no way to add obligatory affixes.
Say for example we look for boots which have to have intelligence, but also movement speed + 1 resistance or 2 resistances.

It could be done using a dedicated tag, something like:

Affixes:

  • BootsTest:
    itemType: boots
    minPower: 700
    obligatory:
    - [intelligence]
    affixPool:
    - [movement_speed]
    - any_of:
    - [poison_resistance]
    - [cold_resistance]
    - [lightning_resistance]
    minAffixCount: 2

or - using the existing structure - multiple affixPools.
If the tool would parse multiple affix pools and discard an item as soon as the item does not fit a pool, we could do something like:

Affixes:

  • BootsTest:
    itemType: boots
    minPower: 700
    affixPool:
    - [intelligence]
    minAffixCount: 1
    affixPool:
    - [movement_speed]
    - any_of:
    - [poison_resistance]
    - [cold_resistance]
    - [lightning_resistance]
    minAffixCount: 2

I tried the latter but sadly it does not work, Items fitting the second affix pool are accepted ("greenlit") even if they don't sport intelligence, I guess the program either ignores the first affixpool or greenlights an item as soon as one affixpool fits the item.

@aeon0
Copy link
Contributor

aeon0 commented Feb 15, 2024

I dont really get it because if you want int as mandatory and also movement speed and any resistance you actually saying that movement speed is also mandatory. Thus you need to set the minAffixCount: 3. Or if you say it must have inteligence and either movment speed or any of the resistances, then put movement speed in the any_of block.

BootsTest:
  itemType: boots
  minPower: 700  
  affixPool:
    - [intelligence]
    - [movement_speed]
    - any_of:
      - [poison_resistance]
      - [cold_resistance]
      - [lightning_resistance]
  minAffixCount: 3
  
BootsTest2:
  itemType: boots
  minPower: 700  
  affixPool:
    - [intelligence]
    - any_of:
      - [movement_speed]
      - [poison_resistance]
      - [cold_resistance]
      - [lightning_resistance]
  minAffixCount: 2

@Massemassimo
Copy link
Author

Massemassimo commented Feb 16, 2024

I believe you're correct, sorry. I didn't think of any_of as a catch-all but it is. I wanted the latter of your examples but minAffixCount = 3, but that's achieved if you do any_of twice:

BootsTest3:
  itemType: boots
  minPower: 700  
  affixPool:
    - [intelligence]
    - any_of:
        - [movement_speed]
        - [poison_resistance]
        - [cold_resistance]
        - [lightning_resistance]
    - any_of:
        - [movement_speed]
        - [poison_resistance]
        - [cold_resistance]
        - [lightning_resistance]
  minAffixCount: 3

@chrisoro
Copy link
Contributor

I'll prepare something for next league start that simplifies filtering. Will have the same option as PoE trade website (count, and, not)

@chrisoro
Copy link
Contributor

Done -> #199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants