From 32f291a3c04350852d48fceb64dd5aafd4f880d6 Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Sun, 1 Dec 2013 22:21:44 -0800 Subject: [PATCH] Score bugfix and death condition --- js/screens.js | 2 +- js/ui.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/js/screens.js b/js/screens.js index 9160991..3ed6a14 100755 --- a/js/screens.js +++ b/js/screens.js @@ -448,7 +448,7 @@ function ScoreScreen( stage, gameState ){ var coreTempScore = that.scoreDistribution( coreTemp ) * 200; totalScore += parseInt(skinScoreChart[ turkeyState.skin.cond[2]]); - totalScore += parseInt(skinScoreChart[ turkeyState.core.cond[2]]); + totalScore += parseInt(coreScoreChart[ turkeyState.core.cond[2]]); totalScore += parseInt(outerTempScore.toFixed(0)); totalScore += parseInt(coreTempScore.toFixed(0)); diff --git a/js/ui.js b/js/ui.js index 5e9f7cb..c565a32 100755 --- a/js/ui.js +++ b/js/ui.js @@ -685,6 +685,10 @@ function OvenUI( stage, gameState ){ //finalize button if( gameState.turkeyBought ){ stage.addChild( new Button( stage, gameState, 45, 250, 250, 150, null, null, function(){ + if(!evalSkin[turkeyState["skin"]["cond"][2]]){ + gameState.pubsub.publish("Death",""); + return; + } gameState.pubsub.publish("Play", "Error"); gameState.pubsub.publish("ShowFinalConfirm",""); } ) );