Skip to content

Commit

Permalink
Merge pull request #311 from jyotiskaghosh/Multi-Draw-Fix
Browse files Browse the repository at this point in the history
change DrawBetween to DrawUpto
  • Loading branch information
sindreslungaard authored Jan 12, 2025
2 parents a2fd3e2 + a92f7ad commit 6b733c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion game/cards/dm03/gel_fish.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func ChaosFish(c *match.Card) {

ctx.ScheduleAfter(func() {
nrCardsToDraw := (getWaterCardsInYourBattleZone(card) - 1) //-1 to exclude self
fx.DrawBetween(card, ctx, 0, nrCardsToDraw)
fx.DrawUpto(card, ctx, nrCardsToDraw)
})
}))

Expand Down
2 changes: 1 addition & 1 deletion game/cards/dm06/survivor.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func QTronicHypermind(c *match.Card) {
return
}

fx.DrawBetween(card, ctx, 0, toDraw)
fx.DrawUpto(card, ctx, toDraw)

}))
}
Expand Down
10 changes: 5 additions & 5 deletions game/fx/draw.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ func MayDraw1(card *match.Card, ctx *match.Context) {
}

func DrawUpTo2(card *match.Card, ctx *match.Context) {
DrawBetween(card, ctx, 0, 2)
DrawUpto(card, ctx, 2)
}

func DrawUpTo3(card *match.Card, ctx *match.Context) {
DrawBetween(card, ctx, 0, 3)
DrawUpto(card, ctx, 3)
}

// This gives the player the choice to select a number of cards to draw between 2 provided limits
func DrawBetween(card *match.Card, ctx *match.Context, min int, max int) {
for i := min; i < max; i++ {
// This gives the player the choice to select a number of cards to draw upto the provided limit
func DrawUpto(card *match.Card, ctx *match.Context, max int) {
for i := 0; i < max; i++ {
if BinaryQuestion(card.Player, ctx.Match, fmt.Sprintf("Do you want to draw? (%s effect)", card.Name)) {
card.Player.DrawCards(1)
ctx.Match.BroadcastState()
Expand Down

0 comments on commit 6b733c5

Please sign in to comment.