share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua
author Wuzzy <almikes@aol.com>
Wed, 23 Nov 2016 23:54:55 +0100
changeset 12054 030464f34d47
parent 11970 72be38f6d0c0
child 12231 3ec0261e01f0
permissions -rw-r--r--
Tweak flags used in all missions to fit more to the theme
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     1
------------------- ABOUT ----------------------
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     2
--
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     3
-- Hero has collected all the anti-gravity device
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     4
-- parts but because of the size of the meteorite
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     5
-- he needs to detonate some faulty explosives that
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     6
-- PAotH have previously placed on it.
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     7
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     8
HedgewarsScriptLoad("/Scripts/Locale.lua")
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     9
HedgewarsScriptLoad("/Scripts/Animate.lua")
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    10
HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    11
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    12
----------------- VARIABLES --------------------
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    13
-- globals
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    14
local missionName = loc("The big bang")
9781
5eb7c3778045 removed bouncy terrain, added visual mark on non-portal/indestructible areas, changed map so only way to win is by using the portal gun
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9758
diff changeset
    15
local challengeObjectives = loc("Find a way to detonate all the explosives and stay alive!").."|"..
5eb7c3778045 removed bouncy terrain, added visual mark on non-portal/indestructible areas, changed map so only way to win is by using the portal gun
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9758
diff changeset
    16
							loc("Red areas are indestructible").."|"..
11697
68eddcdc9f26 Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents: 9810
diff changeset
    17
							loc("Green areas are portal-proof")
9634
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    18
local explosives = {}
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    19
local currentHealth = 1
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    20
local currentDamage = 0
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    21
-- hogs
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    22
local hero = {
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    23
	name = loc("Hog Solo"),
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    24
	x = 790,
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    25
	y = 70
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    26
}
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    27
-- teams
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    28
local teamA = {
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    29
	name = loc("Hog Solo"),
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    30
	color = tonumber("38D61C",16) -- green
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    31
}
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    32
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    33
-------------- LuaAPI EVENT HANDLERS ------------------
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    34
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    35
function onGameInit()
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    36
	GameFlags = gfDisableWind + gfOneClanMode
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    37
	Seed = 1
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    38
	TurnTime = -1
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    39
	CaseFreq = 0
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    40
	MinesNum = 0
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    41
	MinesTime = 1
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    42
	Explosives = 0
9781
5eb7c3778045 removed bouncy terrain, added visual mark on non-portal/indestructible areas, changed map so only way to win is by using the portal gun
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9758
diff changeset
    43
	HealthCaseAmount = 35
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    44
	Map = "final_map"
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    45
	Theme = "EarthRise"
9758
3b8058b251b8 some more campaign string tweaks
sheepluva
parents: 9642
diff changeset
    46
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    47
	-- Hog Solo
12054
030464f34d47 Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents: 11970
diff changeset
    48
	AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "hedgewars")
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    49
	hero.gear = AddHog(hero.name, 0, 1, "war_desertgrenadier1")
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    50
	AnimSetGearPosition(hero.gear, hero.x, hero.y)
9758
3b8058b251b8 some more campaign string tweaks
sheepluva
parents: 9642
diff changeset
    51
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    52
	initCheckpoint("final")
9758
3b8058b251b8 some more campaign string tweaks
sheepluva
parents: 9642
diff changeset
    53
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    54
	AnimInit()
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    55
end
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    56
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    57
function onGameStart()
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    58
	AnimWait(hero.gear, 3000)
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    59
	FollowGear(hero.gear)
11697
68eddcdc9f26 Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents: 9810
diff changeset
    60
	ShowMission(missionName, loc("Challenge objectives"), challengeObjectives, -amSkip, 0)
9758
3b8058b251b8 some more campaign string tweaks
sheepluva
parents: 9642
diff changeset
    61
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    62
	-- explosives
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    63
	x = 400
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    64
	while x < 815 do
9634
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    65
		local gear = AddGear(x, 500, gtExplosives, 0, 0, 0, 0)
9810
54c0fdec4600 changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9802
diff changeset
    66
		x = x + GetRandom(26) + 15
9634
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    67
		table.insert(explosives, gear)
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    68
	end
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    69
	-- mines
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    70
	local x = 360
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    71
	while x < 815 do
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    72
		AddGear(x, 480, gtMine, 0, 0, 0, 0)
9810
54c0fdec4600 changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9802
diff changeset
    73
		x = x + GetRandom(16) + 5
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    74
	end
9758
3b8058b251b8 some more campaign string tweaks
sheepluva
parents: 9642
diff changeset
    75
	-- health crate
9781
5eb7c3778045 removed bouncy terrain, added visual mark on non-portal/indestructible areas, changed map so only way to win is by using the portal gun
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9758
diff changeset
    76
	SpawnHealthCrate(910, 5)
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    77
	-- ammo crates
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    78
	SpawnAmmoCrate(930, 1000,amRCPlane)
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    79
	SpawnAmmoCrate(1220, 672,amPickHammer)
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    80
	SpawnAmmoCrate(1220, 672,amGirder)
9758
3b8058b251b8 some more campaign string tweaks
sheepluva
parents: 9642
diff changeset
    81
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    82
	-- ammo
9758
3b8058b251b8 some more campaign string tweaks
sheepluva
parents: 9642
diff changeset
    83
	AddAmmo(hero.gear, amPortalGun, 1)
9634
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    84
	AddAmmo(hero.gear, amFirePunch, 1)
9758
3b8058b251b8 some more campaign string tweaks
sheepluva
parents: 9642
diff changeset
    85
9634
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    86
	AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    87
	AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0)
9758
3b8058b251b8 some more campaign string tweaks
sheepluva
parents: 9642
diff changeset
    88
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    89
	SendHealthStatsOff()
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    90
end
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    91
9634
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    92
function onGameTick()
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    93
	AnimUnWait()
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    94
	if ShowAnimation() == false then
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    95
		return
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    96
	end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    97
	ExecuteAfterAnimations()
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    98
	CheckEvents()
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
    99
end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   100
9632
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
   101
function onAmmoStoreInit()
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
   102
	SetAmmo(amRCPlane, 0, 0, 0, 1)
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
   103
	SetAmmo(amPickHammer, 0, 0, 0, 2)
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
   104
	SetAmmo(amGirder, 0, 0, 0, 1)
9dd1c36d8b54 final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
   105
end
9634
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   106
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   107
function onNewTurn()
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   108
	currentDamage = 0
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   109
	currentHealth = GetHealth(hero.gear)
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   110
end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   111
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   112
function onGearDamage(gear, damage)
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   113
	if gear == hero.gear then
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   114
		currentDamage = currentDamage + damage
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   115
	end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   116
end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   117
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   118
-------------- EVENTS ------------------
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   119
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   120
function onHeroDeath(gear)
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   121
	if not GetHealth(hero.gear) then
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   122
		return true
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   123
	end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   124
	return false
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   125
end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   126
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   127
function onHeroWin(gear)
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   128
	local win = true
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   129
	for i=1,table.getn(explosives) do
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   130
		if GetHealth(explosives[i]) then
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   131
			win = false
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   132
			break
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   133
		end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   134
	end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   135
	if currentHealth <= currentDamage then
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   136
		win = false
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   137
	end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   138
	return win
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   139
end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   140
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   141
-------------- ACTIONS ------------------
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   142
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   143
function heroDeath(gear)
9642
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9634
diff changeset
   144
	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9634
diff changeset
   145
	SendStat(siCustomAchievement, loc("You have to destroy all the explosives without dying!"))
11697
68eddcdc9f26 Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents: 9810
diff changeset
   146
	SendStat(siCustomAchievement, loc("Red areas are indestructible."))
68eddcdc9f26 Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents: 9810
diff changeset
   147
	SendStat(siCustomAchievement, loc("Green areas are portal-proof and repel portals."))
9642
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9634
diff changeset
   148
	SendStat(siPlayerKills,'0',teamA.name)
9634
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   149
	EndGame()
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   150
end
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   151
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   152
function heroWin(gear)
9802
00216d609140 desert01 fixed destructible terrain marks and cosmos marks for completed main missions
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9781
diff changeset
   153
	saveCompletedStatus(7)
11954
079d687671b2 Store campaign victories in campaign variable "Won"
Wuzzy <almikes@aol.com>
parents: 11697
diff changeset
   154
	SaveCampaignVar("Won", "true")
11970
72be38f6d0c0 Complete space campaign's spacetrip mission if all main+side missions are completed
Wuzzy <almikes@aol.com>
parents: 11957
diff changeset
   155
	checkAllMissionsCompleted()
9642
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9634
diff changeset
   156
	SendStat(siGameResult, loc("Congratulations, you have saved Hogera!"))
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9634
diff changeset
   157
	SendStat(siCustomAchievement, loc("Hogera is safe!"))
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9634
diff changeset
   158
	SendStat(siPlayerKills,'1',teamA.name)
9634
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   159
	EndGame()
8032df67a249 custom stats and win/lose events
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9632
diff changeset
   160
end