Bug Certain NPC purchasable items cannot be "acquire"d without purchasable currency

Ryo_Sangnoir

Developer
Staff member
Some shops (e.g. Toxic Chemistry, Beer Garden) are not accessible if you have no items of currency to spend at them, but the currency items themselves are tradable. In this case, attempting to "acquire" items sold at those shops fails until you gain one of the currency items.

For example:
Code:
> acquire toxo

You    need 1 more toxo to continue.

> acquire    toxic globule

Searching for "toxic globule"...
Search    complete.
Purchasing toxic globule (1 @ 875) from #2080800...
Purchases    complete.

> acquire toxo

Verifying    ingredients for toxo (1)...
Purchasing toxic globule (4 @ 875 = 3,500)    from #2080800...
Purchases complete.
Purchasing toxo (1 @ 5 toxic    globules)...
Visiting the Toxic Chemistry...
You acquire an item:    toxo
Toxic Chemistry successfully looted!
Successfully created toxo    (1)

It would be nice if Mafia could obtain all the currency necessary without needing to start with at least one.
 
Shops that are concoctions - like Beer Garden - can do this:

Code:
  @Override
  public void run() {
    // Attempt to retrieve the ingredients
    if (!this.makeIngredients()) {
      return;
    }

    KoLmafia.updateDisplay("Creating " + this.getQuantityNeeded() + " " + this.getName() + "...");
    this.addFormField("quantity", String.valueOf(this.getQuantityNeeded()));
    super.run();
  }

Those that are coinmasters do this:

Code:
  public static String accessible() {
    if (TOXIC_GLOBULE.getCount(KoLConstants.inventory) == 0) {
      return "You do not have a toxic globule in inventory";
    }
    return null;
  }

CoinMasterRequest does not have the equivalent of this.makeIngredients()

Adjusting "acquire" might be a workaround, but perhaps there is something more fundamental we can do...
 
Perhaps we should be checking InventoryManager.getAccessibleCount(TOXIC_GLOBULE) == 0, since in order to purchase anything from that coinmaster, you need toxic globules, which trivially satisfies the accessibility requirement.
 
Back
Top