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

Function AddTrap

Source/objects.cpp:1071–1084  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1069}
1070
1071void AddTrap(int i, int ot)
1072{
1073 int mt;
1074
1075 mt = currlevel / 3 + 1;
1076 mt = random_(148, mt);
1077 if (mt == 0)
1078 object[i]._oVar3 = MIS_ARROW;
1079 if (mt == 1)
1080 object[i]._oVar3 = MIS_FIREBOLT;
1081 if (mt == 2)
1082 object[i]._oVar3 = MIS_LIGHTCTRL;
1083 object[i]._oVar4 = 0;
1084}
1085
1086void AddObjLight(int i, int r)
1087{

Callers 1

AddObjectFunction · 0.85

Calls 1

random_Function · 0.85

Tested by

no test coverage detected