Skip to content

BuyPotionAction crashes the agent due to incorrect game state usage #4

@Max-Suslov

Description

@Max-Suslov

Bug Report: BuyPotionAction Crashes the Agent

When BuyPotionAction runs, it crashes the agent. The problem occurs in action.py at line 149:

if coordinator.game.are_potions_full():

This line uses the current game state, but it should reference the last game state to avoid inconsistencies, like so:

if coordinator.last_game_state.are_potions_full():

Changing this one variable fixes the crash.

Steps to reproduce:

  1. Use BuyPotionAction.
  2. Observe the crash at the potion check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions