… | |
… | |
946 | } |
946 | } |
947 | else if (QUERY_FLAG (tmp, FLAG_ALIVE)) |
947 | else if (QUERY_FLAG (tmp, FLAG_ALIVE)) |
948 | { |
948 | { |
949 | tmp->stats.hp = spell_ob->duration + SP_level_duration_adjust (caster, spell_ob); |
949 | tmp->stats.hp = spell_ob->duration + SP_level_duration_adjust (caster, spell_ob); |
950 | tmp->stats.maxhp = tmp->stats.hp; |
950 | tmp->stats.maxhp = tmp->stats.hp; |
951 | set_owner (tmp, op); |
951 | tmp->set_owner (op); |
952 | set_spell_skill (op, caster, spell_ob, tmp); |
952 | set_spell_skill (op, caster, spell_ob, tmp); |
953 | } |
953 | } |
954 | if (QUERY_FLAG (spell_ob, FLAG_IS_USED_UP) || QUERY_FLAG (tmp, FLAG_IS_USED_UP)) |
954 | if (QUERY_FLAG (spell_ob, FLAG_IS_USED_UP) || QUERY_FLAG (tmp, FLAG_IS_USED_UP)) |
955 | { |
955 | { |
956 | tmp->stats.food = spell_ob->duration + SP_level_duration_adjust (caster, spell_ob); |
956 | tmp->stats.food = spell_ob->duration + SP_level_duration_adjust (caster, spell_ob); |
… | |
… | |
965 | } |
965 | } |
966 | |
966 | |
967 | /* This can't really hurt - if the object doesn't kill anything, |
967 | /* This can't really hurt - if the object doesn't kill anything, |
968 | * these fields just won't be used. |
968 | * these fields just won't be used. |
969 | */ |
969 | */ |
970 | set_owner (tmp, op); |
970 | tmp->set_owner (op); |
971 | set_spell_skill (op, caster, spell_ob, tmp); |
971 | set_spell_skill (op, caster, spell_ob, tmp); |
972 | tmp->x = x; |
972 | tmp->x = x; |
973 | tmp->y = y; |
973 | tmp->y = y; |
974 | tmp->level = caster_level (caster, spell_ob) / 2; |
974 | tmp->level = caster_level (caster, spell_ob) / 2; |
975 | |
975 | |
… | |
… | |
2374 | CLEAR_FLAG (tmp, FLAG_MONSTER); |
2374 | CLEAR_FLAG (tmp, FLAG_MONSTER); |
2375 | SET_FLAG (tmp, FLAG_FRIENDLY); |
2375 | SET_FLAG (tmp, FLAG_FRIENDLY); |
2376 | tmp->stats.exp = 0; |
2376 | tmp->stats.exp = 0; |
2377 | add_friendly_object (tmp); |
2377 | add_friendly_object (tmp); |
2378 | tmp->type = GOLEM; |
2378 | tmp->type = GOLEM; |
2379 | set_owner (tmp, op); |
2379 | tmp->set_owner (op); |
2380 | set_spell_skill (op, caster, spell, tmp); |
2380 | set_spell_skill (op, caster, spell, tmp); |
2381 | op->contr->ranges[range_golem] = tmp; |
2381 | op->contr->ranges[range_golem] = tmp; |
2382 | op->contr->shoottype = range_golem; |
2382 | op->contr->shoottype = range_golem; |
2383 | |
2383 | |
2384 | /* Give the weapon to the golem now. A bit of a hack to check the |
2384 | /* Give the weapon to the golem now. A bit of a hack to check the |
… | |
… | |
2541 | |
2541 | |
2542 | new_aura->duration = spell->duration + 10 * SP_level_duration_adjust (caster, spell); |
2542 | new_aura->duration = spell->duration + 10 * SP_level_duration_adjust (caster, spell); |
2543 | |
2543 | |
2544 | new_aura->stats.dam = spell->stats.dam + SP_level_dam_adjust (caster, spell); |
2544 | new_aura->stats.dam = spell->stats.dam + SP_level_dam_adjust (caster, spell); |
2545 | |
2545 | |
2546 | set_owner (new_aura, op); |
2546 | new_aura->set_owner (op); |
2547 | set_spell_skill (op, caster, spell, new_aura); |
2547 | set_spell_skill (op, caster, spell, new_aura); |
2548 | new_aura->attacktype = spell->attacktype; |
2548 | new_aura->attacktype = spell->attacktype; |
2549 | |
2549 | |
2550 | new_aura->level = caster_level (caster, spell); |
2550 | new_aura->level = caster_level (caster, spell); |
2551 | if (refresh) |
2551 | if (refresh) |
… | |
… | |
2663 | |
2663 | |
2664 | if (rndm (0, atk_lev - 1) > def_lev) |
2664 | if (rndm (0, atk_lev - 1) > def_lev) |
2665 | { |
2665 | { |
2666 | /* make this sucker peaceful. */ |
2666 | /* make this sucker peaceful. */ |
2667 | |
2667 | |
2668 | change_exp (get_owner (op), victim->stats.exp, op->skill, 0); |
2668 | change_exp (op->owner, victim->stats.exp, op->skill, 0); |
2669 | victim->stats.exp = 0; |
2669 | victim->stats.exp = 0; |
2670 | #if 0 |
2670 | #if 0 |
2671 | /* No idea why these were all set to zero - if something |
2671 | /* No idea why these were all set to zero - if something |
2672 | * makes this creature agressive, he should still do damage. |
2672 | * makes this creature agressive, he should still do damage. |
2673 | */ |
2673 | */ |