warriorjs-ja
Version:
Game written in JavaScript for learning JavaScript and artificial intelligence
63 lines (60 loc) • 1.64 kB
JSON
{
"description": "Another large room, but with several enemies blocking your way to the stairs.",
"tip": "Just like walking, you can attack and feel in multiple directions ('forward', 'left', 'right', 'backward').",
"clue": "Call `warrior.feel(direction).isEnemy()` in each direction to make sure there isn't an enemy beside you (attack if there is). Call `warrior.rest()` if you're low in health when there are no enemies around.",
"timeBonus": 40,
"aceScore": 84,
"floor": {
"size": {
"width": 4,
"height": 2
},
"stairs": {
"x": 3,
"y": 1
},
"warrior": {
"x": 0,
"y": 0,
"facing": "east",
"abilities": [
{
"name": "feel",
"args": []
},
{
"name": "attack",
"args": []
},
{
"name": "health",
"args": []
},
{
"name": "rest",
"args": []
}
]
},
"units": [
{
"type": "sludge",
"x": 1,
"y": 0,
"facing": "west"
},
{
"type": "thickSludge",
"x": 2,
"y": 1,
"facing": "west"
},
{
"type": "sludge",
"x": 1,
"y": 1,
"facing": "north"
}
]
}
}