Add Tricolour Battle

This commit is contained in:
Samuel Elliott 2022-09-25 01:16:52 +01:00
parent 62854fc428
commit b869046f1f
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
2 changed files with 5 additions and 4 deletions

View File

@ -106,6 +106,7 @@ function getVsModeDescription(vs_mode: {id: string; mode: string;} | null) {
if (vs_mode.mode === 'BANKARA') return 'Anarchy Battle';
if (vs_mode.id === 'VnNNb2RlLTY=') return 'Splatfest Battle (Open)'; // VsMode-6
if (vs_mode.id === 'VnNNb2RlLTc=') return 'Splatfest Battle (Pro)'; // VsMode-7
if (vs_mode.id === 'VnNNb2RlLTg=') return 'Tricolour Battle'; // VsMode-8
if (vs_mode.mode === 'FEST') return 'Splatfest Battle';
if (vs_mode.mode === 'LEAGUE') return 'League Battle';
if (vs_mode.mode === 'X_MATCH') return 'X Battle';

View File

@ -258,6 +258,7 @@ export function callback(activity: DiscordRPC.Presence, game: Game, context?: Di
friend.vsMode.mode === 'BANKARA' ? 'Anarchy Battle' :
friend.vsMode.id === 'VnNNb2RlLTY=' ? 'Splatfest Battle (Open)' : // VsMode-6
friend.vsMode.id === 'VnNNb2RlLTc=' ? 'Splatfest Battle (Pro)' : // VsMode-7
friend.vsMode.id === 'VnNNb2RlLTg=' ? 'Tricolour Battle' : // VsMode-8
friend.vsMode.mode === 'FEST' ? 'Splatfest Battle' :
friend.vsMode.mode === 'LEAGUE' ? 'League Battle' :
friend.vsMode.mode === 'X_MATCH' ? 'X Battle' :
@ -290,10 +291,9 @@ export function callback(activity: DiscordRPC.Presence, game: Game, context?: Di
// In the second half the player may be in a Tricolour battle if either:
// the player is on the defending team and joins Splatfest Battle (Open) or
// the player is on the attacking team and joins Tricolour Battle
const possibly_tricolour = fest && new Date(fest.midtermTime).getTime() <= Date.now() && (
false
// (friend.vsMode?.id === 'VnNNb2RlLTY=' && fest_team?.role === FestTeamRole.DEFENSE) ||
// (friend.vsMode?.id === '... tricolour mode ID ...')
const possibly_tricolour = fest?.state === FestState.SECOND_HALF && (
(friend.vsMode?.id === 'VnNNb2RlLTY=' && fest_team?.role === FestTeamRole.DEFENSE) ||
(friend.vsMode?.id === 'VnNNb2RlLTg=')
);
activity.largeImageKey = 'https://fancy.org.uk/api/nxapi/s3/image?' + new URLSearchParams({