<commit_before>var lavaMap, lavalayer1, lavalayer2, lava_dictionary;

demo.lavastate = function(){};
demo.lavastate.prototype = {
    preload: function(){
//        loadImages();
//        loadCatBoss();

        
        // make sure to set this to the size of the tile map 
        game.world.setBounds(0, 0, 1000, 6000);
        
        // load in tile map assets 
        game.load.tilemap('lavaStage', 'assets/tilemaps/LavaStage/LavaMap.json', null, Phaser.Tilemap.TILED_JSON);
        game.load.image('grass_platform', 'assets/tilemaps/LavaStage/lava_platform.png');
        game.load.image('new_ladder_sprite_top', 'assets/tilemaps/Tutorial/new_ladder_sprite.png');
        game.load.image('temp_red_tile', 'assets/tilemaps/LavaStage/red_tile.png');
        game.load.image('temp_orange_tile', 'assets/tilemaps/LavaStage/orange_tile.png');
        game.load.image('temp_yellow_tile', 'assets/tilemaps/LavaStage/yellow_tile.png');
        game.load.image('new_ladder_sprite', 'assets/tilemaps/Tutorial/new_ladder_sprite.png');
        
        loadBearBoss();
    },
    
    
    
    create: function(){
//        game.physics.startSystem(Phaser.Physics.ARCADE);
//        cursors = game.input.keyboard.createCursorKeys();
        
        // stop all other sounds 
        game.sound.stopAll();
        game.camera.y = game.world.height;
//        game.camera.y = 0
        
        // play background music
        happyrock = game.add.audio('happyrock');
        
        happyrock.play('','',0.2,true,true);
        
        // add background
        add_game_bg('bg2');
        
        game.stage.backgroundColor = '#DDDDDD';

//        cursors = game.input.keyboard.createCursorKeys();

        // add in the tile map * make into function - creates dictionary and cycles through dictionary 
        lavaMap = game.add.tilemap('lavaStage');
        lavaMap.addTilesetImage('grass_platform');
        lavaMap.addTilesetImage('new_ladder_sprite_top');
        lavaMap.addTilesetImage('temp_red_tile');
        lavaMap.addTilesetImage('temp_orange_tile');
        lavaMap.addTilesetImage('temp_yellow_tile');
        lavaMap.addTilesetImage('new_ladder_sprite');

        
       // SET UP TILE MAP 
        lavalayer1 = lavaMap.createLayer('Platforms');
        lavalayer2 = lavaMap.createLayer('Ladders');
        lavalayer1.resizeWorld();
        lavalayer2.resizeWorld();
//        
        game.physics.arcade.enable(lavalayer1);
        game.physics.arcade.enable(lavalayer2);
//        
//        
        createChameleon(450,game.world.height - 400);
//        createChameleon(500,600);
        
//        place_cat_boss(0,0);
//
//        
        lavaMap.setCollision(12, true, icelayer1);
        lavaMap.setCollisionBetween(1, 12, true, lavalayer1);
        lavaMap.setCollisionBetween(13, 14, true, lavalayer2);



        
//        //prep for placing fruit and enemies and health packs 
        make_fruit_groups();
        make_enemy_groups();
        make_healthpack_groups(); 
        make_balloon_group();
        addMovingPlatforms();
        
        // place things - in order of appearance on screen 
        placeFruit(300, 5645, "bluefruit"); // can change the color on this one maybe, but its funny 
        placeFruit(150, 5645, "redfruit");
        placeFruit(750 ,5495, "yellowfruit");
        placeFruit(850, 5495, "orangefruit");
        placeFruit(350,5345, "redfruit");
        placeFruit(100,5195, "orangefruit");
        placeFruit(700,5150, "yellowfruit");
        placeFruit(900, 5150, "redfruit");
        placeFruit(2*50,102*50,"orangefruit");
        placeHealthpack(3*50,102*50);
        
        placeSnake(200, 94*50+50, ["red"]);
        
        placeFruit(18*50, 95*50 - 10, "yellowfruit");
        var testbird = placeBird(16*50 - 25, 93*50 - 25, ["orange"]);
//        game.add.tween(testbird).to({x:[16*50 - 25, 16*50 - 25], y:[93*50 + 100, 93*50 - 25]}, 1200, Phaser.Easing.Linear.None, true, 0, -1, false)
        placeFruit(4*50, 91*50, "redfruit");
        
        placeMP(14*50, 82*50, 2, 1, 0, 3, 0, 100); 
        placeMP(7*50, 86*50-30, 1, 1, 4, 0, 150, 0 );
        placeMP(9*50, 83*50-30, 1, 1, 4, 0, 150, 0 );
        placeMP(7*50, 79*50-30, 1, 1, 4, 0, 150, 0 );
        
        placeHealthpack(14.5*50, 81*50);
        
        placeBalloon(1*50,82*50);
        
        //The super moving platform place -
        placeMP(3*50, 71*50, 2, 1, 0, 3, 0, 100); 
        placeMP(5*50, 69*50, 2, 1, 0, 3, 0, 150 );
        placeMP(8*50, 70*50, 2, 1, 0, 4, 0, 125 );
        placeMP(10*50, 70*50, 2, 1, 0, 3, 0, 75 );
        placeMP(12*50, 71*50, 2, 1, 0, 3, 0, 100 );
        placeMP(15*50, 69*50, 2, 1, 0, 3, 0, 125 );
        placeMP(17*50, 70*50, 2, 1, 0, 4, 0, 80 );
        
        placeMP(4*50, 65*50, 2, 1, 0, 3, 0, 125); 
        placeMP(9*50, 65*50, 2, 1, 0, 4, 0, 130);
        placeMP(13*50, 65*50, 2, 1, 0, 4, 0, 200);
        
        // random fruit stuff in super moving platform place y: [64, 75]
        placeFruit(5*50, 72*50, "redfruit");
        placeFruit(8*50, 71*50, "yellowfruit");
        placeFruit(15*50, 73*50, "redfruit");
        placeFruit(3*50, 67*50, "orangefruit");
        placeFruit(8*50, 64*50, "orangefruit");
        placeFruit(13*50, 63*50, "yellowfruit");
        
        placeHealthpack(16*50, 61*50);
        
        // random inbetween place 
        placeMP(5*50, 53*50, 3, 1, 6, 0, 150, 0);
        placeFruit(8*50, 52*50, "redfruit");
        placeFruit(9*50, 52*50, "orangefruit");
        placeFruit(10*50, 52*50, "yellowfruit");

        
        
        // the enemy maze ! -
        var bottom_of_maze = 30*50-10;<commit_msg>Randomized fruits in moving cloud area of lava stage<commit_after>var lavaMap, lavalayer1, lavalayer2, lava_dictionary;

demo.lavastate = function(){};
demo.lavastate.prototype = {
    preload: function(){
//        loadImages();
//        loadCatBoss();

        
        // make sure to set this to the size of the tile map 
        game.world.setBounds(0, 0, 1000, 6000);
        
        // load in tile map assets 
        game.load.tilemap('lavaStage', 'assets/tilemaps/LavaStage/LavaMap.json', null, Phaser.Tilemap.TILED_JSON);
        game.load.image('grass_platform', 'assets/tilemaps/LavaStage/lava_platform.png');
        game.load.image('new_ladder_sprite_top', 'assets/tilemaps/Tutorial/new_ladder_sprite.png');
        game.load.image('temp_red_tile', 'assets/tilemaps/LavaStage/red_tile.png');
        game.load.image('temp_orange_tile', 'assets/tilemaps/LavaStage/orange_tile.png');
        game.load.image('temp_yellow_tile', 'assets/tilemaps/LavaStage/yellow_tile.png');
        game.load.image('new_ladder_sprite', 'assets/tilemaps/Tutorial/new_ladder_sprite.png');
        
        loadBearBoss();
    },
    
    
    
    create: function(){
//        game.physics.startSystem(Phaser.Physics.ARCADE);
//        cursors = game.input.keyboard.createCursorKeys();
        
        // stop all other sounds 
        game.sound.stopAll();
        game.camera.y = game.world.height;
//        game.camera.y = 0
        
        // play background music
        happyrock = game.add.audio('happyrock');
        
        happyrock.play('','',0.2,true,true);
        
        // add background
        add_game_bg('bg2');
        
        game.stage.backgroundColor = '#DDDDDD';

//        cursors = game.input.keyboard.createCursorKeys();

        // add in the tile map * make into function - creates dictionary and cycles through dictionary 
        lavaMap = game.add.tilemap('lavaStage');
        lavaMap.addTilesetImage('grass_platform');
        lavaMap.addTilesetImage('new_ladder_sprite_top');
        lavaMap.addTilesetImage('temp_red_tile');
        lavaMap.addTilesetImage('temp_orange_tile');
        lavaMap.addTilesetImage('temp_yellow_tile');
        lavaMap.addTilesetImage('new_ladder_sprite');

        
       // SET UP TILE MAP 
        lavalayer1 = lavaMap.createLayer('Platforms');
        lavalayer2 = lavaMap.createLayer('Ladders');
        lavalayer1.resizeWorld();
        lavalayer2.resizeWorld();
//        
        game.physics.arcade.enable(lavalayer1);
        game.physics.arcade.enable(lavalayer2);
//        
//        
        createChameleon(450,game.world.height - 400);
//        createChameleon(500,600);
        
//        place_cat_boss(0,0);
//
//        
        lavaMap.setCollision(12, true, icelayer1);
        lavaMap.setCollisionBetween(1, 12, true, lavalayer1);
        lavaMap.setCollisionBetween(13, 14, true, lavalayer2);



        
//        //prep for placing fruit and enemies and health packs 
        make_fruit_groups();
        make_enemy_groups();
        make_healthpack_groups(); 
        make_balloon_group();
        addMovingPlatforms();
        
        // place things - in order of appearance on screen 
        placeFruit(300, 5645, "bluefruit"); // can change the color on this one maybe, but its funny 
        placeFruit(150, 5645, "redfruit");
        placeFruit(750 ,5495, "yellowfruit");
        placeFruit(850, 5495, "orangefruit");
        placeFruit(350,5345, "redfruit");
        placeFruit(100,5195, "orangefruit");
        placeFruit(700,5150, "yellowfruit");
        placeFruit(900, 5150, "redfruit");
        placeFruit(2*50,102*50,"orangefruit");
        placeHealthpack(3*50,102*50);
        
        placeSnake(200, 94*50+50, ["red"]);
        
        placeFruit(18*50, 95*50 - 10, "yellowfruit");
        var testbird = placeBird(16*50 - 25, 93*50 - 25, ["orange"]);
//        game.add.tween(testbird).to({x:[16*50 - 25, 16*50 - 25], y:[93*50 + 100, 93*50 - 25]}, 1200, Phaser.Easing.Linear.None, true, 0, -1, false)
        placeFruit(4*50, 91*50, "redfruit");
        
        placeMP(14*50, 82*50, 2, 1, 0, 3, 0, 100); 
        placeMP(7*50, 86*50-30, 1, 1, 4, 0, 150, 0 );
        placeMP(9*50, 83*50-30, 1, 1, 4, 0, 150, 0 );
        placeMP(7*50, 79*50-30, 1, 1, 4, 0, 150, 0 );
        
        placeHealthpack(14.5*50, 81*50);
        
        placeBalloon(1*50,82*50);
        
        //The super moving platform place -
        placeMP(3*50, 71*50, 2, 1, 0, 3, 0, 100); 
        placeMP(5*50, 69*50, 2, 1, 0, 3, 0, 150 );
        placeMP(8*50, 70*50, 2, 1, 0, 4, 0, 125 );
        placeMP(10*50, 70*50, 2, 1, 0, 3, 0, 75 );
        placeMP(12*50, 71*50, 2, 1, 0, 3, 0, 100 );
        placeMP(15*50, 69*50, 2, 1, 0, 3, 0, 125 );
        placeMP(17*50, 70*50, 2, 1, 0, 4, 0, 80 );
        
        placeMP(4*50, 65*50, 2, 1, 0, 3, 0, 125); 
        placeMP(9*50, 65*50, 2, 1, 0, 4, 0, 130);
        placeMP(13*50, 65*50, 2, 1, 0, 4, 0, 200);
        
        // random fruit stuff in super moving platform place y: [64, 75]
        placeFruit(randomIntFromInterval(3, 17)*50, 72*50, "redfruit");
        placeFruit(randomIntFromInterval(3, 17)*50, 70*50, "yellowfruit");
        placeFruit(randomIntFromInterval(3, 17)*50, 68*50, "orangefruit");
        placeFruit(randomIntFromInterval(3, 17)*50, 67*50, "yellowfruit");
        placeFruit(randomIntFromInterval(3, 17)*50, 65*50, "orangefruit");
        placeFruit(randomIntFromInterval(3, 17)*50, 64*50, "redfruit");
        
        placeHealthpack(16*50, 61*50);
        
        // random inbetween place 
        placeMP(5*50, 53*50, 3, 1, 6, 0, 150, 0);
        placeFruit(8*50, 52*50, "redfruit");
        placeFruit(9*50, 52*50, "orangefruit");
        placeFruit(10*50, 52*50, "yellowfruit");

        
        
        // the enemy maze ! -
        var bottom_of_maze = 30*50-10;
{'fraction_non_alphanumeric': 0.14935234286707816, 'fraction_numerical': 0.09197600625923671, 'mean_word_length': 2.32005772005772, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3345453', 'n_tokens_mistral': 4883, 'n_tokens_neox': 3974, 'n_words': 793}