Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* duelist crippling critical: light armor and free hand: 1d4 str dam, 1d4 dex dam,
- * 4 penalty to saves, 4 penalty to AC, 2d4 bleed damage and 2d4 drain moves */
- if (HAS_FEAT(ch, FEAT_CRIPPLING_CRITICAL) && HAS_FREE_HAND(ch) &&
- compute_gear_armor_type(ch) <= ARMOR_TYPE_LIGHT) {
- struct mud_event_data *pMudEvent = NULL;
- struct affected_type af;
- /* has event? then we increment the events svariable */
- if ((pMudEvent = char_has_mud_event(victim, eCRIPPLING_CRITICAL))) {
- int crippling_critical_var = 0;
- char buf[10] = {'\0'};
- crippling_critical_var = atoi((char *) pMudEvent->sVariables);
- crippling_critical_var++;
- sprintf(buf, "%d", crippling_critical_var);
- if (pMudEvent->sVariables) /* need to free memory if we changing it */
- free(pMudEvent->sVariables);
- pMudEvent->sVariables = strdup(buf);
- } else { /* no event, so make one */
- pMudEvent = new_mud_event(eCRIPPLING_CRITICAL, victim, strdup("1"));
- /* create and attach new event, apply the first effect */
- attach_mud_event(pMudEvent, 60 * PASSES_PER_SEC);
- }
- /* dummy check */
- if (!pMudEvent)
- ;
- else { /* decide on the effect to drop */
- act("\tRYou strike $N with a crippling critical!\tn", FALSE, ch, NULL, victim, TO_CHAR);
- act("\tr$n strikes you with a crippling critical!\tn", FALSE, ch, NULL, victim, TO_VICT);
- act("\tr$n strikes $N with a crippling critical!\tn", FALSE, ch, NULL, victim, TO_NOTVICT);
- switch (atoi((char *) pMudEvent->sVariables)) {
- case 1: /* 1d4 strength damage */
- new_affect(&af);
- af.spell = SKILL_CRIPPLING_CRITICAL;
- af.location = APPLY_STR;
- af.modifier = -dice(1, 4);
- af.duration = MAX(1, (int) (event_time(pMudEvent->pEvent) / 60));
- SET_BIT_AR(af.bitvector, AFF_CRIPPLING_CRITICAL);
- affect_join(victim, &af, 1, FALSE, FALSE, FALSE);
- break;
- case 2: /* 1d4 dexterity damage */
- new_affect(&af);
- af.spell = SKILL_CRIPPLING_CRITICAL;
- af.location = APPLY_DEX;
- af.modifier = -dice(1, 4);
- af.duration = MAX(1, (int) (event_time(pMudEvent->pEvent) / 60));
- SET_BIT_AR(af.bitvector, AFF_CRIPPLING_CRITICAL);
- affect_join(victim, &af, 1, FALSE, FALSE, FALSE);
- break;
- case 3: /* -4 penalty to fortitude saves */
- new_affect(&af);
- af.spell = SKILL_CRIPPLING_CRITICAL;
- af.location = APPLY_SAVING_FORT;
- af.modifier = -4;
- af.duration = MAX(1, (int) (event_time(pMudEvent->pEvent) / 60));
- SET_BIT_AR(af.bitvector, AFF_CRIPPLING_CRITICAL);
- affect_join(victim, &af, 1, FALSE, FALSE, FALSE);
- break;
- case 4: /* -4 penalty to reflex saves */
- new_affect(&af);
- af.spell = SKILL_CRIPPLING_CRITICAL;
- af.location = APPLY_SAVING_REFL;
- af.modifier = -4;
- af.duration = MAX(1, (int) (event_time(pMudEvent->pEvent) / 60));
- SET_BIT_AR(af.bitvector, AFF_CRIPPLING_CRITICAL);
- affect_join(victim, &af, 1, FALSE, FALSE, FALSE);
- break;
- case 5: /* -4 penalty to will saves */
- new_affect(&af);
- af.spell = SKILL_CRIPPLING_CRITICAL;
- af.location = APPLY_SAVING_WILL;
- af.modifier = -4;
- af.duration = MAX(1, (int) (event_time(pMudEvent->pEvent) / 60));
- SET_BIT_AR(af.bitvector, AFF_CRIPPLING_CRITICAL);
- affect_join(victim, &af, 1, FALSE, FALSE, FALSE);
- break;
- case 6: /* -4 penalty to AC */
- new_affect(&af);
- af.spell = SKILL_CRIPPLING_CRITICAL;
- af.location = APPLY_AC_NEW;
- af.modifier = -4;
- af.duration = MAX(1, (int) (event_time(pMudEvent->pEvent) / 60));
- SET_BIT_AR(af.bitvector, AFF_CRIPPLING_CRITICAL);
- affect_join(victim, &af, 1, FALSE, FALSE, FALSE);
- break;
- default: /* 2d4 bleed damage and 2d4 moves drain */
- GET_MOVE(victim) -= dice(2, 4);
- dam += dice(2, 4);
- break;
- }
- }
- } /* end crippling critical */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement