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

Function RndSFX

Source/effects.cpp:1091–1126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1089}
1090
1091int RndSFX(int psfx)
1092{
1093 int nRand;
1094
1095 if (psfx == PS_WARR69)
1096 nRand = 2;
1097 else if (psfx == PS_WARR14)
1098 nRand = 3;
1099 else if (psfx == PS_WARR15)
1100 nRand = 3;
1101 else if (psfx == PS_WARR16)
1102 nRand = 3;
1103#ifndef SPAWN
1104 else if (psfx == PS_MAGE69)
1105 nRand = 2;
1106 else if (psfx == PS_ROGUE69)
1107 nRand = 2;
1108#endif
1109 else if (psfx == PS_SWING)
1110 nRand = 2;
1111 else if (psfx == LS_ACID)
1112 nRand = 2;
1113 else if (psfx == IS_FMAG)
1114 nRand = 2;
1115 else if (psfx == IS_MAGIC)
1116 nRand = 2;
1117 else if (psfx == IS_BHIT)
1118 nRand = 2;
1119#ifndef SPAWN
1120 else if (psfx == PS_WARR2)
1121 nRand = 3;
1122#endif
1123 else
1124 return psfx;
1125 return psfx + random_(165, nRand);
1126}
1127
1128void PlaySfxLoc(int psfx, int x, int y)
1129{

Callers 2

PlaySFXFunction · 0.85
PlaySfxLocFunction · 0.85

Calls 1

random_Function · 0.85

Tested by

no test coverage detected