add student and librarian
This commit is contained in:
parent
bb73c648cd
commit
13060571dc
12
game.go
12
game.go
@ -245,7 +245,7 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
|
|||||||
return g.CardBuffer
|
return g.CardBuffer
|
||||||
case "d":
|
case "d":
|
||||||
//draw: return player hand
|
//draw: return player hand
|
||||||
if !g.CanDraw || g.QueuedEffect != nil {
|
if !g.CanDraw || g.QueuedEffect != nil || g.BottomBuffer != 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if len(cmd_s) != 2 || !g.CanDraw {
|
if len(cmd_s) != 2 || !g.CanDraw {
|
||||||
@ -273,7 +273,7 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
|
|||||||
g.HasDrawn = true
|
g.HasDrawn = true
|
||||||
return DeckFromCards(curr.Hand)
|
return DeckFromCards(curr.Hand)
|
||||||
case "b":
|
case "b":
|
||||||
if g.BottomBuffer == 0 || g.ScryBuffer == 0 {
|
if g.BottomBuffer == 0 || g.ScryBuffer != 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if len(cmd_s) != 2 {
|
if len(cmd_s) != 2 {
|
||||||
@ -302,7 +302,7 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
|
|||||||
if len(cmd_s) != 3 {
|
if len(cmd_s) != 3 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if !g.HasDrawn || g.QueuedEffect != nil {
|
if !g.HasDrawn || g.QueuedEffect != nil || g.BottomBuffer != 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
x_i, err := strconv.Atoi(cmd_s[1])
|
x_i, err := strconv.Atoi(cmd_s[1])
|
||||||
@ -326,7 +326,7 @@ func (g *Game) PlayerAct(id int, cmd string) *Deck {
|
|||||||
if len(cmd_s) != 3 {
|
if len(cmd_s) != 3 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if !g.HasDrawn || g.QueuedEffect != nil {
|
if !g.HasDrawn || g.QueuedEffect != nil || g.BottomBuffer != 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
x_i, err := strconv.Atoi(cmd_s[1])
|
x_i, err := strconv.Atoi(cmd_s[1])
|
||||||
@ -379,7 +379,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 || g.BottomBuffer != 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
x_i, err := strconv.Atoi(cmd_s[1])
|
x_i, err := strconv.Atoi(cmd_s[1])
|
||||||
@ -415,7 +415,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 || g.BottomBuffer != 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
board, err := strconv.Atoi(cmd_s[1])
|
board, err := strconv.Atoi(cmd_s[1])
|
||||||
|
13
oracle.go
13
oracle.go
@ -60,6 +60,10 @@ func OracleEnters(c *Card, g *Game) {
|
|||||||
return
|
return
|
||||||
case Scholar:
|
case Scholar:
|
||||||
AddPlayerEffect(g.GetPlayer(c.Owner), &Effect{c.Id, uuid.Nil, 2, 1, true})
|
AddPlayerEffect(g.GetPlayer(c.Owner), &Effect{c.Id, uuid.Nil, 2, 1, true})
|
||||||
|
case Student:
|
||||||
|
AddPlayerEffect(g.GetPlayer(c.Owner), &Effect{c.Id, uuid.Nil, 4, 2, true})
|
||||||
|
case Librarian:
|
||||||
|
AddPlayerEffect(g.GetPlayer(c.Owner), &Effect{c.Id, uuid.Nil, 1, 1, true})
|
||||||
case ShieldWall, Tree:
|
case ShieldWall, Tree:
|
||||||
c.Counters = 0
|
c.Counters = 0
|
||||||
case HealthPotion:
|
case HealthPotion:
|
||||||
@ -273,6 +277,10 @@ func OraclePlayerEffect(p *Player, g *Game) {
|
|||||||
}
|
}
|
||||||
for _, e := range p.Effects {
|
for _, e := range p.Effects {
|
||||||
switch e.ID {
|
switch e.ID {
|
||||||
|
case 1:
|
||||||
|
g.CanDraw = true
|
||||||
|
g.HasDrawn = false
|
||||||
|
RemovePlayerEffect(e.Owner, p)
|
||||||
case 2:
|
case 2:
|
||||||
g.CardBuffer = DeckFromCards(g.GetDeck(p.Id).Scry(1))
|
g.CardBuffer = DeckFromCards(g.GetDeck(p.Id).Scry(1))
|
||||||
g.CanDraw = true
|
g.CanDraw = true
|
||||||
@ -282,6 +290,11 @@ func OraclePlayerEffect(p *Player, g *Game) {
|
|||||||
g.ScryBuffer = e.Modifier
|
g.ScryBuffer = e.Modifier
|
||||||
g.BottomBuffer = e.Modifier - 1
|
g.BottomBuffer = e.Modifier - 1
|
||||||
RemovePlayerEffect(e.Owner, p)
|
RemovePlayerEffect(e.Owner, p)
|
||||||
|
case 4:
|
||||||
|
g.ScryBuffer = e.Modifier
|
||||||
|
g.CanDraw = true
|
||||||
|
g.HasDrawn = false
|
||||||
|
RemovePlayerEffect(e.Owner, p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user