<commit_before>import {Game} from "../../core/models/game";
import {Monster} from "../../core/models/monster";
import {light_trollsfire, put_out_trollsfire} from "./event-handlers";

export var custom_commands = [];

custom_commands.push({
  name: "trollsfire",
  verbs: ["trollsfire"],
  run: function(verb: string, arg: string): void {
    let game = Game.getInstance();
    let trollsfire = game.artifacts.get(10);

    if (game.player.hasArtifact(trollsfire.id)) {
      if (!trollsfire.is_lit) {
        game.effects.print(4, "success");
        if (game.player.weapon_id === trollsfire.id) {
          // player has trollsfire ready. increase its stats.
          light_trollsfire();
        } else {
          // turned on when carrying but not ready. Ouch.
          game.effects.print(5, "warning");
          game.player.injure(game.diceRoll(1, 5), true);
        }
      } else {
        game.effects.print(6, "success");
        put_out_trollsfire();
      }
    } else {
      game.history.write("Nothing happens.");
    }

  },
});<commit_msg>Curse of the Hellsblade: remove extraneous extra command<commit_after>import {Game} from "../../core/models/game";
import {Monster} from "../../core/models/monster";

export var custom_commands = [];
{'fraction_non_alphanumeric': 0.1592356687898089, 'fraction_numerical': 0.005573248407643312, 'mean_word_length': 2.774774774774775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4039163', 'n_tokens_mistral': 411, 'n_tokens_neox': 403, 'n_words': 89}