share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua
changeset 13377 03e4d9b5b09c
parent 13374 e1aa72e0872e
child 13379 4dd503978c0a
equal deleted inserted replaced
13376:f7631fb4c584 13377:03e4d9b5b09c
  1904 		RemoveWeapon(CurrentHedgehog,amSeduction)
  1904 		RemoveWeapon(CurrentHedgehog,amSeduction)
  1905 
  1905 
  1906 	elseif(CS.ANTARCTICA_SPECIAL == 1 and GetCurAmmoType() == amPickHammer and band(GetState(CurrentHedgehog),gstAttacked)==0)
  1906 	elseif(CS.ANTARCTICA_SPECIAL == 1 and GetCurAmmoType() == amPickHammer and band(GetState(CurrentHedgehog),gstAttacked)==0)
  1907 	then
  1907 	then
  1908 		EndTurnCS(10)
  1908 		EndTurnCS(10)
  1909 		SetGearPosition(CurrentHedgehog,GetX(CurrentHedgehog),0)
  1909 		local dx, dy = GetGearVelocity(CurrentHedgehog)
  1910 		ParseCommand("hjump")
  1910 		local isLeft = dx < 0
  1911 		SetGearVelocity(CurrentHedgehog, 0, 100000000)
  1911 		-- Cave map / map has border
  1912 
  1912 		if not MapHasBorder() then
       
  1913 			-- Place hog at Y = 0
       
  1914 			SetGearPosition(CurrentHedgehog, GetX(CurrentHedgehog), 0)
       
  1915 			ParseCommand("hjump")
       
  1916 			SetGearVelocity(CurrentHedgehog, 0, 100000000)
       
  1917 
       
  1918 		-- Open air map
       
  1919 		else
       
  1920 			-- Place hog just below the top border, erase a bit of land as well
       
  1921 			local x = GetX(CurrentHedgehog)
       
  1922 			Explode(x, TopY + 6, 32, EXPLNoDamage + EXPLDoNotTouchAny + EXPLNoGfx)
       
  1923 			Explode(x, TopY + 20, 24, EXPLNoDamage + EXPLDoNotTouchAny)
       
  1924 			SetGearPosition(CurrentHedgehog, x, TopY + 26)
       
  1925 			local dx, dy = GetGearVelocity(CurrentHedgehog)
       
  1926 			SetGearVelocity(CurrentHedgehog, 0, dy)
       
  1927 			ParseCommand("hjump")
       
  1928 		end
       
  1929 		if isLeft then
       
  1930 			HogTurnLeft(CurrentHedgehog, true)
       
  1931 		end
  1913 		PlaySound(sndPiano8)
  1932 		PlaySound(sndPiano8)
  1914 		PlaySound(sndWarp)
  1933 		PlaySound(sndWarp)
  1915 
  1934 
  1916 		RemoveWeapon(CurrentHedgehog,amPickHammer)
  1935 		RemoveWeapon(CurrentHedgehog,amPickHammer)
  1917 
  1936