From: Anthony C. <dae...@us...> - 2004-05-23 18:16:07
|
Update of /cvsroot/havok/havokmud In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12272 Modified Files: Tag: rev_1_11 act.info.c constants.c magic2.c mind_use1.c mindskills1.c protos.h spell_parser.c spells.h spells2.c Log Message: imp'd feature request 956404, wall of thought Index: mind_use1.c =================================================================== RCS file: /cvsroot/havok/havokmud/mind_use1.c,v retrieving revision 1.11.2.6 retrieving revision 1.11.2.7 diff -C2 -d -r1.11.2.6 -r1.11.2.7 *** mind_use1.c 21 May 2004 13:25:39 -0000 1.11.2.6 --- mind_use1.c 23 May 2004 18:15:55 -0000 1.11.2.7 *************** *** 399,402 **** --- 399,435 ---- } + void mind_use_wall_of_thought(int level, struct char_data *ch, char *arg, + int type, struct char_data *tar_ch, + struct obj_data *tar_obj) + { + switch(type) { + case SPELL_TYPE_SPELL: + if (affected_by_spell(ch, SKILL_WALL_OF_THOUGHT)) { + send_to_char("Nothing seems to happen.\n\r", ch); + return; + } else { + mind_wall_of_thought(level, ch, ch, 0); + break; + } + case SPELL_TYPE_POTION: + if (affected_by_spell(ch, SKILL_WALL_OF_THOUGHT)) { + return; + } else { + mind_wall_of_thought(level, ch, ch, 0); + break; + } + case SPELL_TYPE_SCROLL: + case SPELL_TYPE_WAND: + if (tar_obj || affected_by_spell(ch, SKILL_WALL_OF_THOUGHT)) { + return; + } else { + mind_wall_of_thought(level, ch, ch, 0); + break; + } + default: + Log("Serious screwup in wall_of_thought!"); + break; + } + } /* * vim:ts=4:sw=4:ai:et:si:sts=4 Index: act.info.c =================================================================== RCS file: /cvsroot/havok/havokmud/act.info.c,v retrieving revision 1.150.2.27 retrieving revision 1.150.2.28 diff -C2 -d -r1.150.2.27 -r1.150.2.28 *** act.info.c 23 May 2004 01:07:59 -0000 1.150.2.27 --- act.info.c 23 May 2004 18:15:54 -0000 1.150.2.28 *************** *** 2869,2872 **** --- 2869,2874 ---- send_to_char(help, ch); + } else { + do_help(ch, "help help", 38); } } Index: protos.h =================================================================== RCS file: /cvsroot/havok/havokmud/protos.h,v retrieving revision 1.153.2.17 retrieving revision 1.153.2.18 diff -C2 -d -r1.153.2.17 -r1.153.2.18 *** protos.h 21 May 2004 13:25:40 -0000 1.153.2.17 --- protos.h 23 May 2004 18:15:55 -0000 1.153.2.18 *************** *** 3371,3378 **** void do_clanlist(struct char_data *ch, char *arg, int cmd); ! void spell_wall_of_thought(int level, struct char_data *ch, struct char_data *victim, struct obj_data *obj); ! void cast_wall_of_thought(int level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, --- 3371,3378 ---- void do_clanlist(struct char_data *ch, char *arg, int cmd); ! void mind_wall_of_thought(int level, struct char_data *ch, struct char_data *victim, struct obj_data *obj); ! void mind_use_wall_of_thought(int level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, Index: spells2.c =================================================================== RCS file: /cvsroot/havok/havokmud/spells2.c,v retrieving revision 1.43.2.8 retrieving revision 1.43.2.9 diff -C2 -d -r1.43.2.8 -r1.43.2.9 *** spells2.c 21 May 2004 13:25:42 -0000 1.43.2.8 --- spells2.c 23 May 2004 18:15:55 -0000 1.43.2.9 *************** *** 5351,5390 **** } - void cast_wall_of_thought(int level, struct char_data *ch, char *arg, - int type, struct char_data *tar_ch, - struct obj_data *tar_obj) - { - switch (type) { - case SPELL_TYPE_SPELL: - if (affected_by_spell(ch, SPELL_WALL_OF_THOUGHT)) { - send_to_char("Nothing seems to happen.\n\r", ch); - return; - } - spell_wall_of_thought(level, ch, ch, 0); - break; - case SPELL_TYPE_POTION: - if (affected_by_spell(ch, SPELL_WALL_OF_THOUGHT)) { - return; - } - spell_wall_of_thought(level, ch, ch, 0); - break; - case SPELL_TYPE_SCROLL: - if (tar_obj || affected_by_spell(ch, SPELL_WALL_OF_THOUGHT)) { - return; - } - spell_wall_of_thought(level, ch, ch, 0); - break; - case SPELL_TYPE_WAND: - if (tar_obj || affected_by_spell(ch, SPELL_WALL_OF_THOUGHT)) { - return; - } - spell_wall_of_thought(level, ch, ch, 0); - break; - default: - Log("Serious screw-up in wall_of_thought!"); - break; - } - } - void cast_cold_light(int level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, --- 5351,5354 ---- Index: spell_parser.c =================================================================== RCS file: /cvsroot/havok/havokmud/spell_parser.c,v retrieving revision 1.97.2.16 retrieving revision 1.97.2.17 diff -C2 -d -r1.97.2.16 -r1.97.2.17 *** spell_parser.c 21 May 2004 13:25:42 -0000 1.97.2.16 --- spell_parser.c 23 May 2004 18:15:55 -0000 1.97.2.17 *************** *** 1611,1617 **** IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, 4, IMMORTAL, IMMORTAL, IMMORTAL, 0, 0, 0 }, - { 305, cast_wall_of_thought, 20, 24, POSITION_STANDING, - IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, 35, IMMORTAL, - TAR_SELF_ONLY, 0, 1 }, { 306, mind_use_mind_tap, 35, 36, POSITION_FIGHTING, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, 20, IMMORTAL, --- 1611,1614 ---- *************** *** 1719,1722 **** --- 1716,1722 ---- IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, 45, TAR_IGNORE, 0, 0 }, + { 339, mind_use_wall_of_thought, 50, 24, POSITION_STANDING, + IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, 30, IMMORTAL, + TAR_SELF_ONLY | TAR_CHAR_ROOM, 30, 0 }, { 341, cast_blade_barrier, 40, 24, POSITION_STANDING, IMMORTAL, 45, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, IMMORTAL, Index: constants.c =================================================================== RCS file: /cvsroot/havok/havokmud/constants.c,v retrieving revision 1.123.2.7 retrieving revision 1.123.2.8 diff -C2 -d -r1.123.2.7 -r1.123.2.8 *** constants.c 28 Apr 2004 04:01:13 -0000 1.123.2.7 --- constants.c 23 May 2004 18:15:54 -0000 1.123.2.8 *************** *** 1273,1276 **** --- 1273,1277 ---- {"tower of iron will", SKILL_TOWER_IRON_WILL, 34, 45}, {"ultra blast", SKILL_ULTRA_BLAST, 20, 45}, + {"wall of thought", SKILL_WALL_OF_THOUGHT, 30, 45}, {"None", -1, -1, -1} }, *************** *** 1819,1823 **** "Your mental reserves have restored enough to raise another flesh golem.", "The aura of freezing flames that surrounds you melts.", /* 338 */ ! "wall of thought", "mind tap", "Your blade barrier winks out of existence.", --- 1820,1824 ---- "Your mental reserves have restored enough to raise another flesh golem.", "The aura of freezing flames that surrounds you melts.", /* 338 */ ! "Your wall of thought vanishes.", "mind tap", "Your blade barrier winks out of existence.", *************** *** 2171,2175 **** "", "The aura of freezing flames surrounding $n melts.", /* 338 */ ! "wall of thought", "mind tap", "$n's blade barrier winks out of existence.", --- 2172,2176 ---- "", "The aura of freezing flames surrounding $n melts.", /* 338 */ ! "The wall of thought surrounding $n vanishes.", "mind tap", "$n's blade barrier winks out of existence.", *************** *** 2529,2533 **** "", "Your aura of freezing flames hisses softly.", /* 338 */ ! "wall of thought", "mind tap", "Your blade barrier wavers a moment.", --- 2530,2534 ---- "", "Your aura of freezing flames hisses softly.", /* 338 */ ! "Your wall of thought wavers a moment.", "mind tap", "Your blade barrier wavers a moment.", *************** *** 2883,2887 **** "", "$n's aura of freezing flames hisses softly.", /* 338 */ ! "wall of thought", "mind tap", "$n's blade barrier wavers a moment.", --- 2884,2888 ---- "", "$n's aura of freezing flames hisses softly.", /* 338 */ ! "$n's wall of thought wavers a moment.", "mind tap", "$n's blade barrier wavers a moment.", Index: mindskills1.c =================================================================== RCS file: /cvsroot/havok/havokmud/mindskills1.c,v retrieving revision 1.23.2.11 retrieving revision 1.23.2.12 diff -C2 -d -r1.23.2.11 -r1.23.2.12 *** mindskills1.c 22 May 2004 22:10:59 -0000 1.23.2.11 --- mindskills1.c 23 May 2004 18:15:55 -0000 1.23.2.12 *************** *** 903,907 **** --- 903,926 ---- } } + void mind_wall_of_thought(int level, struct char_data *ch, + struct char_data *victim, struct obj_data *obj) + { + struct affected_type af; + + assert (ch); + if (!affected_by_spell(ch, SKILL_WALL_OF_THOUGHT)) { + act("A wall of thought surrounds $n.", TRUE, ch, 0, 0, TO_ROOM); + act("You surround yourself with a wall of thought.", + TRUE, ch, 0, 0, TO_CHAR); + + af.type = SKILL_WALL_OF_THOUGHT; + af.duration = level/2; + af.modifier = IMM_BLUNT; + af.location = APPLY_IMMUNE; + af.bitvector = 0; + affect_to_char(ch, &af); + } + } /* * vim:ts=4:sw=4:ai:et:si:sts=4 Index: magic2.c =================================================================== RCS file: /cvsroot/havok/havokmud/magic2.c,v retrieving revision 1.42.2.8 retrieving revision 1.42.2.9 diff -C2 -d -r1.42.2.8 -r1.42.2.9 *** magic2.c 23 May 2004 05:00:10 -0000 1.42.2.8 --- magic2.c 23 May 2004 18:15:55 -0000 1.42.2.9 *************** *** 1942,1945 **** --- 1942,1949 ---- affect_from_char(victim, SPELL_FEEBLEMIND); } + if (affected_by_spell(victim, SKILL_WALL_OF_THOUGHT)) { + affect_from_char(victim, SKILL_WALL_OF_THOUGHT); + send_to_char("Your wall of thought suddenly fails!\n\r", victim); + } } } *************** *** 2942,2976 **** } - void spell_wall_of_thought(int level, struct char_data *ch, - struct char_data *victim, struct obj_data *obj) - { - struct affected_type af; - - assert(ch); - - if (!affected_by_spell(ch, SPELL_WALL_OF_THOUGHT)) { - act("$n's wall of thought.", TRUE, ch, 0, 0, TO_ROOM); - act("A wall of thought comes up.", TRUE, ch, 0, 0, TO_CHAR); - - af.type = SPELL_WALL_OF_THOUGHT; - af.duration = level; - af.modifier = -40; - af.location = APPLY_AC; - af.bitvector = 0; - affect_to_char(ch, &af); - - /* - * resistance to piercing weapons - */ - - af.type = SPELL_WALL_OF_THOUGHT; - af.duration = level; - af.modifier = IMM_BLUNT; - af.location = APPLY_IMMUNE; - af.bitvector = 0; - affect_to_char(ch, &af); - } - } - /* * vim:ts=4:sw=4:ai:et:si:sts=4 --- 2946,2949 ---- Index: spells.h =================================================================== RCS file: /cvsroot/havok/havokmud/spells.h,v retrieving revision 1.43.2.3 retrieving revision 1.43.2.4 diff -C2 -d -r1.43.2.3 -r1.43.2.4 *** spells.h 12 Apr 2004 02:27:10 -0000 1.43.2.3 --- spells.h 23 May 2004 18:15:55 -0000 1.43.2.4 *************** *** 431,435 **** * PSI Spells */ ! #define SPELL_WALL_OF_THOUGHT 339 #define SKILL_MIND_TAP 340 --- 431,435 ---- * PSI Spells */ ! #define SKILL_WALL_OF_THOUGHT 339 #define SKILL_MIND_TAP 340 |