From 2054138befb280e513d81fe58bf07f529241df5d Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Thu, 1 Sep 2016 08:20:38 +1000 Subject: [PATCH] Tweak stars required to unlock - was too low on higher levels. --- cat.html | 17 +++++++++++++---- todo | 12 ++++++------ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/cat.html b/cat.html index 878e305..b3496a9 100644 --- a/cat.html +++ b/cat.html @@ -1688,6 +1688,19 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio); // must be an integer this.levels[lev].maxturns = Math.floor(this.levels[lev].maxturns); + + // calc stars to unlock + //extrastars = Math.floor(lev / 5); + //this.levels[lev].starsrequired = (lev-1) + extrastars; + + // must use 'lev-1' so that level 1 requires no stars. + // 1.2 * level num + if (lev < 5) { + this.levels[lev].starsrequired = Math.floor(1.2 * (lev-1)); + } else { + this.levels[lev].starsrequired = Math.floor(1.5 * (lev-1)); + } + }, initlevels : function ( ) { @@ -1817,10 +1830,6 @@ console.log("lev " + lev + " newwid " + newwid + " ratio " + ratio); this.calclevparams(i); } - // calc stars to unlock - //extrastars = Math.floor(i / 5); - //this.levels[i].starsrequired = (i-1) + extrastars; - this.levels[i].starsrequired = Math.floor(1.2 * (i-1)); } diff --git a/todo b/todo index b23d390..c1da736 100644 --- a/todo +++ b/todo @@ -8,20 +8,20 @@ https://www.smashingmagazine.com/2012/10/design-your-own-mobile-game/ https://www.smashingmagazine.com/2012/10/design-your-own-mobile-game/ --- check here for ios - ------------------- + + +Tweak stars required -- too low. + + new door fell down on top of new goat!! (or the other way around ??) check code for doors falling when off the top of the screen. check code for adding new objects at top of screen. -Powerup to break bricks (but only after bricks appear) -diff colour cats which only match themselves - *add - *only match themself - help +remaining levels. --------------