~ubuntu-branches/ubuntu/saucy/cuyo/saucy

« back to all changes in this revision

Viewing changes to data/jump.ld

  • Committer: Bazaar Package Importer
  • Author(s): Angel Abad
  • Date: 2010-07-19 09:54:44 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100719095444-ecoegzo1vvvdwra9
Tags: 2.~-1.1.brl3-1ubuntu1
* Merge from debian unstable (LP: #607106). Remaining changes:
  - Don't register MimeType=application/x-executable in
    the .desktop file.
  - Remove UTF-8 in the .desktop file
  - 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
#   Copyright 2008 by Mark Weyer
 
3
#
 
4
#   This program is free software; you can redistribute it and/or modify
 
5
#   it under the terms of the GNU General Public License as published by
 
6
#   the Free Software Foundation; either version 2 of the License, or
 
7
#   (at your option) any later version.
 
8
#
 
9
#   This program is distributed in the hope that it will be useful,
 
10
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
#   GNU General Public License for more details.
 
13
#
 
14
#   You should have received a copy of the GNU General Public License
 
15
#   along with this program; if not, write to the Free Software
 
16
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
#
 
18
 
 
19
 
 
20
Jump = {
 
21
  name = "Jump"
 
22
  author = "Mark Weyer"
 
23
  description[geek] = "8 bit nostalgia"
 
24
  farben = 5
 
25
  pics = Avatar, Gift * <farben>
 
26
  startpic = Naegel
 
27
  emptypic = Luft
 
28
  startdist = ".A...A..AA",".AAAAA..AA",".AAAAAA.AA","AAAAAAAAAA"
 
29
  numexplode[easy] = 3
 
30
  numexplode = 4
 
31
  numexplode[hard] = 5
 
32
  bgcolor = 0,0,0
 
33
  nogreyprob = 1
 
34
  quelle_dauer = 125
 
35
 
 
36
  <<
 
37
    var zeit;
 
38
    var gesch, tot, y_soll, y_ist, steht;
 
39
    var pf1_x, pf1_y, pf1_d, pf1_v, pf1_l, pf1_z;
 
40
    var pf2_x, pf2_y, pf2_d, pf2_v, pf2_l, pf2_z;
 
41
    var qu_x, qu_y, qu_f1, qu_f2, qu_zeit;
 
42
 
 
43
    var farbe = farben : reapply;
 
44
 
 
45
    quelle_neu = {
 
46
      qu_x = -1;
 
47
    };
 
48
 
 
49
    tropf = {
 
50
      if farbe@@0 != farben -> {
 
51
        farbe@@(loc_x@@0, loc_y@@0) = farbe@@0;
 
52
        farbe@@(loc_x@@1, loc_y@@1) = farbe@@1;
 
53
      };
 
54
    };
 
55
 
 
56
    semiglobal.init = {
 
57
      bonus(100);
 
58
      pf1_y = -10;
 
59
      pf2_y = -10;
 
60
      quelle_neu;
 
61
    };
 
62
 
 
63
    semiglobal = {
 
64
      zeit += 1;
 
65
 
 
66
      if loc_yy@@0 > loc_yy@@1
 
67
        -> y_ist = loc_yy@@0
 
68
        else -> y_ist = loc_yy@@1;
 
69
 
 
70
      # Quelle
 
71
      if qu_x==-1 -> { # Keine Quelle vorhanden, also neue suchen
 
72
        qu_x = 1+rnd(8);
 
73
        qu_y = 3+rnd(7);
 
74
        if (kind@@(qu_x,qu_y) == Luft) && (qu_y >= zeit/32/50) -> {
 
75
          qu_f1 = rnd(farben);
 
76
          qu_f2 = rnd(farben);
 
77
          qu_zeit = quelle_dauer + 10;
 
78
        } else -> qu_x=-1;
 
79
      } else -> # Es gibt eine Quelle
 
80
        if qu_zeit==0 -> quelle_neu
 
81
        else qu_zeit-=1;
 
82
 
 
83
      # Bewegung Plattform 1
 
84
      if pf1_d==0
 
85
        -> {
 
86
          pf1_y = rnd(6)+5;
 
87
          pf1_l = 3+rnd(3);
 
88
          pf1_v = 5+rnd(10);
 
89
          pf1_z = pf1_v;
 
90
          if 1:2 -> {pf1_d = 1; pf1_x = -pf1_l;}
 
91
            else -> {pf1_d = -1; pf1_x = 10;};
 
92
        }
 
93
        else -> {
 
94
          pf1_z -=1;
 
95
          if pf1_z==0 -> {
 
96
            pf1_x+=pf1_d; pf1_z=pf1_v;
 
97
            if ((pf1_d==1) && (pf1_x==10)) || ((pf1_d==-1) && (pf1_x==-pf1_l))
 
98
              -> pf1_d=0;
 
99
          };
 
100
        };
 
101
 
 
102
      # Bewegung Plattform 2
 
103
      if pf2_d==0
 
104
        -> {
 
105
          pf2_y = rnd(6)+5;
 
106
          pf2_l = 3+rnd(3);
 
107
          pf2_v = 5+rnd(10);
 
108
          pf2_z = pf2_v;
 
109
          if 1:2 -> {pf2_d = 1; pf2_x = -pf2_l;}
 
110
            else -> {pf2_d = -1; pf2_x = 10;};
 
111
        }
 
112
        else -> {
 
113
          pf2_z -=1;
 
114
          if pf2_z==0 -> {
 
115
            pf2_x+=pf2_d; pf2_z=pf2_v;
 
116
            if ((pf2_d==1) && (pf2_x==10)) || ((pf2_d==-1) && (pf2_x==-pf2_l))
 
117
              -> pf2_d=0;
 
118
          };
 
119
        };
 
120
 
 
121
      # Interaktion Plattformen-Spieler
 
122
      steht = 0;
 
123
      if ((pf1_x<=loc_x@@0) && (pf1_x+pf1_l>loc_x@@0) ||
 
124
            (pf1_x<=loc_x@@1) && (pf1_x+pf1_l>loc_x@@1)) &&
 
125
          (y_soll >= pf1_y*32) && (y_soll <= pf1_y*32+gesch)
 
126
        -> {y_soll = pf1_y*32; steht+=1;};
 
127
      if ((pf2_x<=loc_x@@0) && (pf2_x+pf2_l>loc_x@@0) ||
 
128
            (pf2_x<=loc_x@@1) && (pf2_x+pf2_l>loc_x@@1)) &&
 
129
          (y_soll >= pf2_y*32) && (y_soll <= pf2_y*32+gesch)
 
130
        -> {y_soll = pf2_y*32; steht+=2;};
 
131
      if (steht==3) && (pf2_y>pf1_y) -> y_soll = pf1_y*32;
 
132
      if steht>0 -> {gesch=0; steht=1;};
 
133
 
 
134
      #Interaktion Quelle-Spieler
 
135
      if (qu_zeit<=quelle_dauer) && (((loc_x@@0==qu_x) && (loc_y@@0==qu_y))
 
136
          || ((loc_x@@1==qu_x) && (loc_y@@1==qu_y))) -> {
 
137
        if farbe@@0 != farben -> tropf;
 
138
        farbe@@0 = qu_f1;
 
139
        farbe@@1 = qu_f2;
 
140
        quelle_neu;
 
141
      };
 
142
 
 
143
      # Bewegung Spieler
 
144
      if !steht -> {
 
145
        y_soll = y_soll + gesch;
 
146
        gesch += 3;
 
147
        if gesch>64 -> gesch=64;
 
148
      };
 
149
      falling_speed = y_soll-y_ist;
 
150
      falling_fast_speed = y_soll-y_ist;
 
151
      if tot -> falling_fast_speed = 32;
 
152
    };
 
153
 
 
154
    semiglobal.keyturn = {
 
155
      if steht -> gesch=-30;
 
156
    };
 
157
 
 
158
    semiglobal.keyfall = {
 
159
      tropf;
 
160
      if steht && (((loc_x@@0==qu_x) && (loc_y@@0==qu_y-1))
 
161
          || ((loc_x@@1==qu_x) && (loc_y@@1==qu_y-1))) -> {
 
162
        farbe@@0 = qu_f1;
 
163
        farbe@@1 = qu_f2;
 
164
        quelle_neu;
 
165
      } else -> {
 
166
        farbe@@0 = farben;
 
167
        farbe@@1 = farben;
 
168
      };
 
169
    };
 
170
 
 
171
 
 
172
    sprites = {
 
173
      if (loc_x==qu_x@@) && (loc_y==qu_y@@)
 
174
          && ((qu_zeit@@ % 2) || (qu_zeit@@ == 25..quelle_dauer)) -> {
 
175
        M;
 
176
        file = qu_f1@@;
 
177
        qu=Q_TL; *; qu=Q_BR; *;
 
178
        file = qu_f2@@;
 
179
        qu=Q_TR; *; qu=Q_BL; *;
 
180
        qu=Q_ALL;
 
181
      };
 
182
      file = farben;
 
183
      if loc_y==pf1_y@@+1
 
184
        -> switch {
 
185
          loc_x==pf1_x@@ -> A*;
 
186
          loc_x==pf1_x@@+pf1_l@@-1 -> C*;
 
187
          loc_x-pf1_x@@ == 1..pf1_l@@-2 -> B*;
 
188
        };
 
189
      if loc_y==pf2_y@@+1
 
190
        -> switch {
 
191
          loc_x==pf2_x@@ -> A*;
 
192
          loc_x==pf2_x@@+pf2_l@@-1 -> C*;
 
193
          loc_x-pf2_x@@ == 1..pf2_l@@-2 -> B*;
 
194
        };
 
195
    };
 
196
 
 
197
 
 
198
    var avricht;
 
199
 
 
200
    Avatar.init = {
 
201
      weight = 0;  # (Zur Sicherheit)
 
202
      if loc_x==4
 
203
        -> avricht=0
 
204
        else -> avricht=2;
 
205
      y_soll@@ = loc_yy;
 
206
      falling_speed@@ = 0;
 
207
      falling_fast_speed@@ = 0;
 
208
      gesch@@ = 0;
 
209
      tot@@=0;
 
210
    };
 
211
 
 
212
    Avatar = {
 
213
      file = farbe;
 
214
      pos=3*avricht+turn;
 
215
      *;
 
216
    };
 
217
 
 
218
    Avatar.turn = {
 
219
      avricht = (avricht+1)%4;
 
220
    };
 
221
 
 
222
    Avatar.land = {bonus(-5); explode; tot@@=1};
 
223
 
 
224
 
 
225
    Gift = {
 
226
      weight = 1;
 
227
      file = kind-Gift;
 
228
      O*;
 
229
      sprites;
 
230
    };
 
231
 
 
232
 
 
233
    Naegel = {
 
234
      file = farben+1;
 
235
      if kind@(0,-1)==kind
 
236
        -> {C*; B; *@(0,-1)}
 
237
        else -> A*;
 
238
      sprites;
 
239
    };
 
240
 
 
241
 
 
242
    Luft = {
 
243
      if farbe != farben -> {
 
244
        file = farbe; N*;
 
245
        if kind@(0,1) == Luft -> {
 
246
          if farbe@(0,1) == farben -> {
 
247
            farbe@(0,1) = farbe;
 
248
            farbe = farben;
 
249
          };
 
250
        } else -> { kind = Gift+farbe; };
 
251
      };
 
252
      sprites;
 
253
    };
 
254
 
 
255
  >>
 
256
 
 
257
  Avatar = {
 
258
    pics = mjZeugRed.xpm, mjZeugYellow.xpm, mjZeugGreen.xpm, mjZeugBlue.xpm, mjZeugPurple.xpm,
 
259
           mjZeugWhite.xpm
 
260
  }
 
261
 
 
262
  Gift = {
 
263
    pics = mjZeugRed.xpm, mjZeugYellow.xpm, mjZeugGreen.xpm, mjZeugBlue.xpm, mjZeugPurple.xpm,
 
264
           mjPlattform.xpm
 
265
    colourprob = 0
 
266
  }
 
267
 
 
268
  Naegel = {
 
269
    pics = mjZeugRed.xpm, mjZeugYellow.xpm, mjZeugGreen.xpm, mjZeugBlue.xpm, mjZeugPurple.xpm,
 
270
           mjPlattform.xpm, mjNaegel.xpm
 
271
  }
 
272
 
 
273
  Luft = {
 
274
    pics = mjZeugRed.xpm, mjZeugYellow.xpm, mjZeugGreen.xpm, mjZeugBlue.xpm, mjZeugPurple.xpm,
 
275
           mjPlattform.xpm
 
276
  }
 
277
 
 
278
}
 
279