// Clone public static BattleEnvironment Clone(BattleEnvironment original) { BattleEnvironment clone = new BattleEnvironment( environmentType: original.environmentType, naturePowerMove: original.naturePowerMove ); return(clone); }
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)); }