diff --git a/gemp-lotr/db/extract-league-decks.sql b/gemp-lotr/db/extract-league-decks.sql index ee93e3845..50daa8fdc 100644 --- a/gemp-lotr/db/extract-league-decks.sql +++ b/gemp-lotr/db/extract-league-decks.sql @@ -1,7 +1,11 @@ +-- +-- SELECT * +-- FROM league l +-- ORDER BY id DESC; + - -SET @player = 'sempolPL', @rank=0; +SET @player = 'Chadwick537', @rank=0; SELECT @player AS player @@ -15,16 +19,28 @@ SELECT CASE WHEN winner = @player THEN CONCAT(REPLACE(winner, '_', '%5F'), '$', win_recording_id) ELSE CONCAT(REPLACE(loser, '_', '%5F'), '$', lose_recording_id) - END, ']', @rank:=@rank+1,'[/url] • ') AS URL + END, ']', @rank:=@rank+1,'[/url] • ') AS URL FROM game_history gh INNER JOIN player p ON p.name = @player -INNER JOIN deck d +LEFT JOIN deck d ON d.player_id = p.id AND (d.name = winner_deck_name OR d.name = loser_deck_name OR d.name = 'denethor / tentacle V2') -WHERE tournament = 'Constructed - Weekend Qualifier PC-Expanded - Serie 1' - AND start_date > '2023-07-20' +WHERE tournament = 'PC Weekend Qualifier League - PC-FOTR - Serie 1' + AND start_date > '2024-04-20' AND (winner = @player OR loser = @player) ORDER BY gh.id; +-- SELECT * +-- FROM game_history gh +-- WHERE winner = @player OR loser = @player +-- ORDER BY id DESC +-- +-- +-- SELECT * +-- FROM deck d +-- INNER JOIN player p +-- ON d.player_id = p.id +-- WHERE p.name = @player + diff --git a/gemp-lotr/db/extract-tourney-replays.sql b/gemp-lotr/db/extract-tourney-replays.sql index 732b15437..699759a1b 100644 --- a/gemp-lotr/db/extract-tourney-replays.sql +++ b/gemp-lotr/db/extract-tourney-replays.sql @@ -55,12 +55,12 @@ ORDER BY gh.id; --- --- SELECT * --- ,CONCAT('https://play.lotrtcgpc.net/gemp-lotr/game.html?replayId=',REPLACE(winner, '_', '%5F'), '$', win_recording_id) AS winner_replay --- ,CONCAT('https://play.lotrtcgpc.net/gemp-lotr/game.html?replayId=',REPLACE(loser, '_', '%5F'), '$', lose_recording_id) AS loser_replay --- FROM game_history gh --- WHERE tournament = '2023 PC-Expanded Championship' + +SELECT winner, loser, win_reason, lose_reason, start_date, end_date + ,CONCAT('https://play.lotrtcgpc.net/gemp-lotr/game.html?replayId=',REPLACE(winner, '_', '%5F'), '$', win_recording_id) AS winner_replay + ,CONCAT('https://play.lotrtcgpc.net/gemp-lotr/game.html?replayId=',REPLACE(loser, '_', '%5F'), '$', lose_recording_id) AS loser_replay +FROM game_history gh +WHERE tournament = '2023 WC Group Stage' diff --git a/gemp-lotr/db/update-playtest-decks.sql b/gemp-lotr/db/update-playtest-decks.sql index f0bad271c..eaec5b30a 100644 --- a/gemp-lotr/db/update-playtest-decks.sql +++ b/gemp-lotr/db/update-playtest-decks.sql @@ -9,8 +9,50 @@ WHERE contents RLIKE '(7|8)\\d_' SELECT REGEXP_REPLACE(REGEXP_REPLACE('7_94,7_94,87_13,81_30,72_32,51_80,1_83,71_240,71_240,71_240,71_240,72_32', '7(\\d)_', '5\\1_'), '8(\\d)_', '6\\1_') +SELECT REGEXP_REPLACE('51_404,7_94,87_13,81_30,72_32,51_80,1_83,71_240,71_240,71_240,71_240,72_32,51_402,51_403', '51_40\\d', '51_70') + +SELECT REGEXP_REPLACE('51_404,7_94,87_13,81_30,72_32,51_80,1_83,71_240,71_240,71_240,71_240,72_32,51_402,51_403,51_401', '53_401', '53_13') + + + +UPDATE deck +SET contents = REGEXP_REPLACE(REGEXP_REPLACE(contents, '7(\\d)_', '5\\1_'), '8(\\d)_', '6\\1_') +WHERE contents RLIKE '(7|8)_' + +UPDATE deck +SET contents = REGEXP_REPLACE(contents, '51_40\\d', '51_70') +WHERE contents RLIKE '51_40\\d' + +UPDATE deck +SET contents = REGEXP_REPLACE(contents, '53_401', '53_13') +WHERE contents RLIKE '53_401' + +UPDATE deck +SET contents = CONCAT(contents,'|100_4') +WHERE target_format = 'Movie Block (PC)' + +UPDATE deck +SET contents = CONCAT(contents,'|100_4') +WHERE target_format = 'PLAYTEST - Movie Block (PC)' + AND contents RLIKE '(7_335|7_336|7_337)' + +UPDATE deck +SET contents = CONCAT(contents,'|100_2') +WHERE target_format = 'PLAYTEST - Movie Block (PC)' + AND contents RLIKE '(1_349)' + +UPDATE deck +SET contents = CONCAT(contents,'|100_3') +WHERE target_format = 'PLAYTEST - Movie Block (PC)' + AND contents RLIKE '(4_360|4_361|4_362|4_363|5_120|6_120)' + +SELECT * +FROM deck d +WHERE target_format = 'PLAYTEST - Movie Block (PC)' + + + + + --- UPDATE deck --- SET contents = REGEXP_REPLACE(REGEXP_REPLACE(contents, '7(\\d)_', '5\\1_'), '8(\\d)_', '6\\1_') --- WHERE contents RLIKE '(7|8)_' diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/includes/admin/leagueAdmin.html b/gemp-lotr/gemp-lotr-async/src/main/web/includes/admin/leagueAdmin.html index 40c50c725..8a8bb82d7 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/includes/admin/leagueAdmin.html +++ b/gemp-lotr/gemp-lotr-async/src/main/web/includes/admin/leagueAdmin.html @@ -298,8 +298,8 @@ $(document).ready( if (Object.prototype.hasOwnProperty.call(sealed, prop)) { //console.log(prop); - let code = sealed[prop].Format; - let id = sealed[prop].ID; + let code = sealed[prop].format; + let id = sealed[prop].id; let serieCount = sealed[prop].seriesProduct.length; var item = $("