<commit_before>package com.wolviegames.exodus.barter

import com.wolviegames.exodus.equipment.EquipmentCategory
import groovy.transform.Canonical

@Canonical
class Merchant {
    String name
    String location
    int barterSkill
    List<EquipmentCategory> equipmentCategories
    Map<String, Integer> barterResults = new HashMap<String, Integer>()

    void performBarterRoll(String pcName, int pcBarterResult){
        // TODO create a dice roller
        int barterRollResult = (int)(Math.random() * 20) + 1 + barterSkill
        barterResults.put(pcName,barterRollResult)
    }

    int getBarterSkillResult(String pcName){
        return barterResults.get(pcName)
    }
}
<commit_msg>Added barter skill to merchant result<commit_after>package com.wolviegames.exodus.barter

import com.wolviegames.exodus.equipment.EquipmentCategory
import groovy.transform.Canonical

@Canonical
class Merchant {
    String name
    String location
    int barterSkill
    List<EquipmentCategory> equipmentCategories
    Map<String, Integer> barterResults = new HashMap<String, Integer>()

    // Performs a barter roll result
    // Positive represents merchant win
    // TODO translate this to a %discount
    void performBarterRoll(String pcName, int pcBarterResult){
        // TODO create a dice roller
        int barterRollResult = (int)(Math.random() * 20) + 1 + barterSkill
        barterResults.put(pcName,barterRollResult - pcBarterResult)
    }

    int getBarterSkillResult(String pcName){
        return barterResults.get(pcName)
    }
}

{'fraction_non_alphanumeric': 0.07652399481193256, 'fraction_numerical': 0.0038910505836575876, 'mean_word_length': 3.7186544342507646, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6646042', 'n_tokens_mistral': 477, 'n_tokens_neox': 453, 'n_words': 111}