share/hedgewars/Data/Missions/Scenario/User_Mission_-_Bamboo_Thicket.lua
author Wuzzy <almikes@aol.com>
Fri, 29 Sep 2017 03:41:30 +0200
changeset 12586 7510fe66bfbb
parent 12513 d90db45a0c4f
child 12771 957e4e2e2802
permissions -rw-r--r--
Change graves of teams in missions for greater variety In A Space Adventure, only one grave was used for all teams, which was clearly bad.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5427
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
     1
8043
da083f8d95e6 We need custom script loading function in lua now
unc0rr
parents: 7877
diff changeset
     2
HedgewarsScriptLoad("/Scripts/Locale.lua")
5427
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
     3
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
     4
local player = nil 
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
     5
local enemy = nil
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
     6
local firedShell = false
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
     7
local turnNumber = 0
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
     8
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
     9
local hhs = {}
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    10
local numhhs = 0
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    11
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    12
function onGameInit()
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    13
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    14
	Seed = 0 
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    15
	TurnTime = 20000 
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    16
	CaseFreq = 0 
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    17
	MinesNum = 0 
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    18
	Explosives = 0 
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    19
	Map = "Bamboo" 
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    20
	Theme = "Bamboo"
12224
d62d6f8ebef1 Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents: 12078
diff changeset
    21
	-- Disable Sudden Death
d62d6f8ebef1 Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents: 12078
diff changeset
    22
	HealthDecrease = 0
d62d6f8ebef1 Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents: 12078
diff changeset
    23
	WaterRise = 0
5427
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    24
12586
7510fe66bfbb Change graves of teams in missions for greater variety
Wuzzy <almikes@aol.com>
parents: 12513
diff changeset
    25
	AddTeam(loc("Pathetic Resistance"), 14483456, "Plinko", "Island", "Default", "cm_yinyang")
11262
6e1aa1144a2b - Finally added rus localization for all User Missions
antonc27 <antonc27@mail.ru>
parents: 8043
diff changeset
    26
	player = AddHog(loc("Ikeda"), 0, 10, "StrawHat")
5427
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    27
			
12586
7510fe66bfbb Change graves of teams in missions for greater variety
Wuzzy <almikes@aol.com>
parents: 12513
diff changeset
    28
	AddTeam(loc("Cybernetic Empire"), 	1175851, "ring", "Island", "Robot", "cm_cyborg")
5823
mikade
parents: 5449
diff changeset
    29
	enemy = AddHog(loc("Unit 835"), 1, 10, "cyborg1")
5427
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    30
7877
b3fb94986255 Fix training script positions altered by variable land dimension change. Issue #453
nemo
parents: 5823
diff changeset
    31
	SetGearPosition(player,142,656)
b3fb94986255 Fix training script positions altered by variable land dimension change. Issue #453
nemo
parents: 5823
diff changeset
    32
	SetGearPosition(enemy,1824,419)
5427
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    33
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    34
end
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    35
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    36
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    37
function onGameStart()
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    38
12078
99bfd35b3924 Fix misleading scenario desciptions regarding time limit / no time limit
Wuzzy <almikes@aol.com>
parents: 12077
diff changeset
    39
	ShowMission(loc("Bamboo Thicket"), loc("Scenario"), loc("Eliminate the enemy."), -amBazooka, 0)
5427
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    40
12513
d90db45a0c4f Fix crate types in A Space Adventure and some user missions
Wuzzy <almikes@aol.com>
parents: 12348
diff changeset
    41
	--WEAPON CRATE LIST. WCRATES: 2
7877
b3fb94986255 Fix training script positions altered by variable land dimension change. Issue #453
nemo
parents: 5823
diff changeset
    42
	SpawnAmmoCrate(891,852,amBazooka)
12513
d90db45a0c4f Fix crate types in A Space Adventure and some user missions
Wuzzy <almikes@aol.com>
parents: 12348
diff changeset
    43
	SpawnAmmoCrate(962,117,amBlowTorch)
d90db45a0c4f Fix crate types in A Space Adventure and some user missions
Wuzzy <almikes@aol.com>
parents: 12348
diff changeset
    44
	--UTILITY CRATE LIST. UCRATES: 1
7877
b3fb94986255 Fix training script positions altered by variable land dimension change. Issue #453
nemo
parents: 5823
diff changeset
    45
	SpawnUtilityCrate(403,503,amParachute)
5427
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    46
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    47
	AddAmmo(enemy, amGrenade, 100)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    48
		
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    49
end
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    50
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    51
function onNewTurn()
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    52
	SetWind(100)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    53
	turnNumber = turnNumber + 1
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    54
end
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    55
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    56
function onAmmoStoreInit()
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    57
	SetAmmo(amSkip, 9, 0, 0, 0)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    58
	SetAmmo(amGirder, 4, 0, 0, 0)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    59
	SetAmmo(amBlowTorch, 0, 0, 0, 1)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    60
	SetAmmo(amParachute, 0, 0, 0, 2)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    61
	SetAmmo(amBazooka, 0, 0, 0, 2)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    62
end
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    63
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    64
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    65
function onGearAdd(gear)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    66
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    67
	if GetGearType(gear) == gtHedgehog then
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    68
		hhs[numhhs] = gear
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    69
		numhhs = numhhs + 1
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    70
	elseif GetGearType(gear) == gtShell then
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    71
		firedShell = true
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    72
	end
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    73
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    74
end
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    75
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    76
function onGearDelete(gear)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    77
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    78
	if (gear == enemy) then
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    79
		
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    80
		ShowMission(loc("Bamboo Thicket"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    81
		
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    82
		if (turnNumber < 6) and (firedShell == false) then
12344
877f55c77a3f Standardize the secret achievements strings in Lua scripts
Wuzzy <almikes@aol.com>
parents: 12224
diff changeset
    83
			AddCaption(string.format(loc("Achievement gotten: %s"), loc("Energetic Engineer")),0xffba00ff,capgrpMessage2)
5427
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    84
		end
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    85
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    86
	elseif gear == player then
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    87
		ShowMission(loc("Bamboo Thicket"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    88
	end
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    89
3817b7e6c871 New mission. Hopefully easier than most of my other missions. :D
mikade
parents:
diff changeset
    90
end