MCPcopy Create free account
hub / github.com/diasurgical/devilution / ForceTownTrig

Function ForceTownTrig

Source/trigs.cpp:333–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331#endif
332
333BOOL ForceTownTrig()
334{
335 int i, j, k, l;
336
337 for (i = 0; TownDownList[i] != -1; i++) {
338 if (dPiece[cursmx][cursmy] == TownDownList[i]) {
339 strcpy(infostr, "Down to dungeon");
340 cursmx = 25;
341 cursmy = 29;
342 return TRUE;
343 }
344 }
345
346 if (townwarps[0]) {
347 for (j = 0; TownWarp1List[j] != -1; j++) {
348 if (dPiece[cursmx][cursmy] == TownWarp1List[j]) {
349 strcpy(infostr, "Down to catacombs");
350 cursmx = 49;
351 cursmy = 21;
352 return TRUE;
353 }
354 }
355 }
356
357 if (townwarps[1]) {
358 for (k = 1199; k <= 1220; k++) {
359 if (dPiece[cursmx][cursmy] == k) {
360 strcpy(infostr, "Down to caves");
361 cursmx = 17;
362 cursmy = 69;
363 return TRUE;
364 }
365 }
366 }
367
368 if (townwarps[2]) {
369 for (l = 1240; l <= 1255; l++) {
370 if (dPiece[cursmx][cursmy] == l) {
371 strcpy(infostr, "Down to hell");
372 cursmx = 41;
373 cursmy = 80;
374 return TRUE;
375 }
376 }
377 }
378
379 return FALSE;
380}
381
382BOOL ForceL1Trig()
383{

Callers 1

CheckTrigForceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected