ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/spell_util.C
(Generate patch)

Comparing deliantra/server/server/spell_util.C (file contents):
Revision 1.131 by root, Sat Nov 17 23:40:04 2018 UTC vs.
Revision 1.132 by root, Sun Nov 18 15:19:48 2018 UTC

492 if (tmp->attacktype & AT_HOLYWORD || tmp->attacktype & AT_GODPOWER) 492 if (tmp->attacktype & AT_HOLYWORD || tmp->attacktype & AT_GODPOWER)
493 if (!tailor_god_spell (tmp, op)) 493 if (!tailor_god_spell (tmp, op))
494 return 0; 494 return 0;
495 495
496 if (tmp->flag [FLAG_IS_TURNABLE]) 496 if (tmp->flag [FLAG_IS_TURNABLE])
497 SET_ANIMATION (tmp, dir); 497 tmp->set_anim_frame (dir);
498 498
499 if ((tmp = op->map->insert (tmp, x, y, op))) 499 if ((tmp = op->map->insert (tmp, x, y, op)))
500 move_spell_effect (tmp); 500 move_spell_effect (tmp);
501 501
502 return 1; 502 return 1;
688 put_a_monster (op, monstername); 688 put_a_monster (op, monstername);
689 689
690 return n; 690 return n;
691} 691}
692 692
693
694/* Some local definitions for shuffle-attack */ 693/* Some local definitions for shuffle-attack */
695struct attacktype_shuffle 694struct attacktype_shuffle
696{ 695{
697 int attacktype; 696 int attacktype;
698 int face; 697 int face;
699} ATTACKS[22] = 698} ATTACKS[] =
700{ 699{
701 { AT_PHYSICAL, 0}, 700 { AT_PHYSICAL, 0},
702 { AT_PHYSICAL, 0}, /*face = explosion */ 701 { AT_PHYSICAL, 0}, /* face = explosion */
703 { AT_PHYSICAL, 0}, 702 { AT_PHYSICAL, 0},
704 { AT_MAGIC, 1}, 703 { AT_MAGIC, 1},
705 { AT_MAGIC, 1}, /* face = last-burnout */ 704 { AT_MAGIC, 1}, /* face = last-burnout */
706 { AT_MAGIC, 1}, 705 { AT_MAGIC, 1},
707 { AT_FIRE, 2}, 706 { AT_FIRE, 2},
739 * attacktypes, which probably wasn't the intent. MSW 2003-06-03 738 * attacktypes, which probably wasn't the intent. MSW 2003-06-03
740 */ 739 */
741void 740void
742shuffle_attack (object *op, int change_face) 741shuffle_attack (object *op, int change_face)
743{ 742{
744 int i; 743 int i = rndm (ecb_array_length (ATTACKS));
745
746 i = rndm (0, 21);
747 744
748 op->attacktype = ATTACKS[i].attacktype | AT_MAGIC; 745 op->attacktype = ATTACKS[i].attacktype | AT_MAGIC;
749 746
750 if (change_face) 747 if (change_face)
751 { 748 op->set_anim_frame (ATTACKS[i].face);
752 SET_ANIMATION (op, ATTACKS[i].face);
753 }
754} 749}
755 750
756/* prayer_failure: This is called when a player fails 751/* prayer_failure: This is called when a player fails
757 * at casting a prayer. 752 * at casting a prayer.
758 * op is the player. 753 * op is the player.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines