share/hedgewars/Data/Missions/Scenario/User_Mission_-_Nobody_Laugh.lua
author Wuzzy <Wuzzy2@mail.ru>
Fri, 09 Feb 2018 07:38:14 +0100
changeset 12933 e65aa3c3d4e6
parent 12629 be1ee010e30d
child 13059 2f21d92eae27
permissions -rw-r--r--
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
     1
--------------------------------------
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
     2
-- NOBODY LAUGH
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
     3
-- a hilarious (not really) adventure
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
     4
--------------------------------------
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
     5
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
     6
HedgewarsScriptLoad("/Scripts/Locale.lua")
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
     7
HedgewarsScriptLoad("/Scripts/Tracker.lua")
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
     8
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
     9
local hhs = {}
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    10
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    11
function onGameInit()
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    12
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    13
	Seed = 0
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    14
	GameFlags = gfInfAttack + gfPerHogAmmo +gfDisableWind
12224
d62d6f8ebef1 Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents: 12078
diff changeset
    15
	-- Disable Sudden Death
d62d6f8ebef1 Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents: 12078
diff changeset
    16
	HealthDecrease = 0
d62d6f8ebef1 Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents: 12078
diff changeset
    17
	WaterRise = 0
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    18
	TurnTime = 180000
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    19
	CaseFreq = 0
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    20
	MinesNum = 0
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    21
	Explosives = 0
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    22
	Map = "Bath"
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    23
	Theme = "Nature"
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    24
12049
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11968
diff changeset
    25
	AddTeam(loc("Nameless Heroes"), 14483456, "eyecross", "Wood", "HillBilly", "cm_crossedswords")
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    26
	hhs[1] = AddHog(loc( "Hunter" ), 0, 1, "Skull")
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    27
	SetGearPosition(hhs[1], 1267, 451)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    28
	hhs[2] = AddHog(loc("Drowner"), 0, 31, "mp3")
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    29
	SetGearPosition(hhs[2], 1332, 451)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    30
12049
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11968
diff changeset
    31
	AddTeam(loc("Clowns"), 1175851, "Duck2", "Tank", "Mobster", "cm_face")
12629
be1ee010e30d Nobody Laugh mission: Set bot level to maximum
Wuzzy <almikes@aol.com>
parents: 12351
diff changeset
    32
	hhs[3] = AddHog(loc("Poison"), 1, 100, "WhySoSerious")
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    33
	SetGearPosition(hhs[3], 1133, 446)
12629
be1ee010e30d Nobody Laugh mission: Set bot level to maximum
Wuzzy <almikes@aol.com>
parents: 12351
diff changeset
    34
	hhs[4] = AddHog(loc("Bobo"), 1, 100, "clown")
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    35
	SetGearPosition(hhs[4], 1215, 553)
12629
be1ee010e30d Nobody Laugh mission: Set bot level to maximum
Wuzzy <almikes@aol.com>
parents: 12351
diff changeset
    36
	hhs[5] = AddHog(loc("Copper"), 1, 10, "clown-copper")
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    37
	SetGearPosition(hhs[5], 414, 376)
12629
be1ee010e30d Nobody Laugh mission: Set bot level to maximum
Wuzzy <almikes@aol.com>
parents: 12351
diff changeset
    38
	hhs[6] = AddHog(loc("Derp"), 1, 100, "clown-crossed")
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    39
	SetGearPosition(hhs[6], 1590, 886)
12629
be1ee010e30d Nobody Laugh mission: Set bot level to maximum
Wuzzy <almikes@aol.com>
parents: 12351
diff changeset
    40
	hhs[7] = AddHog(loc("Eckles"), 1, 100, "clown-copper")
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    41
	SetGearPosition(hhs[7], 772, 754)
12629
be1ee010e30d Nobody Laugh mission: Set bot level to maximum
Wuzzy <almikes@aol.com>
parents: 12351
diff changeset
    42
	hhs[8] = AddHog(loc("Frank"), 1, 50, "clown-copper")
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    43
	SetGearPosition(hhs[8], 1688, 714)
12629
be1ee010e30d Nobody Laugh mission: Set bot level to maximum
Wuzzy <almikes@aol.com>
parents: 12351
diff changeset
    44
	hhs[9] = AddHog(loc("Harry"), 1, 50, "clown-copper")
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    45
	SetGearPosition(hhs[9], 1932, 837)
12629
be1ee010e30d Nobody Laugh mission: Set bot level to maximum
Wuzzy <almikes@aol.com>
parents: 12351
diff changeset
    46
	hhs[10] = AddHog(loc("Igmund"), 1, 50, "WhySoSerious")
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    47
	SetGearPosition(hhs[10], 1601, 733)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    48
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    49
end
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    50
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    51
function onGameStart()
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    52
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    53
	AddAmmo(enemy, amAirAttack, 100)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    54
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    55
	ShowMission(	loc("Nobody Laugh"),
12077
ce3860c82c8b Rewrite 2nd line of mission panel of most missions for consistency
Wuzzy <almikes@aol.com>
parents: 12049
diff changeset
    56
					loc("Scenario"),
12351
62b935bec899 Mention important game modifiers in Spooky Tree and Nobody Laugh
Wuzzy <almikes@aol.com>
parents: 12224
diff changeset
    57
					loc("Eliminate the enemy.") .. "|" ..
62b935bec899 Mention important game modifiers in Spooky Tree and Nobody Laugh
Wuzzy <almikes@aol.com>
parents: 12224
diff changeset
    58
					loc("Unlimited Attacks: Attacks don't end your turn") .. "|"..
62b935bec899 Mention important game modifiers in Spooky Tree and Nobody Laugh
Wuzzy <almikes@aol.com>
parents: 12224
diff changeset
    59
					loc("Per-hog Ammo: Weapons are not shared between hogs")
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    60
					, 0, 0
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    61
				)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    62
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    63
	-- GIRDERS
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    64
	PlaceGirder(1212, 710, 7)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    65
	PlaceGirder(1215, 570, 4)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    66
	PlaceGirder(1288, 520, 2)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    67
	PlaceGirder(1184, 468, 4)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    68
	PlaceGirder(1344, 468, 4)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    69
	PlaceGirder(1247, 346, 4)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    70
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    71
	PlaceGirder(667, 438, 4)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    72
	PlaceGirder(507, 438, 4)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    73
	PlaceGirder(434, 487, 2)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    74
	PlaceGirder(505, 537, 4)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    75
	PlaceGirder(665, 537, 4)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    76
	PlaceGirder(737, 487, 2)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    77
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    78
	PlaceGirder(416, 465, 6)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    79
	PlaceGirder(1415, 378, 6)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    80
	PlaceGirder(1300, 625, 3)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    81
	PlaceGirder(1359, 566, 3)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    82
	PlaceGirder(1436, 538, 0)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    83
	PlaceGirder(1505, 468, 4)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    84
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12629
diff changeset
    85
	------ CRATE LIST ------
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12629
diff changeset
    86
	tempG = SpawnSupplyCrate(1242, 315, amBaseballBat)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12629
diff changeset
    87
	tempG = SpawnSupplyCrate(1309, 315, amAirAttack)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12629
diff changeset
    88
	tempG = SpawnSupplyCrate(144, 895, amAirAttack)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12629
diff changeset
    89
	tempG = SpawnSupplyCrate(664, 699, amIceGun)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12629
diff changeset
    90
	tempG = SpawnSupplyCrate(1572, 444, amFirePunch)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12629
diff changeset
    91
	tempG = SpawnSupplyCrate(1574, 382, amDynamite)
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    92
12933
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12629
diff changeset
    93
	tempG = SpawnSupplyCrate(654, 513, amParachute)
e65aa3c3d4e6 Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents: 12629
diff changeset
    94
	tempG = SpawnSupplyCrate(1569, 413, amParachute)
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    95
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    96
	-- HOG AMMO
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    97
	AddAmmo(hhs[1],amParachute,1)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    98
	AddAmmo(hhs[1],amHammer,1)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
    99
	AddAmmo(hhs[2],amWhip,1)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   100
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   101
	for i = 3, 10 do
10893
b085cf83ab4c fix error in Nobody Laugh
mikade <redgrinner@gmail.com>
parents: 10017
diff changeset
   102
		AddAmmo(hhs[i], amDEagle, 100)
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   103
		AddAmmo(hhs[i], amShotgun, 100)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   104
		AddAmmo(hhs[i], amGrenade, 100)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   105
		AddAmmo(hhs[i], amBazooka, 100)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   106
		AddAmmo(hhs[i], amDrill, 100)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   107
	end
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   108
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   109
end
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   110
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   111
function onNewTurn()
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   112
	SetWind(100)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   113
end
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   114
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   115
function onAmmoStoreInit()
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   116
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   117
	SetAmmo(amBaseballBat, 0, 0, 0, 1)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   118
	SetAmmo(amAirAttack, 0, 0, 0, 1)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   119
	SetAmmo(amFirePunch, 0, 0, 0, 1)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   120
	SetAmmo(amDynamite, 0, 0, 0, 1)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   121
	SetAmmo(amHammer, 0, 0, 0, 1)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   122
	SetAmmo(amIceGun, 0, 0, 0, 1)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   123
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   124
	SetAmmo(amParachute, 0, 0, 0, 1)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   125
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   126
	SetAmmo(amSwitch, 9, 0, 0, 0)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   127
	SetAmmo(amSkip, 9, 0, 0, 0)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   128
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   129
end
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   130
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   131
------------------------------
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   132
--                  I'm in         whitesppaaaaaaaaaacceeeee           :D
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9088
diff changeset
   133
------------------------------