hearthbreaker
hearthbreaker copied to clipboard
'NoneType' object has no attribute 'is_valid'
Tried to add the replay function into my AI fork. This is an error I got, but I don't know if I messed something up or if it's a real error in HearthBreaker since I have never seen this error message before.
https://gist.github.com/Ragowit/5f53106a2cfe2ed2a58f
The bug in the replay file is that the game plays Shattered Sun Cleric, but no target is set in the replay so it targets None, which generates the error.
The replay records the play from the event "card_played", but no target has been made by this point. A current_target for the minion card is set in the card.use() function after the trigger of the event.