Skip to content

Commit

Permalink
Merge pull request #5 from approvers/feature/rinia/gacha/002
Browse files Browse the repository at this point in the history
Gacha: 10連爆死したら煽ってくる機能を追加
  • Loading branch information
2RiniaR authored Jan 16, 2024
2 parents 0abbb6b + ae04bb1 commit 7cdcd06
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Events/GachaCommandPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class GachaCommandPresenter : DiscordMessagePresenterBase

protected override async Task MainAsync()
{
var results = Enumerable.Range(0, PickCount).Select(_ => Pick());
var results = Enumerable.Range(0, PickCount).Select(_ => Pick()).ToList();

var builder = new StringBuilder();
builder.AppendLine($"↓↓↓ いっそう{PickCount}連おみくじ ↓↓↓");
Expand All @@ -19,6 +19,12 @@ protected override async Task MainAsync()
builder.AppendLine(result != null ? Discord.Format.Bold($"・{result}") : Discord.Format.Code("x"));
}

if (results.All(x => x == null))
{
builder.AppendLine();
builder.AppendLine("ザコ!");
}

await Message.ReplyAsync(builder.ToString());
}

Expand Down

0 comments on commit 7cdcd06

Please sign in to comment.