author | Wuzzy <Wuzzy2@mail.ru> |
Tue, 11 Feb 2020 01:33:31 +0100 | |
changeset 15568 | 6b9655be1e7f |
parent 15188 | 9d4a6ab60dec |
permissions | -rw-r--r-- |
12794
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
1 |
--[[ |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
2 |
A Classic Fairytale: First Blood |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
3 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
4 |
= SUMMARY = |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
5 |
Simple introduction to the most basic aspects of gameplay. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
6 |
Basically a story-driven mini-tutorial. Does not replace |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
7 |
a real tutorial, however. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
8 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
9 |
= GOAL = |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
10 |
To complete the various tasks the chief gives to the player. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
11 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
12 |
= FLOW CHART = |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
13 |
This section explains how this mission is (roughly) |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
14 |
*supposed* to work, with a step-to-step list. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
15 |
Use this to hunt down bugs or for testing. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
16 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
17 |
All other missions in ACF will have the same section. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
18 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
19 |
These symbols are used: |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
20 |
- Event |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
21 |
| Choice (only one of these can happen) |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
22 |
> End of mission |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
23 |
: Go to another event in the flow chart |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
24 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
25 |
“TBS” stands for “Turn-Based Stragegy”. It is used when the game switches from |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
26 |
heavily scripted events to the default turn-based stragegy gameplay. This |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
27 |
is not used in the first mission, however. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
28 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
29 |
== Linear events == |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
30 |
This is the expected course of events in chronological order. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
31 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
32 |
- Introduction; movement (left/right/jump) instructions |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
33 |
- Player moves to mushroom |
14929
8d63c6ce4f7e
ACF1: Improve backjump explanation
Wuzzy <Wuzzy2@mail.ru>
parents:
14919
diff
changeset
|
34 |
- Backjump instructions, move to flower |
12794
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
35 |
- Collect first crate (rope) |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
36 |
- Rope instructions |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
37 |
- Parachute crate appears in the right pit |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
38 |
- Player collects parachute |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
39 |
- Instruct player to move to mole head |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
40 |
| If player stopped on mole head: |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
41 |
- Cut scene |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
42 |
- Place girder to block off right pit |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
43 |
- Spawn rope crate in left pit |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
44 |
- Player must collect crate safely |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
45 |
- If hurt: Reset player to mole head |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
46 |
| If player skipped the mole (e.g. by roping) and instead went down the pit left from the mole: |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
47 |
- Different cut scene |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
48 |
- Place girder to block off right pit |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
49 |
- Spawn rope crate in left pit |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
50 |
- Player must collect this crate |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
51 |
- Shoryuken crate spawns |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
52 |
- Player destroys all targets |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
53 |
- Rope challenge |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
54 |
- Player chooses rope challenge difficulty |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
55 |
- Crates spawn, one-by-one, while player collects them |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
56 |
| If player collects all crates in time: |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
57 |
- Proceed |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
58 |
| If player fails to collect all crates in time: |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
59 |
: Rope challenge restarts |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
60 |
- Deagle crate spawns |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
61 |
- Player collects deagle crate |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
62 |
- Deagle targets spawn |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
63 |
- Deagle targets destroyd |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
64 |
- Cannibal and lots of ammo crates appear |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
65 |
| Player kills cannibal |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
66 |
> Victory |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
67 |
| Player moves close to cannibal |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
68 |
- Many weapon crates with melee weapons spawn |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
69 |
- Cut scene |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
70 |
- Player kills cannibal |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
71 |
> Victory |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
72 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
73 |
== Non-linear events == |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
74 |
These events can be triggered at (theoretically) any time and interrupt |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
75 |
the normal flow. Obvious events like “all player hogs dead” are omitted here. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
76 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
77 |
- Player hog damages princess: |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
78 |
- Princess complains |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
79 |
- Player hog damages chief |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
80 |
- Chief complains |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
81 |
- Player hog, Princess or Chief dead: |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
82 |
> Game over |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
83 |
- Player hurt itself without dying: |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
84 |
- Chief mocks player |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
85 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
86 |
]] |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12624
diff
changeset
|
87 |
|
8043 | 88 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
89 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
|
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
90 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
91 |
-----------------------------Variables--------------------------------- |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
92 |
startDialogue = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
93 |
damageAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
94 |
onShroomAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
95 |
onFlowerAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
96 |
tookParaAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
97 |
tookPunchAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
98 |
onMoleHeadAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
99 |
tookRope2Anim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
100 |
challengeAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
101 |
challengeFailedAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
102 |
challengeCompletedAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
103 |
beforeKillAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
104 |
closeCannim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
105 |
cannKilledAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
106 |
cannKilledEarlyAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
107 |
princessDamagedAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
108 |
elderDamagedAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
109 |
pastMoleHeadAnim = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
110 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
111 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
112 |
targets = {} |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
113 |
crates = {} |
15097
527a7414bb44
ACF1: Fix 2 crate spawns being very close to each other in the difficult rope challenge
Wuzzy <Wuzzy2@mail.ru>
parents:
15089
diff
changeset
|
114 |
targXdif2 = {2755, 2638, 2921, 2973, 3162, 3067, 2674, 1300} |
527a7414bb44
ACF1: Fix 2 crate spawns being very close to each other in the difficult rope challenge
Wuzzy <Wuzzy2@mail.ru>
parents:
15089
diff
changeset
|
115 |
targYdif2 = {1197, 1537, 1646, 1857, 1804, 1173, 1844, 1183} |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
116 |
targXdif1 = {2749, 2909, 2770, 2836, 1558, 1305} |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
117 |
targYdif1 = {1179, 1313, 1734, 1441, 1152, 1259} |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
118 |
targetPosX = {{821, 866, 789}, {614, 656, 638}, {1238, 1237, 1200}} |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
119 |
targetPosY = {{1342, 1347, 1326}, {1112, 1121, 1061}, {1152, 1111, 1111}} |
7236
378fc97dae99
Reduced number of crates on the challenge in mission 1, fixed an error with mission 3 (at the end)
belphegorr <szabibibi@gmail.com>
parents:
7228
diff
changeset
|
120 |
crateNum = {6, 8} |
12545
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
121 |
rope2GirderX = 3245 |
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
122 |
rope2GirderY = 1190 |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
123 |
|
15188
9d4a6ab60dec
ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents:
15159
diff
changeset
|
124 |
nativesTeamName = nil |
15159
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
125 |
inCrateChallenge = false |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
126 |
cratesCollected = 0 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
127 |
chalTries = 0 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
128 |
targetsDestroyed = 0 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
129 |
targsWave = 1 |
15159
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
130 |
tTime = MAX_TURN_TIME |
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
131 |
difficulty = 1 |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
132 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
133 |
cannibalVisible = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
134 |
cannibalKilles = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
135 |
youngdamaged = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
136 |
youngKilled = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
137 |
elderDamaged = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
138 |
princessDamaged = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
139 |
elderKilled = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
140 |
princessKilled = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
141 |
rope1Taken = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
142 |
paraTaken = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
143 |
rope2Taken = false |
12545
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
144 |
rope2InProgress = false |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
145 |
punchTaken = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
146 |
canKilled = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
147 |
desertTaken = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
148 |
challengeFailed = false |
8984
3c342826f299
fix comparison error in Campaign mission 1
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8979
diff
changeset
|
149 |
deleteCrate = false |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
150 |
difficultyChoice = false |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
151 |
princessFace = "Left" |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
152 |
elderFace = "Left" |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
153 |
|
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
154 |
local ctrlJump, ctrlMissionPanel, ctrlAttack |
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
155 |
if INTERFACE == "touch" then |
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
156 |
ctrlJump = loc("Long Jump: Tap the [Curvy Arrow] button for long") |
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
157 |
ctrlMissionPanel = loc("Hint: Pause the game to review the mission texts.") |
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
158 |
ctrlAttack = loc("Attack: Tap the [Bomb]") |
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
159 |
else |
14409
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14404
diff
changeset
|
160 |
ctrlJump = loc("Long Jump: [Enter]") |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
161 |
ctrlMissionPanel = loc("Hint: Hold down [M] to review the mission texts.") |
14409
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14404
diff
changeset
|
162 |
ctrlAttack = loc("Attack: [Space]") |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
163 |
end |
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
164 |
|
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
165 |
goals = { |
15089
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
166 |
[startDialogue] = {loc("First Blood"), loc("First Steps"), loc("Press [Left] or [Right] to move around, [Long Jump] to jump forwards.") .. "| |" .. ctrlJump, 2, 4000}, |
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
167 |
[onShroomAnim] = {loc("First Blood"), loc("A leap in a leap"), loc("Go on top of the flower.") .. "|" .. ctrlMissionPanel, 2, 7000}, |
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
168 |
[onFlowerAnim] = {loc("First Blood"), loc("Hightime"), loc("Collect the crate on the right.") .. "|" .. loc("Hint: Select the rope, [Up] or [Down] to aim, [Attack] to fire, directional keys to move.") .. "|" .. loc("Ropes can be fired again in the air!") .. "| |" .. ctrlAttack, 2, 7000}, |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
169 |
[tookParaAnim] = {loc("First Blood"), loc("Omnivore"), loc("Get on the head of the mole."), 1, 4000}, |
15089
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
170 |
[onMoleHeadAnim] = {loc("First Blood"), loc("The Leap of Faith"), loc("Use the parachute to get the next crate.") .. "|" .. loc("Hint: Just select the parachute, it opens automatically when you fall."), 2, 4000}, |
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
171 |
[pastMoleHeadAnim] = {loc("First Blood"), loc("The Leap of Faith"), loc("Get that crate!"), 5, 4000}, |
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
172 |
[tookRope2Anim] = {loc("First Blood"), loc("The Rising"), loc("Get that crate!"), 7, 4000}, |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
173 |
[tookPunchAnim] = {loc("First Blood"), loc("The Slaughter"), loc("Destroy the targets!") .. "|" .. loc("Hint: Select the Shoryuken and hit [Attack].|P.S.: You can use it mid-air.") .. "| |" .. ctrlAttack, 1, 5000}, |
15089
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
174 |
[challengeAnim] = {loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 7, 5000}, |
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
175 |
[challengeFailedAnim] = {loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 7, 5000}, |
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
176 |
[challengeCompletedAnim] = {loc("First Blood"), loc("The Ultimate Weapon"), loc("Get that crate!"), 7, 5000}, |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
177 |
[beforeKillAnim] = {loc("First Blood"), loc("The First Blood"), loc("Kill the cannibal!"), 1, 5000}, |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
178 |
[closeCannim] = {loc("First Blood"), loc("The First Blood"), loc("KILL IT!"), 1, 5000}, |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
179 |
} |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
180 |
|
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
181 |
-----------------------------Animations-------------------------------- |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
182 |
function Skipanim(anim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
183 |
AnimSwitchHog(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
184 |
if goals[anim] ~= nil then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
185 |
ShowMission(unpack(goals[anim])) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
186 |
end |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
187 |
if anim == startDialogue then |
14253
60622d2a4a3c
ACF1: Set hero's gear position when skipping first cut scene
Wuzzy <Wuzzy2@mail.ru>
parents:
13752
diff
changeset
|
188 |
AnimSetGearPosition(youngh, 1952, 1365) |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
189 |
HogTurnLeft(princess, false) |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
190 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
191 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
192 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
193 |
function SkipDamageAnim(anim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
194 |
SwitchHog(youngh) |
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
195 |
AnimSetInputMask(0xFFFFFFFF) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
196 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
197 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
198 |
function SkipOnShroom() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
199 |
Skipanim(onShroomAnim) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
200 |
AnimSetGearPosition(elderh, 2700, 1278) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
201 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
202 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
203 |
function AnimationSetup() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
204 |
AddSkipFunction(damageAnim, SkipDamageAnim, {damageAnim}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
205 |
table.insert(damageAnim, {func = AnimWait, args = {youngh, 500}, skipFunc = Skipanim, skipArgs = damageAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
206 |
table.insert(damageAnim, {func = AnimSay, args = {elderh, loc("Watch your steps, young one!"), SAY_SAY, 2000}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
207 |
table.insert(damageAnim, {func = AnimGearWait, args = {youngh, 500}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
208 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
209 |
AddSkipFunction(princessDamagedAnim, SkipDamageAnim, {princessDamagedAnim}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
210 |
table.insert(princessDamagedAnim, {func = AnimWait, args = {princess, 500}, skipFunc = Skipanim, skipArgs = princessDamagedAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
211 |
table.insert(princessDamagedAnim, {func = AnimSay, args = {princess, loc("Why do men keep hurting me?"), SAY_THINK, 3000}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
212 |
table.insert(princessDamagedAnim, {func = AnimGearWait, args = {youngh, 500}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
213 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
214 |
AddSkipFunction(elderDamagedAnim, SkipDamageAnim, {elderDamagedAnim}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
215 |
table.insert(elderDamagedAnim, {func = AnimWait, args = {elderh, 500}, skipFunc = Skipanim, skipArgs = elderDamagedAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
216 |
table.insert(elderDamagedAnim, {func = AnimSay, args = {elderh, loc("Violence is not the answer to your problems!"), SAY_SAY, 3000}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
217 |
table.insert(elderDamagedAnim, {func = AnimGearWait, args = {youngh, 500}}) |
12544
77b05be26a6e
Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents:
12466
diff
changeset
|
218 |
|
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
219 |
AddSkipFunction(startDialogue, Skipanim, {startDialogue}) |
9263
5069877daa09
reverting 2 files I accidentally changed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9258
diff
changeset
|
220 |
table.insert(startDialogue, {func = AnimWait, args = {youngh, 3500}, skipFunc = Skipanim, skipArgs = startDialogue}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
221 |
table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("Once upon a time, on an island with great natural resources, lived two tribes in heated conflict..."), 5000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
222 |
table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("One tribe was peaceful, spending their time hunting and training, enjoying the small pleasures of life..."), 5000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
223 |
table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("The other one were all cannibals, spending their time eating the organs of fellow hedgehogs..."), 5000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
224 |
table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("And so it began..."), 1000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
225 |
table.insert(startDialogue, {func = AnimSay, args = {elderh, loc("What are you doing at a distance so great, young one?"), SAY_SHOUT, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
226 |
table.insert(startDialogue, {func = AnimSay, args = {elderh, loc("Come closer, so that your training may continue!"), SAY_SHOUT, 6000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
227 |
table.insert(startDialogue, {func = AnimSay, args = {youngh, loc("This is it! It's time to make Fell From Heaven fall for me..."), SAY_THINK, 6000}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
228 |
table.insert(startDialogue, {func = AnimJump, args = {youngh, "long"}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
229 |
table.insert(startDialogue, {func = AnimTurn, args = {princess, "Right"}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
230 |
table.insert(startDialogue, {func = AnimSwitchHog, args = {youngh}}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
231 |
table.insert(startDialogue, {func = AnimShowMission, args = {youngh, unpack(goals[startDialogue])}}) |
9263
5069877daa09
reverting 2 files I accidentally changed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9258
diff
changeset
|
232 |
|
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
233 |
AddSkipFunction(onShroomAnim, SkipOnShroom, {onShroomAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
234 |
table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("I can see you have been training diligently."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = onShroomAnim}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
235 |
table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("The wind whispers that you are ready to become familiar with tools, now..."), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
236 |
table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("Open that crate and we will continue!"), SAY_SAY, 5000}}) |
7243
9ae9178c525e
Modified Animate.lua function AnimMove to take highercase direction (e.g. "Left")
belphegorr <szabibibi@gmail.com>
parents:
7236
diff
changeset
|
237 |
table.insert(onShroomAnim, {func = AnimMove, args = {elderh, "Right", 2700, 0}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
238 |
table.insert(onShroomAnim, {func = AnimTurn, args = {elderh, "Left"}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
239 |
table.insert(onShroomAnim, {func = AnimSay, args = {princess, loc("He moves like an eagle in the sky."), SAY_THINK, 4000}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
240 |
table.insert(onShroomAnim, {func = AnimSwitchHog, args = {youngh}}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
241 |
table.insert(onShroomAnim, {func = AnimShowMission, args = {youngh, unpack(goals[onShroomAnim])}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
242 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
243 |
AddSkipFunction(onFlowerAnim, Skipanim, {onFlowerAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
244 |
table.insert(onFlowerAnim, {func = AnimSay, args = {elderh, loc("See that crate farther on the right?"), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
245 |
table.insert(onFlowerAnim, {func = AnimSay, args = {elderh, loc("Swing, Leaks A Lot, on the wings of the wind!"), SAY_SAY, 6000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
246 |
table.insert(onFlowerAnim, {func = AnimSay, args = {princess, loc("His arms are so strong!"), SAY_THINK, 4000}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
247 |
table.insert(onFlowerAnim, {func = AnimSwitchHog, args = {youngh}}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
248 |
table.insert(onFlowerAnim, {func = AnimShowMission, args = {youngh, unpack(goals[onFlowerAnim])}}) |
12544
77b05be26a6e
Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents:
12466
diff
changeset
|
249 |
|
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
250 |
AddSkipFunction(tookParaAnim, Skipanim, {tookParaAnim}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
251 |
table.insert(tookParaAnim, {func = AnimGearWait, args = {youngh, 1000}, skipFunc = Skipanim, skipArgs = tookParaAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
252 |
table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("Use the rope to get on the head of the mole, young one!"), SAY_SHOUT, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
253 |
table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("Worry not, for it is a peaceful animal! There is no reason to be afraid..."), SAY_SHOUT, 5000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
254 |
table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("We all know what happens when you get frightened..."), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
255 |
table.insert(tookParaAnim, {func = AnimSay, args = {youngh, loc("So humiliating..."), SAY_SAY, 4000}}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
256 |
table.insert(tookParaAnim, {func = AnimShowMission, args = {youngh, unpack(goals[tookParaAnim])}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
257 |
table.insert(tookParaAnim, {func = AnimSwitchHog, args = {youngh}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
258 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
259 |
AddSkipFunction(onMoleHeadAnim, Skipanim, {onMoleHeadAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
260 |
table.insert(onMoleHeadAnim, {func = AnimSay, args = {elderh, loc("Perfect! Now try to get the next crate without hurting yourself!"), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = onMoleHeadAnim}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
261 |
table.insert(onMoleHeadAnim, {func = AnimSay, args = {elderh, loc("The giant umbrella from the last crate should help break the fall."), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
262 |
table.insert(onMoleHeadAnim, {func = AnimSay, args = {princess, loc("He's so brave..."), SAY_THINK, 4000}}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
263 |
table.insert(onMoleHeadAnim, {func = AnimShowMission, args = {youngh, unpack(goals[onMoleHeadAnim])}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
264 |
table.insert(onMoleHeadAnim, {func = AnimSwitchHog, args = {youngh}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
265 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
266 |
AddSkipFunction(pastMoleHeadAnim, Skipanim, {pastMoleHeadAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
267 |
table.insert(pastMoleHeadAnim, {func = AnimSay, args = {elderh, loc("I see you have already taken the leap of faith."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = pastMoleHeadAnim}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
268 |
table.insert(pastMoleHeadAnim, {func = AnimSay, args = {elderh, loc("Get that crate!"), SAY_SAY, 4000}}) |
15039
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
269 |
table.insert(pastMoleHeadAnim, {func = AnimShowMission, args = {youngh, unpack(goals[pastMoleHeadAnim])}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
270 |
table.insert(pastMoleHeadAnim, {func = AnimSwitchHog, args = {youngh}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
271 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
272 |
AddSkipFunction(tookRope2Anim, Skipanim, {tookRope2Anim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
273 |
table.insert(tookRope2Anim, {func = AnimSay, args = {elderh, loc("Impressive...you are still dry as the corpse of a hawk after a week in the desert..."), SAY_SAY, 5000}, skipFunc = Skipanim, skipArgs = tookRope2Anim}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
274 |
table.insert(tookRope2Anim, {func = AnimSay, args = {elderh, loc("You probably know what to do next..."), SAY_SAY, 4000}}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
275 |
table.insert(tookRope2Anim, {func = AnimShowMission, args = {youngh, unpack(goals[tookRope2Anim])}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
276 |
table.insert(tookRope2Anim, {func = AnimSwitchHog, args = {youngh}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
277 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
278 |
AddSkipFunction(tookPunchAnim, Skipanim, {tookPunchAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
279 |
table.insert(tookPunchAnim, {func = AnimSay, args = {elderh, loc("It is time to practice your fighting skills."), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
280 |
table.insert(tookPunchAnim, {func = AnimSay, args = {elderh, loc("Imagine those targets are the wolves that killed your parents! Take your anger out on them!"), SAY_SAY, 5000}}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
281 |
table.insert(tookPunchAnim, {func = AnimShowMission, args = {youngh, unpack(goals[tookPunchAnim])}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
282 |
table.insert(tookPunchAnim, {func = AnimSwitchHog, args = {youngh}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
283 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
284 |
AddSkipFunction(challengeAnim, Skipanim, {challengeAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
285 |
table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("I hope you are prepared for a small challenge, young one."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeAnim}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
286 |
table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("Your movement skills will be evaluated now."), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
287 |
table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("Collect all the crates, but remember, our time in this life is limited!"), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
288 |
table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("How difficult would you like it to be?")}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
289 |
table.insert(challengeAnim, {func = AnimSwitchHog, args = {youngh}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
290 |
table.insert(challengeAnim, {func = AnimWait, args = {youngh, 500}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
291 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
292 |
AddSkipFunction(challengeFailedAnim, Skipanim, {challengeFailedAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
293 |
table.insert(challengeFailedAnim, {func = AnimSay, args = {elderh, loc("Hmmm...perhaps a little more time will help."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeFailedAnim}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
294 |
table.insert(challengeFailedAnim, {func = AnimShowMission, args = {youngh, unpack(goals[challengeFailedAnim])}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
295 |
table.insert(challengeFailedAnim, {func = AnimSwitchHog, args = {youngh}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
296 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
297 |
AddSkipFunction(challengeCompletedAnim, Skipanim, {challengeCompletedAnim}) |
13354 | 298 |
table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("The spirits of the ancestors are surely pleased, Leaks A Lot."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeCompletedAnim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
299 |
table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("You have proven yourself worthy to see our most ancient secret!"), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
300 |
table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("The weapon in that last crate was bestowed upon us by the ancients!"), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
301 |
table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("Use it with precaution!"), SAY_SAY, 4000}}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
302 |
table.insert(challengeCompletedAnim, {func = AnimShowMission, args = {youngh, unpack(goals[challengeCompletedAnim])}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
303 |
table.insert(challengeCompletedAnim, {func = AnimSwitchHog, args = {youngh}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
304 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
305 |
AddSkipFunction(beforeKillAnim, Skipanim, {beforeKillAnim}) |
12585
b28f09d70e73
ACF1: Fix graphical deagle shot glitch after shooting final target
Wuzzy <almikes@aol.com>
parents:
12554
diff
changeset
|
306 |
table.insert(beforeKillAnim, {func = AnimWait, args = {elderh, 100}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
307 |
table.insert(beforeKillAnim, {func = AnimSay, args = {elderh, loc("What do my faulty eyes observe? A spy!"), SAY_SHOUT, 4000}, skipFunc = Skipanim, skipArgs = beforeKillAnim}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
308 |
table.insert(beforeKillAnim, {func = AnimFollowGear, args = {cannibal}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
309 |
table.insert(beforeKillAnim, {func = AnimWait, args = {cannibal, 1000}}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
310 |
table.insert(beforeKillAnim, {func = AnimSay, args = {elderh, loc("Destroy him, Leaks A Lot! He is responsible for the deaths of many of us!"), SAY_SHOUT, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
311 |
table.insert(beforeKillAnim, {func = AnimSay, args = {cannibal, loc("Oh, my!"), SAY_THINK, 4000}}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
312 |
table.insert(beforeKillAnim, {func = AnimShowMission, args = {youngh, unpack(goals[beforeKillAnim])}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
313 |
table.insert(beforeKillAnim, {func = AnimSwitchHog, args = {youngh}}) |
12544
77b05be26a6e
Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents:
12466
diff
changeset
|
314 |
|
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
315 |
AddSkipFunction(closeCannim, Skipanim, {closeCannim}) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
316 |
table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("I see you would like his punishment to be more...personal..."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = closeCannim}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
317 |
table.insert(closeCannim, {func = AnimSay, args = {cannibal, loc("I'm certain that this is a misunderstanding, fellow hedgehogs!"), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
318 |
table.insert(closeCannim, {func = AnimSay, args = {cannibal, loc("If only I were given a chance to explain my being here..."), SAY_SAY, 4000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
319 |
table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("Do not let his words fool you, young one! He will stab you in the back as soon as you turn away!"), SAY_SAY, 6000}}) |
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
320 |
table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("Here...pick your weapon!"), SAY_SAY, 5000}}) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
321 |
table.insert(closeCannim, {func = AnimShowMission, args = {youngh, unpack(goals[closeCannim])}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
322 |
table.insert(closeCannim, {func = AnimSwitchHog, args = {youngh}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
323 |
|
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
324 |
table.insert(cannKilledAnim, {func = AnimSay, args = {elderh, loc("Yes, yeees! You are now ready to enter the real world!"), SAY_SHOUT, 6000}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
325 |
|
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
326 |
table.insert(cannKilledEarlyAnim, {func = AnimSay, args = {elderh, loc("What?! A cannibal? Here? There is no time to waste! Come, you are prepared."), SAY_SHOUT, 4000}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
327 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
328 |
-----------------------------Events------------------------------------ |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
329 |
function CheckNeedToTurn(gear) |
8943
63ecf5320439
fix nil comparison error, see issues 470 and 601
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
330 |
if youngKilled then |
63ecf5320439
fix nil comparison error, see issues 470 and 601
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
331 |
return false |
63ecf5320439
fix nil comparison error, see issues 470 and 601
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
332 |
end |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
333 |
if gear == princess then |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
334 |
if princessKilled ~= true then |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
335 |
if (GetX(princess) > GetX(youngh) and princessFace == "Right") |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
336 |
or (GetX(princess) < GetX(youngh) and princessFace == "Left") then |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
337 |
--if (GetX(princess) > GetX(youngh)) |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
338 |
-- or (GetX(princess) < GetX(youngh)) then |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
339 |
return true |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
340 |
end |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
341 |
end |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
342 |
else |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
343 |
if elderKilled ~= true then |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
344 |
if (GetX(elderh) > GetX(youngh) and elderFace == "Right") |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
345 |
or (GetX(elderh) < GetX(youngh) and elderFace == "Left") then |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
346 |
return true |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
347 |
end |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
348 |
end |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
349 |
end |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
350 |
return false |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
351 |
end |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
352 |
|
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
353 |
function DoNeedToTurn(gear) |
12605
d05a159e7874
ACF1: Fix princess/elder flying very weirdly when punching to direction they look at
Wuzzy <almikes@aol.com>
parents:
12604
diff
changeset
|
354 |
if gear == princess and not princessDamaged then |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
355 |
if GetX(princess) > GetX(youngh) then |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
356 |
HogTurnLeft(princess, true) |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
357 |
princessFace = "Left" |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
358 |
elseif GetX(princess) < GetX(youngh) then |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
359 |
HogTurnLeft(princess, false) |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
360 |
princessFace = "Right" |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
361 |
end |
12605
d05a159e7874
ACF1: Fix princess/elder flying very weirdly when punching to direction they look at
Wuzzy <almikes@aol.com>
parents:
12604
diff
changeset
|
362 |
elseif gear == elderh and not elderDamaged then |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
363 |
if GetX(elderh) > GetX(youngh) then |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
364 |
HogTurnLeft(elderh, true) |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
365 |
elderFace = "Left" |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
366 |
elseif GetX(elderh) < GetX(youngh) then |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
367 |
HogTurnLeft(elderh, false) |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
368 |
elderFace = "Right" |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
369 |
end |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
370 |
end |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
371 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
372 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
373 |
function CheckDamage() |
12544
77b05be26a6e
Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents:
12466
diff
changeset
|
374 |
return youngdamaged and StoppedGear(youngh) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
375 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
376 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
377 |
function DoOnDamage() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
378 |
AddAnim(damageAnim) |
12545
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
379 |
if rope2InProgress and not rope2Taken then |
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
380 |
AnimSetGearPosition(youngh, 3040, 1221) |
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
381 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
382 |
youngdamaged = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
383 |
AddFunction({func = ResetTurnTime, args = {}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
384 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
385 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
386 |
function CheckDeath() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
387 |
return youngKilled |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
388 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
389 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
390 |
function DoDeath() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
391 |
RemoveEventFunc(CheckKilledOthers) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
392 |
RemoveEventFunc(CheckDamage) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
393 |
RemoveEventFunc(CheckDamagedOthers) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
394 |
FinishThem() |
15089
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
395 |
ShowMission(loc("First Blood"), loc("The wasted youth"), loc("Leaks A Lot gave his life for his tribe! He should have survived!"), -amSkip, 4000) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
396 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
397 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
398 |
function CheckDamagedOthers() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
399 |
return (princessDamaged and StoppedGear(princess)) or (elderDamaged and StoppedGear(elderh)) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
400 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
401 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
402 |
function CheckKilledOthers() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
403 |
return princessKilled or elderKilled |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
404 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
405 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
406 |
function DoOnDamagedOthers() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
407 |
if princessDamaged then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
408 |
AddAnim(princessDamagedAnim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
409 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
410 |
if elderDamaged then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
411 |
AddAnim(elderDamagedAnim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
412 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
413 |
elderDamaged = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
414 |
princessDamaged = false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
415 |
AddFunction({func = ResetTurnTime, args = {}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
416 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
417 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
418 |
function DoKilledOthers() |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
419 |
AddCaption(loc("After Leaks A Lot betrayed his tribe, he joined the cannibals...")) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
420 |
FinishThem() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
421 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
422 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
423 |
function CheckMovedUntilJump() |
15050
09c63d4bcf53
ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents:
15040
diff
changeset
|
424 |
return GetHealth(youngh) and GetX(youngh) >= 2343 |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
425 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
426 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
427 |
function DoMovedUntilJump() |
14929
8d63c6ce4f7e
ACF1: Improve backjump explanation
Wuzzy <Wuzzy2@mail.ru>
parents:
14919
diff
changeset
|
428 |
local msg = loc("Look to the left and do a backwards jump towards the mushroom.") .. "| |" |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
429 |
if INTERFACE == "touch" then |
14929
8d63c6ce4f7e
ACF1: Improve backjump explanation
Wuzzy <Wuzzy2@mail.ru>
parents:
14919
diff
changeset
|
430 |
msg = msg .. loc("Backwards jump: Tap the [Curvy Arrow] twice") |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
431 |
else |
14929
8d63c6ce4f7e
ACF1: Improve backjump explanation
Wuzzy <Wuzzy2@mail.ru>
parents:
14919
diff
changeset
|
432 |
msg = msg .. loc("Backwards jump: Press [Backspace] twice") |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
433 |
end |
15089
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
434 |
ShowMission(loc("First Blood"), loc("Step By Step"), msg, 2, 10000) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
435 |
AddEvent(CheckOnShroom, {}, DoOnShroom, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
436 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
437 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
438 |
function CheckOnShroom() |
15050
09c63d4bcf53
ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents:
15040
diff
changeset
|
439 |
return GetHealth(youngh) and GetX(youngh) >= 2461 and StoppedGear(youngh) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
440 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
441 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
442 |
function DoOnShroom() |
12933
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
443 |
ropeCrate1 = SpawnSupplyCrate(2751, 1194, amRope, 100) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
444 |
SetGearMessage(CurrentHedgehog, 0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
445 |
AddAnim(onShroomAnim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
446 |
AddEvent(CheckOnFlower, {}, DoOnFlower, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
447 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
448 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
449 |
function CheckOnFlower() |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
450 |
return rope1Taken and StoppedGear(youngh) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
451 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
452 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
453 |
function DoOnFlower() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
454 |
AddAmmo(youngh, amRope, 100) |
12933
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
455 |
paraCrate = SpawnSupplyCrate(3245, 1758, amParachute, 100) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
456 |
SetGearMessage(CurrentHedgehog, 0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
457 |
AddAnim(onFlowerAnim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
458 |
AddEvent(CheckTookParaCrate, {}, DoTookParaCrate, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
459 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
460 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
461 |
function CheckTookParaCrate() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
462 |
return paraTaken and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
463 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
464 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
465 |
function DoTookParaCrate() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
466 |
AddAmmo(youngh, amParachute, 100) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
467 |
SetGearMessage(CurrentHedgehog, 0) |
15039
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
468 |
if CheckOnOrPastMoleHead() then |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
469 |
DoOnOrPastMoleHead() |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
470 |
else |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
471 |
AddAnim(tookParaAnim) |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
472 |
AddEvent(CheckOnOrPastMoleHead, {}, DoOnOrPastMoleHead, {}, 0) |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
473 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
474 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
475 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
476 |
function CheckOnMoleHead() |
15050
09c63d4bcf53
ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents:
15040
diff
changeset
|
477 |
if not GetHealth(youngh) then |
09c63d4bcf53
ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents:
15040
diff
changeset
|
478 |
return false |
09c63d4bcf53
ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents:
15040
diff
changeset
|
479 |
end |
15039
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
480 |
local x = GetX(youngh) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
481 |
return x >= 3005 and x <= 3126 and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
482 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
483 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
484 |
function CheckPastMoleHead() |
15050
09c63d4bcf53
ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents:
15040
diff
changeset
|
485 |
if not GetHealth(youngh) then |
09c63d4bcf53
ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents:
15040
diff
changeset
|
486 |
return false |
09c63d4bcf53
ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents:
15040
diff
changeset
|
487 |
end |
15039
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
488 |
local x = GetX(youngh) |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
489 |
local y = GetY(youngh) |
15568
6b9655be1e7f
ACF1: Fix PastMole area being too large
Wuzzy <Wuzzy2@mail.ru>
parents:
15188
diff
changeset
|
490 |
return x > 2575 and x < 3016 and y > 1538 and StoppedGear(youngh) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
491 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
492 |
|
15039
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
493 |
function CheckOnOrPastMoleHead() |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
494 |
return CheckOnMoleHead() or CheckPastMoleHead() |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
495 |
end |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
496 |
|
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
497 |
function DoOnOrPastMoleHead() |
12545
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
498 |
-- Initiate parachute challenge |
12933
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
499 |
ropeCrate2 = SpawnSupplyCrate(2782, 1720, amRope, 100) |
12545
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
500 |
rope2InProgress = true |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
501 |
AddAmmo(youngh, amRope, 0) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
502 |
SetGearMessage(CurrentHedgehog, 0) |
12545
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
503 |
-- Block the way to the hole to the right, since the player loses the rope for this section |
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
504 |
PlaceGirder(rope2GirderX, rope2GirderY, 6) |
15039
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
505 |
if CheckPastMoleHead() then |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
506 |
AddAnim(pastMoleHeadAnim) |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
507 |
else |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
508 |
AddAnim(onMoleHeadAnim) |
cf5d6ee109c9
ACF1: Fix pastMoleHeadAnim being played twice
Wuzzy <Wuzzy2@mail.ru>
parents:
15023
diff
changeset
|
509 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
510 |
AddEvent(CheckTookRope2, {}, DoTookRope2, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
511 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
512 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
513 |
function CheckTookRope2() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
514 |
return rope2Taken and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
515 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
516 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
517 |
function DoTookRope2() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
518 |
AddAmmo(youngh, amRope, 100) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
519 |
SetGearMessage(CurrentHedgehog, 0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
520 |
AddAnim(tookRope2Anim) |
12933
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
521 |
punchCrate = SpawnSupplyCrate(2460, 1321, amFirePunch, 100) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
522 |
AddEvent(CheckTookPunch, {}, DoTookPunch, {}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
523 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
524 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
525 |
function CheckTookPunch() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
526 |
return punchTaken and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
527 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
528 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
529 |
function DoTookPunch() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
530 |
AddAmmo(youngh, amFirePunch, 100) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
531 |
AddAmmo(youngh, amRope, 0) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
532 |
SetGearMessage(CurrentHedgehog, 0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
533 |
AddAnim(tookPunchAnim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
534 |
targets[1] = AddGear(1594, 1185, gtTarget, 0, 0, 0, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
535 |
targets[2] = AddGear(2188, 1314, gtTarget, 0, 0, 0, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
536 |
targets[3] = AddGear(1961, 1318, gtTarget, 0, 0, 0, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
537 |
targets[4] = AddGear(1961, 1200, gtTarget, 0, 0, 0, 0) |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
538 |
targets[5] = AddGear(1800, 900, gtTarget, 0, 0, 0, 0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
539 |
AddEvent(CheckTargDestroyed, {}, DoTargDestroyed, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
540 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
541 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
542 |
function CheckTargDestroyed() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
543 |
return targetsDestroyed == 5 and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
544 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
545 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
546 |
function DoTargDestroyed() |
12466
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
547 |
AddAmmo(youngh, amFirePunch, 0) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
548 |
SetGearMessage(CurrentHedgehog, 0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
549 |
AddAnim(challengeAnim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
550 |
targetsDestroyed = 0 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
551 |
AddFunction({func = SetChoice, args = {}}) |
12933
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
552 |
ropeCrate3 = SpawnSupplyCrate(2000, 1200, amRope, 100) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
553 |
AddEvent(CheckTookRope3, {}, AddAmmo, {youngh, amRope, 100}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
554 |
AddEvent(CheckCratesColled, {}, DoCratesColled, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
555 |
AddEvent(CheckChallengeWon, {}, DoChallengeWon, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
556 |
AddEvent(CheckTimesUp, {}, DoTimesUp, {}, 1) |
12545
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
557 |
-- Remove up the old mole blockade from the parachute challenge |
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
558 |
EraseSprite(rope2GirderX, rope2GirderY, sprAmGirder, 6) |
14962
c645327d0a81
Rope Training, ACF1: Improve visual effects when removing girders
Wuzzy <Wuzzy2@mail.ru>
parents:
14953
diff
changeset
|
559 |
for i=-4,4 do |
c645327d0a81
Rope Training, ACF1: Improve visual effects when removing girders
Wuzzy <Wuzzy2@mail.ru>
parents:
14953
diff
changeset
|
560 |
AddVisualGear(rope2GirderX, rope2GirderY + i * 18, vgtSteam, false, 0) |
c645327d0a81
Rope Training, ACF1: Improve visual effects when removing girders
Wuzzy <Wuzzy2@mail.ru>
parents:
14953
diff
changeset
|
561 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
562 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
563 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
564 |
function DoChoice() |
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
565 |
PlaySound(sndPlaced) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
566 |
difficultyChoice = false |
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
567 |
AnimSetInputMask(0xFFFFFFFF) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
568 |
StartChallenge(120000 + chalTries * 20000) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
569 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
570 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
571 |
function CheckCratesColled() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
572 |
return cratesCollected == crateNum[difficulty] |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
573 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
574 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
575 |
function DoCratesColled() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
576 |
RemoveEventFunc(CheckTimesUp) |
13752
110d6c1e817f
Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
577 |
SetTurnTimeLeft(MAX_TURN_TIME) |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
578 |
AddCaption(loc("As the challenge was completed, Leaks A Lot set foot on the ground...")) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
579 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
580 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
581 |
function CheckChallengeWon() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
582 |
return cratesCollected == crateNum[difficulty] and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
583 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
584 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
585 |
function DoChallengeWon() |
15159
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
586 |
inCrateChallenge = false |
12933
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
587 |
desertCrate = SpawnSupplyCrate(1240, 1212, amDEagle, 100) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
588 |
SetGearMessage(CurrentHedgehog, 0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
589 |
AddAnim(challengeCompletedAnim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
590 |
AddEvent(CheckDesertColled, {}, DoDesertColled, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
591 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
592 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
593 |
function CheckTookRope3() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
594 |
return rope3Taken |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
595 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
596 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
597 |
function CheckTimesUp() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
598 |
return TurnTimeLeft == 100 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
599 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
600 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
601 |
function DoTimesUp() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
602 |
challengeFailed = true |
8984
3c342826f299
fix comparison error in Campaign mission 1
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8979
diff
changeset
|
603 |
deleteCrate = true |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
604 |
DeleteGear(crates[1]) |
13752
110d6c1e817f
Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
605 |
SetTurnTimeLeft(MAX_TURN_TIME) |
12263
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
9308
diff
changeset
|
606 |
AddCaption(loc("And so happened that Leaks A Lot failed to complete the challenge! He landed, pressured by shame ...")) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
607 |
AddEvent(CheckChallengeFailed, {}, DoChallengeFailed, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
608 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
609 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
610 |
function CheckChallengeFailed() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
611 |
return challengeFailed and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
612 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
613 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
614 |
function DoChallengeFailed() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
615 |
challengeFailed = false |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
616 |
SetGearMessage(CurrentHedgehog, 0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
617 |
AddAnim(challengeFailedAnim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
618 |
chalTries = chalTries + 1 |
14385
02841325495e
ACF1: Fix Lua error when hitting Attack after failing the rope challenge
Wuzzy <Wuzzy2@mail.ru>
parents:
14253
diff
changeset
|
619 |
difficulty = 1 |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
620 |
AddFunction({func = SetChoice, args = {}}) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
621 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
622 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
623 |
function CheckDesertColled() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
624 |
return desertTaken and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
625 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
626 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
627 |
function DoDesertColled() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
628 |
AddAmmo(youngh, amDEagle, 100) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
629 |
PutTargets(1) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
630 |
AddEvent(CheckTargetsKilled, {}, DoTargetsKilled, {}, 1) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
631 |
AddEvent(CheckCannibalKilled, {}, DoCannibalKilledEarly, {}, 0) |
15089
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
632 |
ShowMission(loc("First Blood"), loc("The Bull's Eye"), loc("Destroy the targets!"), 1, 5000) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
633 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
634 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
635 |
function CheckTargetsKilled() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
636 |
return targetsDestroyed == 3 and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
637 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
638 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
639 |
function DoTargetsKilled() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
640 |
targetsDestroyed = 0 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
641 |
targsWave = targsWave + 1 |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
642 |
if targsWave > 3 then |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
643 |
RemoveEventFunc(CheckTargetsKilled) |
13141
8f2260eeb726
ACF1: Hide Cannibals team before it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
12933
diff
changeset
|
644 |
RestoreHog(cannibal) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
645 |
cannibalVisible = true |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
646 |
SetGearMessage(CurrentHedgehog, 0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
647 |
AddAnim(beforeKillAnim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
648 |
AddEvent(CheckCloseToCannibal, {}, DoCloseToCannibal, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
649 |
AddEvent(CheckCannibalKilled, {}, DoCannibalKilled, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
650 |
else |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
651 |
PutTargets(targsWave) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
652 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
653 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
654 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
655 |
function CheckCloseToCannibal() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
656 |
if CheckCannibalKilled() then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
657 |
return false |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
658 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
659 |
return math.abs(GetX(cannibal) - GetX(youngh)) <= 400 and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
660 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
661 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
662 |
function DoCloseToCannibal() |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
663 |
SetGearMessage(CurrentHedgehog, 0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
664 |
AddAnim(closeCannim) |
12933
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
665 |
AddFunction({func = SpawnSupplyCrate, args = {targetPosX[1][1], targetPosY[1][1], amWhip}}) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
666 |
AddFunction({func = SpawnSupplyCrate, args = {targetPosX[1][2], targetPosY[1][2], amBaseballBat}}) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12794
diff
changeset
|
667 |
AddFunction({func = SpawnSupplyCrate, args = {targetPosX[1][3], targetPosY[1][3], amHammer}}) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
668 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
669 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
670 |
function CheckCannibalKilled() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
671 |
return cannibalKilled and StoppedGear(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
672 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
673 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
674 |
function DoCannibalKilled() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
675 |
AddAnim(cannKilledAnim) |
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8943
diff
changeset
|
676 |
if not progress then |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8943
diff
changeset
|
677 |
SaveCampaignVar("Progress", "1") |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8943
diff
changeset
|
678 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
679 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
680 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
681 |
function DoCannibalKilledEarly() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
682 |
AddAnim(cannKilledEarlyAnim) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
683 |
DoCannibalKilled() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
684 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
685 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
686 |
-----------------------------Misc-------------------------------------- |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
687 |
function StartChallenge(time) |
15159
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
688 |
inCrateChallenge = true |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
689 |
cratesCollected = 0 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
690 |
PutCrate(1) |
13742
2bb7141496a9
Use SetTurnTimeLeft and SetReadyTimeLeft in all scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13583
diff
changeset
|
691 |
SetTurnTimeLeft(time) |
15089
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
692 |
ShowMission(loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 7, 5000) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
693 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
694 |
|
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
695 |
function ChoiceDialog() |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
696 |
local dstr |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
697 |
if difficulty == 2 then |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
698 |
dstr = loc("Difficulty: Hard") |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
699 |
else |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
700 |
dstr = loc("Difficulty: Easy") |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
701 |
end |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
702 |
ShowMission(loc("First Blood"), loc("The Torment"), |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
703 |
loc("Your next task is to collect some crates by using the rope!") .. "|" .. |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
704 |
loc("Press [Left] and [Right] to change the difficulty.") .. "| |" .. |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
705 |
dstr .. "| |" .. |
12606
f1e0fa009eb7
ACF1: Change rope challenge confirm key to [Attack]
Wuzzy <almikes@aol.com>
parents:
12605
diff
changeset
|
706 |
loc("Press [Attack] to begin."), |
15089
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15088
diff
changeset
|
707 |
3, 9999000, true) |
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
708 |
end |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
709 |
|
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
710 |
function SetChoice() |
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
711 |
AnimSetInputMask(0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
712 |
difficultyChoice = true |
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
713 |
ChoiceDialog() |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
714 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
715 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
716 |
function ResetTurnTime() |
15159
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
717 |
if inCrateChallenge then |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
718 |
SetTurnTimeLeft(tTime) |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
719 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
720 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
721 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
722 |
function PutCrate(i) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
723 |
if i > crateNum[difficulty] then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
724 |
return |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
725 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
726 |
if difficulty == 1 then |
12466
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
727 |
crates[1] = SpawnFakeAmmoCrate(targXdif1[i], targYdif1[i], false, false) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
728 |
else |
12466
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
729 |
crates[1] = SpawnFakeAmmoCrate(targXdif2[i], targYdif2[i], false, false) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
730 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
731 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
732 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
733 |
function PutTargets(i) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
734 |
targets[1] = AddGear(targetPosX[i][1], targetPosY[i][1], gtTarget, 0, 0, 0, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
735 |
targets[2] = AddGear(targetPosX[i][2], targetPosY[i][2], gtTarget, 0, 0, 0, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
736 |
targets[3] = AddGear(targetPosX[i][3], targetPosY[i][3], gtTarget, 0, 0, 0, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
737 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
738 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
739 |
function FinishThem() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
740 |
SetHealth(elderh, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
741 |
SetHealth(youngh, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
742 |
SetHealth(princess, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
743 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
744 |
-----------------------------Main Functions---------------------------- |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
745 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
746 |
function onGameInit() |
12544
77b05be26a6e
Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents:
12466
diff
changeset
|
747 |
Seed = 69 |
77b05be26a6e
Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents:
12466
diff
changeset
|
748 |
GameFlags = gfInfAttack + gfSolidLand + gfDisableWind |
77b05be26a6e
Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents:
12466
diff
changeset
|
749 |
TurnTime = 100000 |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
750 |
CaseFreq = 0 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
751 |
MinesNum = 0 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
752 |
MinesTime = 3000 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
753 |
Explosives = 0 |
8979
860836494821
Package the 3 dynamic maps broken by recent uFloat changes as static maps. first_blood actually didn't seem to need it, but, just in case.
nemo
parents:
8944
diff
changeset
|
754 |
Map = "A_Classic_Fairytale_first_blood" |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
755 |
Theme = "Nature" |
15040
51fbc0034c6f
Disable Sudden Death for all A Classic Fairytale missions
Wuzzy <Wuzzy2@mail.ru>
parents:
15039
diff
changeset
|
756 |
WaterRise = 0 |
51fbc0034c6f
Disable Sudden Death for all A Classic Fairytale missions
Wuzzy <Wuzzy2@mail.ru>
parents:
15039
diff
changeset
|
757 |
HealthDecrease = 0 |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
758 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
759 |
|
15188
9d4a6ab60dec
ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents:
15159
diff
changeset
|
760 |
nativesTeamName = AddMissionTeam(-2) |
14506
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14422
diff
changeset
|
761 |
youngh = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo") |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
762 |
elderh = AddHog(loc("Righteous Beard"), 0, 99, "IndianChief") |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
763 |
princess = AddHog(loc("Fell From Heaven"), 0, 300, "tiara") |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
764 |
AnimSetGearPosition(princess, 1911, 1361) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
765 |
HogTurnLeft(princess, true) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
766 |
AnimSetGearPosition(elderh, 2667, 1208) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
767 |
HogTurnLeft(elderh, true) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
768 |
AnimSetGearPosition(youngh, 1862, 1362) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
769 |
HogTurnLeft(youngh, false) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
770 |
|
14953
ff4003a90ff8
Enable automatic voicepack language selection for all missions
Wuzzy <Wuzzy2@mail.ru>
parents:
14929
diff
changeset
|
771 |
AddTeam(loc("Cannibals"), -1, "skull", "Island", "Pirate_qau", "cm_vampire") |
7225
e3f2280d9000
Added localization and changed primary team color.
belphegorr <szabibibi@gmail.com>
parents:
7209
diff
changeset
|
772 |
cannibal = AddHog(loc("Brainiac"), 0, 5, "Zombi") |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
773 |
AnimSetGearPosition(cannibal, 525, 1256) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
774 |
HogTurnLeft(cannibal, false) |
12544
77b05be26a6e
Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents:
12466
diff
changeset
|
775 |
|
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
776 |
AnimInit() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
777 |
AnimationSetup() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
778 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
779 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
780 |
function onGameStart() |
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8943
diff
changeset
|
781 |
progress = tonumber(GetCampaignVar("Progress")) |
13752
110d6c1e817f
Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents:
13742
diff
changeset
|
782 |
SetTurnTimeLeft(MAX_TURN_TIME) |
15159
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
783 |
SetReadyTimeLeft(0) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
784 |
FollowGear(youngh) |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
785 |
local msgSkip |
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
786 |
if INTERFACE == "touch" then |
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
787 |
-- FIXME: Precise key is not available in Touch |
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
788 |
msgSkip = "" |
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
789 |
else |
14409
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14404
diff
changeset
|
790 |
msgSkip = "|" .. loc("Hint: Cinematics can be skipped with the [Precise] key.") |
14404
cea19d3342c8
Modify texts in first 2 ACF missions to be compatible with Touch
Wuzzy <Wuzzy2@mail.ru>
parents:
14385
diff
changeset
|
791 |
end |
15088
d59da429d22c
Add 2 mission panel icons: hedgehog and flags
Wuzzy <Wuzzy2@mail.ru>
parents:
15050
diff
changeset
|
792 |
ShowMission(loc("A Classic Fairytale"), loc("First Blood"), loc("Finish your training.") .. msgSkip, 10, 0) |
13141
8f2260eeb726
ACF1: Hide Cannibals team before it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
12933
diff
changeset
|
793 |
HideHog(cannibal) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
794 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
795 |
AddAnim(startDialogue) |
7245
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
796 |
princessFace = "Right" |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
797 |
AddEvent(CheckNeedToTurn, {princess}, DoNeedToTurn, {princess}, 1) |
53f73f4ae203
Modified frontend so that updating campaogn progress no longer changes current index of the mission combo box
belphegorr <szabibibi@gmail.com>
parents:
7243
diff
changeset
|
798 |
AddEvent(CheckNeedToTurn, {elderh}, DoNeedToTurn, {elderh}, 1) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
799 |
AddEvent(CheckDamage, {}, DoOnDamage, {}, 1) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
800 |
AddEvent(CheckDeath, {}, DoDeath, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
801 |
AddEvent(CheckDamagedOthers, {}, DoOnDamagedOthers, {}, 1) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
802 |
AddEvent(CheckKilledOthers, {}, DoKilledOthers, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
803 |
AddEvent(CheckMovedUntilJump, {}, DoMovedUntilJump, {}, 0) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
804 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
805 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
806 |
function onGameTick() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
807 |
AnimUnWait() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
808 |
if ShowAnimation() == false then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
809 |
return |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
810 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
811 |
ExecuteAfterAnimations() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
812 |
CheckEvents() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
813 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
814 |
|
12624
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
815 |
local choiceDialogTimer = 0 |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
816 |
function onGameTick20() |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
817 |
-- Make sure the choice dialog never disappears while it is active |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
818 |
if difficultyChoice then |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
819 |
choiceDialogTimer = choiceDialogTimer + 20 |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
820 |
if choiceDialogTimer > 9990000 then |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
821 |
ChoiceDialog() |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
822 |
choiceDialogTimer = 0 |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
823 |
end |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
824 |
end |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
825 |
end |
705dde538519
ACF1, fruit01, WxW: Make sure the selection dialogues never disappear on their own
Wuzzy <almikes@aol.com>
parents:
12606
diff
changeset
|
826 |
|
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
827 |
function onGearDelete(gear) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
828 |
if gear == ropeCrate1 then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
829 |
rope1Taken = true |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
830 |
elseif gear == paraCrate then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
831 |
paraTaken = true |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
832 |
elseif gear == ropeCrate2 then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
833 |
rope2Taken = true |
12545
9c3ff4ffd4f3
ACF1: Fix various problems with the parachute section
Wuzzy <almikes@aol.com>
parents:
12544
diff
changeset
|
834 |
rope2InProgress = false |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
835 |
elseif gear == ropeCrate3 then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
836 |
rope3Taken = true |
12466
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
837 |
elseif gear == crates[1] then |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
838 |
-- Play sound if challenge crate (fake crate) collected |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
839 |
if band(GetGearMessage(gear), gmDestroy) ~= 0 then |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
840 |
PlaySound(sndShotgunReload) |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
841 |
end |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
842 |
|
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
843 |
-- Update crate challenge |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
844 |
if deleteCrate == true then |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
845 |
deleteCrate = false |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
846 |
elseif challengeFailed == false then |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
847 |
crates[1] = nil |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
848 |
cratesCollected = cratesCollected + 1 |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
849 |
PutCrate(cratesCollected + 1) |
72c17eabc497
Fix incorrect crate messages when collecting crates in ACF mission 1
Wuzzy <almikes@aol.com>
parents:
12263
diff
changeset
|
850 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
851 |
elseif gear == punchCrate then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
852 |
punchTaken = true |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
853 |
elseif gear == desertCrate then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
854 |
desertTaken = true |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
855 |
elseif GetGearType(gear) == gtTarget then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
856 |
i = 1 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
857 |
while targets[i] ~= gear do |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
858 |
i = i + 1 |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
859 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
860 |
targets[i] = nil |
12544
77b05be26a6e
Improve the mission texts in ACF, mission 1
Wuzzy <almikes@aol.com>
parents:
12466
diff
changeset
|
861 |
targetsDestroyed = targetsDestroyed + 1 |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
862 |
elseif gear == cannibal then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
863 |
cannibalKilled = true |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
864 |
elseif gear == princess then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
865 |
princessKilled = true |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
866 |
elseif gear == elderh then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
867 |
elderKilled = true |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
868 |
elseif gear == youngh then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
869 |
youngKilled = true |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
870 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
871 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
872 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
873 |
function onAmmoStoreInit() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
874 |
SetAmmo(amWhip, 0, 0, 0, 8) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
875 |
SetAmmo(amBaseballBat, 0, 0, 0, 8) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
876 |
SetAmmo(amHammer, 0, 0, 0, 8) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
877 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
878 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
879 |
function onNewTurn() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
880 |
if CurrentHedgehog == cannibal and cannibalVisible == false then |
13141
8f2260eeb726
ACF1: Hide Cannibals team before it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
12933
diff
changeset
|
881 |
RestoreHog(cannibal) |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
882 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
883 |
SwitchHog(youngh) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
884 |
FollowGear(youngh) |
15159
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
885 |
if inCrateChallenge then |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
886 |
ResetTurnTime() |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
887 |
else |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
888 |
SetTurnTimeLeft(MAX_TURN_TIME) |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
889 |
SetReadyTimeLeft(0) |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
890 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
891 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
892 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
893 |
function onGearDamage(gear, damage) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
894 |
if gear == youngh then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
895 |
youngdamaged = true |
15159
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
896 |
if TurnTimeLeft > 0 then |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
897 |
tTime = TurnTimeLeft |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
898 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
899 |
elseif gear == princess then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
900 |
princessDamaged = true |
15159
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
901 |
if TurnTimeLeft > 0 then |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
902 |
tTime = TurnTimeLeft |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
903 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
904 |
elseif gear == elderh then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
905 |
elderDamaged = true |
15159
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
906 |
if TurnTimeLeft > 0 then |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
907 |
tTime = TurnTimeLeft |
a344e20edfa1
ACF1: Crate challenge: Fix turn time being reset to infinity after taking dmg
Wuzzy <Wuzzy2@mail.ru>
parents:
15097
diff
changeset
|
908 |
end |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
909 |
elseif gear == cannibal then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
910 |
cannibalVisible = true |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
911 |
cannibalDamaged = true |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
912 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
913 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
914 |
|
15023
3ed1cbd31754
Backed out changeset 4596357d002d (onPreciseLocal causes desyncs)
Wuzzy <Wuzzy2@mail.ru>
parents:
14962
diff
changeset
|
915 |
function onPrecise() |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
916 |
if GameTime > 2000 then |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
917 |
SetAnimSkip(true) |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
918 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
919 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
920 |
|
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
921 |
function onLeft() |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
922 |
if difficultyChoice == true then |
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
923 |
if difficulty ~= 1 then |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
924 |
difficulty = 1 |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
925 |
else |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
926 |
difficulty = 2 |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
927 |
end |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
928 |
PlaySound(sndSwitchHog) |
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
929 |
ChoiceDialog() |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
930 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
931 |
end |
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
932 |
onRight = onLeft |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
933 |
|
12606
f1e0fa009eb7
ACF1: Change rope challenge confirm key to [Attack]
Wuzzy <almikes@aol.com>
parents:
12605
diff
changeset
|
934 |
function onAttack() |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
935 |
if difficultyChoice == true then |
12604
a45f8eec6869
ACF1: Force player to press jump to confirm difficulty dialog
Wuzzy <almikes@aol.com>
parents:
12585
diff
changeset
|
936 |
DoChoice() |
7203
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
937 |
end |
37661b2a7b64
Copied the first two campaign missions and the helper script into share/hedgewars/Data/
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
938 |
end |
15188
9d4a6ab60dec
ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents:
15159
diff
changeset
|
939 |
|
9d4a6ab60dec
ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents:
15159
diff
changeset
|
940 |
function onGameResult(winner) |
9d4a6ab60dec
ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents:
15159
diff
changeset
|
941 |
if winner == GetTeamClan(nativesTeamName) then |
9d4a6ab60dec
ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents:
15159
diff
changeset
|
942 |
SendStat(siGameResult, loc("Mission succeeded!")) |
9d4a6ab60dec
ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents:
15159
diff
changeset
|
943 |
else |
9d4a6ab60dec
ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents:
15159
diff
changeset
|
944 |
SendStat(siGameResult, loc("Mission failed!")) |
9d4a6ab60dec
ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents:
15159
diff
changeset
|
945 |
end |
9d4a6ab60dec
ACF: Show "Mission succeeded/failed" in stats screen
Wuzzy <Wuzzy2@mail.ru>
parents:
15159
diff
changeset
|
946 |
end |