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

Comparing deliantra/server/server/spell_effect.C (file contents):
Revision 1.47 by root, Tue Apr 24 16:30:29 2007 UTC vs.
Revision 1.50 by root, Sat May 12 08:36:35 2007 UTC

678 */ 678 */
679 dummy->name = op->map->path; 679 dummy->name = op->map->path;
680 EXIT_X (dummy) = op->x; 680 EXIT_X (dummy) = op->x;
681 EXIT_Y (dummy) = op->y; 681 EXIT_Y (dummy) = op->y;
682 insert_ob_in_ob (dummy, op); 682 insert_ob_in_ob (dummy, op);
683 new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "You fix this place in your mind.\nYou feel you are able to come here from anywhere."); 683 new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "You fix this place in your mind. You feel you are able to come here from anywhere.");
684 return 1; 684 return 1;
685 } 685 }
686 686
687 dummy->destroy (); 687 dummy->destroy ();
688 688
760 exitmap = maptile::find_sync (force->name); 760 exitmap = maptile::find_sync (force->name);
761 761
762 /* If we were unable to load (ex. random map deleted), warn player */ 762 /* If we were unable to load (ex. random map deleted), warn player */
763 if (!exitmap) 763 if (!exitmap)
764 { 764 {
765 new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "Something strange happens.\nYou can't remember where to go!?"); 765 new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, op, "Something strange happens. You can't remember where to go!?");
766 force->destroy (); 766 force->destroy ();
767 return 1; 767 return 1;
768 } 768 }
769 769
770 exitmap->load_sync (); 770 exitmap->load_sync ();
771 771
772 op_level = caster_level (caster, spell); 772 op_level = caster_level (caster, spell);
773 if (op_level < 15) 773 if (op_level < 15)
774 snprintf (portal_message, 1024, 774 snprintf (portal_message, 1024,
775 "\nThe air moves around you and\na huge smell of ammonia\nsurounds you as you pass\nthrough %s's tiny portal\nPouah!\n", 775 "The air moves around you and a huge smell of ammonia surounds you as you pass through %s's tiny portal. Pouah!\n",
776 &op->name); 776 &op->name);
777 else if (op_level < 30) 777 else if (op_level < 30)
778 snprintf (portal_message, 1024, 778 snprintf (portal_message, 1024,
779 "\n%s's portal smells of ozone.\nYou do a lot of movements and finally pass\nthrough the small hole in the air\n", &op->name); 779 "%s's portal smells of ozone. You do a lot of movements and finally pass through the small hole in the air\n", &op->name);
780 else if (op_level < 60) 780 else if (op_level < 60)
781 snprintf (portal_message, 1024, "\nA shining door opens in the air in front of you,\nshowing you the path to another place.\n"); 781 snprintf (portal_message, 1024, "A shining door opens in the air in front of you, showing you the path to another place.\n");
782 else 782 else
783 snprintf (portal_message, 1024, "\nAs you walk through %s's portal, flowers come out\nfrom the ground around you.\nYou feel awed.\n", 783 snprintf (portal_message, 1024, "As you walk through %s's portal, flowers come out from the ground around you. You feel awed.\n",
784 &op->name); 784 &op->name);
785 785
786 /* Create a portal in front of player 786 /* Create a portal in front of player
787 * dummy contain the portal and 787 * dummy contain the portal and
788 * force contain the track to kill it later 788 * force contain the track to kill it later
1764 { 1764 {
1765 identify (tmp); 1765 identify (tmp);
1766 1766
1767 if (op->type == PLAYER) 1767 if (op->type == PLAYER)
1768 { 1768 {
1769 new_draw_info_format (NDI_UNIQUE, 0, op, "You have: %s.", long_desc (tmp, op)); 1769 new_draw_info_format (NDI_UNIQUE, 0, op, "You identified: %s.", long_desc (tmp, op));
1770 1770
1771 if (tmp->msg) 1771 if (tmp->msg)
1772 { 1772 {
1773 new_draw_info (NDI_UNIQUE, 0, op, "The item has a story:"); 1773 new_draw_info (NDI_UNIQUE, 0, op, "The item has a story:");
1774 new_draw_info (NDI_UNIQUE, 0, op, tmp->msg); 1774 new_draw_info (NDI_UNIQUE, 0, op, tmp->msg);
1786 * stuff on the floor. Only identify stuff on the floor if the spell 1786 * stuff on the floor. Only identify stuff on the floor if the spell
1787 * was not fully used. 1787 * was not fully used.
1788 */ 1788 */
1789 if (num_ident) 1789 if (num_ident)
1790 { 1790 {
1791 for (tmp = GET_MAP_OB (op->map, op->x, op->y); tmp != NULL; tmp = tmp->above) 1791 for (tmp = GET_MAP_OB (op->map, op->x, op->y); tmp; tmp = tmp->above)
1792 if (!QUERY_FLAG (tmp, FLAG_IDENTIFIED) && !tmp->invisible && need_identify (tmp)) 1792 if (!QUERY_FLAG (tmp, FLAG_IDENTIFIED) && !tmp->invisible && need_identify (tmp))
1793 { 1793 {
1794 identify (tmp); 1794 identify (tmp);
1795 1795
1796 if (op->type == PLAYER) 1796 if (op->type == PLAYER)
1797 { 1797 {
1798 new_draw_info_format (NDI_UNIQUE, 0, op, "On the ground is %s.", long_desc (tmp, op)); 1798 new_draw_info_format (NDI_UNIQUE, 0, op, "On the ground you identified: %s.", long_desc (tmp, op));
1799 1799
1800 if (tmp->msg) 1800 if (tmp->msg)
1801 { 1801 {
1802 new_draw_info (NDI_UNIQUE, 0, op, "The item has a story:"); 1802 new_draw_info (NDI_UNIQUE, 0, op, "The item has a story:");
1803 new_draw_info (NDI_UNIQUE, 0, op, tmp->msg); 1803 new_draw_info (NDI_UNIQUE, 0, op, tmp->msg);
2264 /* exit if it's not a player using this spell. */ 2264 /* exit if it's not a player using this spell. */
2265 if (op->type != PLAYER) 2265 if (op->type != PLAYER)
2266 return 0; 2266 return 0;
2267 2267
2268 /* if player already has a golem, abort */ 2268 /* if player already has a golem, abort */
2269 if (object *golem = op->contr->ranges[range_golem]) 2269 if (object *golem = op->contr->golem)
2270 { 2270 {
2271 control_golem (golem, dir); 2271 control_golem (golem, dir);
2272 return 0; 2272 return 0;
2273 } 2273 }
2274 2274
2326 CLEAR_FLAG (tmp, FLAG_MONSTER); 2326 CLEAR_FLAG (tmp, FLAG_MONSTER);
2327 tmp->stats.exp = 0; 2327 tmp->stats.exp = 0;
2328 add_friendly_object (tmp); 2328 add_friendly_object (tmp);
2329 tmp->type = GOLEM; 2329 tmp->type = GOLEM;
2330 tmp->set_owner (op); 2330 tmp->set_owner (op);
2331 op->contr->ranges[range_golem] = tmp; 2331 op->contr->golem = tmp;
2332 op->contr->shoottype = range_golem;
2333 set_spell_skill (op, caster, spell, tmp); 2332 set_spell_skill (op, caster, spell, tmp);
2334 2333
2335 /* Give the weapon to the golem now. A bit of a hack to check the 2334 /* Give the weapon to the golem now. A bit of a hack to check the
2336 * removed flag - it should only be set if get_split_object was 2335 * removed flag - it should only be set if get_split_object was
2337 * used above. 2336 * used above.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines