aboutsummaryrefslogtreecommitdiff
path: root/src/sim/static/items.js
blob: 40f73f1ac31eb1984eed316aab4278ad96bad705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
tileMap = {
    0: Mountain,
    1: Forest,
    2: Town,
}

function getScout() {
    return { 
        id: 1, 
        text: "scout", 
        cost: 2, 
        callback: function () { 
            var type = tileMap[Math.floor(Math.random() * 3)]
            var tile = new type()
            status = `Your scout found a ${tile.name}. Click to place it.`
            return {
                tile: tile
            }
        }
    }
}