2
# Copyright 2008 by Mark Weyer
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.
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.
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
23
description[geek] = "8 bit nostalgia"
25
pics = Avatar, Gift * <farben>
28
startdist = ".A...A..AA",".AAAAA..AA",".AAAAAA.AA","AAAAAAAAAA"
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;
43
var farbe = farben : reapply;
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;
66
if loc_yy@@0 > loc_yy@@1
68
else -> y_ist = loc_yy@@1;
71
if qu_x==-1 -> { # Keine Quelle vorhanden, also neue suchen
74
if (kind@@(qu_x,qu_y) == Luft) && (qu_y >= zeit/32/50) -> {
77
qu_zeit = quelle_dauer + 10;
79
} else -> # Es gibt eine Quelle
80
if qu_zeit==0 -> quelle_neu
83
# Bewegung Plattform 1
90
if 1:2 -> {pf1_d = 1; pf1_x = -pf1_l;}
91
else -> {pf1_d = -1; pf1_x = 10;};
96
pf1_x+=pf1_d; pf1_z=pf1_v;
97
if ((pf1_d==1) && (pf1_x==10)) || ((pf1_d==-1) && (pf1_x==-pf1_l))
102
# Bewegung Plattform 2
109
if 1:2 -> {pf2_d = 1; pf2_x = -pf2_l;}
110
else -> {pf2_d = -1; pf2_x = 10;};
115
pf2_x+=pf2_d; pf2_z=pf2_v;
116
if ((pf2_d==1) && (pf2_x==10)) || ((pf2_d==-1) && (pf2_x==-pf2_l))
121
# Interaktion Plattformen-Spieler
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;};
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;
145
y_soll = y_soll + gesch;
147
if gesch>64 -> gesch=64;
149
falling_speed = y_soll-y_ist;
150
falling_fast_speed = y_soll-y_ist;
151
if tot -> falling_fast_speed = 32;
154
semiglobal.keyturn = {
155
if steht -> gesch=-30;
158
semiglobal.keyfall = {
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))) -> {
173
if (loc_x==qu_x@@) && (loc_y==qu_y@@)
174
&& ((qu_zeit@@ % 2) || (qu_zeit@@ == 25..quelle_dauer)) -> {
177
qu=Q_TL; *; qu=Q_BR; *;
179
qu=Q_TR; *; qu=Q_BL; *;
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*;
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*;
201
weight = 0; # (Zur Sicherheit)
207
falling_fast_speed@@ = 0;
219
avricht = (avricht+1)%4;
222
Avatar.land = {bonus(-5); explode; tot@@=1};
243
if farbe != farben -> {
245
if kind@(0,1) == Luft -> {
246
if farbe@(0,1) == farben -> {
250
} else -> { kind = Gift+farbe; };
258
pics = mjZeugRed.xpm, mjZeugYellow.xpm, mjZeugGreen.xpm, mjZeugBlue.xpm, mjZeugPurple.xpm,
263
pics = mjZeugRed.xpm, mjZeugYellow.xpm, mjZeugGreen.xpm, mjZeugBlue.xpm, mjZeugPurple.xpm,
269
pics = mjZeugRed.xpm, mjZeugYellow.xpm, mjZeugGreen.xpm, mjZeugBlue.xpm, mjZeugPurple.xpm,
270
mjPlattform.xpm, mjNaegel.xpm
274
pics = mjZeugRed.xpm, mjZeugYellow.xpm, mjZeugGreen.xpm, mjZeugBlue.xpm, mjZeugPurple.xpm,