| 1089 | } |
| 1090 | |
| 1091 | int 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 | |
| 1128 | void PlaySfxLoc(int psfx, int x, int y) |
| 1129 | { |
no test coverage detected