share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua
author unC0Rr
Mon, 16 Mar 2015 11:12:18 +0300
changeset 10857 6ef0fb6cd3bb
parent 10611 58cad46782ff
child 10969 98cab7f366c3
permissions -rw-r--r--
Script parameter to adjust winning score for Mutant
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
     1
ObjectList = {}
10604
f2f9928ea2e7 Sheepluva thought this was worth adding.
nemo
parents: 10423
diff changeset
     2
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
     3
-- Overall padding for roping freedom
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
     4
Padding = 430
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
     5
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
     6
-- This could probably use less points and more precision
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
     7
-- 700x700 for object space
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
     8
function DrawStar(x, y, d, f)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
     9
-- default scale is 700x700 or so
9257
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
    10
    local s = 700
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
    11
    local i = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
    12
    local j = 0
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    13
    if not(d == 1) then s = div(s,d) end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    14
    if NoOverlap(x,y,s,s) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    15
        AddCollision(x,y,s,s)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    16
        if not(d == 1) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    17
            i = 6-d
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    18
            j = math.min(div(5,d),1)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    19
            -- centre
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    20
            AddPoint(x,y,div(20,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    21
            -- arms
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    22
            AddPoint(x-div(325,d),y-f*div(108,d),2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    23
            AddPoint(x+div(325,d),y-f*div(108,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    24
            AddPoint(x-div(205,d),y+f*div(270,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    25
            AddPoint(x,y-f*div(345,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    26
            AddPoint(x+div(205,d),y+f*div(270,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    27
            AddPoint(x-div(325,d),y-f*div(108,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    28
            if d < 4 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    29
            -- fill in arm 1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    30
            AddPoint(x-div(275,d),y-f*div(92,d),i)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    31
            AddPoint(x-div(50,d),y-f*div(92,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    32
            AddPoint(x-div(105,d),y+f*div(25,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    33
            AddPoint(x-div(250,d),y-f*div(80,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    34
            AddPoint(x-div(115,d),y-f*div(70,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    35
            AddPoint(x-div(130,d),y-f*div(25,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    36
            AddPoint(x-div(175,d),y-f*div(60,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    37
            -- fill in arm 2
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    38
            AddPoint(x+div(275,d),y-f*div(92,d),i)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    39
            AddPoint(x+div(50,d),y-f*div(92,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    40
            AddPoint(x+div(105,d),y+f*div(25,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    41
            AddPoint(x+div(250,d),y-f*div(80,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    42
            AddPoint(x+div(115,d),y-f*div(70,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    43
            AddPoint(x+div(130,d),y-f*div(25,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    44
            AddPoint(x+div(175,d),y-f*div(60,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    45
            -- fill in arm 3
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    46
            AddPoint(x-div(175,d),y+f*div(230,d),i)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    47
            AddPoint(x-div(110,d),y+f*div(60,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    48
            AddPoint(x,y+f*div(120,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    49
            AddPoint(x-div(155,d),y+f*div(215,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    50
            AddPoint(x-div(105,d),y+f*div(95,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    51
            AddPoint(x-div(60,d),y+f*div(130,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    52
            AddPoint(x-div(85,d),y+f*div(155,d),j)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    53
            -- fill in arm 4
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    54
            AddPoint(x,y-f*div(300,d),3)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    55
            AddPoint(x+div(50,d),y-f*div(125,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    56
            AddPoint(x-div(50,d),y-f*div(125,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    57
            AddPoint(x,y-f*div(270,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    58
            AddPoint(x-div(40,d),y-f*div(160,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    59
            AddPoint(x+div(40,d),y-f*div(160,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    60
            AddPoint(x,y-f*div(195,d),j)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    61
            -- fill in arm 5
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    62
            AddPoint(x+div(175,d),y+f*div(230,d),i)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    63
            AddPoint(x+div(110,d),y+f*div(60,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    64
            AddPoint(x,y+f*div(120,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    65
            AddPoint(x+div(155,d),y+f*div(215,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    66
            AddPoint(x+div(105,d),y+f*div(95,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    67
            AddPoint(x+div(60,d),y+f*div(130,d))
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    68
            AddPoint(x+div(85,d),y+f*div(155,d),j)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    69
            end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    70
        else
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    71
            -- centre
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    72
            AddPoint(x,y,20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    73
            -- arms
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    74
            AddPoint(x-325,y-f*108,1)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    75
            AddPoint(x+325,y-f*108)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    76
            AddPoint(x-205,y+f*270)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    77
            AddPoint(x,y-f*345)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    78
            AddPoint(x+205,y+f*270)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    79
            AddPoint(x-325,y-f*108)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    80
            -- fill in arm 1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    81
            AddPoint(x-275,y-f*92,4)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    82
            AddPoint(x-50,y-f*92)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    83
            AddPoint(x-105,y+f*25)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    84
            AddPoint(x-250,y-f*80)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    85
            AddPoint(x-115,y-f*70)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    86
            AddPoint(x-130,y-f*25)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    87
            AddPoint(x-175,y-f*60)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    88
            -- fill in arm 2
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    89
            AddPoint(x+275,y-f*92,4)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    90
            AddPoint(x+50,y-f*92)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    91
            AddPoint(x+105,y+f*25)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    92
            AddPoint(x+250,y-f*80)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    93
            AddPoint(x+115,y-f*70)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    94
            AddPoint(x+130,y-f*25)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    95
            AddPoint(x+175,y-f*60)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    96
            -- fill in arm 3
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    97
            AddPoint(x-175,y+f*230,4)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    98
            AddPoint(x-110,y+f*60)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
    99
            AddPoint(x-10,y+f*120)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   100
            AddPoint(x-155,y+f*215)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   101
            AddPoint(x-105,y+f*95)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   102
            AddPoint(x-60,y+f*130)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   103
            AddPoint(x-85,y+f*155,5)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   104
            -- fill in arm 4
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   105
            AddPoint(x,y-f*300,3)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   106
            AddPoint(x+50,y-f*125)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   107
            AddPoint(x-50,y-f*125)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   108
            AddPoint(x,y-f*270)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   109
            AddPoint(x-40,y-f*160)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   110
            AddPoint(x+40,y-f*160)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   111
            AddPoint(x,y-f*195,5)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   112
            -- fill in arm 5
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   113
            AddPoint(x+175,y+f*230,4)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   114
            AddPoint(x+110,y+f*60)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   115
            AddPoint(x+10,y+f*120)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   116
            AddPoint(x+155,y+f*215)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   117
            AddPoint(x+105,y+f*95)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   118
            AddPoint(x+60,y+f*130)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   119
            AddPoint(x+85,y+f*155,5)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   120
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   121
        return true
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   122
    else
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   123
        return false
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   124
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   125
end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   126
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   127
-- well. this was easy
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   128
function DrawCircle(x, y, w)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   129
    if NoOverlap(x,y,w*10+6,w*10+6) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   130
        AddCollision(x,y,w*10+6,w*10+6)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   131
        AddPoint(x,y,w)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   132
        return true
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   133
    else
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   134
        return false
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   135
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   136
end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   137
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   138
function DrawCrescent(x, y, w, s)
9257
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   139
    local b = div(w*(GetRandom(4)+1)*10+6,6)
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   140
    
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   141
    if NoOverlap(x,y,w*10+6,w*10+6) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   142
        AddCollision(x,y,w*10+6,w*10+6)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   143
        AddPoint(x,y,w)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   144
        if s then -- side
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   145
            if GetRandom(1) == 0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   146
                b = b*-1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   147
            end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   148
            AddPoint(x-b,y,w,true)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   149
        else -- top
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   150
            AddPoint(x,y-b,w,true)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   151
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   152
        return true
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   153
    else
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   154
        return false
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   155
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   156
end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   157
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   158
function DrawCones(x,w,h,c)
9257
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   159
    local i = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   160
    local y = 2048-h
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   161
    local hw = div(w,2)
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   162
    if NoOverlap(x+div(w*c,2),y+div(h,2),w*c,h) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   163
        AddCollision(x+div(w*c,2),y+div(h,2),w*c,h)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   164
        x = x + hw
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   165
        for i = 1,c do -- I'm guessing outlining is slightly more efficient than fanning at 16px brush
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   166
            AddPoint(x,y,1)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   167
            AddPoint(x-hw+8,2048)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   168
            AddPoint(x+hw-8,2048)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   169
            AddPoint(x,y)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   170
            for j = x-hw+25,x+hw,34 do
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   171
                AddPoint(x,y+30,3)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   172
                AddPoint(j,2048)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   173
            end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   174
            if GetRandom(2)==0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   175
                AddPoint(x,y-20,8)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   176
            end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   177
            x = x + w
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   178
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   179
    else
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   180
        return false
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   181
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   182
    
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   183
end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   184
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   185
function DrawPlateau(x,y,l,t,b)
9257
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   186
    local bo = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   187
    local to = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   188
    local bSucc = false
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   189
    local tSucc = false
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   190
    if NoOverlapXY(x-28,y-28,x+l+28,y+l+28) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   191
        AddPoint(x,y,5)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   192
        AddPoint(x+l,y)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   193
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   194
        to = GetRandom(6)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   195
        if not(to==0) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   196
            if GetRandom(2)==0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   197
                to = div(l,to)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   198
            else
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   199
                to = l-div(l,to)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   200
            end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   201
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   202
        if t>0 and NoOverlapXY(x+to-28,y-t-28,x+to+28,y+28) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   203
            AddPoint(x+to,y-t,5)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   204
            AddPoint(x+to,y)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   205
            if GetRandom(2)==0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   206
                AddPoint(x+to,y-t+75,20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   207
            else -- square off
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   208
                AddPoint(x+to-20,y-t,1)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   209
                AddPoint(x+to-20,y-t-20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   210
                AddPoint(x+to+20,y-t-20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   211
                AddPoint(x+to+20,y-t)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   212
            end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   213
            tSucc = true
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   214
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   215
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   216
        if to > 120 and GetRandom(2)==0 then -- left bumper
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   217
            AddPoint(x+15,y-20,9)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   218
        else -- square off
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   219
            --AddPoint(x-50,y,2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   220
            AddPoint(x,y+20,1)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   221
            AddPoint(x-20,y+20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   222
            AddPoint(x-20,y-20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   223
            AddPoint(x,y-20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   224
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   225
        if to < (l-120) and GetRandom(2)==0 then -- right bumper
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   226
            AddPoint(x+l-15,y-20,9)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   227
        else -- square off
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   228
            --AddPoint(x+l+50,y,2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   229
            AddPoint(x+l,y+20,1)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   230
            AddPoint(x+l+20,y+20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   231
            AddPoint(x+l+20,y-20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   232
            AddPoint(x+l,y-20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   233
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   234
        bo = GetRandom(6)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   235
        if not(bo == 0) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   236
            if GetRandom(2)==0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   237
                bo = div(l,bo)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   238
            else
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   239
                bo = l-div(l,bo)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   240
            end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   241
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   242
        -- still consider a success even if we can't place this one.  Might need to return more than true/false
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   243
        if b>0 and NoOverlapXY(x+bo-28,y-28,x+bo+28,y+b+28) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   244
            AddPoint(x+bo,y,5)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   245
            AddPoint(x+bo,y+b)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   246
            if GetRandom(2)==0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   247
                AddPoint(x+bo,y+b-75,20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   248
            else -- square off
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   249
                AddPoint(x+bo-20,y+b,1)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   250
                AddPoint(x+bo-20,y+b+20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   251
                AddPoint(x+bo+20,y+b+20)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   252
                AddPoint(x+bo+20,y+b)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   253
            end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   254
            bSucc = true
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   255
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   256
        if bSucc then AddCollisionXY(x+bo-28,y-28,x+bo+28,y+b+28) end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   257
        if tSucc then AddCollisionXY(x+to-28,y-t-28,x+to+28,y+28) end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   258
        AddCollisionXY(x-28,y-28,x+l+28,y+28) 
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   259
        return true
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   260
    else
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   261
        return false
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   262
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   263
end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   264
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   265
function AddCollision(x,y,w,h)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   266
    table.insert(ObjectList,{x-div(w+Padding,2),
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   267
                             y-div(h+Padding,2),
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   268
                             x+div(w+Padding,2),
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   269
                             y+div(h+Padding,2)})
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   270
end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   271
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   272
function AddCollisionXY(x,y,x2,y2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   273
    table.insert(ObjectList,{x-div(Padding,2),
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   274
                             y-div(Padding,2),
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   275
                             x2+div(Padding,2),
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   276
                             y2+div(Padding,2)})
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   277
end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   278
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   279
-- bounding box check
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   280
function NoOverlap(x,y,w,h)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   281
    w = w
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   282
    h = h
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   283
    x = x-div(w,2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   284
    y = y-div(h,2)
9257
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   285
    return NoOverlapXY(x,y,x+w,y+h)
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   286
end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   287
function NoOverlapXY(x,y,x2,y2)
9257
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   288
    local i = 1
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   289
    local l = table.getn(ObjectList)
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   290
    local ox = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   291
    local oy = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   292
    local ox2 = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   293
    local oy2 = 0
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   294
    while i<=l do
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   295
        ox = ObjectList[i][1]
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   296
        oy = ObjectList[i][2]
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   297
        ox2 = ObjectList[i][3]
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   298
        oy2 = ObjectList[i][4]
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   299
         --   WriteLnToConsole(ox..' '..oy..' '..ox2..' '..oy2..' - '..x..' '..y..' '..x2..' '..y2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   300
        --if (math.abs(ox + ox2 -x - x2) <= (ox2 - ox + x2 - x)) and (math.abs(oy + oy2 - y - y2) <= (oy - oy2 + y - y2)) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   301
        if x < ox2 and ox < x2 and y < oy2 and oy < y2 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   302
            return false
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   303
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   304
        i=i+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   305
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   306
    return true
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   307
end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   308
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   309
function dbg()
9257
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   310
    local i = 1
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   311
    local l = table.getn(ObjectList)
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   312
    local ox = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   313
    local oy = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   314
    local ox2 = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   315
    local oy2 = 0
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   316
    while i<=l do
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   317
        ox = ObjectList[i][1]
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   318
        oy = ObjectList[i][2]
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   319
        ox2 = ObjectList[i][3]
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   320
        oy2 = ObjectList[i][4]
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   321
        AddPoint(ox,oy,1)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   322
        AddPoint(ox2,oy)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   323
        AddPoint(ox2,oy2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   324
        AddPoint(ox,oy2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   325
        AddPoint(ox,oy)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   326
        AddPoint(ox2,oy2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   327
        i=i+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   328
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   329
end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   330
10150
fa5c83fd0ad9 Allow lua drawn maps (shoppamap, tunnels, diagonal maze etc) to generate previews.
nemo
parents: 10036
diff changeset
   331
function onPreviewInit()
fa5c83fd0ad9 Allow lua drawn maps (shoppamap, tunnels, diagonal maze etc) to generate previews.
nemo
parents: 10036
diff changeset
   332
onGameInit()
fa5c83fd0ad9 Allow lua drawn maps (shoppamap, tunnels, diagonal maze etc) to generate previews.
nemo
parents: 10036
diff changeset
   333
end
fa5c83fd0ad9 Allow lua drawn maps (shoppamap, tunnels, diagonal maze etc) to generate previews.
nemo
parents: 10036
diff changeset
   334
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   335
function onGameInit()
10423
b9d6463cf2ca fix mapgen of other scripts too
sheepluva
parents: 10172
diff changeset
   336
    MapGen = mgDrawn
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   337
    TemplateFilter = 0
9257
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   338
    local TotGen = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   339
    local Tries = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   340
    local i = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   341
    local l = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   342
    local x = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   343
    local y = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   344
    local w = 0
e89e1ab7f62b I should have specified locals
nemo
parents: 8981
diff changeset
   345
    local h = 0 
10172
7cfd1a9356b5 Only draw border for solid land
nemo
parents: 10150
diff changeset
   346
    if GetGameFlag(gfSolidLand) then EnableGameFlags(gfShoppaBorder) end
10036
3be36d2fdca6 use new API for changing GameFlags
sheepluva
parents: 9387
diff changeset
   347
    if not GetGameFlag(gfBottomBorder) and GetRandom(2) == 0 then
8980
37f4cdd9cd2c don't draw a border if there's already a bottom border, avoid placing objects over gaps in the floor
nemo
parents: 8975
diff changeset
   348
        AddPoint(-50,2010,7)
37f4cdd9cd2c don't draw a border if there's already a bottom border, avoid placing objects over gaps in the floor
nemo
parents: 8975
diff changeset
   349
        AddPoint(4150,2010)
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   350
        for i = 0,GetRandom(3) do
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   351
            x = GetRandom(4096)
8980
37f4cdd9cd2c don't draw a border if there's already a bottom border, avoid placing objects over gaps in the floor
nemo
parents: 8975
diff changeset
   352
            w = GetRandom(40)+10
37f4cdd9cd2c don't draw a border if there's already a bottom border, avoid placing objects over gaps in the floor
nemo
parents: 8975
diff changeset
   353
            AddPoint(x,2200,w,true)
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   354
            AddPoint(x,1900)
8981
6213f45b5ead use less collision space for the holes
nemo
parents: 8980
diff changeset
   355
            table.insert(ObjectList,{x-div(w*9,2),
6213f45b5ead use less collision space for the holes
nemo
parents: 8980
diff changeset
   356
                                     2010-div(100,2),
6213f45b5ead use less collision space for the holes
nemo
parents: 8980
diff changeset
   357
                                     x+div(w*9,2),
6213f45b5ead use less collision space for the holes
nemo
parents: 8980
diff changeset
   358
                                     2010+div(100,2)})
8975
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   359
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   360
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   361
        
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   362
    if GetRandom(2) == 0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   363
        l = GetRandom(3)+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   364
        w = GetRandom(200)+200
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   365
        h = GetRandom(350)+200
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   366
        x = GetRandom(4096-w*l)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   367
        DrawCones(x,w,h,l)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   368
        --if DrawCones(x,w,h,l) then TotGen = TotGen+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   369
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   370
    if GetRandom(2) == 0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   371
        for i = 1,GetRandom(5)+1 do
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   372
            w = GetRandom(35)+15
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   373
            x = GetRandom(4096-w*12)+w
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   374
	    if GetRandom(2)==0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   375
		y = 2048-GetRandom(w*10+6)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   376
	    else
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   377
	    	y = 2048
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   378
	    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   379
           -- if AddPoint(x,y,w) then TotGetn = TotGen+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   380
           DrawCircle(x,y,w)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   381
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   382
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   383
    if GetRandom(2)==0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   384
        x = GetRandom(3300)+350
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   385
        y = GetRandom(1300)+350
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   386
        if DrawStar(x,y, 1, 1+GetRandom(2)*-2) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   387
            TotGen = TotGen+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   388
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   389
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   390
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   391
    while (TotGen < 6) and (Tries < 100) do
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   392
        l = GetRandom(1000-Tries*10)+300
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   393
        x = GetRandom(3900-l)+100
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   394
        y = GetRandom(1900)+100
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   395
        if GetRandom(2)==0 then b = GetRandom(800)+300
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   396
        else b = 0 end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   397
        if GetRandom(2)==0 then t = GetRandom(800)+300
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   398
        else t = 0 end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   399
        if y-t < 50 then t = y - 50 end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   400
        if t < 200 then t = 0 end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   401
        if DrawPlateau(x,y,l,t,b) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   402
            TotGen = TotGen+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   403
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   404
        Tries = Tries + 1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   405
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   406
    Tries = 0
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   407
    while (TotGen < 17) and (Tries < 1000) do
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   408
        if Tries < 500 and GetRandom(2)==0 then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   409
            x = GetRandom(3300)+350
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   410
            y = GetRandom(1300)+350
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   411
            if DrawStar(x,y, 1, 1+GetRandom(2)*-2) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   412
                TotGen = TotGen+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   413
            end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   414
        else
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   415
            if Tries > 500 then d = GetRandom(2)+3
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   416
            else d = GetRandom(3)+2 end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   417
            x = GetRandom(4000-div(700,d))+div(700,d*2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   418
            y = GetRandom(1300-div(700,d))+div(700,d*2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   419
            if DrawStar(x,y, d, 1+GetRandom(2)*-2) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   420
                TotGen = TotGen+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   421
            end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   422
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   423
        w = GetRandom(35-div(Tries,29))+15
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   424
        x = GetRandom(4050-w*20)+w*10
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   425
        y = GetRandom(2000-w*20)+w*10
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   426
        if DrawCircle(x,y,w) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   427
            TotGen = TotGen+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   428
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   429
        w = GetRandom(35-div(Tries,29))+5
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   430
        x = GetRandom(4050-w*20)+w*10
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   431
        y = GetRandom(2000-w*20)+w*10
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   432
        if DrawCrescent(x,y,w,GetRandom(2)==0) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   433
            TotGen = TotGen+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   434
        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   435
        Tries = Tries + 1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   436
    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   437
--    Padding = div(Padding,2)
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   438
--    Tries = 0
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   439
--    while (TotGen < 21) and (Tries < 10000) do
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   440
--        r = GetRandom(20-div(Tries,223))+5
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   441
--        x = GetRandom(4050-r*20)+r*10
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   442
--        y = GetRandom(2000-r*20)+r*10
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   443
--        if DrawCircle(x,y,r) then
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   444
--            TotGen = TotGen+1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   445
--        end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   446
--        Tries = Tries + 1
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   447
--    end
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   448
    --dbg()
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   449
    FlushPoints()
188a71ceda72 Add shoppamap lua as mikade requested. also add 50% chance of bottom border w/ holes as he requested. Also disable land objects in shoppa scheme, since that's more common way to play it.
nemo
parents:
diff changeset
   450
end