<commit_before>function Player() {
    this.strength = statRoll();
    this.dexterity = statRoll();
    this.mind = statRoll();
    this.init(arguments);
}
Mextend(Player, {
    player: true,
    name: '<sV|Bvs>(.exe)',
    experience: 0
});

Player.prototype.act = function(callback) {
    controls.act();
};

Player.prototype.addExperience = function(exp) {
    this.experience += exp;
    unimportant('You gain %d experience.', exp);
    while (this.experience > this.nextLevel()) {
        this.levelUp();
    }
};

/**
 * Level up the player.
 */
Player.prototype.levelUp = function() {
    this.experience -= this.nextLevel();
    this.level += 1;
    var hproll = d6();
    this.maxhp += hproll;
    this.hp = this.maxhp;
    var mproll = d6();
    this.maxmp += mproll;
    this.mp += mproll;
    if ((this.level % 3) === 0) this.strength++; // XXX
    important("You have reached level %d!", this.level);
};

Player.prototype.nextLevel = function() {
    return Math.ceil(Math.pow(this.level + 5, 2.5));
};<commit_msg>Not levels, versions!<commit_after>function Player() {
    this.strength = statRoll();
    this.dexterity = statRoll();
    this.mind = statRoll();
    this.init(arguments);
}
Mextend(Player, {
    player: true,
    name: '<sV|Bvs>(.exe)',
    experience: 0
});

Player.prototype.act = function(callback) {
    controls.act();
};

Player.prototype.addExperience = function(exp) {
    this.experience += exp;
    unimportant('You gain %d experience.', exp);
    while (this.experience > this.nextLevel()) {
        this.levelUp();
    }
};

/**
 * Level up the player.
 */
Player.prototype.levelUp = function() {
    this.experience -= this.nextLevel();
    this.level += 1;
    var hproll = d6();
    this.maxhp += hproll;
    this.hp = this.maxhp;
    var mproll = d6();
    this.maxmp += mproll;
    this.mp += mproll;
    if ((this.level % 3) === 0) this.strength++; // XXX
    important("You are now at version %d.0!", this.level);
};

Player.prototype.nextLevel = function() {
    return Math.ceil(Math.pow(this.level + 5, 2.5));
};
{'fraction_non_alphanumeric': 0.17877906976744187, 'fraction_numerical': 0.009205426356589148, 'mean_word_length': 2.978805394990366, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2826953', 'n_tokens_mistral': 722, 'n_tokens_neox': 697, 'n_words': 151}