Skip to content
Snippets Groups Projects
Commit 4a665bd3 authored by lowercasedonkey's avatar lowercasedonkey
Browse files

Allow nasty scars to be applied quickly

parent a15e390b
No related branches found
No related tags found
No related merge requests found
......@@ -5,19 +5,22 @@ App.Medicine.Modification = {};
* @param {string} scar
* @param {string} design
*/
App.Medicine.Modification.addScar = function(slave, scar, design) {
App.Medicine.Modification.addScar = function(slave, scar, design, weight) {
/* 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 (!weight) {
weight = 1;
}
if (!slave.scar.hasOwnProperty(scar)) {
slave.scar[scar] = new App.Entity.scarState();
}
if (!slave.scar[scar].hasOwnProperty(design)) {
slave.scar[scar][design] = 1;
slave.scar[scar][design] = weight;
} else {
slave.scar[scar][design] += 1;
slave.scar[scar][design] += weight;
}
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment