Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change DrawBetween to DrawUpto #311

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading