share/hedgewars/Data/Maps/ClimbHome/map.lua
changeset 14940 8b848c2939da
parent 14928 4c5fb1ee75b7
child 15501 5a30396f8fb2
equal deleted inserted replaced
14939:7b597da60fda 14940:8b848c2939da
    30 local CakeFireWarning = false
    30 local CakeFireWarning = false
    31 local CakeTries = 0
    31 local CakeTries = 0
    32 local addCake = true
    32 local addCake = true
    33 local takeASeat = false
    33 local takeASeat = false
    34 local Stars = {}
    34 local Stars = {}
    35 local tauntNoo = false
       
    36 local jokeAwardNavy = nil
    35 local jokeAwardNavy = nil
    37 local jokeAwardSpeed = nil
    36 local jokeAwardSpeed = nil
    38 local jokeAwardDamage = nil
    37 local jokeAwardDamage = nil
    39 local recordBroken = false
    38 local recordBroken = false
    40 local dummyHog = nil
    39 local dummyHog = nil
   187     MaxHeight = 32640
   186     MaxHeight = 32640
   188     hTagHeight = 33000
   187     hTagHeight = 33000
   189     SetWaterLine(32768)
   188     SetWaterLine(32768)
   190     YouWon = false
   189     YouWon = false
   191     YouLost = false
   190     YouLost = false
   192     tauntNoo = false
       
   193     takeASeat = false
   191     takeASeat = false
   194     recordBroken = false
   192     recordBroken = false
   195     currTeam = GetHogTeamName(CurrentHedgehog)
   193     currTeam = GetHogTeamName(CurrentHedgehog)
   196     if CurrentHedgehog ~= nil then
   194     if CurrentHedgehog ~= nil then
   197         if CurrentHedgehog ~= dummyHog or multiplayerWinningHogs[CurrentHedgehog] == true then
   195         if CurrentHedgehog ~= dummyHog or multiplayerWinningHogs[CurrentHedgehog] == true then
   501             if not takeASeat and gearIsInBox(CurrentHedgehog, 1765, 131, 244, 189) then
   499             if not takeASeat and gearIsInBox(CurrentHedgehog, 1765, 131, 244, 189) then
   502                 AddCaption(loc("Welcome home! Please take a seat"))
   500                 AddCaption(loc("Welcome home! Please take a seat"))
   503                 takeASeat = true
   501                 takeASeat = true
   504             end
   502             end
   505     
   503     
   506             -- play taunts
       
   507             if not YouWon and not YouLost then
       
   508                 local nooDistance = 500
       
   509                 if ((x < -nooDistance and vx < 0) or (x > LAND_WIDTH+nooDistance and vx > 0)) then
       
   510                     if (tauntNoo == false and distanceFromWater > 80) then
       
   511                         PlaySound(sndNooo, CurrentHedgehog)
       
   512                         tauntNoo = true
       
   513                     end
       
   514                 end
       
   515             end
       
   516 
       
   517             if addCake and CakeTries < 10 and y < 32600 and y > 3000 and Cake == nil then 
   504             if addCake and CakeTries < 10 and y < 32600 and y > 3000 and Cake == nil then 
   518                 -- doing this just after the start the first time to take advantage of randomness sources
   505                 -- doing this just after the start the first time to take advantage of randomness sources
   519                 -- Pick a clear y to start with
   506                 -- Pick a clear y to start with
   520                 if y > 31000 then cy = 24585 elseif
   507                 if y > 31000 then cy = 24585 elseif
   521                    y > 28000 then cy = 21500 elseif
   508                    y > 28000 then cy = 21500 elseif