… | |
… | |
641 | int |
641 | int |
642 | summon_golem (object *op, object *caster, int dir, object *spob) |
642 | summon_golem (object *op, object *caster, int dir, object *spob) |
643 | { |
643 | { |
644 | object *tmp, *god = NULL; |
644 | object *tmp, *god = NULL; |
645 | archetype *at; |
645 | archetype *at; |
646 | char buf[MAX_BUF]; |
|
|
647 | |
646 | |
648 | /* Because there can be different golem spells, player may want to |
647 | /* Because there can be different golem spells, player may want to |
649 | * 'lose' their old golem. |
648 | * 'lose' their old golem. |
650 | */ |
649 | */ |
651 | if (op->type == PLAYER && op->contr->golem) |
650 | if (op->type == PLAYER && op->contr->golem) |
… | |
… | |
741 | tmp->direction = dir; |
740 | tmp->direction = dir; |
742 | |
741 | |
743 | /* Holy spell - some additional tailoring */ |
742 | /* Holy spell - some additional tailoring */ |
744 | if (god) |
743 | if (god) |
745 | { |
744 | { |
746 | object *tmp2; |
|
|
747 | |
|
|
748 | sprintf (buf, "%s of %s", &spob->name, &god->name); |
745 | char *buf = format ("%s of %s", &spob->name, &god->name); |
749 | buf[0] = toupper (buf[0]); |
746 | buf[0] = toupper (buf[0]); |
750 | |
747 | |
751 | for (tmp2 = tmp; tmp2; tmp2 = tmp2->more) |
748 | for (object *tmp2 = tmp; tmp2; tmp2 = tmp2->more) |
752 | tmp2->name = buf; |
749 | tmp2->name = buf; |
753 | |
750 | |
754 | tmp->attacktype |= god->attacktype; |
751 | tmp->attacktype |= god->attacktype; |
755 | memcpy (tmp->resist, god->resist, sizeof (tmp->resist)); |
752 | memcpy (tmp->resist, god->resist, sizeof (tmp->resist)); |
756 | tmp->race = god->race; |
753 | tmp->race = god->race; |