Skip to content

Instantly share code, notes, and snippets.

@whiskers75
Created January 3, 2014 13:05
Show Gist options
  • Save whiskers75/8237579 to your computer and use it in GitHub Desktop.
Save whiskers75/8237579 to your computer and use it in GitHub Desktop.
Villager = require('./villager.js')
util = require('util')
Seer = (Wolfgame) ->
this.toString = () -> return 'seer'
this.acted = false
this.canAct = true
this.description = 'You can see one person per night, and reveal their role.'
this.act = (player) ->
if Wolfgame.autocomplete(player)
player = Wolfgame.autocomplete(player)
Wolfgame.pm(this.name, Wolfgame.c.green('You have a vision; in this vision you see that ') + Wolfgame.c.bold.green(player) + Wolfgame.c.green(' is a ') + Wolfgame.c.bold.green((Wolfgame.players[player].toString() == 'cursed villager' ? 'wolf' : Wolfgame.players[player].toString())) + Wolfgame.c.green('!'))
this.acted = true
return this
util.inherits(Seer, Villager)
module.exports = Seer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment