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.107 by elmex, Thu Sep 17 16:53:15 2009 UTC vs.
Revision 1.109 by sf-marcmagus, Sun Oct 11 01:35:52 2009 UTC

1062 break; 1062 break;
1063 } 1063 }
1064 else if (spell_ob->race && spell_ob->race == tmp2->name) 1064 else if (spell_ob->race && spell_ob->race == tmp2->name)
1065 { 1065 {
1066 if (!silent) 1066 if (!silent)
1067 new_draw_info_format (NDI_UNIQUE, 0, op, "You can not cast %s while %s is in effect", &spell_ob->name, &tmp2->name_pl); 1067 new_draw_info_format (NDI_UNIQUE, 0, op,
1068 "You can not cast %s while %s is in effect",
1069 &spell_ob->name, &tmp2->name_pl);
1068 1070
1069 return 0; 1071 return 0;
1070 } 1072 }
1071 } 1073 }
1072 } 1074 }
1073 1075
1074 if (!force)
1075 {
1076 force = get_archetype (FORCE_NAME);
1077 force->subtype = FORCE_CHANGE_ABILITY;
1078
1079 if (spell_ob->race)
1080 force->name = spell_ob->race;
1081 else
1082 force->name = spell_ob->name;
1083
1084 force->name_pl = spell_ob->name;
1085 new_draw_info (NDI_UNIQUE, 0, op, "You create an aura of magical force.");
1086
1087 }
1088 else
1089 {
1090 int duration = change_ability_duration (spell_ob, caster); 1076 int duration = change_ability_duration (spell_ob, caster);
1091 1077
1078 if (force)
1079 {
1092 if (duration > force->duration) 1080 if (duration > force->duration)
1093 { 1081 {
1094 force->duration = duration; 1082 force->duration = duration;
1095 new_draw_info (NDI_UNIQUE, 0, op, "You recast the spell while in effect."); 1083 new_draw_info (NDI_UNIQUE, 0, op, "You recast the spell while in effect.");
1096 } 1084 }
1098 new_draw_info (NDI_UNIQUE, 0, op, "Recasting the spell had no effect."); 1086 new_draw_info (NDI_UNIQUE, 0, op, "Recasting the spell had no effect.");
1099 1087
1100 return 1; 1088 return 1;
1101 } 1089 }
1102 1090
1103 force->duration = spell_ob->duration + SP_level_duration_adjust (caster, spell_ob) * 50; 1091 new_draw_info_format (NDI_UNIQUE, 0, op,
1092 "You create an aura of magical force. H<The effect will last for about %.10g seconds.>",
1093 TICK2TIME (duration));
1094
1095 force = get_archetype (FORCE_NAME);
1096 force->subtype = FORCE_CHANGE_ABILITY;
1097 force->duration = duration;
1098
1099 if (spell_ob->race)
1100 force->name = spell_ob->race;
1101 else
1102 force->name = spell_ob->name;
1103
1104 force->name_pl = spell_ob->name;
1105
1104 force->speed = 1.0; 1106 force->speed = 1.0;
1105 force->speed_left = -1.0; 1107 force->speed_left = -1.0;
1106 SET_FLAG (force, FLAG_APPLIED); 1108 SET_FLAG (force, FLAG_APPLIED);
1107 1109
1108 /* Now start processing the effects. First, protections */ 1110 /* Now start processing the effects. First, protections */
2328 { 2330 {
2329 new_draw_info (NDI_UNIQUE, 0, op, "Write what?"); 2331 new_draw_info (NDI_UNIQUE, 0, op, "Write what?");
2330 return 0; 2332 return 0;
2331 } 2333 }
2332 2334
2333 if (strcasestr_local (msg, "endmsg")) 2335 if (!msg_is_safe (msg))
2334 { 2336 {
2335 new_draw_info (NDI_UNIQUE, 0, op, "Trying to cheat are we?"); 2337 new_draw_info (NDI_UNIQUE, 0, op, "Trying to cheat are we?");
2336 LOG (llevInfo, "write_rune: player %s tried to write bogus rune %s\n", &op->name, msg); 2338 LOG (llevInfo, "write_mark: player %s tried to write bogus rune %s\n", &op->name, msg);
2337 return 0; 2339 return 0;
2338 } 2340 }
2339 2341
2340 if (!spell->other_arch) 2342 if (!spell->other_arch)
2341 return 0; 2343 return 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines