@@ -59,6 +59,7 @@ var luckInterval = 30; //Lower to increase chances
59
59
var playerInt ;
60
60
var playerAtk ;
61
61
var playerRested = false ;
62
+ var playerCooked = false ;
62
63
var seenLoot ;
63
64
64
65
var playerKarma = 1 ; //Does not reset during the session
@@ -1356,16 +1357,20 @@ function resolveAction(button){ //Yeah, this is bad, like really bad
1356
1357
1357
1358
case "Consumable" :
1358
1359
case "Consumable-Container" :
1359
- if ( enemyHp < 0 ) {
1360
- logPlayerAction ( actionString , "Cooked it with a spell -1 🔵" ) ;
1361
- enemyHp = 0 ;
1362
- enemyMsg = "Actually tasted good" ;
1363
- } else {
1364
- logPlayerAction ( actionString , "Roasted a crunchy crust -1 🔵" ) ;
1365
- enemySta = parseInt ( enemySta ) + 1 ;
1366
- enemyMsg = "Tasted better than usual" ;
1360
+ if ( ! playerCooked ) {
1361
+ if ( enemyHp < 0 ) {
1362
+ logPlayerAction ( actionString , "Cooked it with a spell -1 🔵" ) ;
1363
+ enemyHp = 0 ;
1364
+ enemyMsg = "Actually tasted good" ;
1365
+ } else {
1366
+ logPlayerAction ( actionString , "Roasted a crunchy crust -1 🔵" ) ;
1367
+ enemySta = parseInt ( enemySta ) + 1 ;
1368
+ enemyMsg = "Tasted better than usual" ;
1369
+ }
1370
+ playerCooked = true ;
1371
+ displayEnemyEffect ( "🔥" ) ;
1372
+ animateUIElement ( enemyInfoUIElement , "animate__pulse" , "0.4" ) ; //Animate cooking
1367
1373
}
1368
- displayEnemyEffect ( "🔥" ) ;
1369
1374
break ;
1370
1375
1371
1376
case "Dream" :
@@ -2294,6 +2299,7 @@ function nextEncounter(animateArea=true){ //Note: Even generator encounters go t
2294
2299
encounterIndex = getNextEncounterIndex ( ) ;
2295
2300
2296
2301
playerRested = false ;
2302
+ playerCooked = false ;
2297
2303
enemyRenew ( ) ;
2298
2304
loadEncounter ( encounterIndex ) ;
2299
2305
@@ -2338,14 +2344,14 @@ function playerRest(){
2338
2344
logPlayerAction ( actionString , "Wasted a precious moment of life." ) ;
2339
2345
displayPlayerEffect ( "💤" ) ;
2340
2346
}
2347
+ if ( procAbilityChance ( "🔮" , 33 ) ) {
2348
+ logAction ( "🔮 ▸ <b>👁️ Vivid Dream</b> provided bonus +1 🔵" )
2349
+ playerMgk ++ ;
2350
+ }
2341
2351
} else {
2342
2352
logPlayerAction ( actionString , "Already rested at this spot." ) ;
2343
2353
displayPlayerCannotEffect ( ) ;
2344
2354
}
2345
- if ( procAbilityChance ( "🔮" , 33 ) ) {
2346
- logAction ( "🔮 ▸ <b>👁️ Vivid Dream</b> provided bonus +1 🔵" )
2347
- playerMgk ++ ;
2348
- }
2349
2355
}
2350
2356
2351
2357
function playerHeal ( ) {
0 commit comments