Skip to content

Commit

Permalink
added armor and sword enchant functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Zertuk committed Jun 21, 2014
1 parent a809475 commit 4fc1936
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
23 changes: 11 additions & 12 deletions locations.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function spaceShipCheck() {
}
}

function noDemon() {
player.demonVisit = true;
}

function flipperCheck() {
if (inventoryObject.flippers) {
$('#flipper_on').show();
Expand Down Expand Up @@ -314,23 +318,18 @@ function enterDemon() {
}
}

var swordEnchantVal = 0;
var armorEnchantVal = 0;

function wizardEnchant() {
var buttonValue = $(this).attr('value');
switch (buttonValue) {
case 'damage':

break;

case 'heal':

break;

case 'loot':

case 'sword':
swordEnchantVal = swordEnchantVal + 0.1;
break;

case 'armor':

case 'armor':
armorEnchantVal = armorEnchantVal + 0.1;
break;
}
}
Expand Down
7 changes: 5 additions & 2 deletions store.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,12 @@ var inventoryObject = {
}

var player = {
damage: swordObject.fists.damage,
reduction: inventoryObject.armor.reduction,
damage: swordObject.fists.damage + this.swordEnchant,
reduction: inventoryObject.armor.reduction + this.armorEnchant,
armorEnchant: this.reduction * armorEnchantVal,
swordEnchant: this.damage * swordEnchantVal,
power: 1,
demonVisit: false,
swordHP: false,
health: 10000.00,
maxHealth: 10000,
Expand Down

0 comments on commit 4fc1936

Please sign in to comment.