Change weapon stamina loss to be BASELOSS + 3*weapon_attackdelay_mod
ie. weapon attack delay of 130 = 190% of base stamina loss. This should mitigate powerful weapons like halberds. Make innate 'fists' type objects have the same fast attack speed as a dagger.
This commit is contained in:
parent
321a5ae00c
commit
3fb91ba6e1
7
data.c
7
data.c
|
@ -8835,6 +8835,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_UNARMED, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_UNARMED, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CRITCHANCE, 1, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITCHANCE, 1, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_OBATTACKDELAY, 75, NA, NA, NULL);
|
||||||
|
|
||||||
addot(OT_AIRFISTS, "air currents", "air currents object", MT_GAS, 0, OC_WEAPON, SZ_TINY);
|
addot(OT_AIRFISTS, "air currents", "air currents object", MT_GAS, 0, OC_WEAPON, SZ_TINY);
|
||||||
addflag(lastot->flags, F_DAM, DT_BASH, 2, NA, NULL);
|
addflag(lastot->flags, F_DAM, DT_BASH, 2, NA, NULL);
|
||||||
|
@ -8852,6 +8853,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_ATTACKVERB, NA, 2, NA, "scratch");
|
addflag(lastot->flags, F_ATTACKVERB, NA, 2, NA, "scratch");
|
||||||
addflag(lastot->flags, F_ATTACKVERB, 3, 6, NA, "scrape");
|
addflag(lastot->flags, F_ATTACKVERB, 3, 6, NA, "scrape");
|
||||||
addflag(lastot->flags, F_ATTACKVERB, 7, NA, NA, "rake");
|
addflag(lastot->flags, F_ATTACKVERB, 7, NA, NA, "rake");
|
||||||
|
addflag(lastot->flags, F_OBATTACKDELAY, 75, NA, NA, NULL);
|
||||||
|
|
||||||
|
|
||||||
addot(OT_TEETH, "teeth", "teeth object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
addot(OT_TEETH, "teeth", "teeth object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
||||||
|
@ -8861,6 +8863,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CRITCHANCE, 3, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITCHANCE, 3, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_OBATTACKDELAY, 75, NA, NA, NULL);
|
||||||
|
|
||||||
addot(OT_TRAMPLE, "trample", "trample object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
addot(OT_TRAMPLE, "trample", "trample object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
||||||
addflag(lastot->flags, F_DAM, DT_CRUSH, 2, NA, NULL);
|
addflag(lastot->flags, F_DAM, DT_CRUSH, 2, NA, NULL);
|
||||||
|
@ -8876,6 +8879,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "peck");
|
addflag(lastot->flags, F_ATTACKVERB, NA, NA, NA, "peck");
|
||||||
|
addflag(lastot->flags, F_OBATTACKDELAY, 75, NA, NA, NULL);
|
||||||
|
|
||||||
addot(OT_DRILL, "drills", "drills object", MT_METAL, 0, OC_WEAPON, SZ_TINY);
|
addot(OT_DRILL, "drills", "drills object", MT_METAL, 0, OC_WEAPON, SZ_TINY);
|
||||||
addflag(lastot->flags, F_DAM, DT_SLASH, 2, NA, NULL);
|
addflag(lastot->flags, F_DAM, DT_SLASH, 2, NA, NULL);
|
||||||
|
@ -8898,6 +8902,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_OBATTACKDELAY, 75, NA, NA, NULL);
|
||||||
|
|
||||||
addot(OT_SAWBLADE, "sawblade", "sawblade object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
addot(OT_SAWBLADE, "sawblade", "sawblade object", MT_BONE, 0, OC_WEAPON, SZ_TINY);
|
||||||
addflag(lastot->flags, F_DAM, DT_SLASH, 2, NA, NULL);
|
addflag(lastot->flags, F_DAM, DT_SLASH, 2, NA, NULL);
|
||||||
|
@ -8952,6 +8957,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_NONE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_OBATTACKDELAY, 75, NA, NA, NULL);
|
||||||
|
|
||||||
addot(OT_TENTACLE, "tentacle", "tentacle object", MT_FLESH, 0, OC_WEAPON, SZ_TINY);
|
addot(OT_TENTACLE, "tentacle", "tentacle object", MT_FLESH, 0, OC_WEAPON, SZ_TINY);
|
||||||
addflag(lastot->flags, F_DAM, DT_BASH, 10, NA, NULL);
|
addflag(lastot->flags, F_DAM, DT_BASH, 10, NA, NULL);
|
||||||
|
@ -8973,6 +8979,7 @@ void initobjects(void) {
|
||||||
addflag(lastot->flags, F_NOSTRDAMMOD, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_NOSTRDAMMOD, B_TRUE, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_USESSKILL, SK_WHIPS, NA, NA, NULL);
|
addflag(lastot->flags, F_USESSKILL, SK_WHIPS, NA, NA, NULL);
|
||||||
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
addflag(lastot->flags, F_UNARMEDWEP, B_TRUE, NA, NA, NULL);
|
||||||
|
addflag(lastot->flags, F_OBATTACKDELAY, 75, NA, NA, NULL);
|
||||||
|
|
||||||
addot(OT_ZAPPER, "zapper", "zapper object", MT_NOTHING, 0, OC_WEAPON, SZ_TINY);
|
addot(OT_ZAPPER, "zapper", "zapper object", MT_NOTHING, 0, OC_WEAPON, SZ_TINY);
|
||||||
addflag(lastot->flags, F_DAM, DT_ELECTRIC, 2, NA, NULL);
|
addflag(lastot->flags, F_DAM, DT_ELECTRIC, 2, NA, NULL);
|
||||||
|
|
9
lf.c
9
lf.c
|
@ -7802,9 +7802,12 @@ float getattackstamloss(lifeform_t *lf) {
|
||||||
|
|
||||||
w = getweapon(lf);
|
w = getweapon(lf);
|
||||||
if (w) {
|
if (w) {
|
||||||
int del;
|
int pctmod;
|
||||||
del = getobattackdelay(w);
|
pctmod = getobattackdelay(w); // ie. 50 is fast, 100 is normal, 150 is slow, etc.
|
||||||
loss = pctof(del, loss);
|
pctmod -= 100; // ie. -50 is fast, 0 is normal, 50 is slow
|
||||||
|
|
||||||
|
// ie. normal attack stamina cost, plus twice the weapon's "attack delay"
|
||||||
|
loss = loss + (pctof(pctmod, loss)*3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return loss;
|
return loss;
|
||||||
|
|
Loading…
Reference in New Issue