1 /*
2 This file is part of "Avanor, the Land of Mystery" roguelike game
3 Home page: http://www.avanor.com/
4 Copyright (C) 2000-2003 Vadim Gaidukevich
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 #include "ldebug.h"
22 #include "xgen.h"
23 #include "unique.h"
24 #include "uniquei.h"
25 #include "incl_i.h"
26 #include "itemf.h"
27 #include "shop.h"
28 #include "skeep_ai.h"
29 #include "other_misc.h"
30 #include "game.h"
31
XLDebug(LOCATION tl)32 XLDebug::XLDebug(LOCATION tl) : XLocation(tl)
33 {
34 map = new XMap(80, 20);
35 BuildLabirint();
36 strcpy(brief_name, "DBGL:1");
37 strcpy(full_name, "Debug Level 1");
38
39
40 // map->CreateRoom(0, 0, 80, 20, 0, 0, M_GREENGRAS, M_MAGMA);
41 /*
42
43 {
44 for (int i = 0; i < 20; i++)
45 for (int j = 0; j < 60; j++)
46 {
47 if(map->GetXY(j, i) == M_GREENGRAS && map->GetSpecial(j, i) == NULL)
48 new XMushSpawn(j, i, this);
49 }
50
51 }*/
52
53 /* XRect tr1(30, 5, 40, 10);
54 int i;
55 for (i = 0; i < 10; i++)
56 {
57 NewCreature(CN_RAT, &tr1);
58 }
59 */
60
61 /* map->CreateRoom(10, 10, 5, 5, 12, 15, M_GREENGRAS, M_ROAD);
62
63 XRect r1(10, 10, 15, 15);
64
65
66 for (int i = 0; i < 5; i++)
67 {
68 XCreature * cr = NewCreature(CN_KOBOLD);
69 cr->xai->SetArea(&r1, tl);
70 cr->xai->SetAIFlag(AIF_GUARD_AREA);
71 }
72
73 XCreature * cr = NewCreature(CN_KOBOLD);
74
75 XQList<SCRIPT_CMD> script;
76 SCRIPT_CMD cmd;
77
78 cmd.cmd = SCC_MOVE_POINT;
79 cmd.pt_x = 5;
80 cmd.pt_y = 5;
81 cmd.ln = L_DEBUG1;
82 script.push_back(cmd);
83
84 cmd.cmd = SCC_MOVE_POINT;
85 cmd.pt_x = 15;
86 cmd.pt_y = 15;
87 cmd.ln = L_DEBUG1;
88 script.push_back(cmd);
89
90 cmd.cmd = SCC_MOVE_POINT;
91 cmd.pt_x = 15;
92 cmd.pt_y = 5;
93 cmd.ln = L_DEBUG1;
94 script.push_back(cmd);
95
96
97 cr->xai->ExecuteScript(&script);
98 cr->color = xRED;
99
100 */
101 /* XRect tr2(45, 5, 55, 10);
102 for (i = 0; i < 5; i++)
103 {
104 NewCreature(CN_DOG, &tr2);
105 }
106 */
107 // Game.NewCreature(XCreatureStorage::Create(CN_RAT), 28, 14, this);
108 // Game.NewCreature(XCreatureStorage::Create(CN_RAT), 28, 13, this);
109
110 // Game.NewCreature(XCreatureStorage::Create(CN_KING_COBRA), 8, 15, this);
111 // Game.NewCreature(XCreatureStorage::Create(CN_KING_COBRA), 9, 15, this);
112 // Game.NewCreature(XCreatureStorage::Create(CN_KING_COBRA), 10, 15, this);
113 // Game.NewCreature(XCreatureStorage::Create(CN_KOBOLD), 8, 15, this);
114 // Game.NewCreature(XCreatureStorage::Create(CN_KOBOLD), 9, 15, this);
115 // Game.NewCreature(XCreatureStorage::Create(CN_SHAMAN_KOBOLD), 10, 15, this);
116 // Game.NewCreature(XCreatureStorage::Create(CN_SKELETON), 9, 15, this);
117 // Game.NewCreature(XCreatureStorage::Create(CN_GHOST), 8, 15, this);
118 // Game.NewCreature(XCreatureStorage::Create(CN_FARMER), 8, 15, this);
119 // Game.NewCreature(XCreatureStorage::Create(CN_CITIZEN), 9, 15, this);
120 // NewCreature(CN_FARMER, 10, 11);
121
122 /*
123 XKobold * kobold = new XKobold(CRS_KOBOLD, CRL_ANY, CRE_ANY);
124 all->Add(kobold);
125 kobold->FirstStep(10, 15, this);
126 kobold->xai->SetEnemyClass(CR_ALL);
127
128 XItem * item = ICREATEB(IM_MISSILEW, IT_HEAVYCROSSBOW, 1, 100);
129
130 kobold->CarryItem(item);
131 kobold->contain->Add(item);
132 item = ICREATEB(IM_MISSILE, IT_QUARREL, 1, 100);
133 kobold->CarryItem(item);
134 kobold->contain->Add(item);
135 */
136
137 /* new XTrap(10, 10, this, TL_RANDOM);
138 new XTrap(11, 11, this, TL_RANDOM);
139 new XTrap(12, 12, this, TL_RANDOM);
140 new XTrap(13, 13, this, TL_RANDOM);
141 new XTrap(6, 15, this, TL_RANDOM);
142 new XTrap(7, 15, this, TL_RANDOM);
143 new XTrap(8, 15, this, TL_RANDOM);
144 new XTrap(9, 15, this, TL_RANDOM);
145 */
146
147 /* if (tl == L_DEBUG1)
148 {
149 strcpy(brief_name, "DBGL:1");
150 strcpy(full_name, "Debug Level 1");
151 NewWay(7, 12, L_DEBUG2, STW_DOWN);
152 } else
153 {
154 strcpy(brief_name, "DBGL:2");
155 strcpy(full_name, "Debug Level 2");
156 NewWay(7, 12, L_DEBUG1, STW_UP);
157 }*/
158
159 }
160
161
Init()162 void XLDebug::Init()
163 {
164
165 }
166