TerraScript
This is an esolang inspired by the game Terraria. The language itself uses the names of items from the game. This does NOT include blocks and furniture; strangely, it still includes torches and their variants. This DOES include weapons, torches, accessories and consumables (potions, food, boss summons etc.). Variables can be any item as specified above. Predefined functions:
+ - breathing reed/br,
- - trident/tr,
x - ultrabright torch/ut,
/ - flaming mace/fm,
Exponent - Mana potion/mp,
( - Meowmere/m,
) - Star Wrath/s,
| (bitwise or) - Last prism/lp,
& (bitwise and) - Zenith/ze,
~ (bitwise not) - Terraprisma/te,
^ (bitwise xor) - SDMG/sd,
% (modulo) - Stylish scissors/ss,
< (left bitshift) - Rod of Discord/RoD/rd,
> (unsigned right bitshift) - Rod of Harmony/RoH/rh,
Variable definition - Wooden sword/ws,
Function definition - Gold broadsword/Platinum broadsword/gb/pb,
Output: “x” - torch/t,
Input - white torch/w,
- Syntax
Variable definition:
X = {type} {value} {usefulness}
Types:
Water bucket - float
Lava bucket - int
Honey bucket - bool
Endless shimmer bucket - str
Usefulness:
By hand - 0
Workbench - 1
Furnace - 2
Anvil - 3
Hardmode anvil - 4
Ancient manipulator - 5
Examples:
Wooden sword: Tin shortsword is 6 lava bucket @ anvil
Wooden sword: Wooden breastplate is “yes” endless shimmer bucket @ ancient manipulator
Examples transcripts:
,=x int 6 ;3
,=y str “yes” ;5
Function definition:
.=functionname, {function}
Examples:
Gold Broadsword: Starfury as wooden sword and iron broadsword, 2 breathing reed 3 flaming mace meowmere wooden sword ultrabright torch iron broadsword star wrath
Short version: gb: Starfury as wooden sword and iron broadsword, 2 br 3 fm m wooden sword ut iron broadsword s
Alternate short version: gb: Starfury: 1’ + 2’, 2 br 3 fm m 1’ ut 2’ s
Shortest version: gb:Starfury:1’,2’;2br3fmm1’ut2’s
Meaning: Function defined as ‘Starfury’ containing two variables multiplied with each other and added to 2 which is added to 3.