Merge pull request #30 from Zarkonnen/medicine

Medicine
This commit is contained in:
Michael Townsend
2013-07-10 12:07:05 -07:00
9 changed files with 1045 additions and 59 deletions
+7 -2
View File
@@ -32,7 +32,8 @@ var World = {
FIGHT_CHANCE: 0.20,
BASE_HEALTH: 10,
BASE_HIT_CHANCE: 0.8,
MEAT_HEAL: 10,
MEAT_HEAL: 8,
MEDS_HEAL: 20,
FIGHT_DELAY: 3, // At least three moves between fights
NORTH: [ 0, -1],
SOUTH: [ 0, 1],
@@ -489,6 +490,10 @@ var World = {
return World.MEAT_HEAL * (Engine.hasPerk('gastronome') ? 2 : 1);
},
medsHeal: function() {
return World.MEDS_HEAL;
},
checkFight: function() {
World.fightMove = typeof World.fightMove == 'number' ? World.fightMove : 0;
World.fightMove++;
@@ -855,7 +860,7 @@ var World = {
},
leaveItAtHome: function(thing) {
return thing != 'cured meat' && thing != 'bullets' && thing != 'energy cell' && thing != 'charm'
return thing != 'cured meat' && thing != 'bullets' && thing != 'energy cell' && thing != 'charm' && thing != 'medicine'
&& typeof World.Weapons[thing] == 'undefined' && typeof Room.Craftables[thing] == 'undefined';
},