[3.5-dev] Store refactoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerWyrm
    Prophet
    • Apr 2008
    • 2986

    [3.5-dev] Store refactoring

    Latest attempt at fixing store bugs concerning staples had the following comment:

    "No store has a staple item which it buys, and which has magic but non-ego
    varieties..."

    However, the same commit added diggers to the General Store, which can be generated as magical...
    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Originally posted by PowerWyrm
    Latest attempt at fixing store bugs concerning staples had the following comment:

    "No store has a staple item which it buys, and which has magic but non-ego
    varieties..."

    However, the same commit added diggers to the General Store, which can be generated as magical...
    But diggers have egos, so the comment is true
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • PowerWyrm
      Prophet
      • Apr 2008
      • 2986

      #3
      With the new system implemented, staples are created when there's no item of the same kind that is not an ego in the store. If the player sells a non- ego item to the store, it will stack to the staples if it's not magical, but not if it's magical. If you buy all staples of that kind, no more will be generated in the store. This can happen if you sell a magical digger in the General Store.
      PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

      Comment

      • Timo Pietilä
        Prophet
        • Apr 2007
        • 4096

        #4
        Originally posted by PowerWyrm
        With the new system implemented, staples are created when there's no item of the same kind that is not an ego in the store. If the player sells a non- ego item to the store, it will stack to the staples if it's not magical, but not if it's magical. If you buy all staples of that kind, no more will be generated in the store. This can happen if you sell a magical digger in the General Store.
        I have hard time following what is happening here. Correct me if I got this wrong:
        1. You sell magical digger in store
        2. you buy all non-magical diggers from store

        result: no more non-magical diggers in store. Ever? is the step 1 required for that to happen?


        What is this "staple item" anyway?

        Comment

        • PowerWyrm
          Prophet
          • Apr 2008
          • 2986

          #5
          "Staples" are items that are always generated in a store. The logic behind this is to ensure that when a player buys some of these, the store will automatically restock to max. So if you buy 10 potions of cure light wounds from the temple, next time the temple restocks, you'll have 40 potions of cure light wounds in the store again.

          This system works with items "by kind" and doesn't apply to ego items. For example, the General store sells shovels as "staples", so you'll always have 40 shovels (+0, +0) (+1) in the store. If you sell an ego shovel to the General Store, the system will not count it as a staple item, since it's an ego. So when restocking, it will discard the ego shovel and only restock the average ones to a stack of 40.

          Now suppose you sell an enchanted non-ego shovel. Currently, the system will not discard it and restock the first item found of the same kind, which is the enchanted shovel. So after restock, if you bought all the average shovels, you'll get 40 enchanted shovels and no average ones.
          PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

          Comment

          • Timo Pietilä
            Prophet
            • Apr 2007
            • 4096

            #6
            Originally posted by PowerWyrm
            ... So after restock, if you bought all the average shovels, you'll get 40 enchanted shovels and no average ones.
            OK. Now I understand what the bug was.

            Comment

            Working...
            😀
            😂
            🥰
            😘
            🤢
            😎
            😞
            😡
            👍
            👎