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")
|
fmt.Println("own target not on own board")
|
||||||
return nil
|
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:
|
case TargetOpp:
|
||||||
if board == g.CurrentTurn {
|
if board == g.CurrentTurn {
|
||||||
fmt.Println("opponent target not on oponents board")
|
fmt.Println("opponent target not on oponents board")
|
||||||
return nil
|
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:
|
case TargetNone:
|
||||||
fmt.Println("NoneTarget'd ability?")
|
fmt.Println("NoneTarget'd ability?")
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user