This repository has been archived by the owner on Dec 7, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create new tower and the first stage
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{Sense} = require('./sense') | ||
{_} = require('underscore') | ||
|
||
class DirectionOfStairs extends Sense | ||
description: -> | ||
"Returns the direction ('left', 'right', 'forward', 'backward') the stairs are from your location." | ||
|
||
perform: -> | ||
@unit.position.relativeDirectionOfStairs() | ||
|
||
root = exports ? window | ||
root.DirectionOfStairs = DirectionOfStairs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# ------ | ||
# | | | ||
# |@ | | ||
# | | | ||
# | > | | ||
# ------ | ||
|
||
exports.level = -> | ||
|
||
@description "Silence. The room feels large, but empty. Luckily you have a map of this tower to help find the stairs." | ||
@tip "Use warrior.direction_of_stairs() to determine which direction stairs are located. Pass this to warrior.walk() to walk in that direction." | ||
|
||
@time_bonus 20 | ||
@ace_score 19 | ||
@size 6, 4 | ||
@stairs 2, 3 | ||
|
||
@warrior 0, 1, 'east', -> | ||
@add_abilities 'walk', 'feel', 'direction_of_stairs' |