--warlord
white = Color.new(255,255,255)
black = Color.new(0,0,0)
red = Color.new(255, 0, 0)
green = Color.new(0, 255, 0)
blue = Color.new(0,0,255)
light_blue = Color.new(0,180,255)
orange = Color.new(235,115,0)
yellow = Color.new(255,255,0)
gray = Color.new(160,160,160)
pos = {}
for i=1,100 do
pos[i] = {}
pos[i].x = 17
pos[i].s = 1
end
pos2 = {}
for i=1,100 do
pos2[i] = {}
pos2[i].x = 17
pos2[i].s = 1
end
pos3 = {}
for i=1,100 do
pos3[i] = {}
pos3[i].x = 17
pos3[i].s = 1
pos3[i].f = blue
end
pos4 = {}
for i=1,100 do
pos4[i] = {}
pos4[i].x = 17
pos4[i].s = 1
pos4[i].f = red
end
font = Font.load("fonts/arialsmall.ttf")
font:setPixelSizes(15,14)
fontbig = Font.load("fonts/bankgoth.ttf")
fontbig:setPixelSizes(65,70)
arrow = Image.load("images/arrow.png")
swordman = Image.load("images/sword.png")
spearman = Image.load("images/spear.png")
hellebardier = Image.load("images/hellebardier.png")
archer = Image.load("images/archer.png")
--Mp3.load("music/dust.mp3")
cg1 = 1
cg2 = 1
cg3 = 1
cg4 = 1
g = 0
i = 0
g11 = -10
g12 = -10
g13 = -10
ende = 0
ctime = 0
cguy = 1
cguymax = 4
cline = 70
oldpad=Controls.read()
function new()
cline = 1
cguy = 1
end
while true do
pad = Controls.read()
screen:clear()
--Mp3.play()
screen:blit(1,cline+7,arrow)
ende = ende + 1
if ende == 50 then
ctime = ctime + 1
ende = 0
end
if ctime == 480 then
new()
end
screen:drawLine(0,0,480,0,white)
screen:drawLine(0,4,480,4,white)
screen:fillRect(0,1,ctime+1,3,red)
-- typ und linie bestimmen
if pad:down() and oldpad:down() ~= pad:down() then
cline=cline+40
end
if pad:up() and oldpad:up() ~= pad:up() then
cline=cline-40
end
if cline == 270 then
cline = 230
end
if cline == 30 then
cline = 70
end
if pad:left() and oldpad:left() ~= pad:left() then
cguy=cguy-1
end
if pad:right() and oldpad:right() ~= pad:right() then
cguy=cguy+1
end
if cguy == cguymax + 1 then
cguy = cguymax
end
if cguy == 0 then
cguy = 1
end
if pad:cross() and oldpad:cross() ~= pad:cross() then
if cguy == 1 then
cg1 = cg1 + 1
end
if cguy == 2 then
cg2 = cg2 + 1
end
if cguy == 3 then
cg3 = cg3 + 1
end
if cguy == 4 then
cg4 = cg4 + 1
end
end
if pad:square() then
pos[1].f = red
end
i=1
while i<cg1 do
pos[i].x = pos[i].x+pos[i].s
screen:blit(pos[i].x,cline,spearman)
i=i+1
end
i=1
while i<cg2 do
pos2[i].x = pos2[i].x+pos2[i].s
screen:blit(pos2[i].x,cline,swordman)
i=i+1
end
i=1
while i<cg3 do
pos3[i].x = pos3[i].x+pos3[i].s
screen:blit(pos3[i].x,cline,archer)
i=i+1
end
i=1
while i<cg4 do
pos4[i].x = pos4[i].x+pos4[i].s
screen:blit(pos4[i].x,cline,hellebardier)
i=i+1
end
-- ende "typ und linie bestimen"
screen:print(210,262,"ende:"..ctime.." ".."cline: "..cline.." ".."cguy: "..cguy,white)
oldpad=pad
screen.flip()
screen.waitVblankStart()
end