Anillo III - Original — 16 of 199

Johan Paz

Release 3

Chapter 2 - Utilidades o librerías integradas

Section 0 - Cosas comunes a usar

[Duracion]

A thing has a number called duracion. The duracion of a thing is usually 0.

[Substancias, al menos para considerar lo metálico ]

Substance is a kind of value.

Substances are metal, flint, vegetable, meat, paper and irrelevant.

A thing has a substance called naturaleza. The naturaleza of a thing is usually irrelevant.

Definition: a thing is metalica if the naturaleza of it is metal.

Definition: a thing is chisposa if the naturaleza of it is flint.

Definition: a thing is carne if the naturaleza of it is meat.

Definition: a thing is vegetal if the naturaleza of it is vegetable.

Definition: a thing is papel if the naturaleza of it is paper.

[Volumen]

Volumen is a kind of value. The volumens are minusculo, pequeno, medio, grande and enorme.

A thing has a volumen called tamano. The tamano of a thing is usually pequeno.

To decide which number is espacio de (item - a thing):

if the tamano of item is:

-- minusculo: decide on 1;

-- pequeno: decide on 10;

-- medio: decide on 30;

-- grande: decide on 200;

-- enorme: decide on 1000.

[Capacidad]

A container has a number called capacidad. The capacidad of a container is normally 50. [objetos minusculos]

[Carga del jugador]

To decide which number is carga del jugador:

let carga be 0;

repeat with item running through the things carried by the player:

increase carga by espacio de item;

decide on carga.

[Contenido de un contenedor]

To decide which number is carga de (item - a thing):

let carga be 0;

repeat with cosa running through the things in item:

increase carga by espacio de cosa;

decide on carga.

[Como va de cargado el deavork]

To decide which number is carga del insecto:

let carga be 0;

repeat with cosa running through the things in estomago del deavork:

increase carga by espacio de cosa;

decide on carga.

[Verificar la carga del jugador]

Before taking a thing:

let carga final be carga del jugador;

increase carga final by espacio de the noun;

let maxCarga be 235;

if the player is icalante or the player is yerk:

now maxCarga is 435;

if carga final is greater than maxCarga:

if the player is carrying anything:

say "Tu portador ya lleva demasiadas cosas, tendrás que dejar algo antes de cargar con [the noun].";

otherwise:

say "Simplemente tu portador no puede cargar con eso, es demasiado grande.";

stop the action.

[Verificar capacidad de un contenedor]

Before inserting a thing into a open container:

let carga final be carga de the second noun;

increase carga final by espacio de the noun;

if carga final is greater than capacidad of the second noun:

if there is anything in the second noun:

say "[The noun] ya no cabe en [the second noun]. Saca algo antes.";

otherwise:

say "[The noun] parece que simplemente no cabe ahí.";

stop the action.

[----------------------------------------------------

Algunas funciones de presentación

-----------------------------------------------------]

To bnw: [break and wait]

say line break;

[say paragraph break;]

wait for any key.

To (pnj - a patroller) hace (text - a text):

if pnj is visible:

say text.