Section 3 - Bag of tricks
[--------------------------------------------------
Contenedores en los que se
puede rebuscar y encontrar cosas
más o menos aleatorias.
--------------------------------------------------]
A bag of tricks is a kind of NSE container. A bag of tricks has a list of objects called hidden objects. The hidden objects of a bag of tricks is usually {}.
A bag of tricks has a text called nothing inside phrase. The nothing inside phrase of a bag of tricks is usually "Buscas un rato en [the noun] sin encontrar nada.".
A bag of tricks has a text called found phrase. The found phrase of a bag of tricks is usually "Buscas un rato en [the noun] encontrando por sorpresa [a second noun].".
A bag of tricks has a number called avisos. The avisos of a bag of tricks is usually 0.
Instead of searching a bag of tricks:
let HO be the hidden objects of the noun;
let NHO be the number of entries in HO;
if NHO is 0:
say the nothing inside phrase of the noun;
say line break;
otherwise:
let longitud be the number of entries of HO;
let num be a random number from 1 to NHO;
let kosa be the entry num of HO;
now the second noun is kosa;
say the found phrase of the noun;
say line break;
if the noun is scenery or the noun is a backdrop:
move entry num of HO to the location;
otherwise:
move entry num of HO to the noun;
remove entry num from the hidden objects of the noun.
[Pista sobre la existencia de la bolsa de trucos]
Every turn when there is a bag of tricks (called bolsa) in the location and not in darkness:
let N be the number of entries in hidden objects of bolsa;
if N is not 0:
let MAX be 10;
increase MAX by avisos of bolsa;
if a random chance of N in MAX succeeds:
say "[one of]Por un momento te ha parecido ver algo en [the bolsa][or]Uhm... tu intuición te dice que tal vez haya algo en [the bolsa][or]Te ha parecido ver con el rabillo del ojo algo extraño en [the bolsa][or]La verdad es que [the bolsa] tiene[n the bolsa] algo extraño, tal vez habría que registrar[lo the bolsa] a fondo[at random].";
increase avisos of bolsa by 5.