player object
This commit is contained in:
+3
-2
@@ -10,6 +10,7 @@ fn init() {
|
||||
log(`hello from object — player at ${Board.player_x}, ${Board.player_y}`);
|
||||
set_tile(2); // change my glyph to ☻ — proves the write path
|
||||
say("Hello there,\\ntraveller!");
|
||||
log(`Player health: ${Player.health}`);
|
||||
}
|
||||
|
||||
fn tick(dt) {
|
||||
@@ -73,8 +74,8 @@ fn bump(id) {
|
||||
]);
|
||||
}
|
||||
fn eat() {
|
||||
log("You ate the muffin. Delicious.");
|
||||
say("Mmm!");
|
||||
say("Yeah it was poisoned.");
|
||||
alter_health(-2);
|
||||
}
|
||||
fn ignore() {
|
||||
log("You walk away from the muffin. Wise.");
|
||||
|
||||
Reference in New Issue
Block a user