share/hedgewars/Data/Missions/Scenario/User_Mission_-_Nobody_Laugh.lua
changeset 13059 2f21d92eae27
parent 12933 e65aa3c3d4e6
child 14483 310b167141cc
equal deleted inserted replaced
13058:004f4f7dc9d4 13059:2f21d92eae27
     1 --------------------------------------
     1 HedgewarsScriptLoad("/Scripts/SimpleMission.lua")
     2 -- NOBODY LAUGH
     2 HedgewarsScriptLoad("/Scripts/Locale.lua")
     3 -- a hilarious (not really) adventure
       
     4 --------------------------------------
       
     5 
     3 
     6 HedgewarsScriptLoad("/Scripts/Locale.lua")
     4 local enemyAmmo = {
     7 HedgewarsScriptLoad("/Scripts/Tracker.lua")
     5 	[amDEagle] = 100, [amShotgun] = 100, [amGrenade] = 100, [amBazooka] = 100, [amDrill] = 100
       
     6 }
     8 
     7 
     9 local hhs = {}
     8 SimpleMission({
       
     9 	missionTitle = loc("Nobody Laugh"),
       
    10 	missionIcon = 0,
       
    11 	goalText = 
       
    12 		loc("Eliminate the enemy.") .. "|" ..
       
    13 		loc("Unlimited Attacks: Attacks don't end your turn") .. "|"..
       
    14 		loc("Per-hog Ammo: Weapons are not shared between hogs"),
       
    15 	wind = 100,
       
    16 	initVars = {
       
    17 		TurnTime = 180000,
       
    18 		Map = "Bath",
       
    19 		Theme = "Nature",
       
    20 		Seed = 0,
       
    21 		GameFlags = gfInfAttack + gfPerHogAmmo + gfDisableWind,
       
    22 	},
       
    23 	ammoConfig = {
       
    24 		[amSwitch] = { count = 9 },
       
    25 	},
       
    26 	teams = {
       
    27 		{ name = loc("Nameless Heroes"),
       
    28 		flag = "cm_crossedswords",
       
    29 		grave = "eyecross",
       
    30 		voice = "HillBilly",
       
    31 		clanID = 0,
       
    32 		hogs = {
       
    33 			{
       
    34 			name = loc("Hunter"),
       
    35 			health = 1,
       
    36 			x = 1267, y = 451,
       
    37 			hat = "Skull",
       
    38 			botLevel = 0,
       
    39 			ammo = { [amParachute] = 1, [amHammer] = 1 },
       
    40 			},
       
    41 			{
       
    42 			name = loc("Drowner"),
       
    43 			health = 31,
       
    44 			x = 1332, y = 451,
       
    45 			hat = "mp3",
       
    46 			botLevel = 0,
       
    47 			ammo = { [amWhip] = 1 },
       
    48 			},
       
    49 		}},
       
    50 		{ name = loc("Clowns"),
       
    51 		flag = "cm_face",
       
    52 		grave = "Duck2",
       
    53 		voice = "Mobster",
       
    54 		clanID = 5,
       
    55 		hogs = {
       
    56 			{ name = loc("Poison"), health = 100, x = 1133, y = 446, hat = "WhySoSerious", botLevel = 1, ammo = enemyAmmo },
       
    57 			{ name = loc("Bobo"), health = 100, x = 1215, y = 553, hat = "clown", botLevel = 1, ammo = enemyAmmo },
       
    58 			{ name = loc("Copper"), health = 10, x = 414, y = 376, hat = "clown-copper", botLevel = 1, ammo = enemyAmmo },
       
    59 			{ name = loc("Derp"), health = 100, x = 1590, y = 886, hat = "clown-crossed", botLevel = 1, ammo = enemyAmmo },
       
    60 			{ name = loc("Eckles"), health = 100, x = 772, y = 754, hat = "clown-copper", botLevel = 1, ammo = enemyAmmo },
       
    61 			{ name = loc("Frank"), health = 50, x = 1688, y = 714, hat = "clown-copper", botLevel = 1, ammo = enemyAmmo },
       
    62 			{ name = loc("Harry"), health = 50, x = 1932, y = 837, hat = "clown-copper", botLevel = 1, ammo = enemyAmmo },
       
    63 			{ name = loc("Igmund"), health = 50, x = 1601, y = 733, hat = "WhySoSerious", botLevel = 1, ammo = enemyAmmo },
       
    64 		}},
       
    65 	},
       
    66 	girders = {
       
    67 		{ x = 1212, y = 710, frameIdx = 7 },
       
    68 		{ x = 1215, y = 570, frameIdx = 4 },
       
    69 		{ x = 1288, y = 520, frameIdx = 2 },
       
    70 		{ x = 1184, y = 468, frameIdx = 4 },
       
    71 		{ x = 1344, y = 468, frameIdx = 4 },
       
    72 		{ x = 1247, y = 346, frameIdx = 4 },
       
    73 		{ x = 667, y = 438, frameIdx = 4 },
       
    74 		{ x = 507, y = 438, frameIdx = 4 },
       
    75 		{ x = 434, y = 487, frameIdx = 2 },
       
    76 		{ x = 505, y = 537, frameIdx = 4 },
       
    77 		{ x = 665, y = 537, frameIdx = 4 },
       
    78 		{ x = 737, y = 487, frameIdx = 2 },
       
    79 		{ x = 416, y = 465, frameIdx = 6 },
       
    80 		{ x = 1415, y = 378, frameIdx = 6 },
       
    81 		{ x = 1300, y = 625, frameIdx = 3 },
       
    82 		{ x = 1359, y = 566, frameIdx = 3 },
       
    83 		{ x = 1436, y = 538, frameIdx = 0 },
       
    84 		{ x = 1505, y = 468, frameIdx = 4 },
       
    85 	},
    10 
    86 
    11 function onGameInit()
    87 	gears = {
    12 
    88 		{ type = gtCase, crateType = "supply", x = 1242, y = 315, ammoType = amBaseballBat },
    13 	Seed = 0
    89 		{ type = gtCase, crateType = "supply", x = 1309, y = 315, ammoType = amAirAttack },
    14 	GameFlags = gfInfAttack + gfPerHogAmmo +gfDisableWind
    90 		{ type = gtCase, crateType = "supply", x = 144, y = 895, ammoType = amAirAttack },
    15 	-- Disable Sudden Death
    91 		{ type = gtCase, crateType = "supply", x = 664, y = 699, ammoType = amIceGun },
    16 	HealthDecrease = 0
    92 		{ type = gtCase, crateType = "supply", x = 1572, y = 444, ammoType = amFirePunch },
    17 	WaterRise = 0
    93 		{ type = gtCase, crateType = "supply", x = 1574, y = 382, ammoType = amDynamite },
    18 	TurnTime = 180000
    94 		{ type = gtCase, crateType = "supply", x = 654, y = 513, ammoType = amParachute },
    19 	CaseFreq = 0
    95 		{ type = gtCase, crateType = "supply", x = 1569, y = 413, ammoType = amParachute },
    20 	MinesNum = 0
    96 	}
    21 	Explosives = 0
    97 })
    22 	Map = "Bath"
       
    23 	Theme = "Nature"
       
    24 
       
    25 	AddTeam(loc("Nameless Heroes"), 14483456, "eyecross", "Wood", "HillBilly", "cm_crossedswords")
       
    26 	hhs[1] = AddHog(loc( "Hunter" ), 0, 1, "Skull")
       
    27 	SetGearPosition(hhs[1], 1267, 451)
       
    28 	hhs[2] = AddHog(loc("Drowner"), 0, 31, "mp3")
       
    29 	SetGearPosition(hhs[2], 1332, 451)
       
    30 
       
    31 	AddTeam(loc("Clowns"), 1175851, "Duck2", "Tank", "Mobster", "cm_face")
       
    32 	hhs[3] = AddHog(loc("Poison"), 1, 100, "WhySoSerious")
       
    33 	SetGearPosition(hhs[3], 1133, 446)
       
    34 	hhs[4] = AddHog(loc("Bobo"), 1, 100, "clown")
       
    35 	SetGearPosition(hhs[4], 1215, 553)
       
    36 	hhs[5] = AddHog(loc("Copper"), 1, 10, "clown-copper")
       
    37 	SetGearPosition(hhs[5], 414, 376)
       
    38 	hhs[6] = AddHog(loc("Derp"), 1, 100, "clown-crossed")
       
    39 	SetGearPosition(hhs[6], 1590, 886)
       
    40 	hhs[7] = AddHog(loc("Eckles"), 1, 100, "clown-copper")
       
    41 	SetGearPosition(hhs[7], 772, 754)
       
    42 	hhs[8] = AddHog(loc("Frank"), 1, 50, "clown-copper")
       
    43 	SetGearPosition(hhs[8], 1688, 714)
       
    44 	hhs[9] = AddHog(loc("Harry"), 1, 50, "clown-copper")
       
    45 	SetGearPosition(hhs[9], 1932, 837)
       
    46 	hhs[10] = AddHog(loc("Igmund"), 1, 50, "WhySoSerious")
       
    47 	SetGearPosition(hhs[10], 1601, 733)
       
    48 
       
    49 end
       
    50 
       
    51 function onGameStart()
       
    52 
       
    53 	AddAmmo(enemy, amAirAttack, 100)
       
    54 
       
    55 	ShowMission(	loc("Nobody Laugh"),
       
    56 					loc("Scenario"),
       
    57 					loc("Eliminate the enemy.") .. "|" ..
       
    58 					loc("Unlimited Attacks: Attacks don't end your turn") .. "|"..
       
    59 					loc("Per-hog Ammo: Weapons are not shared between hogs")
       
    60 					, 0, 0
       
    61 				)
       
    62 
       
    63 	-- GIRDERS
       
    64 	PlaceGirder(1212, 710, 7)
       
    65 	PlaceGirder(1215, 570, 4)
       
    66 	PlaceGirder(1288, 520, 2)
       
    67 	PlaceGirder(1184, 468, 4)
       
    68 	PlaceGirder(1344, 468, 4)
       
    69 	PlaceGirder(1247, 346, 4)
       
    70 
       
    71 	PlaceGirder(667, 438, 4)
       
    72 	PlaceGirder(507, 438, 4)
       
    73 	PlaceGirder(434, 487, 2)
       
    74 	PlaceGirder(505, 537, 4)
       
    75 	PlaceGirder(665, 537, 4)
       
    76 	PlaceGirder(737, 487, 2)
       
    77 
       
    78 	PlaceGirder(416, 465, 6)
       
    79 	PlaceGirder(1415, 378, 6)
       
    80 	PlaceGirder(1300, 625, 3)
       
    81 	PlaceGirder(1359, 566, 3)
       
    82 	PlaceGirder(1436, 538, 0)
       
    83 	PlaceGirder(1505, 468, 4)
       
    84 
       
    85 	------ CRATE LIST ------
       
    86 	tempG = SpawnSupplyCrate(1242, 315, amBaseballBat)
       
    87 	tempG = SpawnSupplyCrate(1309, 315, amAirAttack)
       
    88 	tempG = SpawnSupplyCrate(144, 895, amAirAttack)
       
    89 	tempG = SpawnSupplyCrate(664, 699, amIceGun)
       
    90 	tempG = SpawnSupplyCrate(1572, 444, amFirePunch)
       
    91 	tempG = SpawnSupplyCrate(1574, 382, amDynamite)
       
    92 
       
    93 	tempG = SpawnSupplyCrate(654, 513, amParachute)
       
    94 	tempG = SpawnSupplyCrate(1569, 413, amParachute)
       
    95 
       
    96 	-- HOG AMMO
       
    97 	AddAmmo(hhs[1],amParachute,1)
       
    98 	AddAmmo(hhs[1],amHammer,1)
       
    99 	AddAmmo(hhs[2],amWhip,1)
       
   100 
       
   101 	for i = 3, 10 do
       
   102 		AddAmmo(hhs[i], amDEagle, 100)
       
   103 		AddAmmo(hhs[i], amShotgun, 100)
       
   104 		AddAmmo(hhs[i], amGrenade, 100)
       
   105 		AddAmmo(hhs[i], amBazooka, 100)
       
   106 		AddAmmo(hhs[i], amDrill, 100)
       
   107 	end
       
   108 
       
   109 end
       
   110 
       
   111 function onNewTurn()
       
   112 	SetWind(100)
       
   113 end
       
   114 
       
   115 function onAmmoStoreInit()
       
   116 
       
   117 	SetAmmo(amBaseballBat, 0, 0, 0, 1)
       
   118 	SetAmmo(amAirAttack, 0, 0, 0, 1)
       
   119 	SetAmmo(amFirePunch, 0, 0, 0, 1)
       
   120 	SetAmmo(amDynamite, 0, 0, 0, 1)
       
   121 	SetAmmo(amHammer, 0, 0, 0, 1)
       
   122 	SetAmmo(amIceGun, 0, 0, 0, 1)
       
   123 
       
   124 	SetAmmo(amParachute, 0, 0, 0, 1)
       
   125 
       
   126 	SetAmmo(amSwitch, 9, 0, 0, 0)
       
   127 	SetAmmo(amSkip, 9, 0, 0, 0)
       
   128 
       
   129 end
       
   130 
       
   131 ------------------------------
       
   132 --                  I'm in         whitesppaaaaaaaaaacceeeee           :D
       
   133 ------------------------------