author | Wuzzy <almikes@aol.com> |
Thu, 27 Apr 2017 05:07:35 +0200 | |
changeset 12358 | b9582e2ebb56 |
parent 12226 | 3ec0261e01f0 |
child 12586 | 7510fe66bfbb |
permissions | -rw-r--r-- |
8043 | 1 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
7889 | 2 |
|
3 |
local player = nil |
|
4 |
local enemy = nil |
|
5 |
||
6 |
function onGameInit() |
|
7 |
||
8 |
Map = "Castle" |
|
9 |
Theme = "Nature" |
|
10 |
Seed = 0 |
|
11 |
GameFlags = gfInfAttack |
|
12 |
||
13 |
TurnTime = 45 * 1000 |
|
14 |
||
15 |
CaseFreq = 0 |
|
16 |
MinesNum = 0 |
|
17 |
Explosives = 0 |
|
18 |
||
12049
030464f34d47
Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents:
11968
diff
changeset
|
19 |
AddTeam(loc("Hero Team"), 14483456, "Simple", "Island", "Default", "cm_swordshield") |
7889 | 20 |
player = AddHog(loc("Good Dude"), 0, 80, "NoHat") --NoHat |
21 |
||
12049
030464f34d47
Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents:
11968
diff
changeset
|
22 |
AddTeam(loc("Bad Team"), 1175851, "Simple", "Island", "Default", "cm_dragonrb") |
11262
6e1aa1144a2b
- Finally added rus localization for all User Missions
antonc27 <antonc27@mail.ru>
parents:
8043
diff
changeset
|
23 |
enemy = AddHog(loc("Bad Guy"), 1, 40, "NoHat") |
7889 | 24 |
|
25 |
end |
|
26 |
||
27 |
function onGameStart() |
|
28 |
||
12226
3ec0261e01f0
Display mines timer in all missions with non-default timer
Wuzzy <almikes@aol.com>
parents:
12077
diff
changeset
|
29 |
ShowMission(loc("The Great Escape"), loc("Scenario"), loc("Elimate your captor.") .. "|" .. loc("Mines time: 0 seconds"), -amGrenade, 0) |
7889 | 30 |
|
31 |
------ GIRDER LIST ------ |
|
32 |
PlaceGirder(1042,564,0) |
|
33 |
PlaceGirder(1028,474,6) |
|
34 |
PlaceGirder(1074,474,6) |
|
35 |
PlaceGirder(1050,385,0) |
|
36 |
PlaceGirder(1175,731,7) |
|
37 |
PlaceGirder(1452,905,2) |
|
38 |
PlaceGirder(1522,855,4) |
|
39 |
PlaceGirder(1496,900,3) |
|
40 |
PlaceGirder(1682,855,4) |
|
41 |
PlaceGirder(1773,887,2) |
|
42 |
PlaceGirder(1647,901,1) |
|
43 |
PlaceGirder(1871,883,6) |
|
44 |
PlaceGirder(1871,723,6) |
|
45 |
PlaceGirder(1774,768,6) |
|
46 |
PlaceGirder(1773,767,6) |
|
47 |
PlaceGirder(1821,904,1) |
|
48 |
PlaceGirder(1822,802,3) |
|
49 |
PlaceGirder(1820,723,1) |
|
50 |
PlaceGirder(1782,678,4) |
|
51 |
PlaceGirder(1822,661,0) |
|
52 |
PlaceGirder(1822,644,0) |
|
53 |
PlaceGirder(1742,644,0) |
|
54 |
PlaceGirder(1742,661,0) |
|
55 |
PlaceGirder(1694,676,2) |
|
56 |
PlaceGirder(1903,635,0) |
|
57 |
------ HEALTH CRATE LIST ------ |
|
58 |
SpawnHealthCrate(1476,169) |
|
59 |
SpawnHealthCrate(1551,177) |
|
60 |
SpawnHealthCrate(1586,200) |
|
61 |
SpawnHealthCrate(1439,189) |
|
62 |
SpawnHealthCrate(1401,211) |
|
63 |
SpawnHealthCrate(1633,210) |
|
64 |
------ MINE LIST ------ |
|
65 |
tempG = AddGear(1010,680,gtMine, 0, 0, 0, 0) |
|
66 |
SetTimer(tempG, 1) |
|
67 |
tempG = AddGear(1031,720,gtMine, 0, 0, 0, 0) |
|
68 |
SetTimer(tempG, 1) |
|
69 |
tempG = AddGear(1039,748,gtMine, 0, 0, 0, 0) |
|
70 |
SetTimer(tempG, 1) |
|
71 |
tempG = AddGear(1051,777,gtMine, 0, 0, 0, 0) |
|
72 |
SetTimer(tempG, 1) |
|
73 |
tempG = AddGear(1065,796,gtMine, 0, 0, 0, 0) |
|
74 |
SetTimer(tempG, 1) |
|
75 |
tempG = AddGear(1094,800,gtMine, 0, 0, 0, 0) |
|
76 |
SetTimer(tempG, 1) |
|
77 |
------ REPOSITION LIST ------ |
|
78 |
SetGearPosition(player,1050,534) |
|
79 |
SetGearPosition(enemy,1512,158) |
|
80 |
SetHealth(player, 1) |
|
81 |
SetHealth(enemy, 1) |
|
82 |
------ AMMO CRATE LIST ------ |
|
12358
b9582e2ebb56
Refactor hardcoded ammo IDs in The Great Escape
Wuzzy <almikes@aol.com>
parents:
12226
diff
changeset
|
83 |
SpawnAmmoCrate(1632,943,amShotgun) |
b9582e2ebb56
Refactor hardcoded ammo IDs in The Great Escape
Wuzzy <almikes@aol.com>
parents:
12226
diff
changeset
|
84 |
SpawnAmmoCrate(1723,888,amFirePunch) |
b9582e2ebb56
Refactor hardcoded ammo IDs in The Great Escape
Wuzzy <almikes@aol.com>
parents:
12226
diff
changeset
|
85 |
SpawnAmmoCrate(1915,599,amGrenade) |
b9582e2ebb56
Refactor hardcoded ammo IDs in The Great Escape
Wuzzy <almikes@aol.com>
parents:
12226
diff
changeset
|
86 |
SpawnAmmoCrate(1416,913,amBlowTorch) |
b9582e2ebb56
Refactor hardcoded ammo IDs in The Great Escape
Wuzzy <almikes@aol.com>
parents:
12226
diff
changeset
|
87 |
SpawnAmmoCrate(1227,640,amPickHammer) |
7889 | 88 |
------ UTILITY CRATE LIST ------ |
12358
b9582e2ebb56
Refactor hardcoded ammo IDs in The Great Escape
Wuzzy <almikes@aol.com>
parents:
12226
diff
changeset
|
89 |
SpawnUtilityCrate(1519,945,amParachute) |
7889 | 90 |
------ END LOADING DATA ------ |
91 |
||
92 |
end |
|
93 |
||
94 |
function onGameTick() |
|
95 |
||
96 |
if TurnTimeLeft == TurnTime-1 then |
|
97 |
SetWind(100) |
|
98 |
end |
|
99 |
||
100 |
end |
|
101 |
||
102 |
function onGearDelete(gear) |
|
103 |
if (GetGearType(gear) == gtCase) and (CurrentHedgehog == player) then |
|
104 |
if GetHealth(gear) > 0 then |
|
105 |
AddGear(GetX(gear), GetY(gear), gtGrenade, 0, 0, 0, 1) |
|
106 |
end |
|
107 |
elseif gear == player then |
|
108 |
ShowMission(loc("The Great Escape"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0) |
|
109 |
elseif gear == enemy then |
|
110 |
ShowMission(loc("The Great Escape"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0) |
|
111 |
end |
|
112 |
end |
|
113 |
||
114 |
function onAmmoStoreInit() |
|
115 |
SetAmmo(amGrenade, 1, 0, 0, 1) |
|
116 |
SetAmmo(amParachute, 1, 0, 0, 1) |
|
117 |
SetAmmo(amFirePunch, 0, 0, 0, 3) |
|
118 |
SetAmmo(amPickHammer, 0, 0, 0, 1) |
|
119 |
SetAmmo(amBlowTorch, 0, 0, 0, 1) |
|
120 |
SetAmmo(amShotgun, 0, 0, 0, 1) |
|
121 |
SetAmmo(amSkip, 9, 0, 0, 0) |
|
122 |
end |