… | |
… | |
701 | /* give the player control of the golem */ |
701 | /* give the player control of the golem */ |
702 | set_spell_skill (op, caster, spob, tmp); |
702 | set_spell_skill (op, caster, spob, tmp); |
703 | } |
703 | } |
704 | |
704 | |
705 | /* make the speed positive. */ |
705 | /* make the speed positive. */ |
706 | tmp->speed = FABS (tmp->speed); |
706 | tmp->speed = fabs (tmp->speed); |
707 | |
707 | |
708 | /* This sets the level dependencies on dam and hp for monsters */ |
708 | /* This sets the level dependencies on dam and hp for monsters */ |
709 | /* players can't cope with too strong summonings. */ |
709 | /* players can't cope with too strong summonings. */ |
710 | /* but monsters can. reserve these for players. */ |
710 | /* but monsters can. reserve these for players. */ |
711 | if (op->type == PLAYER) |
711 | if (op->type == PLAYER) |
… | |
… | |
716 | tmp->stats.dam += SP_level_dam_adjust (caster, spob); |
716 | tmp->stats.dam += SP_level_dam_adjust (caster, spob); |
717 | else |
717 | else |
718 | tmp->stats.dam = spob->stats.dam + SP_level_dam_adjust (caster, spob); |
718 | tmp->stats.dam = spob->stats.dam + SP_level_dam_adjust (caster, spob); |
719 | |
719 | |
720 | tmp->speed += .02 * SP_level_range_adjust (caster, spob); |
720 | tmp->speed += .02 * SP_level_range_adjust (caster, spob); |
721 | tmp->speed = MIN (tmp->speed, 1.0); |
721 | tmp->speed = min (tmp->speed, 1.0); |
722 | |
722 | |
723 | if (spob->attacktype) |
723 | if (spob->attacktype) |
724 | tmp->attacktype = spob->attacktype; |
724 | tmp->attacktype = spob->attacktype; |
725 | } |
725 | } |
726 | |
726 | |
… | |
… | |
730 | |
730 | |
731 | /* make experience increase in proportion to the strength. |
731 | /* make experience increase in proportion to the strength. |
732 | * this is a bit simplistic - we are basically just looking at how |
732 | * this is a bit simplistic - we are basically just looking at how |
733 | * often the sp doubles and use that as the ratio. |
733 | * often the sp doubles and use that as the ratio. |
734 | */ |
734 | */ |
735 | tmp->stats.exp *= 1 + (MAX (spob->stats.maxgrace, spob->stats.sp) / caster_level (caster, spob)); |
735 | tmp->stats.exp *= 1 + max (spob->stats.maxgrace, spob->stats.sp) / casting_level (caster, spob); |
736 | tmp->speed_left = 0; |
736 | tmp->speed_left = 0; |
737 | tmp->direction = dir; |
737 | tmp->direction = dir; |
738 | |
738 | |
739 | /* Holy spell - some additional tailoring */ |
739 | /* Holy spell - some additional tailoring */ |
740 | if (god) |
740 | if (god) |
… | |
… | |
861 | |
861 | |
862 | if (spell_ob->other_arch) |
862 | if (spell_ob->other_arch) |
863 | summon_arch = spell_ob->other_arch; |
863 | summon_arch = spell_ob->other_arch; |
864 | else if (spell_ob->randomitems) |
864 | else if (spell_ob->randomitems) |
865 | { |
865 | { |
866 | int level = caster_level (caster, spell_ob); |
866 | int level = casting_level (caster, spell_ob); |
867 | treasure *tr, *lasttr = NULL; |
867 | treasure *tr, *lasttr = NULL; |
868 | |
868 | |
869 | shstr_cmp sparam (stringarg); |
869 | shstr_cmp sparam (stringarg); |
870 | |
870 | |
871 | /* In old code, this was a very convoluted for statement, |
871 | /* In old code, this was a very convoluted for statement, |
… | |
… | |
913 | new_draw_info_format (NDI_UNIQUE, 0, op, "%s has no creatures that you may summon!", &god->name); |
913 | new_draw_info_format (NDI_UNIQUE, 0, op, "%s has no creatures that you may summon!", &god->name); |
914 | return 0; |
914 | return 0; |
915 | } |
915 | } |
916 | |
916 | |
917 | /* the summon level */ |
917 | /* the summon level */ |
918 | summon_level = caster_level (caster, spell_ob); |
918 | summon_level = casting_level (caster, spell_ob); |
919 | if (summon_level == 0) |
919 | if (summon_level == 0) |
920 | summon_level = 1; |
920 | summon_level = 1; |
921 | |
921 | |
922 | tries = 0; |
922 | tries = 0; |
923 | do |
923 | do |