#11 Write report

This commit is contained in:
Tibo De Peuter 2022-12-23 21:39:56 +01:00
parent c3f7e47703
commit 0a6e1d7ffb
27 changed files with 328 additions and 134 deletions

144
levels/level5.txt Normal file
View file

@ -0,0 +1,144 @@
player: {
hp: 100,
inventory: [
{
id: "dagger",
x: 0,
y: 0,
name: "Swiss army knife",
description: "Your trustworthy army knife will never let you down",
useTimes: infinite,
value: 5,
actions: {}
},
{
id: "potion",
x: 0,
y: 0,
name: "Small healing potion",
description: "Will recover you from small injuries",
useTimes: 5,
value: 5,
actions: {}
}
]
}
levels: [
{
layout: {
| * * * * * * *
| * s . . . e *
| * * * * * * *
},
items: [],
entities: []
},
{
layout: {
| x x * * * x x x x
| x x * . * x x x x
| * * * . * * * * *
| * s . . . . . e *
| * * * * * * * * *
},
items: [
{
id: "key",
x: 3,
y: 3,
name: "Secret key",
description: "What if this key opens a secret door?",
useTimes: 1,
value: 0,
actions: {
[not(inventoryFull())] retrieveItem(key),
[] leave()
}
}
],
entities: [
{
id: "door",
x: 4,
y: 1,
name: "Secret door",
description: "This door can only be opened with a secret key",
direction: left,
actions: {
[inventoryContains(key)] useItem(key),
[] leave()
}
}
]
},
{
layout: {
| * * * * * * * * * * *
| * . . . . . . . . . *
| * * * * * * * * * . *
| * e . . . . . . . s *
| * * * * * * * * * . *
| x x x x x x x x * . *
| * * * * * * * * * . *
| * . . . . . . . . . *
| * * * * * * * * * * *
},
items: [
{
id: "key",
x: 1,
y: 1,
name: "Key to sturdy door",
description: "You have proven worthy",
useTimes: 1,
value: 0,
actions: {
[not(inventoryFull())] retrieveItem(key),
[] leave()
}
},
{
id: "sword",
x: 1,
y: 7,
name: "Mighty sword",
description: "Slayer of evil",
useTimes: 3,
value: 100,
actions: {
[not(inventoryFull())] retrieveItem(sword),
[] leave()
}
}
],
entities: [
{
id: "door",
x: 8,
y: 5,
name: "Sturdy door",
description: "I wonder what's behind it?",
direction: right,
actions: {
[inventoryContains(key)] useItem(key),
[] leave()
}
},
{
id: "devil",
x: 6,
y: 1,
name: "Evil powers",
description: "Certainly from hell",
hp: 55,
value: 10,
actions: {
[inventoryContains(dagger)] decreaseHp(devil, dagger),
[inventoryContains(sword)] decreaseHp(devil, sword),
[] leave()
}
}
]
}
]