Part - Lanterne
mine_lantern is a kind of light_device.
mine_lantern has a number called life.
life of mine_lantern is 10.
printed name of mine_lantern is "lanterne".
mine_lantern is privately-named.
printed plural name of mine_lantern is "lanternes".
mine_lantern is improper-named.
grammatical gender of mine_lantern is feminine gender.
indefinite article of mine_lantern is "une".
description of mine_lantern is "Voilà un objet qu[']il faut manipuler avec précaution, parce que le verre en est bien fragile et qu'il a rapidement fait de trop s'humidifier pour fonctionner. Avec cela, la lumière qu'il produit ne peut jamais s'éterniser très longtemps après qu'on l'a allumé.".
understand "lanterne" as mine_lantern.
understand "lanternes" as plural of mine_lantern.
every turn:
repeat with L running through mine_lantern:
if L is switched on and life of L > 0:
decrease life of L by 1;
if life of L <= 0:
if L is visible:
mark_a_pause;
say as player_information "La lanterne a usé toute sa substance et elle s'éteint bientôt.";
now L is switched off;
now L is not lit;
before switching on mine_lantern:
if life of the noun <= 0:
say "Impossible de rallumer cette lanterne. Elle a déjà usé toute sa substance.";
stop the action;
else:
continue the action;