Browse Source

Bugfixes on scoring and modifier percentage

pull/2/head
Robert Chen 11 years ago
parent
commit
ccd0b1ceed
  1. 2
      js/main.js
  2. 13
      js/screens.js
  3. 3
      js/ui.js

2
js/main.js

@ -1,6 +1,6 @@
// Robert- Here be dragons // Robert- Here be dragons
var DEBUG = 0; var DEBUG = 1;
function GameState(){ function GameState(){
var that = this; var that = this;

13
js/screens.js

@ -441,7 +441,7 @@ function ScoreScreen( stage, gameState ){
}; };
// Temperature Score // 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 coreTemp = UtilityFunctions.C2F(turkeyState.core.temp).toFixed(2);
var outerTempScore = that.scoreDistribution( outerTemp, "skin" ) * 200; var outerTempScore = that.scoreDistribution( outerTemp, "skin" ) * 200;
@ -454,13 +454,13 @@ function ScoreScreen( stage, gameState ){
resultsDialogue = []; resultsDialogue = [];
if (totalScore>=2000) { if (totalScore>=4000) {
randomDiag = perfect; randomDiag = perfect;
} }
else if (totalScore>=1200) { else if (totalScore>=2500) {
randomDiag = great; randomDiag = great;
} }
else if (totalScore>=625) { else if (totalScore>=800) {
randomDiag = average; randomDiag = average;
} }
else if (totalScore>=300) { else if (totalScore>=300) {
@ -594,14 +594,13 @@ function ScoreScreen( stage, gameState ){
// Modifiers // Modifiers
var turkeyMod = typeToMod[gameState.turkeyType]; 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.x = 310;
turkeyTypeModifierText.y = 437; turkeyTypeModifierText.y = 437;
totalScore *= turkeyMod; totalScore *= turkeyMod;
var stuffingTypeModifierText = new createjs.Text( -1*((1-gameState.stuffingTypeModifier)*100).toFixed(0)+"%" , "20px Arial", "black" );
var stuffingTypeModifierText = new createjs.Text( ((1-gameState.stuffingTypeModifier)*100).toFixed(0)+"%" , "20px Arial", "black" );
stuffingTypeModifierText.x = 310 stuffingTypeModifierText.x = 310
stuffingTypeModifierText.y = 457; stuffingTypeModifierText.y = 457;

3
js/ui.js

@ -770,9 +770,10 @@ function WindowUI( stage, gameState ){
stage.addChild( dayNight ); stage.addChild( dayNight );
stage.addChild( ground ); stage.addChild( ground );
stage.addChild( houses ); stage.addChild( houses );
stage.addChild( stars );
stage.addChild( animation ); stage.addChild( animation );
stage.addChild( mood ); stage.addChild( mood );
stage.addChild( stars );
for( var i in smallWindows ){ for( var i in smallWindows ){
smallWindows[i].visible = UtilityFunctions.randRange(0,1); smallWindows[i].visible = UtilityFunctions.randRange(0,1);

Loading…
Cancel
Save