Skip to content

Commit

Permalink
Finalizando missões
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseFilipi committed Sep 9, 2024
1 parent f5def50 commit f5d27ca
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions docs/sql/dml/dml.sql
Original file line number Diff line number Diff line change
Expand Up @@ -604,10 +604,6 @@ VALUES (3, 3, 1);
-- Inserindo dados na tabela 'missoes'
INSERT INTO missao (nome_mapa, id_loot, dificuldade, objetivo, principal)
VALUES ('Floresta da Sombra', 1, 3, 'Derrotar Boss', true);
INSERT INTO missao (nome_mapa, id_loot, dificuldade, objetivo, principal)
VALUES ('Caverna Cristal', 2, 5, 'Derrotar Chefão', false);
INSERT INTO missao (nome_mapa, id_loot, dificuldade, objetivo, principal)
VALUES ('Montanha fire', 3, 7, 'Coletar Itens', true);

-- Inserindo dados na tabela 'pokemon_habilidade'
INSERT INTO pokemon_habilidade (id_pokemon, id_habilidade, pp_restante)
Expand Down
2 changes: 1 addition & 1 deletion docs/sql/trigger_procedure/trigger.sql
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CREATE OR REPLACE FUNCTION verifica_vida_jogador()
RETURNS TRIGGER AS $$
BEGIN
IF NEW.vida <= 0 THEN
NEW.posicao := (SELECT id_terreno FROM terreno WHERE x = 0 AND y = 0);
NEW.posicao := 6;
RAISE NOTICE 'Jogador % retornou para a cidade.', NEW.id_jogador;
END IF;
RETURN NEW;
Expand Down
2 changes: 1 addition & 1 deletion python/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def abre_correio(id_jogador):

# Preparar dados para tabulate
headers = ["ID Missão", "Objetivo", "Dificuldade", "Tipo Missão", "Mapa"]
table = [[missao[0], missao[1], missao[2], missao[3], missao[4]] for missao in missoes]
table = [[missao[0], missao[1], 'Fácil', 'Principal', missao[4]] for missao in missoes]

# Exibir tabela formatada
print(tabulate(table, headers, tablefmt="grid"))
Expand Down

0 comments on commit f5d27ca

Please sign in to comment.