Commit f6c2b69c authored by Renato Alves's avatar Renato Alves 🌱
Browse files

Add Overdose achievement

parent d3ab36e6
......@@ -27,27 +27,29 @@
.achievement18 .coin {background-position:-648px -822px;}
.achievement19 .coin {background-position:-720px -822px;}
.achievement20 .coin {background-position:-792px -822px;}
.achievement21 .coin {background-position:-864px -822px;}
#achievements-wrapper {height:387px;width:1116px;margin:60px 0 30px 60px;}
#achievements ul {float:left;margin-left:60px;}
#achievements nav {height:66px;width:202px;margin:0 auto;}
#previous, #next {height:66px;width:102px;display:inline-block;}
.page1 #previous, .upscaled .page1 #previous {background-position:0px -846px;}
.page5 #next, .upscaled .page5 #next {background-position:-99px -846px;}
.page6 #next, .upscaled .page6 #next {background-position:-99px -846px;}
#previous, .upscaled #previous {background-position:-201px -846px;}
#previous:active, .upscaled #previous:active {background-position:-402px -846px;}
#next, .upscaled #next {margin-left:-15px;background-position:-300px -846px;}
#next:active, .upscaled #next:active {background-position:-501px -846px;}
.page1 #previous:hover, .page1 #previous:active {background-position:0px -846px;}
.page5 #next:hover, .page5 #next:active {background-position:-99px -846px}
.page6 #next:hover, .page6 #next:active {background-position:-99px -846px}
#lists {width:6000px;}
#lists {width:7200px;} /* Increase this if more pages are added */
#achievements.page1 #lists {left:0;}
#achievements.page2 #lists {left:-1176px;}
#achievements.page3 #lists {left:-2352px;}
#achievements.page4 #lists {left:-3528px;}
#achievements.page5 #lists {left:-4704px;}
#achievements.page6 #lists {left:-5880px;}
#achievements-count {margin:18px 72px 0 0;}
......@@ -93,27 +95,29 @@
.achievement18 .coin {background-position:-432px -548px;}
.achievement19 .coin {background-position:-480px -548px;}
.achievement20 .coin {background-position:-528px -548px;}
.achievement21 .coin {background-position:-576px -548px;}
#achievements-wrapper {height:258px;width:744px;margin:40px 0 20px 40px;}
#achievements ul {float:left;margin-left:40px;}
#achievements nav {height:44px;width:134px;margin:0 auto;}
#previous, #next {height:44px;width:68px;display:inline-block;}
.page1 #previous, .upscaled .page1 #previous {background-position:0px -564px;}
.page5 #next, .upscaled .page5 #next {background-position:-66px -564px;}
.page6 #next, .upscaled .page6 #next {background-position:-66px -564px;}
#previous, .upscaled #previous {background-position:-134px -564px;}
#previous:active, .upscaled #previous:active {background-position:-268px -564px;}
#next, .upscaled #next {margin-left:-10px;background-position:-200px -564px;}
#next:active, .upscaled #next:active {background-position:-334px -564px;}
.page1 #previous:hover, .page1 #previous:active {background-position:0px -564px;}
.page5 #next:hover, .page5 #next:active {background-position:-66px -564px}
.page6 #next:hover, .page6 #next:active {background-position:-66px -564px}
#lists {width:4000px;}
#lists {width:4800px;} /* Increase this if more pages are added */
#achievements.page1 #lists {left:0;}
#achievements.page2 #lists {left:-784px;}
#achievements.page3 #lists {left:-1568px;}
#achievements.page4 #lists {left:-2352px;}
#achievements.page5 #lists {left:-3136px;}
#achievements.page6 #lists {left:-3920px;}
#achievements-count {margin:12px 48px 0 0;}
......@@ -159,27 +163,29 @@
.achievement18 .coin {background-position:-432px -548px;}
.achievement19 .coin {background-position:-480px -548px;}
.achievement20 .coin {background-position:-528px -548px;}
.achievement21 .coin {background-position:-576px -548px;}
#achievements-wrapper {height:258px;width:744px;margin:40px 0 20px 40px;}
#achievements ul {float:left;margin-left:40px;}
#achievements nav {height:44px;width:135px;margin:0 auto;}
#previous, #next {height:44px;width:68px;display:inline-block;}
.page1 #previous, .upscaled .page1 #previous {background-position:0px -564px;}
.page5 #next, .upscaled .page5 #next {background-position:-66px -564px;}
.page6 #next, .upscaled .page6 #next {background-position:-66px -564px;}
#previous, .upscaled #previous {background-position:-134px -564px;}
#previous:active, .upscaled #previous:active {background-position:-268px -564px;}
#next, .upscaled #next {margin-left:-10px;background-position:-200px -564px;}
#next:active, .upscaled #next:active {background-position:-334px -564px;}
.page1 #previous:hover, .page1 #previous:active {background-position:0px -564px;}
.page5 #next:hover, .page5 #next:active {background-position:-66px -564px}
.page6 #next:hover, .page6 #next:active {background-position:-66px -564px}
#lists {width:4000px;}
#lists {width:4800px;} /* Increase this if more pages are added */
#achievements.page1 #lists {left:0;}
#achievements.page2 #lists {left:-784px;}
#achievements.page3 #lists {left:-1568px;}
#achievements.page4 #lists {left:-2352px;}
#achievements.page5 #lists {left:-3136px;}
#achievements.page6 #lists {left:-3920px;}
#achievements-count {margin:12px 48px 0 0;}
......@@ -225,27 +231,29 @@
.achievement18 .coin {background-position:-216px -274px;}
.achievement19 .coin {background-position:-240px -274px;}
.achievement20 .coin {background-position:-264px -274px;}
.achievement21 .coin {background-position:-288px -274px;}
#achievements-wrapper {height:129px;width:372px;margin:20px 0 10px 20px;}
#achievements ul {float:left;margin-left:20px;}
#achievements nav {height:22px;width:68px;margin:0 auto;}
#previous, #next {height:22px;width:34px;display:inline-block;}
.page1 #previous, .upscaled .page1 #previous {background-position:0px -282px;}
.page5 #next, .upscaled .page5 #next {background-position:-33px -282px;}
.page6 #next, .upscaled .page6 #next {background-position:-33px -282px;}
#previous, .upscaled #previous {background-position:-67px -282px;}
#previous:active, .upscaled #previous:active {background-position:-134px -282px;}
#next, .upscaled #next {margin-left:-5px;background-position:-100px -282px;}
#next:active, .upscaled #next:active {background-position:-167px -282px;}
.page1 #previous:hover, .page1 #previous:active {background-position:0px -282px;}
.page5 #next:hover, .page5 #next:active {background-position:-33px -282px}
.page6 #next:hover, .page6 #next:active {background-position:-33px -282px}
#lists {width:2000px;-moz-transition:none;-webkit-transition:none;-o-transition:none;-ms-transition:none;transition:none;}
#lists {width:2500px;-moz-transition:none;-webkit-transition:none;-o-transition:none;-ms-transition:none;transition:none;}
#achievements.page1 #lists {left:0;}
#achievements.page2 #lists {left:-392px;}
#achievements.page3 #lists {left:-784px;}
#achievements.page4 #lists {left:-1176px;}
#achievements.page5 #lists {left:-1568px;}
#achievements.page6 #lists {left:-1960px;}
#achievements-count {margin:6px 24px 0 0;}
......@@ -291,25 +299,27 @@
#achievement-notification.achievement18 .coin {background-position:-432px -548px;}
#achievement-notification.achievement19 .coin {background-position:-480px -548px;}
#achievement-notification.achievement20 .coin {background-position:-528px -548px;}
#achievement-notification.achievement21 .coin {background-position:-576px -548px;}
#achievements nav {height:22px;width:68px;margin:0 auto;}
#previous, #next {height:22px;width:34px;display:inline-block;}
.page1 #previous, .upscaled .page1 #previous {background-position:0px -282px;}
.page5 #next, .upscaled .page5 #next {background-position:-33px -282px;}
.page6 #next, .upscaled .page6 #next {background-position:-33px -282px;}
#previous, .upscaled #previous {background-position:-67px -282px;}
#previous:active, .upscaled #previous:active {background-position:-134px -282px;}
#next, .upscaled #next {margin-left:-5px;background-position:-100px -282px;}
#next:active, .upscaled #next:active {background-position:-167px -282px;}
.page1 #previous:hover, .page1 #previous:active {background-position:0px -282px;}
.page5 #next:hover, .page5 #next:active {background-position:-33px -282px}
.page6 #next:hover, .page6 #next:active {background-position:-33px -282px}
#lists {width:2000px;-moz-transition:none;-webkit-transition:none;-o-transition:none;-ms-transition:none;transition:none;}
#lists {width:2500px;-moz-transition:none;-webkit-transition:none;-o-transition:none;-ms-transition:none;transition:none;}
#achievements.page1 #lists {left:0;}
#achievements.page2 #lists {left:-392px;}
#achievements.page3 #lists {left:-784px;}
#achievements.page4 #lists {left:-1176px;}
#achievements.page5 #lists {left:-1568px;}
#achievements.page6 #lists {left:-1960px;}
#achievements-count {margin:6px 24px 0 0;}
......@@ -323,4 +333,4 @@
#achievement-notification .name {color:#eee;font-size:20px;margin:6px 0;}
#achievements li.unlocked .achievement-sharing {display:block;}
}
\ No newline at end of file
}
client/img/1/achievements.png

15 KB | W: | H:

client/img/1/achievements.png

15.2 KB | W: | H:

client/img/1/achievements.png
client/img/1/achievements.png
client/img/1/achievements.png
client/img/1/achievements.png
  • 2-up
  • Swipe
  • Onion skin
client/img/2/achievements.png

19.5 KB | W: | H:

client/img/2/achievements.png

10.2 KB | W: | H:

client/img/2/achievements.png
client/img/2/achievements.png
client/img/2/achievements.png
client/img/2/achievements.png
  • 2-up
  • Swipe
  • Onion skin
client/img/3/achievements.png

23.9 KB | W: | H:

client/img/3/achievements.png

14.8 KB | W: | H:

client/img/3/achievements.png
client/img/3/achievements.png
client/img/3/achievements.png
client/img/3/achievements.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -286,6 +286,15 @@ function(InfoManager, BubbleManager, Renderer, Map, Animation, Sprite, AnimatedT
name: "Clustered",
desc: "Server usage 101",
hidden: true
},
OVERDOSE: {
id: 21,
name: "Overdose",
desc: "Running on caffeine",
hidden: true,
isCompleted: function() {
return self.storage.getFlaskCount() >= 20;
}
}
};
......@@ -920,6 +929,11 @@ function(InfoManager, BubbleManager, Renderer, Map, Animation, Sprite, AnimatedT
self.tryUnlockingAchievement("FOR_SCIENCE");
}
if(item.kind === Types.Entities.FLASK) {
self.storage.incrementFlaskCount();
self.tryUnlockingAchievement("OVERDOSE");
}
if(item.kind === Types.Entities.FIREPOTION) {
self.tryUnlockingAchievement("FOXY");
self.audioManager.playSound("firefox");
......
......@@ -23,6 +23,7 @@ define(function() {
unlocked: [],
ratCount: 0,
eyeCount: 0,
flaskCount: 0,
totalKills: 0,
totalDmg: 0,
totalRevives: 0
......@@ -108,6 +109,11 @@ define(function() {
return this.data.achievements.ratCount;
},
// Overdose
getFlaskCount: function() {
return this.data.achievements.flaskCount;
},
incrementRatCount: function() {
if(this.data.achievements.ratCount < 10) {
this.data.achievements.ratCount++;
......@@ -115,6 +121,14 @@ define(function() {
}
},
// Potions drank
incrementFlaskCount: function() {
if(this.data.achievements.flaskCount < 20) {
this.data.achievements.flaskCount++;
this.save();
}
},
// Eye Collector
getEyeCount: function() {
return this.data.achievements.eyeCount;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment