diff --git a/public/img/avatar/dead.png b/public/img/BrowserQuest/habitrpg_mods/armor0.png similarity index 60% rename from public/img/avatar/dead.png rename to public/img/BrowserQuest/habitrpg_mods/armor0.png index 4a5e41621e..1840cafffa 100644 Binary files a/public/img/avatar/dead.png and b/public/img/BrowserQuest/habitrpg_mods/armor0.png differ diff --git a/public/img/avatar/1.png b/public/img/BrowserQuest/habitrpg_mods/armor1.png similarity index 56% rename from public/img/avatar/1.png rename to public/img/BrowserQuest/habitrpg_mods/armor1.png index 512e173f10..bf8287a17b 100644 Binary files a/public/img/avatar/1.png and b/public/img/BrowserQuest/habitrpg_mods/armor1.png differ diff --git a/public/img/BrowserQuest/habitrpg_mods/armor2.png b/public/img/BrowserQuest/habitrpg_mods/armor2.png new file mode 100644 index 0000000000..1e0bbc0483 Binary files /dev/null and b/public/img/BrowserQuest/habitrpg_mods/armor2.png differ diff --git a/public/img/avatar/8.png b/public/img/BrowserQuest/habitrpg_mods/armor3.png similarity index 55% rename from public/img/avatar/8.png rename to public/img/BrowserQuest/habitrpg_mods/armor3.png index 9a6d645402..325be1e4e6 100644 Binary files a/public/img/avatar/8.png and b/public/img/BrowserQuest/habitrpg_mods/armor3.png differ diff --git a/public/img/avatar/2.png b/public/img/BrowserQuest/habitrpg_mods/armor4.png similarity index 54% rename from public/img/avatar/2.png rename to public/img/BrowserQuest/habitrpg_mods/armor4.png index d1017c137c..de3f698563 100644 Binary files a/public/img/avatar/2.png and b/public/img/BrowserQuest/habitrpg_mods/armor4.png differ diff --git a/public/img/BrowserQuest/habitrpg_mods/armor5.png b/public/img/BrowserQuest/habitrpg_mods/armor5.png new file mode 100644 index 0000000000..6dcb9e3f7d Binary files /dev/null and b/public/img/BrowserQuest/habitrpg_mods/armor5.png differ diff --git a/public/img/BrowserQuest/habitrpg_mods/favicon.png b/public/img/BrowserQuest/habitrpg_mods/favicon.png new file mode 100644 index 0000000000..a1783aac99 Binary files /dev/null and b/public/img/BrowserQuest/habitrpg_mods/favicon.png differ diff --git a/public/img/BrowserQuest/habitrpg_mods/weapon0.png b/public/img/BrowserQuest/habitrpg_mods/weapon0.png new file mode 100644 index 0000000000..f4c30d7e05 Binary files /dev/null and b/public/img/BrowserQuest/habitrpg_mods/weapon0.png differ diff --git a/public/img/BrowserQuest/habitrpg_mods/weapon1.png b/public/img/BrowserQuest/habitrpg_mods/weapon1.png new file mode 100644 index 0000000000..4ce8fb9407 Binary files /dev/null and b/public/img/BrowserQuest/habitrpg_mods/weapon1.png differ diff --git a/public/img/BrowserQuest/habitrpg_mods/weapon2.png b/public/img/BrowserQuest/habitrpg_mods/weapon2.png new file mode 100644 index 0000000000..823bad1c17 Binary files /dev/null and b/public/img/BrowserQuest/habitrpg_mods/weapon2.png differ diff --git a/public/img/BrowserQuest/habitrpg_mods/weapon3.png b/public/img/BrowserQuest/habitrpg_mods/weapon3.png new file mode 100644 index 0000000000..7151d9a5d3 Binary files /dev/null and b/public/img/BrowserQuest/habitrpg_mods/weapon3.png differ diff --git a/public/img/BrowserQuest/habitrpg_mods/weapon4.png b/public/img/BrowserQuest/habitrpg_mods/weapon4.png new file mode 100644 index 0000000000..4c3f6e3996 Binary files /dev/null and b/public/img/BrowserQuest/habitrpg_mods/weapon4.png differ diff --git a/public/img/BrowserQuest/habitrpg_mods/weapon5.png b/public/img/BrowserQuest/habitrpg_mods/weapon5.png new file mode 100644 index 0000000000..1fe8eb0e11 Binary files /dev/null and b/public/img/BrowserQuest/habitrpg_mods/weapon5.png differ diff --git a/public/img/BrowserQuest/habitrpg_mods/weapon6.png b/public/img/BrowserQuest/habitrpg_mods/weapon6.png new file mode 100644 index 0000000000..ad2f524fab Binary files /dev/null and b/public/img/BrowserQuest/habitrpg_mods/weapon6.png differ diff --git a/public/img/avatar/3.png b/public/img/avatar/3.png deleted file mode 100644 index d72e359cba..0000000000 Binary files a/public/img/avatar/3.png and /dev/null differ diff --git a/public/img/avatar/4.png b/public/img/avatar/4.png deleted file mode 100644 index 66b0200ce0..0000000000 Binary files a/public/img/avatar/4.png and /dev/null differ diff --git a/public/img/avatar/5.png b/public/img/avatar/5.png deleted file mode 100644 index 2afe04cfad..0000000000 Binary files a/public/img/avatar/5.png and /dev/null differ diff --git a/public/img/avatar/6.png b/public/img/avatar/6.png deleted file mode 100644 index 86c2204463..0000000000 Binary files a/public/img/avatar/6.png and /dev/null differ diff --git a/public/img/avatar/7.png b/public/img/avatar/7.png deleted file mode 100644 index 90e780e35a..0000000000 Binary files a/public/img/avatar/7.png and /dev/null differ diff --git a/public/img/avatar/9.png b/public/img/avatar/9.png deleted file mode 100644 index 126ca47a2d..0000000000 Binary files a/public/img/avatar/9.png and /dev/null differ diff --git a/src/app/content.coffee b/src/app/content.coffee index 863fee9550..fddd838f4b 100644 --- a/src/app/content.coffee +++ b/src/app/content.coffee @@ -118,12 +118,13 @@ module.exports = { unlockedMessage: title: "Item Store Unlocked" content: "Congradulations, you have unlocked the Item Store! You can now buy weapons, armor, potions, etc. Read each item's comment for more information." + #TODO: figure out how to calculate index & type without having to store it in the JSON weapon: [ {type: 'weapon', index: 0, text: "Sword 1", icon: "item-sword1", notes:'', value:0} {type: 'weapon', index: 1, text: "Sword 2", icon:'item-sword2', notes:'', value:100} - {type: 'weapon', index: 2, text: "Blue Sword", icon:'item-bluesword', notes:'', value:200} - {type: 'weapon', index: 3, text: "Axe", icon:'item-axe', notes:'', value:300} - {type: 'weapon', index: 4, text: "Morningstar", icon:'item-morningstar', notes:'', value:400} + {type: 'weapon', index: 2, text: "Axe", icon:'item-axe', notes:'', value:200} + {type: 'weapon', index: 3, text: "Morningstar", icon:'item-morningstar', notes:'', value:300} + {type: 'weapon', index: 4, text: "Blue Sword", icon:'item-bluesword', notes:'', value:400} {type: 'weapon', index: 5, text: "Red Sword", icon:'item-redsword', notes:'', value:500} {type: 'weapon', index: 6, text: "Gold Sword", icon:'item-goldsword', notes:'', value:600} ] @@ -131,9 +132,9 @@ module.exports = { {type: 'armor', index: 0, text: "Cloth Armor", icon: 'item-clotharmor', notes:'', value:0} {type: 'armor', index: 1, text: "Leather Armor", icon: 'item-leatherarmor', notes:'', value:100} {type: 'armor', index: 2, text: "Chain Mail", icon: 'item-mailarmor', notes:'', value:200} - {type: 'armor', index: 3, text: "Plate Mail", icon: 'item-platearmor', notes:'', value:200} - {type: 'armor', index: 4, text: "Red Armor", icon: 'item-redarmor', notes:'', value:200} - {type: 'armor', index: 5, text: "Golden Armor", icon: 'item-goldenarmor', notes:'', value:200} + {type: 'armor', index: 3, text: "Plate Mail", icon: 'item-platearmor', notes:'', value:300} + {type: 'armor', index: 4, text: "Red Armor", icon: 'item-redarmor', notes:'', value:400} + {type: 'armor', index: 5, text: "Golden Armor", icon: 'item-goldenarmor', notes:'', value:500} ] potion: {type: 'potion', text: "Potion", notes: "Recover 15 HP", value: 100, icon: 'item-flask'} reroll: {type: 'reroll', text: "Re-Roll", icon: 'chest', notes: "Reset your task values to 0. Do this only if you're floundering."} diff --git a/src/app/index.coffee b/src/app/index.coffee index 64583d6977..c1d87ee656 100644 --- a/src/app/index.coffee +++ b/src/app/index.coffee @@ -65,12 +65,12 @@ getRoom = (page, model, userId) -> # Default Items & Stats user.setNull 'stats', { money: 0, exp: 0, lvl: 1, hp: 50 } user.setNull 'items', { itemsEnabled: false, armor: 0, weapon: 0 } - model.set '_items', [ - content.items.armor[user.get('items.armor')+1] - content.items.weapon[user.get('items.weapon')+1] - content.items.potion - content.items.reroll - ] + model.set '_items', [] + model.push '_items', content.items.armor[user.get('items.armor')+1] if content.items.armor[user.get('items.armor')+1] + model.push '_items', content.items.armor[user.get('items.weapon')+1] if content.items.weapon[user.get('items.weapon')+1] + model.push '_items', content.items.potion + model.push '_items', content.items.reroll + # http://tibia.wikia.com/wiki/Formula model.fn '_tnl', '_user.stats.lvl', (lvl) -> 50 * Math.pow(lvl, 2) - 150 * lvl + 200 @@ -96,8 +96,11 @@ ready (model) -> if stats.hp? # game over if stats.hp < 0 - user.set 'stats', { hp: 50, lvl: 1, exp: 0, money: 0 } - user.set 'items', { weapon: 1, armor: 1 } + user.set 'stats.hp', 50 + user.set 'stats.lvl', 1 + user.set 'stats.exp', 0 + user.set 'stats.money', 0 + user.set 'items', { weapon: 0, armor: 0 } else user.set 'stats.hp', stats.hp diff --git a/styles/app/index.styl b/styles/app/index.styl index 1f51db295f..dca5ab378b 100644 --- a/styles/app/index.styl +++ b/styles/app/index.styl @@ -88,12 +88,25 @@ li:hover .task-meta-controls .hover-show background-color: #DEE5F2 #character - img - width: 60px td#avatar vertical-align: top text-align: center + + .avatar-sprites + position: relative + + .weapon + position: absolute + z-index: 200 + left: -13px + bottom: 7px + .weapon-0 + left: -7px + .weapon-5 + left: -16px + .weapon-6 + left:-20px td#bars padding: 10px 0 0 10px @@ -118,8 +131,6 @@ footer.footer .item-store-popover img float:left padding-right:7px; - - .item .task-text img max-height: 16px diff --git a/views/app/index.html b/views/app/index.html index 14453dc3cd..1540fbdd4d 100644 --- a/views/app/index.html +++ b/views/app/index.html @@ -11,7 +11,10 @@
|
- +
+
+
+ Lvl: {_user.stats.lvl}
|