1 |
base_xpos = (room == room_dw_mansion_acid_tunnel_loop_rouxls) ? x : camerax(); |
2 |
base_ypos = (room == room_dw_mansion_acid_tunnel_loop_rouxls) ? y : cameray(); |
3 |
maker = 0; |
4 |
if (room != room_dw_mansion_acid_tunnel_loop_rouxls) |
5 |
depth = obj_rouxls_enemy.depth + 9997; |
6 |
else |
7 |
depth = 840000; |
8 |
AvailableTension = 150; |
9 |
HouseTensionCost = 0; |
10 |
HouseCount = 0; |
11 |
HouseCountMax = 1; |
12 |
RouxlsTurn = 0; |
13 |
RouxlsHouseMax = 2; |
14 |
RalseiDistract = 0; |
15 |
RalseiDistractTwice = 0; |
16 |
for (i = 0; i < 16; i += 1) |
17 |
{ |
18 |
for (j = 0; j < 6; j += 1) |
19 |
{ |
20 |
TileLand[i][j] = 0; |
21 |
TileHasHouse[i][j] = 0; |
22 |
TileYouCanBuild[i][j] = 0; |
23 |
TileRouxlsCanBuild[i][j] = 0; |
24 |
tileHouseY[i][j] = 0; |
25 |
if (collision_point(base_xpos + (i * 40) + 20, cameray() + (j * 40) + 100, obj_simtown_landmaker, false, true)) |
26 |
TileLand[i][j] = 1; |
27 |
} |
28 |
} |
29 |
TileHasHouse[4][0] = 1; |
30 |
TileHasHouse[11][5] = 2; |
31 |
CursorX = 0; |
32 |
CursorY = 0; |
33 |
CursorVisualX = 0; |
34 |
CursorVisualY = 0; |
35 |
YourAvailableTileTotal = 0; |
36 |
RouxlsAvailableTileTotal = 0; |
37 |
GameOver = 0; |
38 |
MyTurn = -1; |
39 |
TurnCon = 0; |
40 |
StatusMessage = "* Build a house!"; |
41 |
scr_simtown_canbuild_checkscr_simtown_canbuild_checkfunction scr_simtown_canbuild_check()
{
YourAvailableTileTotal = 0;
RouxlsAvailableTileTotal = 0;
GameOver = 0;
for (i = 0; i < 16; i += 1)
{
for (j = 0; j < 6; j += 1)
{
TileYouCanBuild[i][j] = 0;
TileRouxlsCanBuild[i][j] = 0;
if (TileLand[i][j] == 1 && TileHasHouse[i][j] == 0)
{
if (j > 0)
{
for (k = 0; k < 3; k += 1)
{
if (TileHasHouse[(i - 1) + k][j - 1] == 1)
TileYouCanBuild[i][j] = 1;
if (TileHasHouse[(i - 1) + k][j - 1] == 2)
TileRouxlsCanBuild[i][j] = 1;
}
}
if (j < 5)
{
for (k = 0; k < 3; k += 1)
{
if (TileHasHouse[(i - 1) + k][j + 1] == 1)
TileYouCanBuild[i][j] = 1;
if (TileHasHouse[(i - 1) + k][j + 1] == 2)
TileRouxlsCanBuild[i][j] = 1;
}
}
if (TileHasHouse[i - 1][j] == 1)
TileYouCanBuild[i][j] = 1;
if (TileHasHouse[i - 1][j] == 2)
TileRouxlsCanBuild[i][j] = 1;
if (TileHasHouse[i + 1][j] == 1)
TileYouCanBuild[i][j] = 1;
if (TileHasHouse[i + 1][j] == 2)
TileRouxlsCanBuild[i][j] = 1;
}
if (TileYouCanBuild[i][j] == 1)
YourAvailableTileTotal += 1;
if (TileRouxlsCanBuild[i][j] == 1)
RouxlsAvailableTileTotal += 1;
}
}
if (YourAvailableTileTotal == 0)
GameOver = 1;
if (RouxlsAvailableTileTotal == 0)
GameOver = 1;
} (); |
42 |
scr_simtown_reset_cursorscr_simtown_reset_cursorfunction scr_simtown_reset_cursor()
{
if (GameOver == 0)
{
for (i = 0; i < 16; i += 1)
{
for (j = 0; j < 6; j += 1)
{
if (TileYouCanBuild[i][j] == 1)
{
CursorX = i;
CursorY = j;
CursorVisualX = cameray() + (i * 40);
CursorVisualY = cameray() + (j * 40) + 80;
exit;
}
}
}
}
} (); |
43 |
siner = 0; |
44 |
actresult = "tie"; |
45 |
specialCursor = scr_dark_markerscr_dark_markerfunction scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (-100, -100, spr_simtown_selector); |
46 |
specialCursor.depth = -100; |
47 |
specialCursor.image_speed = 0.2; |
48 |
flyaway = 0; |