Add a hint to tell the user how to use ladders

This commit is contained in:
Yohann D'ANELLO 2021-01-08 14:51:56 +01:00
parent f48377e055
commit 156e4a7e3a
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
7 changed files with 132 additions and 83 deletions

View File

@ -57,7 +57,7 @@ Dans le `pack de textures`_ ASCII, il est représenté par le caractère ``8``.
Dans le `pack de textures`_ écureuil, il est représenté par l'émoji ``🧸``.
Pyguargue
Pygargue
---------
Son nom est fixé à `eagle`. Il a par défaut une force à **1000** et **5000** points de vie.

View File

@ -22,7 +22,7 @@ Pack de textures
.. _Bouclier: entities/items.html#bouclier
.. _Hazel: ../index.html
.. _Plastron: ../entities/items.html#plastron
.. _Pyguargue: ../entities/monsters.html#Pyguargue
.. _Pygargue: ../entities/monsters.html#Pygargue
.. _Casque: ../entities/items.html#Casque
.. _Anneau: ../entities/items.html#Anneau
.. _Trompette: ../entities/items.html#Trompette
@ -64,7 +64,7 @@ Chaque tuile fait un caractère de large.
* Bouclier_ : ``D``
* Hazel_ : ``¤``
* Plastron_ : ``(``
* Pyguargue_ : ``µ``
* Pygargue_ : ``µ``
* Casque_ : ``0``
* Anneau_ : ``o``
* Trompette_ : ``/``
@ -95,7 +95,7 @@ Chaque tuile fait 2 caractères de large pour afficher les émojis proprement.
* Bouclier_ : ``🛡️``
* Hazel_ : ``🌰``
* Plastron_ : ``🦺``
* Pyguargue_ : ``🦅``
* Pygargue_ : ``🦅``
* Casque_ : ``⛑️``
* Anneau_ : ``💍``
* Trompette_ : ``🎺``

View File

@ -5,6 +5,7 @@ import curses
from ..entities.player import Player
from ..game import Game
from ..settings import Settings
from ..translations import gettext as _
from .display import Display
@ -14,6 +15,7 @@ class StatsDisplay(Display):
A class to handle the display of the stats of the player.
"""
player: Player
settings: Settings
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@ -21,6 +23,7 @@ class StatsDisplay(Display):
def update(self, game: Game) -> None:
self.player = game.player
self.settings = game.settings
def update_pad(self) -> None:
string2 = f"{_(self.player.name).capitalize()} " \
@ -77,6 +80,12 @@ class StatsDisplay(Display):
self.addstr(self.pad, 15, 0, _("YOU ARE DEAD"), curses.COLOR_RED,
bold=True, blink=True, standout=True)
if self.player.map.tiles[self.player.y][self.player.x].is_ladder():
msg = _("Use {key} to use the ladder") \
.format(key=self.settings.KEY_LADDER)
self.addstr(self.pad, self.height - 2, 0, msg,
italic=True, reverse=True)
def display(self) -> None:
self.pad.erase()
self.update_pad()

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: squirrelbattle 3.14.1\n"
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\n"
"POT-Creation-Date: 2021-01-08 12:03+0100\n"
"POT-Creation-Date: 2021-01-08 14:47+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,6 +17,12 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "ring_of_critical_damage"
msgstr ""
msgid "ring_of_more_experience"
msgstr ""
#, python-brace-format
msgid "{name} takes {amount} damage."
msgstr "{name} nimmt {amount} Schadenspunkte."
@ -43,30 +49,35 @@ msgstr "BESTAND"
msgid "STALL"
msgstr "STAND"
#: squirrelbattle/display/statsdisplay.py:40
#: squirrelbattle/display/statsdisplay.py:43
msgid "Inventory:"
msgstr "Bestand:"
#: squirrelbattle/display/statsdisplay.py:57
#: squirrelbattle/display/statsdisplay.py:60
msgid "Equipped main:"
msgstr ""
#: squirrelbattle/display/statsdisplay.py:61
#: squirrelbattle/display/statsdisplay.py:64
msgid "Equipped secondary:"
msgstr ""
#: squirrelbattle/display/statsdisplay.py:66
#: squirrelbattle/display/statsdisplay.py:69
msgid "Equipped chestplate:"
msgstr ""
#: squirrelbattle/display/statsdisplay.py:70
#: squirrelbattle/display/statsdisplay.py:73
msgid "Equipped helmet:"
msgstr ""
#: squirrelbattle/display/statsdisplay.py:77
#: squirrelbattle/display/statsdisplay.py:80
msgid "YOU ARE DEAD"
msgstr "SIE WURDEN GESTORBEN"
#: squirrelbattle/display/statsdisplay.py:84
#, python-brace-format
msgid "Use {key} to use the ladder"
msgstr ""
#. TODO
#: squirrelbattle/entities/friendly.py:33
msgid "I don't sell any squirrel"
@ -106,7 +117,7 @@ msgstr "Der Spieler klettert auf dem Stock {floor} hinoben."
msgid "The buyer does not have enough money"
msgstr "Der Kaufer hat nicht genug Geld"
#: squirrelbattle/game.py:347
#: squirrelbattle/game.py:349
msgid ""
"Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted."
@ -114,7 +125,7 @@ msgstr ""
"In Ihrer Speicherdatei fehlen einige Schlüssel.\n"
"Ihre Speicherung scheint korrupt zu sein. Es wird gelöscht."
#: squirrelbattle/game.py:355
#: squirrelbattle/game.py:357
msgid ""
"No player was found on this map!\n"
"Maybe you died?"
@ -122,7 +133,7 @@ msgstr ""
"Auf dieser Karte wurde kein Spieler gefunden!\n"
"Vielleicht sind Sie gestorben?"
#: squirrelbattle/game.py:375
#: squirrelbattle/game.py:379
msgid ""
"The JSON file is not correct.\n"
"Your save seems corrupted. It got deleted."
@ -130,26 +141,26 @@ msgstr ""
"Die JSON-Datei ist nicht korrekt.\n"
"Ihre Speicherung scheint korrumpiert. Sie wurde gelöscht."
#: squirrelbattle/interfaces.py:712
#: squirrelbattle/interfaces.py:718
msgid "It's a critical hit!"
msgstr ""
#: squirrelbattle/interfaces.py:713
#: squirrelbattle/interfaces.py:719
#, python-brace-format
msgid "{name} hits {opponent}."
msgstr "{name} schlägt {opponent}."
#: squirrelbattle/interfaces.py:727
#: squirrelbattle/interfaces.py:733
#, python-brace-format
msgid "{name} takes {damage} damage."
msgstr ""
#: squirrelbattle/interfaces.py:729
#: squirrelbattle/interfaces.py:735
#, python-brace-format
msgid "{name} dies."
msgstr "{name} stirbt."
#: squirrelbattle/interfaces.py:763
#: squirrelbattle/interfaces.py:769
#, python-brace-format
msgid "{entity} said: {message}"
msgstr "{entity} hat gesagt: {message}"
@ -284,42 +295,46 @@ msgstr "Teddybär"
msgid "tiger"
msgstr "Tiger"
#: squirrelbattle/tests/translations_test.py:71
#: squirrelbattle/tests/translations_test.py:70
msgid "eagle"
msgstr ""
#: squirrelbattle/tests/translations_test.py:72
msgid "body snatch potion"
msgstr "Leichenfleddererzaubertrank"
#: squirrelbattle/tests/translations_test.py:72
#: squirrelbattle/tests/translations_test.py:73
msgid "bomb"
msgstr "Bombe"
#: squirrelbattle/tests/translations_test.py:73
#: squirrelbattle/tests/translations_test.py:74
msgid "explosion"
msgstr "Explosion"
#: squirrelbattle/tests/translations_test.py:74
#: squirrelbattle/tests/translations_test.py:75
msgid "heart"
msgstr "Herz"
#: squirrelbattle/tests/translations_test.py:75
#: squirrelbattle/tests/translations_test.py:76
msgid "sword"
msgstr "schwert"
#: squirrelbattle/tests/translations_test.py:76
#: squirrelbattle/tests/translations_test.py:77
msgid "helmet"
msgstr ""
#: squirrelbattle/tests/translations_test.py:77
#: squirrelbattle/tests/translations_test.py:78
msgid "chestplate"
msgstr ""
#: squirrelbattle/tests/translations_test.py:78
#: squirrelbattle/tests/translations_test.py:79
msgid "shield"
msgstr ""
#: squirrelbattle/tests/translations_test.py:79
msgid "ring_of_critical_damage"
#: squirrelbattle/tests/translations_test.py:80
msgid "ring of critical damage"
msgstr ""
#: squirrelbattle/tests/translations_test.py:81
msgid "ring_of_more_experience"
#: squirrelbattle/tests/translations_test.py:82
msgid "ring of more experience"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: squirrelbattle 3.14.1\n"
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\n"
"POT-Creation-Date: 2021-01-08 12:03+0100\n"
"POT-Creation-Date: 2021-01-08 14:47+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,6 +17,12 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "ring_of_critical_damage"
msgstr ""
msgid "ring_of_more_experience"
msgstr ""
#, python-brace-format
msgid "{name} takes {amount} damage."
msgstr "{name} recibe {amount} daño."
@ -43,30 +49,35 @@ msgstr "INVENTORIO"
msgid "STALL"
msgstr "PUESTO"
#: squirrelbattle/display/statsdisplay.py:40
#: squirrelbattle/display/statsdisplay.py:43
msgid "Inventory:"
msgstr "Inventorio :"
#: squirrelbattle/display/statsdisplay.py:57
#: squirrelbattle/display/statsdisplay.py:60
msgid "Equipped main:"
msgstr ""
#: squirrelbattle/display/statsdisplay.py:61
#: squirrelbattle/display/statsdisplay.py:64
msgid "Equipped secondary:"
msgstr ""
#: squirrelbattle/display/statsdisplay.py:66
#: squirrelbattle/display/statsdisplay.py:69
msgid "Equipped chestplate:"
msgstr ""
#: squirrelbattle/display/statsdisplay.py:70
#: squirrelbattle/display/statsdisplay.py:73
msgid "Equipped helmet:"
msgstr ""
#: squirrelbattle/display/statsdisplay.py:77
#: squirrelbattle/display/statsdisplay.py:80
msgid "YOU ARE DEAD"
msgstr "ERES MUERTO"
#: squirrelbattle/display/statsdisplay.py:84
#, python-brace-format
msgid "Use {key} to use the ladder"
msgstr ""
#: squirrelbattle/entities/friendly.py:33
msgid "I don't sell any squirrel"
msgstr "No vendo ninguna ardilla"
@ -105,7 +116,7 @@ msgstr ""
msgid "The buyer does not have enough money"
msgstr "El comprador no tiene suficiente dinero"
#: squirrelbattle/game.py:347
#: squirrelbattle/game.py:349
msgid ""
"Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted."
@ -113,7 +124,7 @@ msgstr ""
"Algunas claves faltan en su archivo de guarda.\n"
"Su guarda parece a ser corruptido. Fue eliminado."
#: squirrelbattle/game.py:355
#: squirrelbattle/game.py:357
msgid ""
"No player was found on this map!\n"
"Maybe you died?"
@ -121,7 +132,7 @@ msgstr ""
"No jugador encontrado sobre la carta !\n"
"¿ Quizas murió ?"
#: squirrelbattle/game.py:375
#: squirrelbattle/game.py:379
msgid ""
"The JSON file is not correct.\n"
"Your save seems corrupted. It got deleted."
@ -129,26 +140,26 @@ msgstr ""
"El JSON archivo no es correcto.\n"
"Su guarda parece corrupta. Fue eliminada."
#: squirrelbattle/interfaces.py:712
#: squirrelbattle/interfaces.py:718
msgid "It's a critical hit!"
msgstr ""
#: squirrelbattle/interfaces.py:713
#: squirrelbattle/interfaces.py:719
#, python-brace-format
msgid "{name} hits {opponent}."
msgstr "{name} golpea a {opponent}."
#: squirrelbattle/interfaces.py:727
#: squirrelbattle/interfaces.py:733
#, python-brace-format
msgid "{name} takes {damage} damage."
msgstr ""
#: squirrelbattle/interfaces.py:729
#: squirrelbattle/interfaces.py:735
#, python-brace-format
msgid "{name} dies."
msgstr "{name} se muere."
#: squirrelbattle/interfaces.py:763
#: squirrelbattle/interfaces.py:769
#, python-brace-format
msgid "{entity} said: {message}"
msgstr "{entity} dijo : {message}"
@ -283,42 +294,46 @@ msgstr "osito de peluche"
msgid "tiger"
msgstr "tigre"
#: squirrelbattle/tests/translations_test.py:71
#: squirrelbattle/tests/translations_test.py:70
msgid "eagle"
msgstr ""
#: squirrelbattle/tests/translations_test.py:72
msgid "body snatch potion"
msgstr "poción de intercambio"
#: squirrelbattle/tests/translations_test.py:72
#: squirrelbattle/tests/translations_test.py:73
msgid "bomb"
msgstr "bomba"
#: squirrelbattle/tests/translations_test.py:73
#: squirrelbattle/tests/translations_test.py:74
msgid "explosion"
msgstr "explosión"
#: squirrelbattle/tests/translations_test.py:74
#: squirrelbattle/tests/translations_test.py:75
msgid "heart"
msgstr "corazón"
#: squirrelbattle/tests/translations_test.py:75
#: squirrelbattle/tests/translations_test.py:76
msgid "sword"
msgstr "espada"
#: squirrelbattle/tests/translations_test.py:76
#: squirrelbattle/tests/translations_test.py:77
msgid "helmet"
msgstr ""
#: squirrelbattle/tests/translations_test.py:77
#: squirrelbattle/tests/translations_test.py:78
msgid "chestplate"
msgstr ""
#: squirrelbattle/tests/translations_test.py:78
#: squirrelbattle/tests/translations_test.py:79
msgid "shield"
msgstr ""
#: squirrelbattle/tests/translations_test.py:79
msgid "ring_of_critical_damage"
#: squirrelbattle/tests/translations_test.py:80
msgid "ring of critical damage"
msgstr ""
#: squirrelbattle/tests/translations_test.py:81
msgid "ring_of_more_experience"
#: squirrelbattle/tests/translations_test.py:82
msgid "ring of more experience"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: squirrelbattle 3.14.1\n"
"Report-Msgid-Bugs-To: squirrel-battle@crans.org\n"
"POT-Creation-Date: 2021-01-08 12:03+0100\n"
"POT-Creation-Date: 2021-01-08 14:47+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -43,30 +43,35 @@ msgstr "INVENTAIRE"
msgid "STALL"
msgstr "STAND"
#: squirrelbattle/display/statsdisplay.py:40
#: squirrelbattle/display/statsdisplay.py:43
msgid "Inventory:"
msgstr "Inventaire :"
#: squirrelbattle/display/statsdisplay.py:57
#: squirrelbattle/display/statsdisplay.py:60
msgid "Equipped main:"
msgstr "Équipement principal :"
#: squirrelbattle/display/statsdisplay.py:61
#: squirrelbattle/display/statsdisplay.py:64
msgid "Equipped secondary:"
msgstr "Équipement secondaire :"
#: squirrelbattle/display/statsdisplay.py:66
#: squirrelbattle/display/statsdisplay.py:69
msgid "Equipped chestplate:"
msgstr "Plastron équipé :"
#: squirrelbattle/display/statsdisplay.py:70
#: squirrelbattle/display/statsdisplay.py:73
msgid "Equipped helmet:"
msgstr "Casque équipé :"
#: squirrelbattle/display/statsdisplay.py:77
#: squirrelbattle/display/statsdisplay.py:80
msgid "YOU ARE DEAD"
msgstr "VOUS ÊTES MORT"
#: squirrelbattle/display/statsdisplay.py:84
#, python-brace-format
msgid "Use {key} to use the ladder"
msgstr "Appuyez sur {key} pour utiliser l'échelle"
#. TODO
#: squirrelbattle/entities/friendly.py:33
msgid "I don't sell any squirrel"
@ -106,7 +111,7 @@ msgstr "Le joueur monte à l'étage {floor}."
msgid "The buyer does not have enough money"
msgstr "L'acheteur n'a pas assez d'argent"
#: squirrelbattle/game.py:347
#: squirrelbattle/game.py:349
msgid ""
"Some keys are missing in your save file.\n"
"Your save seems to be corrupt. It got deleted."
@ -114,7 +119,7 @@ msgstr ""
"Certaines clés de votre ficher de sauvegarde sont manquantes.\n"
"Votre sauvegarde semble corrompue. Elle a été supprimée."
#: squirrelbattle/game.py:355
#: squirrelbattle/game.py:357
msgid ""
"No player was found on this map!\n"
"Maybe you died?"
@ -122,7 +127,7 @@ msgstr ""
"Aucun joueur n'a été trouvé sur la carte !\n"
"Peut-être êtes-vous mort ?"
#: squirrelbattle/game.py:375
#: squirrelbattle/game.py:379
msgid ""
"The JSON file is not correct.\n"
"Your save seems corrupted. It got deleted."
@ -130,26 +135,26 @@ msgstr ""
"Le fichier JSON de sauvegarde est incorrect.\n"
"Votre sauvegarde semble corrompue. Elle a été supprimée."
#: squirrelbattle/interfaces.py:712
#: squirrelbattle/interfaces.py:718
msgid "It's a critical hit!"
msgstr "C'est un coup critique !"
#: squirrelbattle/interfaces.py:713
#: squirrelbattle/interfaces.py:719
#, python-brace-format
msgid "{name} hits {opponent}."
msgstr "{name} frappe {opponent}."
#: squirrelbattle/interfaces.py:727
#: squirrelbattle/interfaces.py:733
#, python-brace-format
msgid "{name} takes {damage} damage."
msgstr "{name} prend {damage} dégâts."
#: squirrelbattle/interfaces.py:729
#: squirrelbattle/interfaces.py:735
#, python-brace-format
msgid "{name} dies."
msgstr "{name} meurt."
#: squirrelbattle/interfaces.py:763
#: squirrelbattle/interfaces.py:769
#, python-brace-format
msgid "{entity} said: {message}"
msgstr "{entity} a dit : {message}"
@ -284,42 +289,46 @@ msgstr "nounours"
msgid "tiger"
msgstr "tigre"
#: squirrelbattle/tests/translations_test.py:71
#: squirrelbattle/tests/translations_test.py:70
msgid "eagle"
msgstr "pygargue"
#: squirrelbattle/tests/translations_test.py:72
msgid "body snatch potion"
msgstr "potion d'arrachage de corps"
#: squirrelbattle/tests/translations_test.py:72
#: squirrelbattle/tests/translations_test.py:73
msgid "bomb"
msgstr "bombe"
#: squirrelbattle/tests/translations_test.py:73
#: squirrelbattle/tests/translations_test.py:74
msgid "explosion"
msgstr "explosion"
#: squirrelbattle/tests/translations_test.py:74
#: squirrelbattle/tests/translations_test.py:75
msgid "heart"
msgstr "cœur"
#: squirrelbattle/tests/translations_test.py:75
#: squirrelbattle/tests/translations_test.py:76
msgid "sword"
msgstr "épée"
#: squirrelbattle/tests/translations_test.py:76
#: squirrelbattle/tests/translations_test.py:77
msgid "helmet"
msgstr "casque"
#: squirrelbattle/tests/translations_test.py:77
#: squirrelbattle/tests/translations_test.py:78
msgid "chestplate"
msgstr "plastron"
#: squirrelbattle/tests/translations_test.py:78
#: squirrelbattle/tests/translations_test.py:79
msgid "shield"
msgstr "bouclier"
#: squirrelbattle/tests/translations_test.py:79
#: squirrelbattle/tests/translations_test.py:80
msgid "ring of critical damage"
msgstr "anneau de coup critique"
#: squirrelbattle/tests/translations_test.py:81
#: squirrelbattle/tests/translations_test.py:82
msgid "ring of more experience"
msgstr "anneau de plus d'expérience"

View File

@ -67,6 +67,7 @@ class TestTranslations(unittest.TestCase):
self.assertEqual(_("sunflower"), "tournesol")
self.assertEqual(_("teddy bear"), "nounours")
self.assertEqual(_("tiger"), "tigre")
self.assertEqual(_("eagle"), "pygargue")
self.assertEqual(_("body snatch potion"), "potion d'arrachage de corps")
self.assertEqual(_("bomb"), "bombe")