@@ -150,6 +150,7 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
150150 computer_click ( )
151151 } else if ( sprite_overlapping_kind ( sprite_cursor_pointer , SpriteKind . Thing ) ) {
152152 difficulty_halving = true
153+ overlapped_sprites ( sprite_cursor_pointer , SpriteKind . Thing ) [ 0 ] . destroy ( effects . halo , 100 )
153154 } else if ( sprite_cursor_pointer . overlapsWith ( sprite_buy_autoclicker ) ) {
154155 buy_autoclicker_menu ( )
155156 } else if ( sprite_cursor_pointer . overlapsWith ( sprite_buy_computer ) ) {
@@ -684,7 +685,7 @@ forever(function () {
684685 pause ( 1000 )
685686} )
686687forever ( function ( ) {
687- if ( ( Math . percentChance ( difficulty_halve_chance ) || true ) && difficulty_halve_time_left <= 0 ) {
688+ if ( ( Math . percentChance ( difficulty_halve_chance ) || true ) && ! ( difficulty_halving ) ) {
688689 sprite_difficulty_halver = sprites . create ( assets . image `difficulty_halver` , SpriteKind . Thing )
689690 sprite_difficulty_halver . z = 30
690691 sprite_difficulty_halver . setPosition ( randint ( 0 , scene . screenWidth ( ) ) , randint ( 0 , scene . screenHeight ( ) ) )
@@ -693,5 +694,16 @@ forever(function () {
693694 sprite_difficulty_halver . lifespan = 10000
694695 pause ( 10000 )
695696 }
697+ if ( difficulty_halving && difficulty_halve_time_left == 0 ) {
698+ max_height = max_height * 0.5
699+ difficulty_halve_time_left = difficulty_halve_max_time
700+ }
701+ if ( difficulty_halving ) {
702+ difficulty_halve_time_left += - 1
703+ }
704+ if ( difficulty_halving && difficulty_halve_time_left <= 0 ) {
705+ max_height = max_height * 2
706+ difficulty_halving = false
707+ }
696708 pause ( 1000 )
697709} )
0 commit comments