Skip to content
Discussion options

You must be logged in to vote

You were very close with your original code! I think you could get it working just by moving everything you have on the lichen_timer object to the player object, maybe tweaking some values. You mentioned the RPG library, so here's an answer using that system, for variety.

// data.js
"use strict"

createItem("me", RPG_PLAYER(), {
  loc: "glowing_cave",
  synonyms: ['me', 'myself'],
  examine: "Just a regular guy.",
  health:100,
  lightSource: function () {
    return rpg.hasEffect(player, "Foxfire") ? world.LIGHT_FULL : world.LIGHT_NONE;
  },
})

createRoom("glowing_cave", {
  desc: "A textbook example of bioluminescence.",
  east: new Exit("dark_cave"),
})

createRoom("dark_cave", {
  de…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@GhostOfMoria
Comment options

@cellarderecho
Comment options

Answer selected by GhostOfMoria
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants