Skip to content

Latest commit

 

History

History
143 lines (117 loc) · 5.56 KB

05-Instructions.md

File metadata and controls

143 lines (117 loc) · 5.56 KB

Index



Instructions

Assignment

Operator: equip

It can be done at the time of declaring a variable or after its declaration.

Two variables can be assigned to each other, if and only if they are of the same type.

If the variables are of the same type, they can be declared on the same line as follow:

type1 id1, ..., idN
type2 idA equip expression, idB equip expression ...

Special assignments

They are assignments that work exclusively on variables of type Power and work as suffix/postfix operators:

level up: Increment. Increase the value of the variable by 1.

use item: Decrement. Decrease the value of the variable by 1.


Conditional

See Flow control structures. Selection section.


Loops

See Flow control structures. Loops section.


Input/Output

Input: variable equip joystick [prompt]

Takes Runes as an optional prompt for the user and reads Runes from the user.

Output: drop variable[, constant, ...]

Takes Runes, Rune, Power or Skill, and shows them in the standard output.

Casting:

portalRuneToRunes: Converts a Rune to Runes.

portalPowerToRunes: Converts a Power to Runes.

portalSkillToRunes: Converts a Skill to Runes.

portalRunesToPower: Converts Runes to Power.

portalRunesToRune : Converts Runes to Rune.

portalRunesToSkill: Converts Runes to Skill.

Its execution consists of an interruption to read from the standard input and returns Runes as default, without the *\n* character.

If the variable its a Rune, Power or Skill, Playit casts the readed Runes to the corresponding type. (Need to be implemented)

These can be used without the kill statement described in Flow control structures. Subroutines section.


Map (Under development)

muestra todas las declaraciones hechas (vars, monsters, bosses, inventory, items ...)

Next page ->



Table of content