| 2157 | } |
| 2158 | |
| 2159 | void |
| 2160 | ugolemeffects(int damtype, int dam) |
| 2161 | { |
| 2162 | int heal = 0; |
| 2163 | |
| 2164 | /* We won't bother with "slow"/"haste" since players do not |
| 2165 | * have a monster-specific slow/haste so there is no way to |
| 2166 | * restore the old velocity once they are back to human. |
| 2167 | */ |
| 2168 | if (u.umonnum != PM_FLESH_GOLEM && u.umonnum != PM_IRON_GOLEM) |
| 2169 | return; |
| 2170 | switch (damtype) { |
| 2171 | case AD_ELEC: |
| 2172 | if (u.umonnum == PM_FLESH_GOLEM) |
| 2173 | heal = (dam + 5) / 6; /* Approx 1 per die */ |
| 2174 | break; |
| 2175 | case AD_FIRE: |
| 2176 | if (u.umonnum == PM_IRON_GOLEM) |
| 2177 | heal = dam; |
| 2178 | break; |
| 2179 | } |
| 2180 | if (heal && (u.mh < u.mhmax)) { |
| 2181 | u.mh += heal; |
| 2182 | if (u.mh > u.mhmax) |
| 2183 | u.mh = u.mhmax; |
| 2184 | disp.botl = TRUE; |
| 2185 | pline("Strangely, you feel better than before."); |
| 2186 | exercise(A_STR, TRUE); |
| 2187 | } |
| 2188 | } |
| 2189 | |
| 2190 | staticfn int |
| 2191 | armor_to_dragon(int atyp) |