|
Dual Wield Patch [by Chris Powell] |
|
|
|
Posted Thursday, October 1st @ 02:12:44 PM, by George Greer in the ex-snippet dept.
This is a patch version of the Dual Wield snippet from
Alex's page. Please credit me Darkness (Chris Powell) and
Todd Kegley (author).
diff -uprN stk/class.c src/class.c
--- stk/class.c
Sun Mar 29 23:43:15 1998
+++ src/class.c
Mon Mar 30 10:33:48 1998
@@ -517,6 +517,7 @@ void init_spell_levels(void)
spell_level(SKILL_RESCUE, CLASS_WARRIOR, 3);
spell_level(SKILL_TRACK, CLASS_WARRIOR, 9);
spell_level(SKILL_BASH, CLASS_WARRIOR, 12);
+ spell_level(SKILL_DUAL, CLASS_WARRIOR, 15);
}
diff -uprN stk/fight.c src/fight.c
--- stk/fight.c
Sun Mar 29 23:43:15 1998
+++ src/fight.c
Tue Mar 31 13:41:30 1998
@@ -882,7 +882,8 @@ void perform_violence(void)
{
struct char_data *ch;
extern struct index_data *mob_index;
-
+ int percent, prob;
+
for (ch = combat_list; ch; ch = next_combat_list) {
next_combat_list = ch->next_fighting;
@@ -911,5 +912,24 @@ void perform_violence(void)
hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
if (MOB_FLAGGED(ch, MOB_SPEC) && mob_index[GET_MOB_RNUM(ch)].func != NULL)
(mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, "");
+
+if (GET_SKILL(ch, SKILL_DUAL) && FIGHTING(ch))
+ {
+ struct obj_data *holding = GET_EQ(ch, WEAR_HOLD);
+
+ if (holding && GET_OBJ_TYPE(holding) == ITEM_WEAPON)
+ {
+ percent = number(1, 101);
+ prob = GET_SKILL(ch, SKILL_DUAL);
+ if (prob > percent)
+ {
+
hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
+
if (MOB_FLAGGED(ch, MOB_SPEC) &&
+ mob_index[GET_MOB_RNUM(ch)].func != NULL)
+
(mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, "");
+ }
+ }
+ }
+
}
}
diff -uprN stk/spell_parser.c src/spell_parser.c
--- stk/spell_parser.c
Sun Mar 29 23:43:16 1998
+++ src/spell_parser.c
Mon Mar 30 10:33:18 1998
@@ -127,7 +127,8 @@ char *spells[] =
"sneak",
"steal",
"track",
/* 140 */
- "!UNUSED!", "!UNUSED!", "!UNUSED!", "!UNUSED!", "!UNUSED!",
/* 145 */
+ "dual",
+ "!UNUSED!", "!UNUSED!", "!UNUSED!", "!UNUSED!",
/* 145 */
"!UNUSED!", "!UNUSED!", "!UNUSED!", "!UNUSED!", "!UNUSED!",
/* 150 */
"!UNUSED!", "!UNUSED!", "!UNUSED!", "!UNUSED!", "!UNUSED!",
/* 155 */
"!UNUSED!", "!UNUSED!", "!UNUSED!", "!UNUSED!", "!UNUSED!",
/* 160 */
@@ -1022,5 +1023,6 @@ void mag_assign_spells(void)
skillo(SKILL_SNEAK);
skillo(SKILL_STEAL);
skillo(SKILL_TRACK);
+ skillo(SKILL_DUAL);
}
diff -uprN stk/spells.h src/spells.h
--- stk/spells.h
Sun Mar 29 23:43:16 1998
+++ src/spells.h
Mon Mar 30 10:32:38 1998
@@ -101,6 +101,7 @@
#define SKILL_SNEAK 138 /* Reserved Skill[] DO NOT CHANGE */
#define SKILL_STEAL 139 /* Reserved Skill[] DO NOT CHANGE */
#define SKILL_TRACK
140 /* Reserved Skill[] DO NOT CHANGE */
+#define SKILL_DUAL
141 /* Reserved Skill[] DO NOT CHANGE */
/* New skills may be added here up to MAX_SKILLS (200) */
<< Upcoming OasisOLC v1.7 | Reply | View as text | Threaded | 128-bit Patch [by Chris Powell] >> |
|
Related Links |
|
|
|