From ccd0b1ceed2fe95f5e8b318a2398480b6b26046b Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Sun, 1 Dec 2013 19:08:37 -0800 Subject: [PATCH] Bugfixes on scoring and modifier percentage --- js/main.js | 2 +- js/screens.js | 13 ++++++------- js/ui.js | 3 ++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/js/main.js b/js/main.js index e39bcab..add9849 100755 --- a/js/main.js +++ b/js/main.js @@ -1,6 +1,6 @@ // Robert- Here be dragons -var DEBUG = 0; +var DEBUG = 1; function GameState(){ var that = this; diff --git a/js/screens.js b/js/screens.js index d05ce9c..1f98731 100755 --- a/js/screens.js +++ b/js/screens.js @@ -441,7 +441,7 @@ function ScoreScreen( stage, gameState ){ }; // Temperature Score - var outerTemp = UtilityFunctions.C2F(turkeyState.skin.temp).toFixed(2); + var outerTemp = UtilityFunctions.C2F(turkeyState.skin.highest).toFixed(2); var coreTemp = UtilityFunctions.C2F(turkeyState.core.temp).toFixed(2); var outerTempScore = that.scoreDistribution( outerTemp, "skin" ) * 200; @@ -454,13 +454,13 @@ function ScoreScreen( stage, gameState ){ resultsDialogue = []; - if (totalScore>=2000) { + if (totalScore>=4000) { randomDiag = perfect; } - else if (totalScore>=1200) { + else if (totalScore>=2500) { randomDiag = great; } - else if (totalScore>=625) { + else if (totalScore>=800) { randomDiag = average; } else if (totalScore>=300) { @@ -594,14 +594,13 @@ function ScoreScreen( stage, gameState ){ // Modifiers var turkeyMod = typeToMod[gameState.turkeyType]; - var turkeyTypeModifierText = new createjs.Text( ((1-turkeyMod)*100).toFixed(0) + "%", "20px Arial", "black" ); + var turkeyTypeModifierText = new createjs.Text( -1*((1-turkeyMod)*100).toFixed(0) + "%", "20px Arial", "black" ); turkeyTypeModifierText.x = 310; turkeyTypeModifierText.y = 437; totalScore *= turkeyMod; - - var stuffingTypeModifierText = new createjs.Text( ((1-gameState.stuffingTypeModifier)*100).toFixed(0)+"%" , "20px Arial", "black" ); + var stuffingTypeModifierText = new createjs.Text( -1*((1-gameState.stuffingTypeModifier)*100).toFixed(0)+"%" , "20px Arial", "black" ); stuffingTypeModifierText.x = 310 stuffingTypeModifierText.y = 457; diff --git a/js/ui.js b/js/ui.js index 941ee95..60720f3 100755 --- a/js/ui.js +++ b/js/ui.js @@ -770,9 +770,10 @@ function WindowUI( stage, gameState ){ stage.addChild( dayNight ); stage.addChild( ground ); stage.addChild( houses ); + stage.addChild( stars ); stage.addChild( animation ); stage.addChild( mood ); - stage.addChild( stars ); + for( var i in smallWindows ){ smallWindows[i].visible = UtilityFunctions.randRange(0,1);