예제 #1
0
    // Clone
    public static BattleEnvironment Clone(BattleEnvironment original)
    {
        BattleEnvironment clone = new BattleEnvironment(
            environmentType: original.environmentType,
            naturePowerMove: original.naturePowerMove
            );

        return(clone);
    }
예제 #2
0
        protected override Task <(bool Success, string Message)> CheckCustomPreconditionsAsync()
        {
            var guildResult = IsGameCommandAllowedInGuild();

            if (!guildResult.Success)
            {
                return(Task.FromResult(guildResult));
            }

            Scope         = ServiceProvider.CreateScope();
            BattleService = Scope.ServiceProvider.GetRequiredService <ColossoBattleService>();

            Battle = BattleService.GetBattleEnvironment(Context.Channel);
            if (Battle == null)
            {
                return(Task.FromResult((false, "Battle not found")));
            }

            return(Task.FromResult(guildResult));
        }