diff --git a/internal/game/board.go b/internal/game/board.go index bd1ff5d..66320fd 100644 --- a/internal/game/board.go +++ b/internal/game/board.go @@ -38,6 +38,19 @@ func (b *Board) GetCard(id int, pos int) *Card { } } +func (b *Board) Remove(c *Card) { + for k, v := range b.Sentinal { + if v.Id == c.Id { + b.Sentinal[k] = NewCard(-1, uuid.Nil) + } + } + for k, v := range b.Scourge { + if v.Id == c.Id { + b.Scourge[k] = NewCard(-1, uuid.Nil) + } + } +} + func (b *Board) Empty(id int) bool { res := true if id == SentinalID { diff --git a/internal/game/oracle.go b/internal/game/oracle.go index a7037d7..0918b8f 100644 --- a/internal/game/oracle.go +++ b/internal/game/oracle.go @@ -2,6 +2,11 @@ package game func OracleUpkeep(c *Card, g *Game) { switch c.Type { + case Eight: + c.Sick = true + if c.Counters > 3 { + g.GameBoard.Remove(c) + } default: c.Sick = false } @@ -9,11 +14,32 @@ func OracleUpkeep(c *Card, g *Game) { } func OracleCast(c *Card, g *Game) bool { - return true + switch c.Type { + case Valk: + g.GameBoard = NewBoard() + return false + default: + return true + } } func OracleEnters(c *Card, g *Game) { c.Sick = true + switch c.Type { + case Two: + //+1 to all + if g.CurrentTurn == SentinalID { + for _, v := range g.GameBoard.Sentinal { + v.Power = v.Power + 1 + } + } else { + for _, v := range g.GameBoard.Scourge { + v.Power = v.Power + 1 + } + } + case Three: + //+1 around it + } return } @@ -22,6 +48,10 @@ func OracleLeaves(c *Card, g *Game) { } func OracleEndstep(c *Card, g *Game) { + switch c.Type { + case Eight: + c.Counters = c.Counters + 1 + } return }