… | |
… | |
1943 | for (i = 0; i < NROFATTACKS; i++) |
1943 | for (i = 0; i < NROFATTACKS; i++) |
1944 | { |
1944 | { |
1945 | if (tmp->resist[i]) |
1945 | if (tmp->resist[i]) |
1946 | { |
1946 | { |
1947 | if (!force) |
1947 | if (!force) |
1948 | force = get_archetype (FORCE_NAME); |
1948 | force = archetype::get (FORCE_NAME); |
1949 | |
1949 | |
1950 | memcpy (force->resist, tmp->resist, sizeof (tmp->resist)); |
1950 | memcpy (force->resist, tmp->resist, sizeof (tmp->resist)); |
1951 | force->type = POTION_EFFECT; |
1951 | force->type = POTION_EFFECT; |
1952 | break; /* Only need to find one protection since we copy entire batch */ |
1952 | break; /* Only need to find one protection since we copy entire batch */ |
1953 | } |
1953 | } |
… | |
… | |
2313 | if (failure <= -1 && failure > -15) |
2313 | if (failure <= -1 && failure > -15) |
2314 | { /* wonder */ |
2314 | { /* wonder */ |
2315 | object *tmp; |
2315 | object *tmp; |
2316 | |
2316 | |
2317 | op->failmsg ("Your spell warps!"); |
2317 | op->failmsg ("Your spell warps!"); |
2318 | tmp = get_archetype (SPELL_WONDER); |
2318 | tmp = archetype::get (SPELL_WONDER); |
2319 | cast_wonder (op, op, 0, tmp); |
2319 | cast_wonder (op, op, 0, tmp); |
2320 | tmp->destroy (); |
2320 | tmp->destroy (); |
2321 | } |
2321 | } |
2322 | else if (failure <= -15 && failure > -35) |
2322 | else if (failure <= -15 && failure > -35) |
2323 | { /* drain mana */ |
2323 | { /* drain mana */ |
… | |
… | |
2343 | op->failmsg ("The magic recoils on you!"); |
2343 | op->failmsg ("The magic recoils on you!"); |
2344 | blind_player (op, op, power); |
2344 | blind_player (op, op, power); |
2345 | } |
2345 | } |
2346 | else if (failure <= -80) |
2346 | else if (failure <= -80) |
2347 | { /* blast the immediate area */ |
2347 | { /* blast the immediate area */ |
2348 | object *tmp = get_archetype (LOOSE_MANA); |
2348 | object *tmp = archetype::get (LOOSE_MANA); |
2349 | cast_magic_storm (op, tmp, power); |
2349 | cast_magic_storm (op, tmp, power); |
2350 | op->failmsg ("You unleash uncontrolled mana!"); |
2350 | op->failmsg ("You unleash uncontrolled mana!"); |
2351 | tmp->destroy (); |
2351 | tmp->destroy (); |
2352 | } |
2352 | } |
2353 | } |
2353 | } |
… | |
… | |
3295 | |
3295 | |
3296 | strcpy (got, find); |
3296 | strcpy (got, find); |
3297 | got[len] = '\0'; |
3297 | got[len] = '\0'; |
3298 | |
3298 | |
3299 | /* Now create new item, remove used ones when required. */ |
3299 | /* Now create new item, remove used ones when required. */ |
3300 | new_item = get_archetype (got); |
3300 | new_item = archetype::get (got); |
3301 | if (!new_item) |
3301 | if (!new_item) |
3302 | { |
3302 | { |
3303 | pl->failmsgf ("This %s is strange, better to not use it.", query_base_name (marked, 0)); |
3303 | pl->failmsgf ("This %s is strange, better to not use it.", query_base_name (marked, 0)); |
3304 | return; |
3304 | return; |
3305 | } |
3305 | } |