don't panic on drawing from empty scry

This commit is contained in:
stryan 2021-07-25 22:03:31 -04:00
parent 73f4f8afee
commit 00bd3539b0

View File

@ -247,6 +247,9 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
if len(cmd_s) != 2 || !g.CanDraw {
return nil
}
if curr.Life == 0 {
return DeckFromCards(curr.Hand)
}
x_i, err := strconv.Atoi(cmd_s[1])
if x_i > 2 || x_i < 0 {
return nil