-
Notifications
You must be signed in to change notification settings - Fork 5
Item Codes
Food is represented by the command fN
where N
is an integer in the range [0,25]
.
Code | Item Type |
---|---|
f0 | Bread |
f1 | Mushroom |
f2 | Cookie |
f3 | Jaffa |
f4 | Apple |
f5 | Meat |
f6 | Orange |
f7 | Milk |
All foods, when consumed, will heal 75 health.
In the item sprite sheet, food items' coordinates are represented by the following function:
function getFood(N) {
return [
N % 5 * 24,
(N / 5 | 0) * 24
];
}
Weapons have a more complex syntax:
w<type>.<variant>.<level>
-
type
: The type of weapon -
variant
: The weapon variant, or modifier -
level
: An integer representing the item's level
There are currently two types of weapons: sw
and bo
(sword and bow, respectively). The game has four other acceptable types: ma
(mace), ax
(axe), ha
(hammer), and st
(staff), though these types are not implemented at the time of writing.
The default variant for a weapon is plain
, which means it has no modifier. The following modifiers are available:
Index | Modifier | Description |
---|---|---|
0 | plain | No modifier |
1 | forged | Forged |
2 | sharp | Sharp |
3 | broad | Broad, wide |
4 | old | Old, worn |
5 | leg | Legendary |
6 | fla | Flaming |
7 | agile | Agile, fast |
8 | bane | Baneful |
9 | ench | Enchanted, magic |
10 | evil | Evil, cursed |
11 | spite | Spiteful |
12 | ether | Ethereal |
13 | ancie | Ancient |
Modifiers can have one of a number of behaviors:
- Modifiers may increase or decrease the effectiveness of the weapon. A sharp sword will do more damage than a plain sword, though an old bow may do less damage than a broad bow.
- Modifiers may have positive or negative effects on the user of the weapon. A spiteful sword may cause harm to its user. An agile bow may make the user faster.
- Modifiers may have conditional effects. Baneful weapons may be more effective against animals. Ethereal weapons may be more effective against monsters of the ether.
The level of a weapon currently has no effect, but provides an opportunity for leveling of weaponry.
The sprite for a weapon can be determined by the following:
function getWeapon(type, variantIndex, level) {
return [
variantIndex * 24 + 5 * 24,
type === 'sw' ? 0 : 24
];
}