Skip to content
Snippets Groups Projects
Forked from pregmodfan / fc-pregmod
28880 commits behind the upstream repository.
modification.js 779 B
App.Medicine.Modification = {};
/**
 * Basic application of scar
 * @param {App.Entity.SlaveState} slave
 * @param {string} scar
 *  @param {string} design
 */
App.Medicine.Modification.addScar = function(slave, scar, design) {
	/* const V = State.variables;
	V.scarApplied = 1;
	V.degradation += 10;
	slave.health -= 10; //dangerous to uncomment this as sometimes many scars are applied at once.
	cashX(forceNeg(surgery.costs), "slaveSurgery", slave);
	slave.health -= (V.PC.medicine >= 100) ? Math.round(surgery.healthCosts / 2) : surgery.healthCosts;*/
	if (!slave.scar.hasOwnProperty(scar)) {
		slave.scar[scar] = new App.Entity.scarState();
	}
	if (!slave.scar[scar].hasOwnProperty(design)) {
		slave.scar[scar][design] = 1;
	} else {
		slave.scar[scar][design] += 1;
	}
};