add enemy, fix targeting
This commit is contained in:
parent
e1fd108c06
commit
972270d667
2
game.go
2
game.go
@ -415,6 +415,8 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
|
||||
fmt.Println("NoneTarget'd ability?")
|
||||
return nil
|
||||
}
|
||||
//we know the target is valid now, so modify the effect to have a valid target
|
||||
g.QueuedEffect.Target = g.GetBoard(board)[pos].Id
|
||||
AddEffect(g.GetBoard(board)[pos], g.QueuedEffect)
|
||||
g.QueuedEffect = nil
|
||||
g.TargetReq = TargetNone
|
||||
|
@ -72,6 +72,9 @@ func OracleEnters(c *Card, g *Game) {
|
||||
case Ally:
|
||||
g.QueuedEffect = &Effect{c.Id, uuid.Nil, 2, 1}
|
||||
g.TargetReq = TargetOwn
|
||||
case Enemy:
|
||||
g.QueuedEffect = &Effect{c.Id, uuid.Nil, 4, 1}
|
||||
g.TargetReq = TargetOpp
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,6 +203,8 @@ func OracleEffect(c *Card, g *Game) {
|
||||
RemoveEffect(e.Owner, c)
|
||||
case 3:
|
||||
c.BasePower = e.Modifier
|
||||
case 4:
|
||||
c.Power = c.Power - e.Modifier
|
||||
default:
|
||||
log.Println("wrong effect type")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user