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?")
|
fmt.Println("NoneTarget'd ability?")
|
||||||
return nil
|
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)
|
AddEffect(g.GetBoard(board)[pos], g.QueuedEffect)
|
||||||
g.QueuedEffect = nil
|
g.QueuedEffect = nil
|
||||||
g.TargetReq = TargetNone
|
g.TargetReq = TargetNone
|
||||||
|
@ -72,6 +72,9 @@ func OracleEnters(c *Card, g *Game) {
|
|||||||
case Ally:
|
case Ally:
|
||||||
g.QueuedEffect = &Effect{c.Id, uuid.Nil, 2, 1}
|
g.QueuedEffect = &Effect{c.Id, uuid.Nil, 2, 1}
|
||||||
g.TargetReq = TargetOwn
|
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)
|
RemoveEffect(e.Owner, c)
|
||||||
case 3:
|
case 3:
|
||||||
c.BasePower = e.Modifier
|
c.BasePower = e.Modifier
|
||||||
|
case 4:
|
||||||
|
c.Power = c.Power - e.Modifier
|
||||||
default:
|
default:
|
||||||
log.Println("wrong effect type")
|
log.Println("wrong effect type")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user