lxgr-linux/pokete

The game crashes when a Pokete levels up

Closed this issue · 2 comments

Checklist
I have:

  • Searched the Issues page for my problem/feature request
  • Updated all related software and Pokete it self

Describe the bug
After a battle is won, if the player's Pokete starts to level up the game crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Start a new game
  2. Win enough battles to gain enough experience to level up
  3. Level the Pokete up

Expected behavior
The Pokete should level up and game play should continue

Screenshots

Traceback (most recent call last):
  File "/usr/bin/pokete.py", line 1543, in <module>
    main()
  File "/usr/bin/pokete.py", line 1200, in main
    game.game(figure.map)
  File "/usr/bin/pokete.py", line 1022, in _game
    figure.set(figure.x + x, figure.y + y)
  File "/usr/lib/python3.10/site-packages/scrap_engine.py", line 283, in set
    obj.action(self)
  File "/usr/share/pokete/pokete_classes/landscape.py", line 30, in action
    fm.fightmap.fight(
  File "/usr/share/pokete/pokete_classes/fightmap.py", line 386, in fight
    winner.moves.shine()
AttributeError: 'Figure' object has no attribute 'moves'. Did you mean: 'pokes'?

Environment

  • OS: Arch Linux
  • Pokete version: 0.7.2
  • Python version 3.10.5
  • Scrap engine version: 1.2.0

Additional context
The game crashes when any Pokete levels up. The function call winner.moves.shine() in fightmap.py on line 386 seems to be what is causing the issue. Commenting out that function call stops the crashing and allows the game to continue running.

Searched the Issues page for my problem/feature request

I mean, I made an issue about this yesterday with a near-identical issue. And the fix is merged. lol

Ah you are right. I noticed the issue yesterday but didn't have time to post about it until today. I should have checked to see if it was fixed between then and now. Just updated the game and its fixed for me. Going to Close this issue.