valid new empty targeting
This commit is contained in:
parent
960d4cc806
commit
bb73c648cd
18
game.go
18
game.go
@ -449,11 +449,29 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
|
||||
fmt.Println("own target not on own board")
|
||||
return nil
|
||||
}
|
||||
case TargetOwnEmpty:
|
||||
if board != g.CurrentTurn {
|
||||
fmt.Println("own target not on board")
|
||||
return nil
|
||||
}
|
||||
if g.GetBoard(board)[pos].Type != EmptyValue {
|
||||
fmt.Println("own empty target not empty")
|
||||
return nil
|
||||
}
|
||||
case TargetOpp:
|
||||
if board == g.CurrentTurn {
|
||||
fmt.Println("opponent target not on oponents board")
|
||||
return nil
|
||||
}
|
||||
case TargetOppEmpty:
|
||||
if board == g.CurrentTurn {
|
||||
fmt.Println("opponent target not on board")
|
||||
return nil
|
||||
}
|
||||
if g.GetOpponentBoard(board)[pos].Type != EmptyValue {
|
||||
fmt.Println("opponent empty target not empty")
|
||||
return nil
|
||||
}
|
||||
case TargetNone:
|
||||
fmt.Println("NoneTarget'd ability?")
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user