… | |
… | |
104 | wand->stats.food += ncharges; |
104 | wand->stats.food += ncharges; |
105 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s glows with power.", query_name (wand)); |
105 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s glows with power.", query_name (wand)); |
106 | if (wand->arch && QUERY_FLAG (&wand->arch->clone, FLAG_ANIMATE)) |
106 | if (wand->arch && QUERY_FLAG (&wand->arch->clone, FLAG_ANIMATE)) |
107 | { |
107 | { |
108 | SET_FLAG (wand, FLAG_ANIMATE); |
108 | SET_FLAG (wand, FLAG_ANIMATE); |
109 | wand->speed = wand->arch->clone.speed; |
109 | wand->set_speed (wand->arch->clone.speed); |
110 | update_ob_speed (wand); |
|
|
111 | } |
110 | } |
|
|
111 | |
112 | return 1; |
112 | return 1; |
113 | } |
113 | } |
114 | |
114 | |
115 | /* Create a missile (nonmagic - magic +4). Will either create bolts or arrows |
115 | /* Create a missile (nonmagic - magic +4). Will either create bolts or arrows |
116 | * based on whether a crossbow or bow is equiped. If neither, it defaults to |
116 | * based on whether a crossbow or bow is equiped. If neither, it defaults to |
… | |
… | |
502 | |
502 | |
503 | /* value of speed really doesn't make much difference, as long as it is |
503 | /* value of speed really doesn't make much difference, as long as it is |
504 | * positive. Lower value may be useful so that the problem doesn't |
504 | * positive. Lower value may be useful so that the problem doesn't |
505 | * do anything really odd if it say a -1000 or something. |
505 | * do anything really odd if it say a -1000 or something. |
506 | */ |
506 | */ |
507 | dummy->speed = 0.002; |
507 | dummy->set_speed (0.002); |
508 | update_ob_speed (dummy); |
|
|
509 | dummy->speed_left = -dummy->speed * time; |
508 | dummy->speed_left = -dummy->speed * time; |
510 | dummy->type = SPELL_EFFECT; |
509 | dummy->type = SPELL_EFFECT; |
511 | dummy->subtype = SP_WORD_OF_RECALL; |
510 | dummy->subtype = SP_WORD_OF_RECALL; |
512 | |
511 | |
513 | /* If we could take advantage of enter_player_savebed() here, it would be |
512 | /* If we could take advantage of enter_player_savebed() here, it would be |
… | |
… | |
2460 | if (a > 14) |
2459 | if (a > 14) |
2461 | a = 14; |
2460 | a = 14; |
2462 | tmp->resist[ATNR_PHYSICAL] = 100 - (int) ((100.0 - (float) tmp->resist[ATNR_PHYSICAL]) / (30.0 - 2.0 * a)); |
2461 | tmp->resist[ATNR_PHYSICAL] = 100 - (int) ((100.0 - (float) tmp->resist[ATNR_PHYSICAL]) / (30.0 - 2.0 * a)); |
2463 | |
2462 | |
2464 | /* Determine golem's speed */ |
2463 | /* Determine golem's speed */ |
2465 | tmp->speed = 0.4 + 0.1 * SP_level_range_adjust (caster, spell); |
2464 | tmp->set_speed (min (3.33, 0.4 + 0.1 * SP_level_range_adjust (caster, spell))); |
2466 | |
|
|
2467 | if (tmp->speed > 3.33) |
|
|
2468 | tmp->speed = 3.33; |
|
|
2469 | |
2465 | |
2470 | if (!spell->race) |
2466 | if (!spell->race) |
2471 | { |
2467 | { |
2472 | sprintf (buf, "animated %s", &weapon->name); |
2468 | sprintf (buf, "animated %s", &weapon->name); |
2473 | tmp->name = buf; |
2469 | tmp->name = buf; |
… | |
… | |
2475 | tmp->face = weapon->face; |
2471 | tmp->face = weapon->face; |
2476 | tmp->animation_id = weapon->animation_id; |
2472 | tmp->animation_id = weapon->animation_id; |
2477 | tmp->anim_speed = weapon->anim_speed; |
2473 | tmp->anim_speed = weapon->anim_speed; |
2478 | tmp->last_anim = weapon->last_anim; |
2474 | tmp->last_anim = weapon->last_anim; |
2479 | tmp->state = weapon->state; |
2475 | tmp->state = weapon->state; |
2480 | if (QUERY_FLAG (weapon, FLAG_ANIMATE)) |
2476 | tmp->flag [FLAG_ANIMATE] = weapon->flag [FLAG_ANIMATE]; |
2481 | { |
|
|
2482 | SET_FLAG (tmp, FLAG_ANIMATE); |
|
|
2483 | } |
|
|
2484 | else |
|
|
2485 | { |
|
|
2486 | CLEAR_FLAG (tmp, FLAG_ANIMATE); |
|
|
2487 | } |
|
|
2488 | update_ob_speed (tmp); |
|
|
2489 | } |
2477 | } |
2490 | |
2478 | |
2491 | /* make experience increase in proportion to the strength of the summoned creature. */ |
2479 | /* make experience increase in proportion to the strength of the summoned creature. */ |
2492 | tmp->stats.exp *= 1 + (MAX (spell->stats.maxgrace, spell->stats.sp) / caster_level (caster, spell)); |
2480 | tmp->stats.exp *= 1 + (MAX (spell->stats.maxgrace, spell->stats.sp) / caster_level (caster, spell)); |
2493 | |
2481 | |