share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua
author Periklis Ntanasis <pntanasis@gmail.com>
Wed, 07 Aug 2013 23:28:24 +0300
branchspacecampaign
changeset 9486 036fece2fb5f
child 9488 2e2bb48566ae
permissions -rw-r--r--
forgot to commit the new files :/
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9486
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     1
------------------- ABOUT ----------------------
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     2
--
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     3
-- In this adventure hero visits the fruit planet
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     4
-- to search for the missing part. However, a war
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     5
-- has broke out and hero has to take part or leave.
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     6
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     7
HedgewarsScriptLoad("/Scripts/Locale.lua")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     8
HedgewarsScriptLoad("/Scripts/Animate.lua")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     9
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    10
----------------- VARIABLES --------------------
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    11
-- globals
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    12
local campaignName = loc("A Space Adventure")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    13
local missionName = loc("Fruit planet, The War!")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    14
-- dialogs
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    15
local dialog01 = {}
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    16
-- mission objectives
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    17
local goals = {
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    18
	[dialog01] = {missionName, loc("Getting ready"), loc("Use the rope and get asap to the surface!"), 1, 4500},
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    19
}
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    20
-- hogs
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    21
local hero = {}
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    22
local yellow1 = {}
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    23
local yellow2 = {}
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    24
local yellow3 = {}
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    25
local green1 = {}
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    26
-- teams
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    27
local teamA = {}
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    28
local teamB = {}
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    29
local teamC = {}
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    30
-- hedgehogs values
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    31
hero.name = "Hog Solo"
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    32
hero.x = 3650
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    33
hero.y = 95
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    34
hero.dead = false
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    35
green1.name = "Captain Limes"
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    36
green1.x = 3600
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    37
green1.y = 95
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    38
yellow1.name = "General Lemon"
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    39
yellow1.x = 1300
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    40
yellow1.y = 1500
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    41
teamA.name = loc("Hog Solo")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    42
teamA.color = tonumber("38D61C",16) -- green  
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    43
teamB.name = loc("Green Bananas")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    44
teamB.color = tonumber("38D61C",16) -- green
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    45
teamC.name = loc("Yellow Watermellons")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    46
teamC.color = tonumber("DDFF00",16) -- yellow
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    47
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    48
function onGameInit()
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    49
	Seed = 1
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    50
	TurnTime = 20000
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    51
	CaseFreq = 0
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    52
	MinesNum = 0
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    53
	MinesTime = 1
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    54
	Explosives = 0
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    55
	Delay = 3
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    56
	HealthCaseAmount = 30
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    57
	Map = "fruit01_map"
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    58
	Theme = "Fruit"
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    59
	
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    60
	-- Hog Solo
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    61
	AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    62
	hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    63
	AnimSetGearPosition(hero.gear, hero.x, hero.y)
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    64
	HogTurnLeft(hero.gear, true)
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    65
	-- Green Bananas
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    66
	AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    67
	green1.gear = AddHog(green1.name, 0, 100, "war_desertgrenadier1")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    68
	AnimSetGearPosition(green1.gear, green1.x, green1.y)
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    69
	-- Yellow Watermellons
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    70
	AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    71
	hero.gear = AddHog(yellow1.name, 0, 100, "war_desertgrenadier1")
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    72
	AnimSetGearPosition(yellow1.gear, yellow1.x, yellow1.y)
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    73
	
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    74
	AnimInit()
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    75
	--AnimationSetup()	
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    76
end
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    77
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    78
function onGameStart()
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    79
	AnimWait(hero.gear, 3000)
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    80
	FollowGear(hero.gear)
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    81
	
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    82
	SendHealthStatsOff()
036fece2fb5f forgot to commit the new files :/
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    83
end