From e1f89c412a594c531fb37aebabf397d914777a83 Mon Sep 17 00:00:00 2001 From: Nicolas Sanchez Date: Tue, 12 Nov 2024 15:29:36 -0300 Subject: [PATCH] Add uren to playable characters list --- apps/arena_load_test/lib/arena_load_test/socket_handler.ex | 2 +- .../lib/game_backend/matches/arena_match_result.ex | 4 ++-- .../lib/game_client_web/controllers/page_html/home.html.heex | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/arena_load_test/lib/arena_load_test/socket_handler.ex b/apps/arena_load_test/lib/arena_load_test/socket_handler.ex index 2908df784..40e80e93a 100644 --- a/apps/arena_load_test/lib/arena_load_test/socket_handler.ex +++ b/apps/arena_load_test/lib/arena_load_test/socket_handler.ex @@ -71,7 +71,7 @@ defmodule ArenaLoadTest.SocketHandler do # This is enough for now. Will request bots from the bots app in future iterations. # https://github.com/lambdaclass/mirra_backend/issues/410 defp get_random_active_character() do - ["muflus", "h4ck", "uma", "valtimer", "kenzu", "otix", "shinko"] + ["muflus", "h4ck", "uma", "valtimer", "kenzu", "otix", "shinko", "uren"] |> Enum.random() end diff --git a/apps/game_backend/lib/game_backend/matches/arena_match_result.ex b/apps/game_backend/lib/game_backend/matches/arena_match_result.ex index 605680bab..865cfbc9e 100644 --- a/apps/game_backend/lib/game_backend/matches/arena_match_result.ex +++ b/apps/game_backend/lib/game_backend/matches/arena_match_result.ex @@ -54,8 +54,8 @@ defmodule GameBackend.Matches.ArenaMatchResult do |> validate_inclusion(:result, ["win", "loss", "abandon"]) ## TODO: This enums should actually be read from config ## https://github.com/lambdaclass/mirra_backend/issues/601 - |> validate_inclusion(:character, ["h4ck", "muflus", "uma", "valtimer", "kenzu", "otix", "shinko"]) - |> validate_inclusion(:killed_by, ["h4ck", "muflus", "uma", "valtimer", "kenzu", "otix", "shinko", "zone"]) + |> validate_inclusion(:character, ["h4ck", "muflus", "uma", "valtimer", "kenzu", "otix", "shinko", "uren"]) + |> validate_inclusion(:killed_by, ["h4ck", "muflus", "uma", "valtimer", "kenzu", "otix", "shinko", "uren", "zone"]) |> foreign_key_constraint(:user_id) end end diff --git a/apps/game_client/lib/game_client_web/controllers/page_html/home.html.heex b/apps/game_client/lib/game_client_web/controllers/page_html/home.html.heex index 476a5dc66..2fc9caf59 100644 --- a/apps/game_client/lib/game_client_web/controllers/page_html/home.html.heex +++ b/apps/game_client/lib/game_client_web/controllers/page_html/home.html.heex @@ -1,6 +1,6 @@ <%= if assigns[:current_user_id] do %> <.form :let={f} for={%{}} action={~p"/"}> - <.input field={f[:character]} name="character" label="Select a Character" type="select" options={["muflus", "h4ck", "uma", "valtimer", "kenzu", "otix", "shinko"]} value=""/> + <.input field={f[:character]} name="character" label="Select a Character" type="select" options={["muflus", "h4ck", "uma", "valtimer", "kenzu", "otix", "shinko", "uren"]} value=""/> <.input field={f[:user_id]} name="user_id" type="hidden" value={assigns[:user_id]}/> <.button type="submit" name="game_mode" value="battle-royale">Play Battle Royal <.button type="submit" name="game_mode" value="pair">Play Pair