… | |
… | |
255 | return; |
255 | return; |
256 | } |
256 | } |
257 | |
257 | |
258 | op->expand_tail (); |
258 | op->expand_tail (); |
259 | |
259 | |
260 | if (op->blocked (creator->map, creator->x, creator->y)) |
260 | if (!creator->is_on_map () || op->blocked (creator->map, creator->x, creator->y)) |
261 | op->destroy (); |
261 | op->destroy (); |
262 | else |
262 | else |
263 | { |
263 | { |
264 | SET_FLAG (op, FLAG_OBJ_ORIGINAL); |
264 | SET_FLAG (op, FLAG_OBJ_ORIGINAL); |
265 | op->insert_at (creator, creator, INS_NO_MERGE | INS_NO_WALK_ON); |
265 | op->insert_at (creator, creator, INS_NO_MERGE | INS_NO_WALK_ON); |
… | |
… | |
578 | if (op->type == ARMOUR) |
578 | if (op->type == ARMOUR) |
579 | ARMOUR_SPEED (op) = (ARMOUR_SPEED (op->arch) * (100 + magic * 10)) / 100; |
579 | ARMOUR_SPEED (op) = (ARMOUR_SPEED (op->arch) * (100 + magic * 10)) / 100; |
580 | |
580 | |
581 | if (magic < 0 && !(rndm (3))) /* You can't just check the weight always */ |
581 | if (magic < 0 && !(rndm (3))) /* You can't just check the weight always */ |
582 | magic = (-magic); |
582 | magic = (-magic); |
|
|
583 | |
583 | op->weight = (op->arch->weight * (100 - magic * 10)) / 100; |
584 | op->weight = (op->arch->weight * (100 - magic * 10)) / 100; |
584 | } |
585 | } |
585 | else |
586 | else |
586 | { |
587 | { |
587 | if (op->type == ARMOUR) |
588 | if (op->type == ARMOUR) |
588 | ARMOUR_SPEED (op) = (ARMOUR_SPEED (op) * (100 + magic * 10)) / 100; |
589 | ARMOUR_SPEED (op) = (ARMOUR_SPEED (op) * (100 + magic * 10)) / 100; |
|
|
590 | |
589 | if (magic < 0 && !(rndm (3))) /* You can't just check the weight always */ |
591 | if (magic < 0 && !(rndm (3))) /* You can't just check the weight always */ |
590 | magic = (-magic); |
592 | magic = (-magic); |
|
|
593 | |
591 | op->weight = (op->weight * (100 - magic * 10)) / 100; |
594 | op->weight = (op->weight * (100 - magic * 10)) / 100; |
592 | } |
595 | } |
593 | } |
596 | } |
594 | |
597 | |
595 | /* |
598 | /* |