share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua
changeset 10940 096be1230a46
parent 10934 d6cc62ef78ef
child 10943 d90706a2183e
equal deleted inserted replaced
10939:55ed72ad3a57 10940:096be1230a46
     1 ------------------------------------------
     1 ------------------------------------------
     2 -- TECH RACER v0.3
     2 -- TECH RACER v0.4
     3 -----------------------------------------
     3 -----------------------------------------
       
     4 
       
     5 --------------
       
     6 -- TO DO
       
     7 --------------
       
     8 -- allow scrolling of maps
       
     9 -- place waypoints for the registered maps automatically.
     4 
    10 
     5 --------------
    11 --------------
     6 --0.2
    12 --0.2
     7 --------------
    13 --------------
     8 -- should work better "out the box"
    14 -- should work better "out the box"
    19 --------------
    25 --------------
    20 -- ehh, scrap everything? those old maps probably still desync so they can die for now
    26 -- ehh, scrap everything? those old maps probably still desync so they can die for now
    21 -- hopefully fix map 3
    27 -- hopefully fix map 3
    22 -- add two new crappy map to test an idea.
    28 -- add two new crappy map to test an idea.
    23 
    29 
       
    30 --------------
       
    31 --0.4
       
    32 --------------
       
    33 -- updated version text (lol)
       
    34 -- some preliminary support for hand-drawn map loading
       
    35 -- some support for being really lazy
       
    36 -- an extra map or two
       
    37 -- param for infinite UFO fuel
       
    38 -- param for number of rounds
       
    39 
    24 -----------------------------
    40 -----------------------------
    25 -- SCRIPT BEGINS
    41 -- SCRIPT BEGINS
    26 -----------------------------
    42 -----------------------------
    27 
    43 
    28 HedgewarsScriptLoad("/Scripts/Locale.lua")
    44 HedgewarsScriptLoad("/Scripts/Locale.lua")
    31 HedgewarsScriptLoad("/Scripts/Params.lua")
    47 HedgewarsScriptLoad("/Scripts/Params.lua")
    32 
    48 
    33 ------------------
    49 ------------------
    34 -- Got Variables?
    50 -- Got Variables?
    35 ------------------
    51 ------------------
       
    52 
       
    53 local atkArray =
       
    54 				{
       
    55 				{amBazooka, 	"amBazooka",		0},
       
    56 				{amBee, 		"amBee",			0},
       
    57 				{amMortar, 		"amMortar",			0},
       
    58 				{amDrill, 		"amDrill",			0},
       
    59 				{amSnowball, 	"amSnowball",		0},
       
    60 
       
    61 				{amGrenade,		"amGrenade",		0},
       
    62 				{amClusterBomb,	"amClusterBomb",	0},
       
    63 				{amMolotov, 	"amMolotov",		0},
       
    64 				{amWatermelon, 	"amWatermelon",		0},
       
    65 				{amHellishBomb,	"amHellishBomb",	0},
       
    66 				{amGasBomb, 	"amGasBomb",		0},
       
    67 
       
    68 				{amShotgun,		"amShotgun",		0},
       
    69 				{amDEagle,		"amDEagle",			0},
       
    70 				{amFlamethrower,"amFlamethrower",	0},
       
    71 				{amSniperRifle,	"amSniperRifle",	0},
       
    72 				{amSineGun, 	"amSineGun",		0},
       
    73 				{amIceGun, 		"amIceGun",			0},
       
    74 				{amLandGun,		"amLandGun",		0},
       
    75 
       
    76 				{amFirePunch, 	"amFirePunch",		0},
       
    77 				{amWhip,		"amWhip",			0},
       
    78 				{amBaseballBat, "amBaseballBat",	0},
       
    79 				{amKamikaze, 	"amKamikaze",		0},
       
    80 				{amSeduction, 	"amSeduction",		0},
       
    81 				{amHammer,		"amHammer",			0},
       
    82 
       
    83 				{amMine, 		"amMine",			0},
       
    84 				{amDynamite, 	"amDynamite",		0},
       
    85 				{amCake, 		"amCake",			0},
       
    86 				{amBallgun, 	"amBallgun",		0},
       
    87 				{amRCPlane,		"amRCPlane",		0},
       
    88 				{amSMine,		"amSMine",			0},
       
    89 				{amAirMine,		"amAirMine",		0},
       
    90 
       
    91 				{amAirAttack,	"amAirAttack",		0},
       
    92 				{amMineStrike,	"amMineStrike",		0},
       
    93 				{amDrillStrike,	"amDrillStrike",	0},
       
    94 				{amAirMine,		"amAirMine",		0},
       
    95 				{amNapalm, 		"amNapalm",			0},
       
    96 				{amPiano,		"amPiano",			0},
       
    97 
       
    98 				{amKnife,		"amKnife",			0},
       
    99 
       
   100 				{amBirdy,		"amBirdy",			0}
       
   101 
       
   102 				}
       
   103 
       
   104 local utilArray =
       
   105 				{
       
   106 				{amBlowTorch, 		"amBlowTorch",		0},
       
   107 				{amPickHammer,		"amPickHammer",		0},
       
   108 				{amGirder, 			"amGirder",			0},
       
   109 				{amRubber, 			"amRubber",			0},
       
   110 				{amPortalGun,		"amPortalGun",		0},
       
   111 
       
   112 				{amRope, 			"amRope",			0},
       
   113 				{amParachute, 		"amParachute",		0},
       
   114 				{amTeleport,		"amTeleport",		0},
       
   115 				{amJetpack,			"amJetpack",		0},
       
   116 
       
   117 				{amInvulnerable,	"amInvulnerable",	0},
       
   118 				{amLaserSight,		"amLaserSight",		0},
       
   119 				{amVampiric,		"amVampiric",		0},
       
   120 
       
   121 				{amLowGravity, 		"amLowGravity",		0},
       
   122 				{amExtraDamage, 	"amExtraDamage",	0},
       
   123 				{amExtraTime,		"amExtraTime",		0},
       
   124 
       
   125 				{amResurrector, 	"amResurrector",	0},
       
   126 				{amTardis, 			"amTardis",			0},
       
   127 
       
   128 				{amSwitch,			"amSwitch",			0}
       
   129 				}
    36 
   130 
    37 local activationStage = 0
   131 local activationStage = 0
    38 local jet = nil
   132 local jet = nil
    39 local infUFO = nil
   133 local infUFO = nil
    40 
   134 
    53 local currY = {}
   147 local currY = {}
    54 local currCount = 0
   148 local currCount = 0
    55 
   149 
    56 local specialPointsX = {}
   150 local specialPointsX = {}
    57 local specialPointsY = {}
   151 local specialPointsY = {}
       
   152 local specialPointsFlag = {}
    58 local specialPointsCount = 0
   153 local specialPointsCount = 0
    59 
   154 
    60 mapID = 22
   155 mapID = 22
    61 
   156 
    62 --------------------------
   157 --------------------------
   468 
   563 
   469 function ClearMap()
   564 function ClearMap()
   470 
   565 
   471 	runOnGears(RemoveGear)
   566 	runOnGears(RemoveGear)
   472 
   567 
       
   568 end
       
   569 
       
   570 -- this handles interim lazy copypasta from HedgeEditor while I'm still messing with things
       
   571 function LoadSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
       
   572 	PlaceSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
   473 end
   573 end
   474 
   574 
   475 function HandleFreshMapCreation()
   575 function HandleFreshMapCreation()
   476 
   576 
   477 	-- the boom stage, boom girders, reset ammo, and delete other map objects
   577 	-- the boom stage, boom girders, reset ammo, and delete other map objects
  1784 ----------------------------------
  1884 ----------------------------------
  1785 -- GAME METHODS / EVENT HANDLERS
  1885 -- GAME METHODS / EVENT HANDLERS
  1786 ----------------------------------
  1886 ----------------------------------
  1787 
  1887 
  1788 function onParameters()
  1888 function onParameters()
  1789     parseParams()
  1889 
       
  1890 	parseParams()
  1790 	mapID = params["m"]
  1891 	mapID = params["m"]
  1791 	infUFO = params["ufo"]
  1892 	infUFO = params["ufo"]
       
  1893 
       
  1894 	roundLimit = tonumber(params["rounds"])
       
  1895 
       
  1896 	if (roundLimit == 0) or (roundLimit == nil) then
       
  1897 		roundLimit = 3
       
  1898 	end
       
  1899 
  1792 end
  1900 end
  1793 
  1901 
  1794 function onPreviewInit()
  1902 function onPreviewInit()
  1795 	onGameInit()
  1903 	onGameInit()
  1796 end
  1904 end
  1823 		DeleteGear(gear)
  1931 		DeleteGear(gear)
  1824     end
  1932     end
  1825 
  1933 
  1826 end
  1934 end
  1827 
  1935 
       
  1936 function onSpecialPoint(x,y,flag)
       
  1937     specialPointsX[specialPointsCount] = x
       
  1938     specialPointsY[specialPointsCount] = y
       
  1939 	specialPointsFlag[specialPointsCount] = flag
       
  1940     specialPointsCount = specialPointsCount + 1
       
  1941 end
       
  1942 
       
  1943 function InterpretPoints()
       
  1944 
       
  1945 	-- flags run from 0 to 127
       
  1946 	for i = 0, (specialPointsCount-1) do
       
  1947 
       
  1948 		-- Mines
       
  1949 		if specialPointsFlag[i] == 1 then
       
  1950 			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 1)
       
  1951 		elseif specialPointsFlag[i] == 2 then
       
  1952 			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 1000)
       
  1953 		elseif specialPointsFlag[i] == 3 then
       
  1954 			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 2000)
       
  1955 		elseif specialPointsFlag[i] == 4 then
       
  1956 			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 3000)
       
  1957 		elseif specialPointsFlag[i] == 5 then
       
  1958 			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 4000)
       
  1959 		elseif specialPointsFlag[i] == 6 then
       
  1960 			SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 5000)
       
  1961 
       
  1962 		-- Sticky Mines
       
  1963 		elseif specialPointsFlag[i] == 7 then
       
  1964 			AddGear(specialPointsX[i], specialPointsY[i], gtSMine, 0, 0, 0, 0)
       
  1965 
       
  1966 		-- Air Mines
       
  1967 		elseif specialPointsFlag[i] == 8 then
       
  1968 			AddGear(specialPointsX[i], specialPointsY[i], gtAirMine, 0, 0, 0, 0)
       
  1969 
       
  1970 		-- Health Crates
       
  1971 		elseif specialPointsFlag[i] == 9 then
       
  1972 			SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),25)
       
  1973 		elseif specialPointsFlag[i] == 10 then
       
  1974 			SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),50)
       
  1975 		elseif specialPointsFlag[i] == 11 then
       
  1976 			SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),75)
       
  1977 		elseif specialPointsFlag[i] == 12 then
       
  1978 			SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),100)
       
  1979 
       
  1980 		-- Cleaver
       
  1981 		elseif specialPointsFlag[i] == 13 then
       
  1982 			AddGear(specialPointsX[i], specialPointsY[i], gtKnife, 0, 0, 0, 0)
       
  1983 
       
  1984 		-- Target
       
  1985 		elseif specialPointsFlag[i] == 14 then
       
  1986 			AddGear(specialPointsX[i], specialPointsY[i], gtTarget, 0, 0, 0, 0)
       
  1987 
       
  1988 		--Barrels
       
  1989 		elseif specialPointsFlag[i] == 15 then
       
  1990 			SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),1)
       
  1991 		elseif specialPointsFlag[i] == 16 then
       
  1992 			SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),25)
       
  1993 		elseif specialPointsFlag[i] == 17 then
       
  1994 			SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),50)
       
  1995 		elseif specialPointsFlag[i] == 18 then
       
  1996 			SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),75)
       
  1997 		elseif specialPointsFlag[i] == 19 then
       
  1998 			SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),100)
       
  1999 
       
  2000 		-- There are about 58+- weps / utils
       
  2001 		-- Weapon Crates
       
  2002 		elseif (specialPointsFlag[i] >= 20) and (specialPointsFlag[i] < (#atkArray+20)) then
       
  2003 			SpawnAmmoCrate(specialPointsX[i],specialPointsY[i],atkArray[i-19][1])
       
  2004 
       
  2005 		-- Utility Crates
       
  2006 		elseif (specialPointsFlag[i] >= (#atkArray+20)) and (specialPointsFlag[i] < (#atkArray+20+#utilArray)) then
       
  2007 			SpawnUtilityCrateCrate(specialPointsX[i],specialPointsY[i],utilArray[i-19-#atkArray][1])
       
  2008 
       
  2009 		--79-82 (reserved for future wep crates)
       
  2010 		--89,88,87,86 and 85,84,83,82 (reserved for the 2 custom sprites and their landflags)
       
  2011 
       
  2012 		--90-99 reserved for scripted structures
       
  2013 		--[[elseif specialPointsFlag[i] == 90 then
       
  2014 			--PlaceStruc("generator")
       
  2015 		elseif specialPointsFlag[i] == 91 then
       
  2016 			--PlaceStruc("healingstation")
       
  2017 		elseif specialPointsFlag[i] == 92 then
       
  2018 			--PlaceStruc("respawner")
       
  2019 		elseif specialPointsFlag[i] == 93 then
       
  2020 			--PlaceStruc("teleportationnode")
       
  2021 		elseif specialPointsFlag[i] == 94 then
       
  2022 			--PlaceStruc("biofilter")
       
  2023 		elseif specialPointsFlag[i] == 95 then
       
  2024 			--PlaceStruc("supportstation")
       
  2025 		elseif specialPointsFlag[i] == 96 then
       
  2026 			--PlaceStruc("constructionstation")
       
  2027 		elseif specialPointsFlag[i] == 97 then
       
  2028 			--PlaceStruc("reflectorshield")
       
  2029 		elseif specialPointsFlag[i] == 98 then
       
  2030 			--PlaceStruc("weaponfilter")]]
       
  2031 
       
  2032 		-- Normal Girders
       
  2033 		elseif specialPointsFlag[i] == 100 then
       
  2034 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal)
       
  2035 		elseif specialPointsFlag[i] == 101 then
       
  2036 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 1, 4294967295, nil, nil, nil, lfNormal)
       
  2037 		elseif specialPointsFlag[i] == 102 then
       
  2038 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal)
       
  2039 		elseif specialPointsFlag[i] == 103 then
       
  2040 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 3, 4294967295, nil, nil, nil, lfNormal)
       
  2041 		elseif specialPointsFlag[i] == 104 then
       
  2042 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal)
       
  2043 		elseif specialPointsFlag[i] == 105 then
       
  2044 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal)
       
  2045 		elseif specialPointsFlag[i] == 106 then
       
  2046 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal)
       
  2047 		elseif specialPointsFlag[i] == 107 then
       
  2048 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal)
       
  2049 
       
  2050 		-- Invulnerable Girders
       
  2051 		elseif specialPointsFlag[i] == 108 then
       
  2052 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible)
       
  2053 		elseif specialPointsFlag[i] == 109 then
       
  2054 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 1, 2516582650, nil, nil, nil, lfIndestructible)
       
  2055 		elseif specialPointsFlag[i] == 110 then
       
  2056 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible)
       
  2057 		elseif specialPointsFlag[i] == 111 then
       
  2058 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 3, 2516582650, nil, nil, nil, lfIndestructible)
       
  2059 		elseif specialPointsFlag[i] == 112 then
       
  2060 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible)
       
  2061 		elseif specialPointsFlag[i] == 113 then
       
  2062 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible)
       
  2063 		elseif specialPointsFlag[i] == 114 then
       
  2064 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 6, 2516582650, nil, nil, nil, lfIndestructible)
       
  2065 		elseif specialPointsFlag[i] == 115 then
       
  2066 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible)
       
  2067 
       
  2068 		-- Icy Girders
       
  2069 		elseif specialPointsFlag[i] == 116 then
       
  2070 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 0, 16448250, nil, nil, nil, lfIce)
       
  2071 		elseif specialPointsFlag[i] == 117 then
       
  2072 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 1, 16448250, nil, nil, nil, lfIce)
       
  2073 		elseif specialPointsFlag[i] == 118 then
       
  2074 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 2, 16448250, nil, nil, nil, lfIce)
       
  2075 		elseif specialPointsFlag[i] == 119 then
       
  2076 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 3, 16448250, nil, nil, nil, lfIce)
       
  2077 		elseif specialPointsFlag[i] == 120 then
       
  2078 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 4, 16448250, nil, nil, nil, lfIce)
       
  2079 		elseif specialPointsFlag[i] == 121 then
       
  2080 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 5, 16448250, nil, nil, nil, lfIce)
       
  2081 		elseif specialPointsFlag[i] == 121 then
       
  2082 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 6, 16448250, nil, nil, nil, lfIce)
       
  2083 		elseif specialPointsFlag[i] == 123 then
       
  2084 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 7, 16448250, nil, nil, nil, lfIce)
       
  2085 
       
  2086 		-- Rubber Bands
       
  2087 		elseif specialPointsFlag[i] == 124 then
       
  2088 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 0, 4294967295, nil, nil, nil, lfBouncy)
       
  2089 		elseif specialPointsFlag[i] == 125 then
       
  2090 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 1, 4294967295, nil, nil, nil, lfBouncy)
       
  2091 		elseif specialPointsFlag[i] == 126 then
       
  2092 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 2, 4294967295, nil, nil, nil, lfBouncy)
       
  2093 		elseif specialPointsFlag[i] == 127 then
       
  2094 			PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 3, 4294967295, nil, nil, nil, lfBouncy)
       
  2095 
       
  2096 		-- Waypoints
       
  2097 		else -- 0 / no value
       
  2098 			PlaceWayPoint(specialPointsX[i], specialPointsY[i])
       
  2099 		end
       
  2100 
       
  2101 	end
       
  2102 
       
  2103 end
       
  2104 
  1828 function onGameStart()
  2105 function onGameStart()
  1829 
       
  1830 
  2106 
  1831 		trackTeams()
  2107 		trackTeams()
  1832 
  2108 
  1833 		roundN = 0
  2109 		roundN = 0
  1834         lastRound = TotalRounds
  2110         lastRound = TotalRounds
  1835         RoundHasChanged = false -- true
  2111         RoundHasChanged = false -- true
  1836 
  2112 
  1837         for i = 0, (specialPointsCount-1) do
  2113         InterpretPoints()
  1838                 PlaceWayPoint(specialPointsX[i], specialPointsY[i])
       
  1839         end
       
  1840 
  2114 
  1841         RebuildTeamInfo()
  2115         RebuildTeamInfo()
  1842 
  2116 
  1843 		for i=0 , TeamsCount - 1 do
  2117 		for i=0 , TeamsCount - 1 do
  1844 			cnthhs = 0
  2118 			cnthhs = 0
  1849                                 loc("RACER"),
  2123                                 loc("RACER"),
  1850                                 loc("a Hedgewars mini-game"),
  2124                                 loc("a Hedgewars mini-game"),
  1851 
  2125 
  1852                                 loc("Build a track and race.") .. "|" ..
  2126                                 loc("Build a track and race.") .. "|" ..
  1853                                 loc("Round Limit:") .. " " .. roundLimit .. "|" ..
  2127                                 loc("Round Limit:") .. " " .. roundLimit .. "|" ..
       
  2128 								loc("You can further customize the race by changing the scheme script paramater.") .. "|" ..
       
  2129 								--loc("For example, the below line would play map 4, with infinite fuel for the flying saucer, and four rounds.") .. "|" ..
       
  2130 								--"m=4, ufo=true, rounds=4" .. "|" ..
  1854 
  2131 
  1855                                 "", 4, 4000
  2132                                 "", 4, 4000
  1856                                 )
  2133                                 )
  1857 
  2134 
  1858         TryRepositionHogs()
  2135         TryRepositionHogs()
  1874 
  2151 
  1875             AddCaption(loc("Waypoint placed.") .. " " .. loc("Available points remaining: ") .. (wpLimit-wpCount))
  2152             AddCaption(loc("Waypoint placed.") .. " " .. loc("Available points remaining: ") .. (wpLimit-wpCount))
  1876         end
  2153         end
  1877     end
  2154     end
  1878 end
  2155 end
  1879 
       
  1880 function onSpecialPoint(x,y,flag)
       
  1881     specialPointsX[specialPointsCount] = x
       
  1882     specialPointsY[specialPointsCount] = y
       
  1883     specialPointsCount = specialPointsCount + 1
       
  1884 end
       
  1885 
       
  1886 
       
  1887 
  2156 
  1888 function onNewTurn()
  2157 function onNewTurn()
  1889 
  2158 
  1890         CheckForNewRound()
  2159         CheckForNewRound()
  1891         TryRepositionHogs()
  2160         TryRepositionHogs()