<commit_before>var ArmyMorale = require('../core/armymorale.js');
var log = require('../core/log.js');

module.exports = {
	nationalities: function(battle) {
    	return ['British', 'American'];
    },
    noninitiative: function(nationality) {
    	if (nationality == 'British') {
	    	return 'American';
        }
    	return 'British';
    },
	calc: function(battle, current, britdie, britmomentum, amerdie, amermomentum) {
        var britInitMod = ArmyMorale.initiativeModifier(battle.moraleLevels, current.britishMorale);
        var amerInitMod = ArmyMorale.initiativeModifier(battle.moraleLevels, current.americanMorale);
        
        var britdrm = britInitMod + (2 * britmomentum);
        var amerdrm = amerInitMod + (2 * amermomentum);
		var result = (britdie + britdrm)  - (amerdie + amerdrm);
        
		// initiative
		if (result > 0) {
        	return "British";
		}            
		else if (result < 0) {
        	return "American";
        }
        return "Tie: Re-roll";
    }
};<commit_msg>initiative list must include ties<commit_after>var ArmyMorale = require('../core/armymorale.js');
var log = require('../core/log.js');

module.exports = {
	nationalities: function(battle) {
    	return ['British', 'American', 'Tie: Re-roll'];
    },
    noninitiative: function(nationality) {
    	if (nationality == 'British') {
	    	return 'American';
        }
    	return 'British';
    },
	calc: function(battle, current, britdie, britmomentum, amerdie, amermomentum) {
        var britInitMod = ArmyMorale.initiativeModifier(battle.moraleLevels, current.britishMorale);
        var amerInitMod = ArmyMorale.initiativeModifier(battle.moraleLevels, current.americanMorale);
        
        var britdrm = britInitMod + (2 * britmomentum);
        var amerdrm = amerInitMod + (2 * amermomentum);
		var result = (britdie + britdrm)  - (amerdie + amerdrm);
        
		// initiative
		if (result > 0) {
        	return "British";
		}            
		else if (result < 0) {
        	return "American";
        }
        return "Tie: Re-roll";
    }
};
{'fraction_non_alphanumeric': 0.13239573229873908, 'fraction_numerical': 0.0038797284190106693, 'mean_word_length': 2.697132616487455, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4581056', 'n_tokens_mistral': 710, 'n_tokens_neox': 681, 'n_words': 140}