WillFlame14 / hanabi-bot

A bot that plays on the hanab.live interface.
GNU General Public License v3.0
14 stars 9 forks source link

Crash when needing to save while finessed #223

Closed flackr closed 1 month ago

flackr commented 1 month ago

Version (PM the bot with /version): v1.4.2 Convention settings: /setall 11 Steps to reproduce or replay link: https://hanab.live/replay/1168361#41

Additional information: On turn 40, I clued red to Ptarr starting a finesse on the bot, however on its turn (turn 42) it had to save Osric instead of playing into the finesse.

This seems to have caused it to crash in card_elim on line 54:

reverse_entry.splice(reverse_entry.findIndex(e => e.order === order), 1);

The crash can be reproduced by running:

npm run replay -- id=1168361 index=0
navigate 41
WillFlame14 commented 1 month ago

Oops. I don't think the finesse was related, I just didn't maintain the two-way maps correctly. It should be fixed now.