equal
deleted
inserted
replaced
1 ObjectList = {} |
1 HedgewarsScriptLoad("/Scripts/Params.lua") |
|
2 |
|
3 local ObjectList = {} |
2 |
4 |
3 -- Overall padding for roping freedom |
5 -- Overall padding for roping freedom |
4 Padding = 430 |
6 local Padding = 430 |
|
7 |
|
8 function onParameters() |
|
9 parseParams() |
|
10 if params["pad"] ~= nil then |
|
11 Padding = params["pad"] |
|
12 end |
|
13 end |
5 |
14 |
6 -- This could probably use less points and more precision |
15 -- This could probably use less points and more precision |
7 -- 700x700 for object space |
16 -- 700x700 for object space |
8 function DrawStar(x, y, d, f) |
17 function DrawStar(x, y, d, f) |
9 -- default scale is 700x700 or so |
18 -- default scale is 700x700 or so |
379 -- if AddPoint(x,y,w) then TotGetn = TotGen+1 |
388 -- if AddPoint(x,y,w) then TotGetn = TotGen+1 |
380 DrawCircle(x,y,w) |
389 DrawCircle(x,y,w) |
381 end |
390 end |
382 end |
391 end |
383 if GetRandom(2)==0 then |
392 if GetRandom(2)==0 then |
384 x = GetRandom(3300)+350 |
393 x = GetRandom(3300)+382 |
385 y = GetRandom(1300)+350 |
394 y = GetRandom(1300)+382 |
386 if DrawStar(x,y, 1, 1+GetRandom(2)*-2) then |
395 if DrawStar(x,y, 1, 1+GetRandom(2)*-2) then |
387 TotGen = TotGen+1 |
396 TotGen = TotGen+1 |
388 end |
397 end |
389 end |
398 end |
390 |
399 |
412 TotGen = TotGen+1 |
421 TotGen = TotGen+1 |
413 end |
422 end |
414 else |
423 else |
415 if Tries > 500 then d = GetRandom(2)+3 |
424 if Tries > 500 then d = GetRandom(2)+3 |
416 else d = GetRandom(3)+2 end |
425 else d = GetRandom(3)+2 end |
417 x = GetRandom(4000-div(700,d))+div(700,d*2) |
426 x = GetRandom(4000-div(764,d))+div(764,d*2) |
418 y = GetRandom(1300-div(700,d))+div(700,d*2) |
427 y = GetRandom(1300-div(764,d))+div(764,d*2) |
419 if DrawStar(x,y, d, 1+GetRandom(2)*-2) then |
428 if DrawStar(x,y, d, 1+GetRandom(2)*-2) then |
420 TotGen = TotGen+1 |
429 TotGen = TotGen+1 |
421 end |
430 end |
422 end |
431 end |
423 w = GetRandom(35-div(Tries,29))+15 |
432 w = GetRandom(35-div(Tries,29))+15 |