<commit_before>var MersenneTwister = require("./MersenneTwister");
var Actives = require("./Actives");
var Effect = require("./Effect");
var ui = require("./uiutil");
function Game(first, seed){
	this.rng = new MersenneTwister(seed);
	this.phase = MulliganPhase1;
	this.ply = 0;
	this.player1 = new Player(this);
	this.player2 = new Player(this);
	this.player1.foe = this.player2;
	this.player2.foe = this.player1;
	this.players = [this.player1, this.player2];
	this.turn = first?this.player1:this.player2;
	this.expectedDamage = [0, 0];
	this.startTime = Date.now();
}
var statuscache = {};
function Card(type, info){
	this.type = type;
	this.element = parseInt(info.Element);
	this.name = info.Name;
	this.code = info.Code;
	if (parseInt(this.code, 32)>6999){
		this.upped = true;
	}
	if (info.Attack){
		this.attack = parseInt(info.Attack);
	}
	if (info.Health){
		this.health = parseInt(info.Health);
	}
	this.readCost("cost", info.Cost||"0");
	if (info.Active){
		if (this.type == SpellEnum){
			this.active = Actives[info.Active];
		}else{
			this.active = {};
			var actives = info.Active.split("+");
			for(var i=0; i<actives.length; i++){
				if (actives[i] == ""){
					continue;
				}
				var active = actives[i].split("=");
				if (active.length == 1){
					this.active.auto = Actives[active[0]];
				}else{
					this.active[this.readCost("cast", active[0])?"cast":active[0]] = Actives[active[1]];
				}
			}
		}
	}
	if (info.Status){
		if (info.Status in statuscache){
			this.status = statuscache[info.Status];
		}else{
			this.status = {};
			var statuses = info.Status.split("+");
			for(var i=0; i<statuses.length; i++){
				var status = statuses[i].split("=");
				this.status[status[0]] = status.length==1 || parseInt(status[1]);
			}
		}
	}
	if (info.Text){
		this.text = info.Text;
	}
	if (info.Rarity){
		this.rarity = parseInt(info.Rarity);
	}
}
function Thing(card, owner){
	this.owner = owner;
	this.card = card;
	this.usedactive = true;
	if (this.status){<commit_msg>How I fail to add something to a cache that I declare while still managing to breathe I don't know<commit_after>var MersenneTwister = require("./MersenneTwister");
var Actives = require("./Actives");
var Effect = require("./Effect");
var ui = require("./uiutil");
function Game(first, seed){
	this.rng = new MersenneTwister(seed);
	this.phase = MulliganPhase1;
	this.ply = 0;
	this.player1 = new Player(this);
	this.player2 = new Player(this);
	this.player1.foe = this.player2;
	this.player2.foe = this.player1;
	this.players = [this.player1, this.player2];
	this.turn = first?this.player1:this.player2;
	this.expectedDamage = [0, 0];
	this.startTime = Date.now();
}
var statuscache = {};
function Card(type, info){
	this.type = type;
	this.element = parseInt(info.Element);
	this.name = info.Name;
	this.code = info.Code;
	if (parseInt(this.code, 32)>6999){
		this.upped = true;
	}
	if (info.Attack){
		this.attack = parseInt(info.Attack);
	}
	if (info.Health){
		this.health = parseInt(info.Health);
	}
	this.readCost("cost", info.Cost||"0");
	if (info.Active){
		if (this.type == SpellEnum){
			this.active = Actives[info.Active];
		}else{
			this.active = {};
			var actives = info.Active.split("+");
			for(var i=0; i<actives.length; i++){
				if (actives[i] == ""){
					continue;
				}
				var active = actives[i].split("=");
				if (active.length == 1){
					this.active.auto = Actives[active[0]];
				}else{
					this.active[this.readCost("cast", active[0])?"cast":active[0]] = Actives[active[1]];
				}
			}
		}
	}
	if (info.Status){
		if (info.Status in statuscache){
			this.status = statuscache[info.Status];
		}else{
			statuscache[info.Status] = this.status = {};
			var statuses = info.Status.split("+");
			for(var i=0; i<statuses.length; i++){
				var status = statuses[i].split("=");
				this.status[status[0]] = status.length==1 || parseInt(status[1]);
			}
		}
	}
	if (info.Text){
		this.text = info.Text;
	}
	if (info.Rarity){
		this.rarity = parseInt(info.Rarity);
	}
}
function Thing(card, owner){
	this.owner = owner;
	this.card = card;
	this.usedactive = true;
	if (this.status){
{'fraction_non_alphanumeric': 0.18765251342118106, 'fraction_numerical': 0.015129331381161543, 'mean_word_length': 3.7829638273045507, 'pattern_counts': {'":': 2, '<': 7, '<?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': '5942571', 'n_tokens_mistral': 1694, 'n_tokens_neox': 1548, 'n_words': 305}