add ally effect
This commit is contained in:
parent
1d45984958
commit
e1fd108c06
8
game.go
8
game.go
@ -342,7 +342,7 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
|
|||||||
fmt.Println("not enough arguments")
|
fmt.Println("not enough arguments")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if !g.HasDrawn || !g.QueuedEffect != nil {
|
if !g.HasDrawn || g.QueuedEffect != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
x_i, err := strconv.Atoi(cmd_s[1])
|
x_i, err := strconv.Atoi(cmd_s[1])
|
||||||
@ -395,7 +395,7 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
|
|||||||
fmt.Println("board position out of bounds")
|
fmt.Println("board position out of bounds")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
switch g.TargetStatus {
|
switch g.TargetReq {
|
||||||
case TargetSelf:
|
case TargetSelf:
|
||||||
if board != g.CurrentTurn && g.GetBoard(board)[pos].Id != g.QueuedEffect.Owner {
|
if board != g.CurrentTurn && g.GetBoard(board)[pos].Id != g.QueuedEffect.Owner {
|
||||||
fmt.Println("self target not on self")
|
fmt.Println("self target not on self")
|
||||||
@ -417,8 +417,8 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
|
|||||||
}
|
}
|
||||||
AddEffect(g.GetBoard(board)[pos], g.QueuedEffect)
|
AddEffect(g.GetBoard(board)[pos], g.QueuedEffect)
|
||||||
g.QueuedEffect = nil
|
g.QueuedEffect = nil
|
||||||
g.TargetStatus = TargetNone
|
g.TargetReq = TargetNone
|
||||||
return g.GetBoard(board)
|
return DeckFromCards(g.GetBoard(board))
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fmt.Println("Invalid act command")
|
fmt.Println("Invalid act command")
|
||||||
|
@ -69,7 +69,9 @@ func OracleEnters(c *Card, g *Game) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case Ally:
|
||||||
|
g.QueuedEffect = &Effect{c.Id, uuid.Nil, 2, 1}
|
||||||
|
g.TargetReq = TargetOwn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +144,7 @@ func OraclePower(c CardType, g *Game) int {
|
|||||||
switch c {
|
switch c {
|
||||||
case Speedster, HealthPotion, Tree, Goblin:
|
case Speedster, HealthPotion, Tree, Goblin:
|
||||||
return 1
|
return 1
|
||||||
case Commander:
|
case Commander, Ally:
|
||||||
return 2
|
return 2
|
||||||
case Paladin:
|
case Paladin:
|
||||||
return 3
|
return 3
|
||||||
|
Loading…
Reference in New Issue
Block a user