When an attack spins someone around:

- break their grabs
- actually spin them around when the play can't see it
This commit is contained in:
Rob Pearce 2019-08-29 20:56:51 +10:00
parent 9456fba0f7
commit 8aef3bf1eb
3 changed files with 407 additions and 405 deletions

View File

@ -2395,16 +2395,17 @@ void criticalhit(lifeform_t *lf, lifeform_t *victim, enum BODYPART hitpos, objec
if (cansee(player, lf) || cansee(player, victim)) {
getlfname(lf, lfname);
getlfname(victim, victimname);
setfacing(victim, getrandomdirexcept(DT_COMPASS, victim->facing));
msg("%s%s blow spins %s around!", lfname, getpossessive(lfname),victimname);
}
} else {
if (isplayer(victim) || cansee(player, victim)) {
getlfname(victim, victimname);
setfacing(victim, getrandomdirexcept(DT_COMPASS, victim->facing));
msg("%s is spun around!", victimname);
}
}
// actually spin them
setfacing(victim, getrandomdirexcept(DT_COMPASS, victim->facing));
breakgrabs(victim, B_TRUE, B_TRUE, B_TRUE);
break;
}
}

2
data.c
View File

@ -5272,7 +5272,7 @@ void initobjects(void) {
addflag(lastot->flags, F_MAXPOWER, 3, NA, NA, NULL);
addflag(lastot->flags, F_TARGETTEDSPELL, TT_NONE, NA, NA, NULL);
addflag(lastot->flags, F_LOSLOF, B_TRUE, LOF_DONTNEED, NA, NULL);
addot(OT_S_LETHARGY, "lethargy", "Reduces the target's stamina by ^bpower^n*2.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addot(OT_S_LETHARGY, "lethargy", "Reduces the target's stamina by ^bpower^n.", MT_NOTHING, 0, OC_SPELL, SZ_TINY);
addflag(lastot->flags, F_SPELLSCHOOL, SS_MENTAL, NA, NA, NULL);
addflag(lastot->flags, F_SPELLSCHOOL, SS_DEATH, NA, NA, NULL);
addflag(lastot->flags, F_SPELLLEVEL, 1, NA, NA, NULL);

805
spell.c

File diff suppressed because it is too large Load Diff