2011-02-01 06:16:13 +11:00
|
|
|
#include <assert.h>
|
|
|
|
#include <math.h>
|
2010-12-02 12:17:54 +11:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2010-12-07 18:34:26 +11:00
|
|
|
#include <string.h>
|
2010-12-02 12:17:54 +11:00
|
|
|
#include "attack.h"
|
|
|
|
#include "defs.h"
|
2010-12-07 18:34:26 +11:00
|
|
|
#include "flag.h"
|
2011-02-01 06:16:13 +11:00
|
|
|
#include "io.h"
|
2010-12-07 18:34:26 +11:00
|
|
|
#include "lf.h"
|
2011-03-04 12:22:36 +11:00
|
|
|
#include "map.h"
|
|
|
|
#include "move.h"
|
2011-02-01 06:16:13 +11:00
|
|
|
#include "nexus.h"
|
2010-12-07 18:34:26 +11:00
|
|
|
#include "objects.h"
|
2011-02-01 06:16:13 +11:00
|
|
|
#include "text.h"
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
extern lifeform_t *player;
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
int applyarmourdamage(lifeform_t *lf, object_t *wep, int dam, enum DAMTYPE damtype) {
|
2011-04-01 10:54:44 +11:00
|
|
|
object_t *armour = NULL;
|
2011-03-04 12:22:36 +11:00
|
|
|
int damtaken = 0;
|
2011-04-01 10:54:44 +11:00
|
|
|
|
|
|
|
// figure out what bit of armour was hit
|
|
|
|
|
2011-04-06 17:27:55 +10:00
|
|
|
// special case - missiles always hit flak jacket
|
2011-04-01 10:54:44 +11:00
|
|
|
if (damtype == DT_PROJECTILE) {
|
|
|
|
object_t *o;
|
|
|
|
o = getequippedob(lf->pack, BP_BODY);
|
|
|
|
if (o && (o->type->id == OT_FLAKJACKET)) {
|
|
|
|
// stop ALL missile damage
|
|
|
|
armour = o;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!armour) {
|
|
|
|
// pick a random piece of armour
|
|
|
|
armour = getrandomarmour(lf);
|
2011-03-04 12:22:36 +11:00
|
|
|
}
|
2011-04-01 10:54:44 +11:00
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
if (armour) {
|
2011-04-01 10:54:44 +11:00
|
|
|
int actualdam;
|
|
|
|
flag_t *rust;
|
|
|
|
// adjust how much damage to do to armour
|
|
|
|
if ( ((armour->type->id == OT_FLAKJACKET) && (damtype == DT_PROJECTILE)) ||
|
|
|
|
(damtype == DT_ACID) ||
|
|
|
|
hasflag(wep->flags, F_ARMOURPIERCE)) {
|
|
|
|
// ALL of damage reduction goes towards armour
|
|
|
|
actualdam = dam;
|
|
|
|
} else {
|
2011-05-06 10:34:42 +10:00
|
|
|
switch (getskill(lf, SK_ARMOUR)) {
|
|
|
|
default:
|
|
|
|
case PR_INEPT:
|
|
|
|
actualdam = dam;
|
|
|
|
break;
|
|
|
|
case PR_NOVICE: actualdam = pctof(90, dam); break;
|
|
|
|
case PR_BEGINNER: actualdam = pctof(80, dam); break;
|
|
|
|
case PR_ADEPT: actualdam = pctof(70, dam); break;
|
|
|
|
case PR_SKILLED: actualdam = pctof(60, dam); break;
|
|
|
|
case PR_EXPERT: actualdam = pctof(50, dam); break;
|
|
|
|
case PR_MASTER: actualdam = pctof(40, dam); break;
|
|
|
|
}
|
|
|
|
if (actualdam > 0) {
|
|
|
|
limit(&dam, 1, NA);
|
|
|
|
}
|
2011-04-01 10:54:44 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
// modify for rust
|
|
|
|
rust = hasflag(armour->flags, F_RUSTED);
|
|
|
|
if (rust) {
|
|
|
|
int multiplier = 1;
|
|
|
|
switch (rust->val[0]) {
|
|
|
|
case R_RUSTY:
|
|
|
|
multiplier = 2;
|
|
|
|
case R_VRUSTY:
|
|
|
|
multiplier = 6;
|
|
|
|
case R_TRUSTY:
|
|
|
|
multiplier = 10;
|
|
|
|
}
|
|
|
|
actualdam *= multiplier;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// actually apply the damage to the armour
|
|
|
|
damtaken = takedamage(armour,actualdam, damtype);
|
2011-03-04 12:22:36 +11:00
|
|
|
}
|
|
|
|
return damtaken;
|
|
|
|
}
|
|
|
|
|
|
|
|
void applyarmourdamreduction(lifeform_t *lf, object_t *wep, int reduceamt, int *dam, enum DAMTYPE damtype) {
|
|
|
|
int db = B_FALSE;
|
|
|
|
|
|
|
|
// armour can't stop armour-piercing weapons
|
|
|
|
if (hasflag(wep->flags, F_ARMOURPIERCE)) {
|
|
|
|
reduceamt = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (db) {
|
|
|
|
if (reduceamt > 0) {
|
|
|
|
dblog("Armour reduces dam by %d to %d.",reduceamt,dam);
|
|
|
|
} else {
|
|
|
|
dblog("No armour dam reduction.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (dam && (reduceamt >= 0)) {
|
|
|
|
*dam -= reduceamt;
|
|
|
|
if (*dam < 0) *dam = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
int attackcell(lifeform_t *lf, cell_t *c) {
|
2011-04-08 13:18:54 +10:00
|
|
|
int validwep[MAXCANDIDATES];
|
|
|
|
object_t *wep[MAXCANDIDATES];
|
|
|
|
flag_t *damflag[MAXCANDIDATES], *f;
|
|
|
|
obpile_t *op = NULL;
|
|
|
|
enum {
|
|
|
|
AT_NONE = 0,
|
|
|
|
AT_LF = 1,
|
|
|
|
AT_OB = 2,
|
|
|
|
} attacktype = AT_NONE;
|
|
|
|
void *attacktarget;
|
|
|
|
int nweps = 0;
|
2011-04-11 15:05:45 +10:00
|
|
|
int innateattacks = 0;
|
2011-04-08 13:18:54 +10:00
|
|
|
int i;
|
|
|
|
int attacktime;
|
|
|
|
int gotweapon = B_FALSE;
|
2011-04-11 15:05:45 +10:00
|
|
|
int maxattacks = ALL;
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
int lastweaponidx = -1;
|
2011-04-08 13:18:54 +10:00
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// anyone there? if so just attack.
|
|
|
|
if (c->lf) {
|
2011-04-08 13:18:54 +10:00
|
|
|
if (isplayer(lf) && !areenemies(lf,c->lf)) {
|
|
|
|
char ch;
|
|
|
|
char victimname[BUFLEN];
|
|
|
|
char buf[BUFLEN];
|
|
|
|
getlfname(c->lf, victimname);
|
|
|
|
switch (getallegiance(c->lf)) {
|
|
|
|
case AL_PEACEFUL:
|
|
|
|
sprintf(buf, "Really attack the peaceful %s?",noprefix(victimname));
|
|
|
|
break;
|
|
|
|
case AL_FRIENDLY:
|
|
|
|
sprintf(buf, "Really attack the allied %s?",noprefix(victimname));
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
sprintf(buf, "Really attack the allied %s?",noprefix(victimname));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
ch = askchar(buf, "yn","n", B_TRUE);
|
|
|
|
if (ch == 'n') {
|
|
|
|
// cancel.
|
|
|
|
return B_TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
attacktype = AT_LF;
|
|
|
|
attacktarget = c->lf;
|
2011-02-01 06:16:13 +11:00
|
|
|
} else {
|
|
|
|
object_t *o;
|
2011-04-08 13:18:54 +10:00
|
|
|
// has an impassable object?
|
2011-02-01 06:16:13 +11:00
|
|
|
o = hasobwithflag(c->obpile, F_IMPASSABLE);
|
|
|
|
if (o) {
|
2011-04-08 13:18:54 +10:00
|
|
|
attacktype = AT_OB;
|
|
|
|
attacktarget = o;
|
2011-02-01 06:16:13 +11:00
|
|
|
} else {
|
|
|
|
// TODO: attack wall?
|
|
|
|
return B_TRUE;
|
|
|
|
}
|
|
|
|
}
|
2011-04-08 13:18:54 +10:00
|
|
|
|
|
|
|
// first use our weapon...
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
nweps = 0;
|
|
|
|
wep[nweps] = getweapon(lf);
|
|
|
|
if (wep[nweps]) {
|
|
|
|
damflag[nweps] = hasflag(wep[nweps]->flags, F_DAM);
|
|
|
|
validwep[nweps] = B_TRUE;
|
|
|
|
lastweaponidx = 0;
|
2011-04-08 13:18:54 +10:00
|
|
|
nweps++;
|
|
|
|
gotweapon = B_TRUE;
|
|
|
|
}
|
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
// if we are skilled at twoweaponing, we can attack with our second weapon
|
|
|
|
// as well, with a possible accuracy penalty depending on our skill level.
|
|
|
|
if (getskill(lf, SK_TWOWEAPON)) {
|
|
|
|
wep[nweps] = getsecmeleeweapon(lf);
|
|
|
|
if (wep[nweps]) {
|
|
|
|
damflag[nweps] = hasflag(wep[nweps]->flags, F_DAM);
|
|
|
|
validwep[nweps] = B_TRUE;
|
|
|
|
lastweaponidx = nweps;
|
|
|
|
nweps++;
|
|
|
|
gotweapon = B_TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
// then use all our innate attacks..
|
|
|
|
for (f = lf->flags->first ; f; f = f->next) {
|
|
|
|
if (f->id == F_HASATTACK) {
|
|
|
|
objecttype_t *ot;
|
|
|
|
|
|
|
|
if (!op) {
|
|
|
|
op = addobpile(NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
ot = findot(f->val[0]);
|
|
|
|
if (ot) {
|
|
|
|
wep[nweps] = addob(op, ot->name);
|
|
|
|
validwep[nweps] = B_TRUE;
|
|
|
|
damflag[nweps] = f;
|
|
|
|
nweps++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
innateattacks = countinnateattacks(lf);
|
|
|
|
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
// stop sprinting
|
|
|
|
f = lfhasflag(lf, F_SPRINTING);
|
|
|
|
if (f && f->val[0]) {
|
|
|
|
killflag(f);
|
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
// take time
|
|
|
|
attacktime = getattackspeed(lf);
|
|
|
|
taketime(lf, attacktime);
|
|
|
|
|
2011-04-11 15:05:45 +10:00
|
|
|
if (nweps <= 0) {
|
|
|
|
if (isplayer(lf)) {
|
|
|
|
msg("You cannot attack!");
|
|
|
|
}
|
|
|
|
return B_TRUE;
|
|
|
|
}
|
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
//maxattacks = nweps; // ie. all
|
|
|
|
|
|
|
|
maxattacks = getmaxattacks(lf);
|
2011-04-11 15:05:45 +10:00
|
|
|
|
|
|
|
/*
|
2011-04-08 13:18:54 +10:00
|
|
|
// if we have a weapon, this takes the place of one of our
|
|
|
|
// attacks.
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
// - for monsters, pick which one to replace randomly.
|
|
|
|
// - for players, never pick the weapon to replace randomly.
|
2011-04-11 15:05:45 +10:00
|
|
|
*/
|
2011-04-08 13:18:54 +10:00
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
// # valid attacks higher than our allowed attacks?
|
2011-04-11 15:05:45 +10:00
|
|
|
if (nweps > maxattacks) {
|
2011-04-08 13:18:54 +10:00
|
|
|
int nvalid;
|
2011-04-11 15:05:45 +10:00
|
|
|
int first;
|
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
// player never invalidates their equipped weapons
|
2011-04-11 15:05:45 +10:00
|
|
|
if (isplayer(lf) && gotweapon) {
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
first = lastweaponidx+1;
|
2011-04-11 15:05:45 +10:00
|
|
|
} else {
|
|
|
|
first = 0;
|
|
|
|
}
|
2011-04-08 13:18:54 +10:00
|
|
|
|
|
|
|
nvalid = 0;
|
|
|
|
for (i = 0; i < nweps; i++) {
|
|
|
|
if (validwep[i]) nvalid++;
|
|
|
|
}
|
|
|
|
|
2011-04-11 15:05:45 +10:00
|
|
|
while (nvalid > maxattacks) {
|
2011-04-08 13:18:54 +10:00
|
|
|
int sel;
|
|
|
|
// mark a random one as invalid
|
2011-04-11 15:05:45 +10:00
|
|
|
sel = rnd(first,nweps-1);
|
2011-04-08 13:18:54 +10:00
|
|
|
while (!validwep[sel]) {
|
2011-04-11 15:05:45 +10:00
|
|
|
sel = rnd(first,nweps-1);
|
2011-04-08 13:18:54 +10:00
|
|
|
}
|
|
|
|
validwep[sel] = B_FALSE;
|
|
|
|
|
|
|
|
// re-count...
|
|
|
|
nvalid = 0;
|
|
|
|
for (i = 0; i < nweps; i++) {
|
|
|
|
if (validwep[i]) nvalid++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
// remember initial cells
|
2011-04-08 13:18:54 +10:00
|
|
|
for (i = 0; i < nweps; i++) {
|
|
|
|
if (validwep[i]) {
|
|
|
|
if (attacktype == AT_LF) {
|
2011-04-11 15:05:45 +10:00
|
|
|
if (!isdead((lifeform_t *)attacktarget)) {
|
2011-04-14 09:44:29 +10:00
|
|
|
if (attacklf(lf, (lifeform_t *)attacktarget, wep[i], damflag[i])) break;
|
2011-04-11 15:05:45 +10:00
|
|
|
}
|
2011-04-08 13:18:54 +10:00
|
|
|
} else if (attacktype == AT_OB) {
|
2011-04-14 09:44:29 +10:00
|
|
|
if (attackob(lf, (object_t *)attacktarget, wep[i], damflag[i])) break;
|
2011-04-08 13:18:54 +10:00
|
|
|
}
|
|
|
|
}
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
|
|
|
|
// stop attacking if they somehow got out of range
|
|
|
|
// (eg. dodging)
|
|
|
|
if (attacktype == AT_LF) {
|
|
|
|
if (getcelldist(lf->cell, ((lifeform_t *)attacktarget)->cell) > 1) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2011-04-08 13:18:54 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
// now kill all temp obs
|
|
|
|
if (op) {
|
|
|
|
killobpile(op);
|
|
|
|
}
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
|
|
|
|
// now stop hiding
|
|
|
|
killflagsofid(lf->flags, F_HIDING);
|
2011-02-01 06:16:13 +11:00
|
|
|
return B_FALSE;
|
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
int attacklf(lifeform_t *lf, lifeform_t *victim, object_t *wep, flag_t *damflag) {
|
2011-02-16 05:21:33 +11:00
|
|
|
int dam[100];
|
2011-02-01 06:16:13 +11:00
|
|
|
enum DAMTYPE damtype[100];
|
|
|
|
int ndam = 0;
|
2010-12-02 12:17:54 +11:00
|
|
|
char buf[BUFLEN];
|
|
|
|
char attackername[BUFLEN];
|
|
|
|
char victimname[BUFLEN];
|
|
|
|
int fatal = B_FALSE;
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
int deflected = B_FALSE;
|
2011-03-24 16:09:31 +11:00
|
|
|
int firstisbackstab = B_FALSE;
|
2010-12-07 18:34:26 +11:00
|
|
|
int hit = B_FALSE;
|
2011-03-04 12:22:36 +11:00
|
|
|
int critical = 0;
|
2010-12-07 18:34:26 +11:00
|
|
|
char wepname[BUFLEN];
|
2011-03-04 12:22:36 +11:00
|
|
|
//int acc;
|
|
|
|
//int ev;
|
2011-02-01 06:16:13 +11:00
|
|
|
int i;
|
2011-02-16 05:21:33 +11:00
|
|
|
int willheal = B_FALSE;
|
2011-04-08 13:18:54 +10:00
|
|
|
int isunarmed = B_FALSE;
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
int aidb = B_FALSE;
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
if (lfhasflag(lf, F_DEBUG)) {
|
|
|
|
aidb = B_TRUE;
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
if (hasflag(wep->flags, F_UNARMEDWEP)) {
|
|
|
|
isunarmed = B_TRUE;
|
|
|
|
}
|
|
|
|
|
2011-03-22 18:06:28 +11:00
|
|
|
moveeffects(lf);
|
|
|
|
|
|
|
|
if (isdead(lf)) {
|
|
|
|
return B_TRUE;
|
|
|
|
}
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
// get names
|
2010-12-02 12:17:54 +11:00
|
|
|
getlfname(lf, attackername);
|
2011-03-04 12:22:36 +11:00
|
|
|
|
|
|
|
if (lf == victim) {
|
|
|
|
if (isplayer(lf)) {
|
|
|
|
strcpy(victimname, "yourself");
|
|
|
|
} else {
|
|
|
|
strcpy(victimname, "itself");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
getlfname(victim, victimname);
|
|
|
|
}
|
2010-12-02 12:17:54 +11:00
|
|
|
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
if (aidb) dblog(".oO { trying to attack %s }", victimname);
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
getobname(wep, wepname, 1);
|
2010-12-02 12:17:54 +11:00
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
if (aidb) dblog(".oO { my weapon is %s }", wepname);
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
|
|
|
|
if (lf->race->raceclass->id == RC_INSECT) {
|
|
|
|
if (hasactivespell(victim, OT_S_REPELINSECTS)) {
|
|
|
|
if (isplayer(lf)) {
|
|
|
|
msg("Something prevents you from attacking %s!", victimname);
|
|
|
|
} else if (cansee(player, lf)) {
|
|
|
|
msg("Something prevents %s from attacking %s!", attackername, victimname);
|
|
|
|
}
|
|
|
|
taketime(lf, getattackspeed(lf));
|
|
|
|
return B_FALSE;
|
|
|
|
}
|
|
|
|
}
|
2010-12-07 18:34:26 +11:00
|
|
|
|
|
|
|
// did you hit?
|
2011-02-01 06:16:13 +11:00
|
|
|
ndam = 0;
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
hit = rolltohit(lf, victim, wep, &critical);
|
|
|
|
|
|
|
|
// deflection?
|
|
|
|
if (hit) {
|
|
|
|
object_t *dwep;
|
|
|
|
dwep = isdualweilding(victim);
|
|
|
|
if (dwep && (getskill(victim, SK_TWOWEAPON) >= PR_MASTER)) {
|
|
|
|
if (onein(4)) {
|
|
|
|
deflected = B_TRUE;
|
|
|
|
hit = B_FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (hit) {
|
2011-02-01 06:16:13 +11:00
|
|
|
if (aidb) dblog(".oO { i hit! }");
|
|
|
|
|
|
|
|
// special case
|
|
|
|
if (isplayer(lf) && (victim->race->id == R_GLOWBUG)) {
|
|
|
|
if ((wep->type->id == OT_EMPTYFLASK) || (wep->type->id == OT_EMPTYVIAL)) {
|
|
|
|
object_t *o;
|
|
|
|
// catch the glowbug!
|
|
|
|
msg("You catch %s in your %s.", victimname, noprefix(wepname));
|
|
|
|
removeob(wep, 1);
|
|
|
|
killlf(victim); // don't leave a corpse
|
|
|
|
o = addob(lf->pack, "glowing flask");
|
|
|
|
if (o) {
|
|
|
|
getobname(o, buf, o->amt);
|
2011-03-04 12:22:36 +11:00
|
|
|
msgnocap("%c - %s.",o->letter, buf);
|
2011-02-01 06:16:13 +11:00
|
|
|
} else {
|
|
|
|
// add to the ground
|
|
|
|
o = addob(lf->cell->obpile, "glowing flask");
|
|
|
|
if (o) {
|
|
|
|
getobname(o, buf, o->amt);
|
|
|
|
msg("%s drops to the ground.", buf);
|
|
|
|
}
|
|
|
|
}
|
2011-04-14 09:44:29 +10:00
|
|
|
// stop all further attacks
|
|
|
|
return B_TRUE;
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// determine base damage
|
|
|
|
|
|
|
|
// determine damage
|
2011-04-11 15:05:45 +10:00
|
|
|
dam[0] = getdamroll(wep, victim, damflag);
|
|
|
|
if (critical) {
|
|
|
|
// critical hit means an extra damage roll.
|
2011-04-08 13:18:54 +10:00
|
|
|
dam[0] += getdamroll(wep, victim, damflag);
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
2011-03-24 16:09:31 +11:00
|
|
|
if (aidb) dblog("rolled dam[%d] = %d",0,dam[0]);
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
if (dam[0] < 0) {
|
2011-02-16 05:21:33 +11:00
|
|
|
willheal = B_TRUE;
|
|
|
|
}
|
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
// damtype?
|
|
|
|
damtype[0] = getdamtype(wep);
|
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
if (!willheal) {
|
2011-03-24 16:09:31 +11:00
|
|
|
enum SKILLLEVEL slev;
|
|
|
|
skill_t *sk;
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
float loremult;
|
2011-03-24 16:09:31 +11:00
|
|
|
// blessed vs undead
|
|
|
|
if (isblessed(wep) && lfhasflagval(victim, F_DTVULN, DT_HOLY, NA, NA, NULL)) {
|
|
|
|
// a little extra damage
|
|
|
|
dam[0] = (int) ( (float)dam[0] * 1.25 );
|
|
|
|
}
|
2011-02-16 05:21:33 +11:00
|
|
|
// modify for strength
|
2011-03-11 12:25:38 +11:00
|
|
|
if (!hasflag(wep->flags, F_NOSTRDAMMOD) && !lfhasflag(lf, F_NOSTRDAMMOD)) {
|
2011-03-24 16:09:31 +11:00
|
|
|
dam[0] = (int)((float)dam[0] * getstrdammod(lf));
|
|
|
|
}
|
|
|
|
// backstab?
|
|
|
|
if ((damtype[0] == DT_PIERCE) && // using a stabbing weapon
|
|
|
|
getskill(lf, SK_BACKSTAB) && // able to backstab
|
|
|
|
!cansee(victim, lf) && // victim can't see us
|
|
|
|
!lfhasflagval(victim, F_STABBEDBY, lf->id, NA, NA, NULL) && // haven't stabbed them before
|
|
|
|
!lfhasflagval(victim, F_TARGET, lf->id, NA, NA, NULL) // victim isnt attacking us
|
|
|
|
) {
|
|
|
|
addflag(victim->flags, F_STABBEDBY, lf->id, NA, NA, NULL);
|
|
|
|
dam[0] *= (getskill(lf, SK_BACKSTAB)*2);
|
|
|
|
firstisbackstab = B_TRUE;
|
|
|
|
}
|
|
|
|
// extra damage for being skilled?
|
|
|
|
sk = getobskill(wep);
|
|
|
|
if (sk) {
|
|
|
|
slev = getskill(lf, sk->id);
|
|
|
|
if (slev > 1) {
|
|
|
|
float pctextra;
|
|
|
|
pctextra = ((slev - 1) * 10);
|
|
|
|
dam[0] += pctof(pctextra, dam[0]);
|
|
|
|
}
|
2011-03-11 12:25:38 +11:00
|
|
|
}
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
// bonus for knowledge about the other lf's race? applied LAST.
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
slev = getlorelevel(lf, victim->race->raceclass->id);
|
|
|
|
if (slev == PR_INEPT) {
|
|
|
|
loremult = 1;
|
|
|
|
} else {
|
|
|
|
loremult = 1 + (slev * 0.1);
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
}
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
dam[0] = (int) ( (float)dam[0] * loremult );
|
2011-02-16 05:21:33 +11:00
|
|
|
}
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
if (aidb) dblog(".oO { dealing %d %s damage }", dam[0], getdamname(damtype[0]));
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
ndam = 1;
|
|
|
|
// determine extra damage for flaming etc.
|
2011-04-01 10:54:44 +11:00
|
|
|
// getextradam from USER too
|
2011-02-16 05:21:33 +11:00
|
|
|
if (!willheal) {
|
2011-04-01 10:54:44 +11:00
|
|
|
getextradamwep(wep, &dam[0], &damtype[0], &ndam);
|
|
|
|
getextradamlf(lf, &dam[0], &damtype[0], &ndam);
|
2011-02-16 05:21:33 +11:00
|
|
|
}
|
2011-04-01 10:54:44 +11:00
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
} else {
|
|
|
|
hit = B_FALSE;
|
2011-02-01 06:16:13 +11:00
|
|
|
ndam = 0;
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
if (ndam > 0) {
|
2011-03-04 12:22:36 +11:00
|
|
|
flag_t *f;
|
2011-02-01 06:16:13 +11:00
|
|
|
for (i = 0; i < ndam; i++) {
|
|
|
|
int reduceamt;
|
2011-03-24 16:09:31 +11:00
|
|
|
int backstab = B_FALSE;
|
2011-04-01 10:54:44 +11:00
|
|
|
flag_t *rust;
|
2011-03-24 16:09:31 +11:00
|
|
|
|
|
|
|
if (firstisbackstab && (i == 0)) backstab = B_TRUE;
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
//dblog("initial dam[%d] = %d",i,dam[i]);
|
2010-12-07 18:34:26 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
if (lfhasflag(lf, F_HEAVYBLOW) || hasflag(wep->flags, F_HEAVYBLOW)) {
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
dam[i] = (int)pctof(110,dam[i]);
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
//dblog("heavy blow makes dam[%d] = %d",i,dam[i]);
|
2011-03-04 12:22:36 +11:00
|
|
|
}
|
|
|
|
|
2011-04-01 10:54:44 +11:00
|
|
|
// modify for rust
|
|
|
|
rust = hasflag(wep->flags, F_RUSTED);
|
|
|
|
if (rust) {
|
|
|
|
switch (damtype[i]) {
|
|
|
|
case DT_PIERCE:
|
|
|
|
case DT_SLASH:
|
|
|
|
if (rust->val[0] >= R_TRUSTY) {
|
|
|
|
dam[i] -= (pctof(50, dam[i]));
|
|
|
|
} else if (rust->val[0] >= R_VRUSTY) {
|
|
|
|
dam[i] -= (pctof(25, dam[i]));
|
|
|
|
} else {
|
|
|
|
dam[i] -= (pctof(10, dam[i]));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// modify based on resistances
|
|
|
|
adjustdamlf(victim, &dam[i], damtype[i]);
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
//dblog("adjusted for lf to dam[%d] = %d",i,dam[i]);
|
2010-12-07 18:34:26 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
if (!backstab) {
|
|
|
|
// modify for defender's armour
|
|
|
|
reduceamt = getarmourdamreduction(victim, wep, dam[i], damtype[i]);
|
2011-03-04 12:22:36 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
applyarmourdamreduction(victim, wep, reduceamt, &dam[i], damtype[i]);
|
2010-12-07 18:34:26 +11:00
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
//dblog("reduced by armour to dam[%d] = %d",i,dam[i]);
|
2011-03-24 16:09:31 +11:00
|
|
|
}
|
2010-12-07 18:34:26 +11:00
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// will this hit be fatal?
|
|
|
|
if (dam[i] >= victim->hp) {
|
|
|
|
fatal = B_TRUE;
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// announce it
|
|
|
|
if (isplayer(lf)) {
|
|
|
|
char extradambuf[BUFLEN];
|
2011-04-11 15:05:45 +10:00
|
|
|
char withwep[BUFLEN];
|
2011-02-16 05:21:33 +11:00
|
|
|
char *verb;
|
2011-04-11 15:05:45 +10:00
|
|
|
|
|
|
|
strcpy(extradambuf, "");
|
|
|
|
|
|
|
|
if (wep && !ismeleeweapon(wep)) {
|
|
|
|
sprintf(withwep, " with %s", wepname);
|
|
|
|
} else {
|
|
|
|
strcpy(withwep, "");
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
if (dam[i] == 0) {
|
|
|
|
strcpy(extradambuf, " but do no damage");
|
|
|
|
} else if (lfhasflag(player, F_EXTRAINFO) || lfhasflag(player, F_OMNIPOTENT) ) {
|
|
|
|
sprintf(extradambuf, " [%d dmg]",dam[i]);
|
|
|
|
} else {
|
|
|
|
strcpy(extradambuf, "");
|
|
|
|
}
|
2011-02-16 05:21:33 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
if (backstab && (i == 0)) {
|
|
|
|
verb = strdup("backstab");
|
|
|
|
} else if (fatal) {
|
2011-04-11 15:05:45 +10:00
|
|
|
verb = getkillverb(victim, wep, damtype[i], dam[i], victim->maxhp);
|
2011-02-16 05:21:33 +11:00
|
|
|
} else {
|
2011-03-22 18:06:28 +11:00
|
|
|
verb = getattackverb(lf, wep, damtype[i], dam[i], victim->maxhp);
|
2011-02-16 05:21:33 +11:00
|
|
|
}
|
2011-04-11 15:05:45 +10:00
|
|
|
warn("You %s %s%s%s%s",
|
2011-02-16 05:21:33 +11:00
|
|
|
verb,
|
2011-04-11 15:05:45 +10:00
|
|
|
victimname, withwep,extradambuf,
|
2011-03-24 16:09:31 +11:00
|
|
|
(fatal || backstab) ? "!" : ".");
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
if (fatal && strstr(verb, "behead")) {
|
|
|
|
addflag(victim->flags, F_BEHEADED, B_TRUE, NA, NA, NULL);
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
if (fatal && !hasflag(victim->flags, F_NODEATHANNOUNCE)) {
|
|
|
|
// don't also say "the xx dies"
|
|
|
|
addflag(victim->flags, F_NODEATHANNOUNCE, B_TRUE, NA, NA, NULL);
|
|
|
|
}
|
2011-03-24 16:09:31 +11:00
|
|
|
if (!strcmp(verb, "backstab")) {
|
|
|
|
free(verb);
|
|
|
|
}
|
2011-02-01 06:16:13 +11:00
|
|
|
} else {
|
2011-03-16 15:45:46 +11:00
|
|
|
if (cansee(player, lf) || isplayer(victim)) {
|
2011-02-01 06:16:13 +11:00
|
|
|
char withwep[BUFLEN];
|
|
|
|
char attackverb[BUFLEN];
|
|
|
|
char nodamstr[BUFLEN];
|
|
|
|
|
|
|
|
// capitalise first letter
|
2011-03-24 16:09:31 +11:00
|
|
|
strcpy(buf, attackername);
|
2011-02-01 06:16:13 +11:00
|
|
|
capitalise(buf);
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
if (wep && !isunarmed && (lf->race->id != R_DANCINGWEAPON) && cansee(player, lf)) {
|
2011-02-01 06:16:13 +11:00
|
|
|
sprintf(withwep, " with %s", wepname);
|
|
|
|
} else {
|
|
|
|
strcpy(withwep, "");
|
|
|
|
}
|
|
|
|
|
2011-03-22 18:06:28 +11:00
|
|
|
strcpy(attackverb, getattackverb(lf, wep, damtype[i],dam[i],victim->maxhp));
|
2011-02-01 06:16:13 +11:00
|
|
|
if ((dam[i] == 0) && (damtype[i] != DT_TOUCH)) {
|
|
|
|
strcpy(nodamstr, " but does no damage");
|
|
|
|
} else {
|
|
|
|
strcpy(nodamstr, "");
|
|
|
|
}
|
|
|
|
warn("%s %s%s %s%s%s.", buf, attackverb,
|
2011-03-24 16:09:31 +11:00
|
|
|
needses(attackverb) ? "es" : "s",
|
2011-02-01 06:16:13 +11:00
|
|
|
victimname,withwep, nodamstr);
|
2011-03-24 16:09:31 +11:00
|
|
|
}
|
|
|
|
noise(lf->cell, lf, "sounds of fighting.", NULL);
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
2010-12-07 18:34:26 +11:00
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
|
|
|
|
if (willheal) {
|
2011-03-16 15:45:46 +11:00
|
|
|
if (cansee(player, victim)) {
|
2011-02-16 05:21:33 +11:00
|
|
|
flag_t *f;
|
|
|
|
msg("%s is healed!",victimname);
|
|
|
|
f = hasflag(wep->flags, F_BALANCE);
|
|
|
|
if (f) {
|
|
|
|
f->known = B_TRUE;
|
|
|
|
}
|
|
|
|
gainhp(victim, dam[i]);
|
|
|
|
}
|
2011-02-01 06:16:13 +11:00
|
|
|
} else {
|
2011-03-10 16:47:18 +11:00
|
|
|
char attackername2[BUFLEN];
|
|
|
|
real_getlfname(lf, attackername2, B_FALSE);
|
2011-02-16 05:21:33 +11:00
|
|
|
// victim loses hp
|
|
|
|
// don't adjust damage - we've already done that
|
2011-04-08 13:18:54 +10:00
|
|
|
if (wep && !isunarmed) {
|
2011-02-16 05:21:33 +11:00
|
|
|
char wepname[BUFLEN];
|
|
|
|
getobname(wep, wepname, 1);
|
2011-03-10 16:47:18 +11:00
|
|
|
sprintf(buf, "%s^%s %s",attackername2,
|
2011-03-04 12:22:36 +11:00
|
|
|
(lf == victim) ? "using" : "weilding",
|
|
|
|
wepname);
|
2011-02-16 05:21:33 +11:00
|
|
|
} else {
|
2011-03-10 16:47:18 +11:00
|
|
|
strcpy(buf, attackername2);
|
2011-02-16 05:21:33 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
losehp_real(victim, dam[i], damtype[i], lf, buf, B_FALSE);
|
|
|
|
|
|
|
|
// victim's armour loses hp
|
|
|
|
if (reduceamt) {
|
2011-03-04 12:22:36 +11:00
|
|
|
applyarmourdamage(victim, wep, reduceamt, damtype[i]);
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} // end foreach damtype
|
|
|
|
|
|
|
|
// special weapon effects
|
2011-04-08 13:18:54 +10:00
|
|
|
wepeffects(wep->flags, victim->cell, damflag, dam[0]);
|
2011-02-16 05:21:33 +11:00
|
|
|
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
// other effects
|
2011-02-16 05:21:33 +11:00
|
|
|
if (!isdead(victim)) {
|
2011-04-08 13:18:54 +10:00
|
|
|
if (isunarmed) {
|
2011-02-16 05:21:33 +11:00
|
|
|
f = lfhasflag(lf, F_FREEZINGTOUCH);
|
|
|
|
if (f) {
|
|
|
|
// victim turns to ice for a while!
|
|
|
|
freezelf(victim, lf, rnd(5,10));
|
|
|
|
killflag(f);
|
|
|
|
}
|
|
|
|
}
|
2011-03-04 12:22:36 +11:00
|
|
|
|
|
|
|
f = lfhasflag(lf, F_QUICKBITE);
|
|
|
|
if (f) {
|
|
|
|
if (isbleeding(victim)) {
|
|
|
|
int dam;
|
|
|
|
char lfname[BUFLEN];
|
|
|
|
dam = rolldie(f->val[0], f->val[1]) + f->val[2];
|
2011-03-10 16:47:18 +11:00
|
|
|
real_getlfname(lf, lfname, B_FALSE);
|
2011-03-04 12:22:36 +11:00
|
|
|
losehp_real(victim, dam, DT_BITE, lf, lfname, B_FALSE);
|
2011-03-16 15:45:46 +11:00
|
|
|
if (isplayer(victim) || cansee(player, victim)) {
|
2011-03-04 12:22:36 +11:00
|
|
|
msg("%s bites %s!", lfname, victimname);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
f = lfhasflag(lf, F_PACKATTACK);
|
|
|
|
if (f) {
|
|
|
|
int dir;
|
|
|
|
cell_t *c;
|
|
|
|
int nmatched = 0;
|
|
|
|
// count adjacent allies of name xx
|
|
|
|
for (dir = DC_N; dir <= DC_NW; dir++) {
|
|
|
|
c = getcellindir(victim->cell, dir);
|
|
|
|
if (c && c->lf) {
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
if (c->lf->race->baseid == lf->race->baseid) {
|
2011-03-04 12:22:36 +11:00
|
|
|
nmatched++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (nmatched >= f->val[2]) {
|
|
|
|
char damstring[BUFLEN];
|
|
|
|
sprintf(damstring, "a %s pack", f->text);
|
|
|
|
losehp(victim, f->val[0], f->val[1], lf, damstring);
|
2011-03-16 15:45:46 +11:00
|
|
|
if (isplayer(victim) || cansee(player, victim)) {
|
2011-03-04 12:22:36 +11:00
|
|
|
msg("The %s pack attacks %s!", f->text, victimname);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
// critical hit effects
|
|
|
|
if (critical) {
|
|
|
|
if (lfhasflag(lf, F_CRITKNOCKDOWN)) {
|
|
|
|
fall(victim, lf, B_TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-03-22 18:06:28 +11:00
|
|
|
// confer flags from attacker?
|
2011-04-08 13:18:54 +10:00
|
|
|
wepeffects(lf->flags, victim->cell, damflag, dam[0]);
|
2011-03-22 18:06:28 +11:00
|
|
|
|
|
|
|
// special lifeform-based effects
|
|
|
|
if ((lf->race->id == R_COCKATRICE) && dam[0]) {
|
|
|
|
// first saving throw...
|
|
|
|
if (skillcheck(victim, SC_CON, 25, 0)) {
|
|
|
|
// slowed
|
2011-04-14 09:44:29 +10:00
|
|
|
addtempflag(victim->flags, F_SLOWACTMOVE, 15, NA, NA, NULL, 2);
|
2011-03-22 18:06:28 +11:00
|
|
|
} else {
|
|
|
|
// second saving throw...
|
|
|
|
if (skillcheck(victim, SC_CON, 25, 0)) {
|
|
|
|
// paralyzed
|
|
|
|
addtempflag(victim->flags, F_PARALYZED, B_TRUE, NA, NA, NULL, 5);
|
|
|
|
} else {
|
|
|
|
if (!lfhasflag(lf, F_BEINGSTONED)) {
|
|
|
|
// stoned!
|
|
|
|
addflag(victim->flags, F_BEINGSTONED, 2, NA, NA, NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
} else if ((lf->race->id == R_STIRGE) || (lf->race->id == R_LEECH)) {
|
|
|
|
// automatically latch on
|
|
|
|
if (!lfhasflag(victim, F_NONCORPOREAL) && !hasflag(lf->flags, F_ATTACHEDTO)) {
|
|
|
|
addflag(lf->flags, F_ATTACHEDTO, victim->id, NA, NA, NULL);
|
|
|
|
}
|
2011-03-22 18:06:28 +11:00
|
|
|
}
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
}
|
2011-03-22 18:06:28 +11:00
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
// retaliation happens even if victim died
|
|
|
|
for (f = victim->flags->first ; f ; f = f->next) {
|
|
|
|
if (f->id == F_RETALIATE) {
|
|
|
|
int rdam;
|
|
|
|
char damstring[BUFLEN];
|
|
|
|
rdam = rolldie(f->val[0], f->val[1]);
|
|
|
|
if (cansee(player, victim)) {
|
|
|
|
msg("%s%s %s %s %s!", victimname, getpossessive(victimname),
|
|
|
|
noprefix(f->text),
|
|
|
|
getattackverb(victim, NULL, f->val[2], rdam, lf->maxhp),
|
|
|
|
attackername);
|
|
|
|
}
|
|
|
|
sprintf(damstring, "%s%s %s", victimname, getpossessive(victimname), noprefix(f->text));
|
|
|
|
losehp(lf, rdam, f->val[2], victim, damstring);
|
|
|
|
}
|
2011-02-16 05:21:33 +11:00
|
|
|
}
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
} else { // miss!
|
2011-02-01 06:16:13 +11:00
|
|
|
if (aidb) dblog(".oO { i missed! }");
|
2010-12-07 18:34:26 +11:00
|
|
|
// announce it
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
if (deflected) {
|
|
|
|
if (cansee(player, lf)) {
|
|
|
|
msg("%s deflect%s %s%s attack.", victimname, isplayer(victim) ? "" : "s",attackername, getpossessive(attackername));
|
|
|
|
}
|
|
|
|
} else if (lfhasflag(victim, F_MAGSHIELD) && ismetal(wep->material->id)) {
|
2011-03-16 15:45:46 +11:00
|
|
|
if (isplayer(lf) || cansee(player, lf)) {
|
2010-12-07 18:34:26 +11:00
|
|
|
sprintf(buf, "%s",attackername);
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
msg("%s%s magnetic shield repels %s%s attack.", victimname, getpossessive(victimname),
|
|
|
|
buf, getpossessive(buf));
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (isplayer(lf)) {
|
|
|
|
msg("You miss %s.", victimname);
|
|
|
|
} else {
|
2011-03-16 15:45:46 +11:00
|
|
|
if (cansee(player, lf)) {
|
2011-02-01 06:16:13 +11:00
|
|
|
// capitalise first letter
|
|
|
|
sprintf(buf, "%s",attackername);
|
|
|
|
|
|
|
|
msg("%s misses %s.", buf, victimname);
|
|
|
|
}
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
2011-03-04 12:22:36 +11:00
|
|
|
|
|
|
|
if (lfhasflag(victim, F_DODGES)) {
|
|
|
|
cell_t *adj;
|
|
|
|
|
2011-04-06 17:27:55 +10:00
|
|
|
adj = getrandomadjcell(victim->cell, WE_WALKABLE, B_NOEXPAND);
|
2011-03-24 16:09:31 +11:00
|
|
|
if (adj) {
|
|
|
|
flag_t *f;
|
|
|
|
f = addflag(victim->flags, F_NOTIME, B_TRUE, NA, NA, NULL);
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
moveto(victim, adj, B_FALSE, B_FALSE);
|
2011-03-24 16:09:31 +11:00
|
|
|
msg("%s dodge%s!",victimname,isplayer(victim) ? "" : "s");
|
|
|
|
killflag(f);
|
|
|
|
}
|
2011-03-04 12:22:36 +11:00
|
|
|
|
|
|
|
}
|
2010-12-02 12:17:54 +11:00
|
|
|
}
|
2010-12-07 18:34:26 +11:00
|
|
|
fightback(victim, lf);
|
|
|
|
}
|
|
|
|
|
2011-04-01 10:54:44 +11:00
|
|
|
// practice?
|
|
|
|
if (hit) {
|
|
|
|
skill_t *sk;
|
|
|
|
// extra damage for being skilled?
|
|
|
|
sk = getobskill(wep);
|
|
|
|
if (sk && !getskill(lf, sk->id)) {
|
|
|
|
practice(lf, sk->id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// induction of fear?
|
|
|
|
if (!isdead(victim)) {
|
|
|
|
if (lfhasflag(victim, F_INDUCEFEAR)) {
|
2011-04-14 09:44:29 +10:00
|
|
|
if (cansee(lf, victim)) {
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
scare(lf, victim, rnd(2,3), 0);
|
2011-04-14 09:44:29 +10:00
|
|
|
}
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
2010-12-02 12:17:54 +11:00
|
|
|
}
|
2011-02-01 06:16:13 +11:00
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
// twoweapon?
|
|
|
|
if (hit) {
|
|
|
|
enum SKILLLEVEL slev;
|
|
|
|
slev = getskill(lf, SK_TWOWEAPON);
|
|
|
|
if (slev >= PR_SKILLED) {
|
|
|
|
object_t *secwep;
|
|
|
|
secwep = getsecmeleeweapon(lf);
|
|
|
|
// ie. if we are using two weapons, and the current one
|
|
|
|
// is the first...
|
|
|
|
if (secwep && (secwep != wep)) {
|
|
|
|
int bonus = 0;
|
|
|
|
// next hit will have enhanced accuracy
|
|
|
|
if (slev == PR_SKILLED) {
|
|
|
|
bonus = 10;
|
|
|
|
} else if (slev == PR_EXPERT) {
|
|
|
|
bonus = 25;
|
|
|
|
} else if (slev == PR_MASTER) {
|
|
|
|
bonus = 40;
|
|
|
|
}
|
|
|
|
if (bonus) {
|
|
|
|
addtempflag(lf->flags, F_ACCURACYMOD, bonus, NA, NA, NULL, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
if (aidb) dblog(".oO { doattack about to return B_FALSE }");
|
|
|
|
return B_FALSE;
|
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
int attackob(lifeform_t *lf, object_t *o, object_t *wep, flag_t *damflag) {
|
2011-02-16 05:21:33 +11:00
|
|
|
int dam[100];
|
2011-02-01 06:16:13 +11:00
|
|
|
enum DAMTYPE damtype[100];
|
|
|
|
int ndam = 0;
|
|
|
|
char attackername[BUFLEN];
|
|
|
|
char obname[BUFLEN];
|
|
|
|
flag_t *f;
|
2011-04-08 13:18:54 +10:00
|
|
|
int isunarmed = B_FALSE;
|
2011-02-01 06:16:13 +11:00
|
|
|
cell_t *obloc = NULL;
|
|
|
|
char wepname[BUFLEN];
|
|
|
|
int i;
|
|
|
|
//int aidb = B_TRUE;
|
|
|
|
int maxhp;
|
|
|
|
|
2011-03-22 18:06:28 +11:00
|
|
|
moveeffects(lf);
|
|
|
|
if (isdead(lf)) return B_TRUE;
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
// get names
|
|
|
|
getlfname(lf, attackername);
|
|
|
|
getobname(o, obname, o->amt);
|
|
|
|
|
|
|
|
// get target object details
|
|
|
|
obloc = o->pile->where;
|
|
|
|
f = hasflag(o->flags, F_OBHP);
|
|
|
|
if (f) {
|
|
|
|
maxhp = f->val[1];
|
|
|
|
} else {
|
|
|
|
maxhp = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
getobname(wep, wepname, 1);
|
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// don't need to figure out accuracy - we always hit.
|
|
|
|
|
|
|
|
// determine damage
|
|
|
|
ndam = 0;
|
|
|
|
//if (unarmedflag && (unarmedflag->val[0] != NA)) {
|
2011-04-08 13:18:54 +10:00
|
|
|
dam[ndam] = getdamroll(wep, NULL, damflag);
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
// modify for strength
|
|
|
|
if (!hasflag(wep->flags, F_NOSTRDAMMOD) && !lfhasflag(lf, F_NOSTRDAMMOD)) {
|
|
|
|
dam[ndam] = (int)((float)dam[ndam] * getstrdammod(lf));
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// damtype?
|
|
|
|
damtype[ndam] = getdamtype(wep);
|
|
|
|
ndam++;
|
|
|
|
|
|
|
|
// don't need to check for blessed vs mosnters
|
|
|
|
|
|
|
|
// determine extra damage
|
2011-04-01 10:54:44 +11:00
|
|
|
getextradamwep(wep, &dam[0], &damtype[0], &ndam);
|
|
|
|
getextradamlf(lf, &dam[0], &damtype[0], &ndam);
|
2011-03-04 12:22:36 +11:00
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
for (i = 0; i < ndam; i++) {
|
|
|
|
// announce the hit
|
|
|
|
if (isplayer(lf)) {
|
|
|
|
char extradambuf[BUFLEN];
|
|
|
|
if (lfhasflag(player, F_EXTRAINFO) || lfhasflag(player, F_OMNIPOTENT) ) {
|
|
|
|
sprintf(extradambuf, " [%d dmg]",dam[i]);
|
|
|
|
} else {
|
|
|
|
strcpy(extradambuf, "");
|
|
|
|
}
|
2011-03-22 18:06:28 +11:00
|
|
|
msg("You %s %s.", getattackverb(lf, wep, damtype[i], dam[i], maxhp),
|
2011-02-01 06:16:13 +11:00
|
|
|
obname, extradambuf);
|
2011-03-16 15:45:46 +11:00
|
|
|
} else if (cansee(player, lf)) {
|
2011-02-01 06:16:13 +11:00
|
|
|
char withwep[BUFLEN];
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
if (wep && !isunarmed && !isblind(player)) { // announce weapon used
|
2011-02-01 06:16:13 +11:00
|
|
|
sprintf(withwep, " with %s", wepname);
|
|
|
|
} else {
|
|
|
|
strcpy(withwep, "");
|
|
|
|
}
|
|
|
|
|
|
|
|
msg("%s %ss %s%s.", attackername,
|
2011-03-22 18:06:28 +11:00
|
|
|
getattackverb(lf, wep, damtype[i],dam[i],maxhp), obname,withwep);
|
2011-02-01 06:16:13 +11:00
|
|
|
} else {
|
2011-03-24 16:09:31 +11:00
|
|
|
noise(lf->cell, NULL, "sounds of fighting.", NULL);
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
if ((i == 0) && (wep->type->id == OT_FISTS) && hasflag(o->flags, F_HARD)) {
|
2011-03-04 12:22:36 +11:00
|
|
|
char buf[BUFLEN];
|
|
|
|
sprintf(buf, "punching %s", obname);
|
|
|
|
if ( losehp(lf, 1, DT_BASH, lf, buf)) {
|
|
|
|
if (isplayer(lf)) {
|
|
|
|
msg("Ow!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// object loses hp
|
|
|
|
takedamage(o, dam[i], damtype[i]);
|
|
|
|
|
|
|
|
} // end foreach damtype
|
|
|
|
|
|
|
|
// special weapon effects
|
2011-04-08 13:18:54 +10:00
|
|
|
wepeffects(wep->flags, obloc, damflag, dam[0]);
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
if (isunarmed) {
|
2011-03-16 15:45:46 +11:00
|
|
|
// touch effects
|
|
|
|
touch(lf, o);
|
|
|
|
} else {
|
|
|
|
// weapon gets damaged ?
|
|
|
|
if (wep && (ndam > 0)) {
|
|
|
|
switch (damtype[0]) {
|
|
|
|
case DT_PIERCE:
|
|
|
|
case DT_SLASH:
|
|
|
|
// weapon gets duller
|
|
|
|
if (rnd(1,2)) makeduller(wep, 1);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2011-03-04 12:22:36 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
return B_FALSE;
|
|
|
|
}
|
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
// returns the amount of damage the armour blocked...
|
|
|
|
int getarmourdamreduction(lifeform_t *lf, object_t *wep, int dam, enum DAMTYPE damtype) {
|
|
|
|
int reduceamt = 0;
|
|
|
|
float reducepct;
|
|
|
|
int ar;
|
2011-04-01 10:54:44 +11:00
|
|
|
object_t *o;
|
2011-03-04 12:22:36 +11:00
|
|
|
|
|
|
|
ar = getarmourrating(lf);
|
2011-04-01 10:54:44 +11:00
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
reducepct = getdamreducepct(ar);
|
|
|
|
reduceamt = (int) ceil((reducepct / 100.0) * (float)dam);
|
|
|
|
|
2011-04-01 10:54:44 +11:00
|
|
|
// special case
|
|
|
|
if (damtype == DT_PROJECTILE) {
|
|
|
|
o = getequippedob(lf->pack, BP_BODY);
|
|
|
|
if (o && (o->type->id == OT_FLAKJACKET)) {
|
|
|
|
// stop ALL missile damage
|
|
|
|
reduceamt = dam;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
if (reduceamt < 0) reduceamt = 0;
|
|
|
|
return reduceamt;
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
// returns a const char *
|
2011-03-22 18:06:28 +11:00
|
|
|
char *getattackverb(lifeform_t *lf, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp) {
|
2011-02-01 06:16:13 +11:00
|
|
|
float pct;
|
2011-03-22 18:06:28 +11:00
|
|
|
enum LFSIZE ownersize = SZ_HUMAN;
|
|
|
|
|
|
|
|
if (lf) {
|
|
|
|
ownersize = getlfsize(lf);
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
pct = (int)(((float) dam / (float) maxhp) * 100.0);
|
2011-03-22 18:06:28 +11:00
|
|
|
|
|
|
|
if (wep) {
|
|
|
|
flag_t *f;
|
2011-04-11 15:05:45 +10:00
|
|
|
for (f = wep->flags->first ; f ; f = f->next) {
|
|
|
|
if (f->id == F_ATTACKVERB) {
|
|
|
|
if ((f->val[0] == NA) && (f->val[1] == NA)) {
|
|
|
|
return f->text;
|
|
|
|
} else if (f->val[0]) {
|
|
|
|
if (pct >= f->val[0]) {
|
|
|
|
if (f->val[1] == NA) {
|
|
|
|
return f->text;
|
|
|
|
} else if (pct <= f->val[1]) {
|
|
|
|
return f->text;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (f->val[1]) {
|
|
|
|
if (pct <= f->val[1]) {
|
|
|
|
return f->text;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-03-22 18:06:28 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (damtype == DT_ACID) {
|
|
|
|
return "burn";
|
|
|
|
} else if (damtype == DT_BASH) {
|
2011-02-01 06:16:13 +11:00
|
|
|
if (pct <= 5) {
|
2011-03-10 16:47:18 +11:00
|
|
|
return "whack";
|
|
|
|
} else if (pct <= 20) {
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
if (onein(2)) {
|
2011-03-10 16:47:18 +11:00
|
|
|
return "hit";
|
|
|
|
} else {
|
|
|
|
return "bash";
|
|
|
|
}
|
2011-04-06 17:27:55 +10:00
|
|
|
} else if (pct <= 30) {
|
2011-03-10 16:47:18 +11:00
|
|
|
return "pummel";
|
2011-04-06 17:27:55 +10:00
|
|
|
} else {
|
|
|
|
return "slam";
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
2011-03-10 16:47:18 +11:00
|
|
|
} else if (damtype == DT_BITE) {
|
2011-03-22 18:06:28 +11:00
|
|
|
if (lf && (ownersize <= SZ_SMALL)) {
|
|
|
|
if (pct <= 5) {
|
|
|
|
return "nip";
|
|
|
|
} else if (pct <= 30) {
|
|
|
|
return "bite";
|
|
|
|
}
|
2011-02-01 06:16:13 +11:00
|
|
|
} else {
|
2011-03-22 18:06:28 +11:00
|
|
|
if (pct <= 5) {
|
|
|
|
return "gnaw";
|
|
|
|
} else if (pct <= 30) {
|
|
|
|
return "bite";
|
|
|
|
} else {
|
|
|
|
return "savage";
|
|
|
|
}
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
2010-12-07 18:34:26 +11:00
|
|
|
} else if (damtype == DT_CHOP) {
|
2011-02-01 06:16:13 +11:00
|
|
|
if (pct <= 5) {
|
2010-12-07 18:34:26 +11:00
|
|
|
return "hit";
|
2011-02-01 06:16:13 +11:00
|
|
|
} else if (pct <= 15) {
|
2010-12-07 18:34:26 +11:00
|
|
|
return "hack";
|
|
|
|
} else {
|
|
|
|
return "chop";
|
|
|
|
}
|
2011-03-10 16:47:18 +11:00
|
|
|
} else if (damtype == DT_COLD) {
|
|
|
|
if (pct <= 10) {
|
|
|
|
return "chill";
|
2010-12-07 18:34:26 +11:00
|
|
|
} else {
|
2011-03-10 16:47:18 +11:00
|
|
|
return "freeze";
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
2011-03-10 16:47:18 +11:00
|
|
|
} else if (damtype == DT_CRUSH) {
|
|
|
|
return "crush";
|
|
|
|
} else if (damtype == DT_ELECTRIC) {
|
2011-02-01 06:16:13 +11:00
|
|
|
if (pct <= 5) {
|
2011-03-10 16:47:18 +11:00
|
|
|
return "zap";
|
|
|
|
} else if (pct <= 15) {
|
|
|
|
return "jolt";
|
|
|
|
} else if (pct <= 20) {
|
|
|
|
return "shock";
|
2011-02-01 06:16:13 +11:00
|
|
|
} else if (pct <= 30) {
|
2011-03-10 16:47:18 +11:00
|
|
|
return "electrify";
|
2010-12-07 18:34:26 +11:00
|
|
|
} else {
|
2011-03-10 16:47:18 +11:00
|
|
|
return "electrocute";
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
2011-02-01 06:16:13 +11:00
|
|
|
} else if (damtype == DT_FIRE) {
|
|
|
|
if (pct <= 5) {
|
|
|
|
return "scorch";
|
|
|
|
} else if (pct <= 20) {
|
|
|
|
return "burn";
|
|
|
|
} else if (pct <= 40) {
|
|
|
|
return "scald";
|
|
|
|
} else {
|
|
|
|
return "incinerate";
|
|
|
|
}
|
2011-03-10 16:47:18 +11:00
|
|
|
} else if (damtype == DT_HOLY) {
|
|
|
|
switch (rnd(1,2)) {
|
|
|
|
case 1:
|
|
|
|
return "smite";
|
|
|
|
case 2:
|
|
|
|
return "cleanse";
|
|
|
|
}
|
|
|
|
} else if (damtype == DT_PIERCE) {
|
|
|
|
if (pct <= 5) {
|
|
|
|
return "poke";
|
|
|
|
} else if (pct <= 15) {
|
|
|
|
return "stab";
|
|
|
|
} else if (pct <= 30) {
|
|
|
|
return "pierce";
|
|
|
|
} else if (pct <= 40) {
|
|
|
|
return "spear";
|
2011-02-01 06:16:13 +11:00
|
|
|
} else {
|
2011-03-10 16:47:18 +11:00
|
|
|
return "deeply stab";
|
|
|
|
}
|
|
|
|
} else if (damtype == DT_POISONGAS) {
|
|
|
|
return "poison";
|
|
|
|
} else if (damtype == DT_PROJECTILE) {
|
|
|
|
return "hit";
|
|
|
|
} else if (damtype == DT_SLASH) {
|
|
|
|
if (pct <= 5) {
|
|
|
|
return "scratch";
|
|
|
|
} else if (pct <= 15) {
|
|
|
|
return "hit";
|
|
|
|
} else if (pct <= 30) {
|
|
|
|
return "slash";
|
|
|
|
} else {
|
|
|
|
return "slice";
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
2011-03-10 16:47:18 +11:00
|
|
|
} else if (damtype == DT_TOUCH) {
|
|
|
|
return "touch";
|
2011-03-04 12:22:36 +11:00
|
|
|
} else if (damtype == DT_UNARMED) {
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
if (onein(2)) {
|
2011-03-04 12:22:36 +11:00
|
|
|
return "punch";
|
|
|
|
} else {
|
|
|
|
return "hit";
|
|
|
|
}
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
|
|
|
return "hit";
|
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
/*
|
2011-02-01 06:16:13 +11:00
|
|
|
object_t *getattackwep(lifeform_t *lf, obpile_t **unarmedpile, flag_t **unarmedflag) {
|
|
|
|
object_t *wep;
|
|
|
|
|
|
|
|
wep = getweapon(lf);
|
|
|
|
if (!wep) {
|
|
|
|
// ie. unarmed
|
|
|
|
*unarmedpile = getunarmedweapon(lf, unarmedflag);
|
|
|
|
|
|
|
|
if ((*unarmedpile)->first) {
|
|
|
|
wep = (*unarmedpile)->first;
|
|
|
|
} else {
|
|
|
|
wep = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return wep;
|
|
|
|
}
|
2011-04-08 13:18:54 +10:00
|
|
|
*/
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
enum DAMTYPE getdamtype(object_t *wep) {
|
|
|
|
flag_t *f;
|
|
|
|
enum DAMTYPE dt = DT_NONE;
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
f = hasflag(wep->flags, F_DAM);
|
2011-02-01 06:16:13 +11:00
|
|
|
if (f) {
|
|
|
|
dt = f->val[0];
|
|
|
|
} else {
|
|
|
|
// default - you are just bashing with whatever
|
|
|
|
// you weilded.
|
|
|
|
dt = DT_BASH;
|
|
|
|
}
|
|
|
|
return dt;
|
|
|
|
}
|
|
|
|
|
2011-04-01 10:54:44 +11:00
|
|
|
int getextradamlf(lifeform_t *lf, int *dam, enum DAMTYPE *damtype, int *ndam) {
|
|
|
|
flag_t *f;
|
|
|
|
// special case - EXTRADAM goes onto INITIAL dam[] if the same type, rather than
|
|
|
|
// adding a new one.
|
|
|
|
for (f = lf->flags->first ; f ; f = f->next) {
|
|
|
|
if (f->id == F_EXTRADAM) {
|
|
|
|
int *damwhere;
|
|
|
|
int *damtypewhere;
|
|
|
|
int doinc = B_FALSE;
|
|
|
|
|
|
|
|
if ((f->val[0] == NA) || (f->val[0] == *damtype)) {
|
|
|
|
damwhere = dam;
|
|
|
|
damtypewhere = damtype;
|
|
|
|
*(damwhere) += roll(f->text); // addition
|
|
|
|
} else {
|
|
|
|
damwhere = (dam + *ndam);
|
|
|
|
damtypewhere = (damtype + *ndam);
|
|
|
|
*(damwhere) = roll(f->text); // set
|
|
|
|
doinc = B_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
*(damtypewhere) = f->val[0];
|
|
|
|
|
|
|
|
if ((f->lifetime == FROMOBEQUIP) ||
|
|
|
|
(f->lifetime == FROMOBHOLD) ||
|
|
|
|
(f->lifetime == FROMOBACTIVATE) ) {
|
|
|
|
object_t *obfrom;
|
|
|
|
obfrom = findobbyid(lf->pack, f->obfrom);
|
|
|
|
if (obfrom) {
|
|
|
|
int bonusdam = 0;
|
|
|
|
sumflags(obfrom->flags, F_BONUS, &bonusdam, NULL, NULL);
|
|
|
|
*(damwhere) += bonusdam;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (doinc) {
|
|
|
|
(*ndam)++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return *dam;
|
|
|
|
}
|
|
|
|
|
|
|
|
int getextradamwep(object_t *wep, int *dam, enum DAMTYPE *damtype, int *ndam) {
|
2011-02-01 06:16:13 +11:00
|
|
|
flag_t *f;
|
|
|
|
for (f = wep->flags->first ; f ; f = f->next) {
|
|
|
|
if (f->id == F_ONFIRE) {
|
2011-04-01 10:54:44 +11:00
|
|
|
*(dam + *ndam) = rolldie(2,6);
|
2011-03-04 12:22:36 +11:00
|
|
|
*(damtype + *ndam) = DT_FIRE;
|
|
|
|
(*ndam)++;
|
2011-04-01 10:54:44 +11:00
|
|
|
} else if (f->id == F_FROZEN) {
|
|
|
|
*(dam + *ndam) = rolldie(1,4);
|
|
|
|
*(damtype + *ndam) = DT_COLD;
|
|
|
|
(*ndam)++;
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return *dam;
|
|
|
|
}
|
|
|
|
|
2011-04-11 15:05:45 +10:00
|
|
|
char *getkillverb(lifeform_t *victim, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp) {
|
2011-02-01 06:16:13 +11:00
|
|
|
float pct;
|
|
|
|
pct = (int)(((float) dam / (float) maxhp) * 100.0);
|
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
if (victim->race->id == R_DANCINGWEAPON) {
|
|
|
|
return "defeat";
|
|
|
|
}
|
|
|
|
|
2011-04-11 15:05:45 +10:00
|
|
|
if (wep) {
|
|
|
|
flag_t *f;
|
|
|
|
for (f = wep->flags->first ; f ; f = f->next) {
|
|
|
|
if (f->id == F_KILLVERB) {
|
|
|
|
if ((f->val[0] == NA) && (f->val[1] == NA)) {
|
|
|
|
return f->text;
|
|
|
|
} else if (f->val[0]) {
|
|
|
|
if (pct >= f->val[0]) {
|
|
|
|
if (f->val[1] == NA) {
|
|
|
|
return f->text;
|
|
|
|
} else if (pct <= f->val[1]) {
|
|
|
|
return f->text;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (f->val[1]) {
|
|
|
|
if (pct <= f->val[1]) {
|
|
|
|
return f->text;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
if ((damtype == DT_BASH) && lfhasflag(victim, F_FROZEN)) {
|
|
|
|
return "shatter";
|
|
|
|
}
|
|
|
|
|
2011-03-10 16:47:18 +11:00
|
|
|
if (damtype == DT_CRUSH) {
|
|
|
|
return "crush";
|
|
|
|
}
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
if (damtype == DT_HOLY) {
|
|
|
|
return "smite";
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
if (pct >= 70) {
|
|
|
|
if (damtype == DT_PIERCE) return "impale";
|
|
|
|
if (damtype == DT_BASH) return "flatten";
|
2010-12-07 18:34:26 +11:00
|
|
|
if (damtype == DT_BITE) return "gore";
|
2011-02-16 05:21:33 +11:00
|
|
|
if (damtype == DT_SLASH) {
|
|
|
|
if (lfhasflagval(victim, F_NOBODYPART, BP_HEAD, NA, NA, NULL)) {
|
|
|
|
return "bisect";
|
|
|
|
} else {
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
if ((getlfsize(victim) >= SZ_MEDIUM) && onein(3)) {
|
2011-02-16 05:21:33 +11:00
|
|
|
return "behead";
|
|
|
|
} else {
|
|
|
|
return "bisect";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
return "kill";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
void getdamrange(flag_t *f, int *min, int *max) {
|
2010-12-07 18:34:26 +11:00
|
|
|
int mindam,maxdam;
|
|
|
|
|
|
|
|
if (f) {
|
|
|
|
int mod,ndice,sides;
|
2011-04-08 13:18:54 +10:00
|
|
|
texttodice(f->text, &ndice,&sides,&mod);
|
2010-12-07 18:34:26 +11:00
|
|
|
|
|
|
|
mindam = (ndice * 1) + mod;
|
|
|
|
maxdam = (ndice * sides) + mod;
|
|
|
|
} else {
|
2011-02-01 06:16:13 +11:00
|
|
|
// TODO wepaon does damage based on weight
|
2010-12-07 18:34:26 +11:00
|
|
|
mindam = 0;
|
|
|
|
maxdam = 0;
|
|
|
|
}
|
|
|
|
if (min) *min = mindam;
|
|
|
|
if (max) *max = maxdam;
|
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
/*
|
2011-02-16 05:21:33 +11:00
|
|
|
void getdamrangeunarmed(flag_t *f, int *min, int *max) {
|
2011-04-08 13:18:54 +10:00
|
|
|
obpile_t *op = NULL;
|
|
|
|
object_t *o = NULL;
|
|
|
|
flag_t *damflag = NULL;
|
|
|
|
|
|
|
|
if (strlen(f->text)) {
|
|
|
|
damflag = f;
|
|
|
|
} else {
|
|
|
|
objecttype_t *ot;
|
|
|
|
ot = findot(f->val[0]);
|
|
|
|
op = addobpile(NULL, NULL);
|
|
|
|
// create the fake weapon
|
|
|
|
o = addob(op, ot->name);
|
|
|
|
if (o) {
|
|
|
|
damflag = hasflag(o->flags, F_DAM);
|
2011-02-16 05:21:33 +11:00
|
|
|
}
|
2011-04-08 13:18:54 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (damflag) {
|
|
|
|
int ndice,nsides,mod;
|
|
|
|
texttodice(damflag->text, &ndice, &nsides, &mod);
|
2011-02-16 05:21:33 +11:00
|
|
|
|
|
|
|
if (min) *min = (ndice * 1) + mod;
|
|
|
|
if (max) *max = (ndice * nsides) + mod;
|
|
|
|
} else {
|
|
|
|
if (min) *min = 0;
|
|
|
|
if (max) *max = 0;
|
|
|
|
}
|
2011-04-08 13:18:54 +10:00
|
|
|
|
|
|
|
if (o) {
|
|
|
|
killob(o);
|
|
|
|
}
|
|
|
|
if (op) {
|
|
|
|
free(op);
|
|
|
|
}
|
2011-02-16 05:21:33 +11:00
|
|
|
}
|
2011-04-08 13:18:54 +10:00
|
|
|
*/
|
2011-02-16 05:21:33 +11:00
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
|
|
|
|
// roll for damage
|
2011-04-08 13:18:54 +10:00
|
|
|
int getdamroll(object_t *o, lifeform_t *victim, flag_t *damflag) {
|
2010-12-07 18:34:26 +11:00
|
|
|
int dam;
|
2011-04-01 10:54:44 +11:00
|
|
|
int bonusdam = 0;
|
2010-12-07 18:34:26 +11:00
|
|
|
flag_t *f;
|
2011-04-08 13:18:54 +10:00
|
|
|
|
|
|
|
if (damflag) {
|
|
|
|
dam = roll(damflag->text);
|
2011-02-01 06:16:13 +11:00
|
|
|
if (isblessed(o)) {
|
|
|
|
int dam2;
|
|
|
|
// blessed weapons get two rolls, and take the best
|
2011-04-08 13:18:54 +10:00
|
|
|
dam2 = roll(damflag->text);
|
2011-02-01 06:16:13 +11:00
|
|
|
if (dam2 > dam) dam = dam2;
|
|
|
|
} else if (iscursed(o)) {
|
|
|
|
int dam2;
|
|
|
|
// cursed weapons get two rolls, and take the worst
|
2011-04-08 13:18:54 +10:00
|
|
|
dam2 = roll(damflag->text);
|
2011-02-01 06:16:13 +11:00
|
|
|
if (dam2 < dam) dam = dam2;
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
|
|
|
} else {
|
2011-04-08 13:18:54 +10:00
|
|
|
// TODO weapon does bashing damage based on weight
|
2011-03-04 12:22:36 +11:00
|
|
|
dam = rnd(1,2);
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
// modify for bonus
|
2011-04-01 10:54:44 +11:00
|
|
|
sumflags(o->flags, F_BONUS, &bonusdam, NULL, NULL);
|
|
|
|
dam += bonusdam;
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
if (dam < 0) dam = 0;
|
|
|
|
|
2011-02-16 05:21:33 +11:00
|
|
|
// special effects ?
|
|
|
|
f = hasflag(o->flags, F_BALANCE);
|
|
|
|
if (f) {
|
|
|
|
lifeform_t *owner;
|
|
|
|
owner = o->pile->owner;
|
|
|
|
if (owner && victim) {
|
|
|
|
float ratio;
|
|
|
|
ratio = (float)owner->maxhp / (float)victim->maxhp;
|
|
|
|
|
|
|
|
if (ratio >= 1.25) {
|
|
|
|
// heals instead!
|
|
|
|
dam = -dam;
|
|
|
|
} else if (ratio <= 0.75) {
|
|
|
|
// extra dam!
|
|
|
|
dam = (int) ((float)dam * ratio);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
return dam;
|
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
float getdamreducepct(float armourrating) {
|
|
|
|
float reducepct;
|
|
|
|
reducepct = (armourrating * 1.5);
|
|
|
|
return reducepct;
|
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
/*
|
|
|
|
int getunarmeddamroll(flag_t *f) {
|
2011-02-01 06:16:13 +11:00
|
|
|
int dam;
|
|
|
|
flag_t *damflag = NULL;
|
|
|
|
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
if (f->text) {
|
|
|
|
// take damage from unarmed flag
|
|
|
|
damflag = f;
|
|
|
|
} else {
|
|
|
|
// take damage from wep type
|
|
|
|
objecttype_t *ot;
|
|
|
|
ot = findot(f->val[0]);
|
|
|
|
assert(ot);
|
|
|
|
damflag = hasflag(ot->flags, F_DAM);
|
2011-02-01 06:16:13 +11:00
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
dam = roll(damflag->text);
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
assert(dam < 1000);
|
|
|
|
assert(dam >= 0);
|
|
|
|
|
|
|
|
return dam;
|
|
|
|
}
|
2011-04-08 13:18:54 +10:00
|
|
|
*/
|
2011-02-01 06:16:13 +11:00
|
|
|
|
|
|
|
|
|
|
|
// returns a multiplier
|
|
|
|
float getstrdammod(lifeform_t *lf) {
|
|
|
|
float mod = 0;
|
|
|
|
float base;
|
|
|
|
// <9 = penalty
|
|
|
|
// 9,10,11,12 = average
|
|
|
|
// >12 = bonus
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
|
|
|
|
if (lfhasflag(lf, F_RAGE)) {
|
|
|
|
base = 20;
|
|
|
|
} else {
|
|
|
|
base = getattr(lf, A_STR);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
if ((base >= 9) && (base <= 12)) {
|
|
|
|
mod = 1;
|
|
|
|
} else if (base > 12) {
|
|
|
|
base -= 12; // ie. 1 - 6
|
|
|
|
|
|
|
|
// 13 = 1 = 1.1
|
|
|
|
// 14 = 2 = 1.2
|
|
|
|
// 15 = 3 = 1.3
|
|
|
|
// 16 = 4 = 1.4
|
|
|
|
// 17 = 5 = 1.6
|
|
|
|
// 18 = 6 = 1.5
|
|
|
|
|
|
|
|
mod = 1 + (base / 10.0);
|
|
|
|
} else { // ie. 0 through 8
|
|
|
|
// 0 = 0.1
|
|
|
|
// 1 = 0.2
|
|
|
|
// 2 = 0.3
|
|
|
|
// 3 = 0.4
|
|
|
|
// 4 = 0.5
|
|
|
|
// 5 = 0.6
|
|
|
|
// 6 = 0.7
|
|
|
|
// 7 = 0.8
|
|
|
|
// 8 = 0.9
|
|
|
|
|
|
|
|
mod = (base * 0.1); // ie. 8 -> 0.8 or 4 -> 0.4
|
|
|
|
mod += 0.1; // ie. 8 -> 0.9 or 4 -> 0.5
|
|
|
|
}
|
|
|
|
return mod;
|
|
|
|
}
|
|
|
|
|
2010-12-07 18:34:26 +11:00
|
|
|
|
|
|
|
// determine attack type for lifeform.
|
2011-02-01 06:16:13 +11:00
|
|
|
// allocate a pile and add weapon to it.
|
|
|
|
// return the pile. remember to free it!
|
2011-04-08 13:18:54 +10:00
|
|
|
/*
|
2011-02-01 06:16:13 +11:00
|
|
|
obpile_t *getunarmedweapon(lifeform_t *lf,flag_t **uflag) {
|
2010-12-07 18:34:26 +11:00
|
|
|
int nposs;
|
|
|
|
flag_t *f;
|
|
|
|
int sel;
|
|
|
|
char poss[MAXPILEOBS][BUFLEN];
|
2011-02-01 06:16:13 +11:00
|
|
|
obpile_t *op;
|
|
|
|
flag_t *possflag[MAXPILEOBS];
|
|
|
|
|
|
|
|
op = addobpile(NULL, NULL);
|
2010-12-07 18:34:26 +11:00
|
|
|
|
|
|
|
// pick a random attack type.
|
|
|
|
nposs = 0;
|
|
|
|
for (f = lf->flags->first ; f ; f = f->next) {
|
2011-02-01 06:16:13 +11:00
|
|
|
if (f->id == F_HASATTACK) {
|
2010-12-07 18:34:26 +11:00
|
|
|
strcpy(poss[nposs],f->text);
|
2011-02-01 06:16:13 +11:00
|
|
|
possflag[nposs] = f;
|
2010-12-07 18:34:26 +11:00
|
|
|
nposs++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (nposs > 0) {
|
2011-02-01 06:16:13 +11:00
|
|
|
object_t *uob;
|
2010-12-07 18:34:26 +11:00
|
|
|
sel = rnd(0,nposs-1);
|
2011-02-01 06:16:13 +11:00
|
|
|
uob = addob(op, poss[sel]);
|
|
|
|
assert(uob);
|
|
|
|
if (uflag) *uflag = possflag[sel];
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
|
|
|
|
2011-02-01 06:16:13 +11:00
|
|
|
if (!op->first) {
|
|
|
|
if (uflag) *uflag = NULL;
|
|
|
|
}
|
|
|
|
return op;
|
|
|
|
}
|
2011-04-08 13:18:54 +10:00
|
|
|
*/
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-04-06 17:27:55 +10:00
|
|
|
int isphysicaldam(enum DAMTYPE damtype) {
|
|
|
|
switch (damtype) {
|
|
|
|
case DT_BASH:
|
|
|
|
case DT_BITE:
|
|
|
|
case DT_CHOP:
|
|
|
|
case DT_COLD:
|
|
|
|
case DT_CRUSH:
|
|
|
|
case DT_ELECTRIC:
|
|
|
|
case DT_EXPLOSIVE:
|
|
|
|
case DT_FALL:
|
|
|
|
case DT_FIRE:
|
|
|
|
case DT_MAGIC:
|
|
|
|
case DT_PIERCE:
|
|
|
|
case DT_PROJECTILE:
|
|
|
|
case DT_SLASH:
|
|
|
|
case DT_UNARMED:
|
|
|
|
return B_TRUE;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return B_FALSE;
|
|
|
|
}
|
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
// returns true if we hit
|
2011-04-08 13:18:54 +10:00
|
|
|
int rolltohit(lifeform_t *lf, lifeform_t *victim, object_t *wep, int *critical) {
|
2011-03-04 12:22:36 +11:00
|
|
|
int acc,ev;
|
|
|
|
int gothit;
|
2011-03-22 18:06:28 +11:00
|
|
|
enum LFSIZE szlf,szvictim;
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
enum SKILLLEVEL slev;
|
|
|
|
int myroll;
|
2011-03-04 12:22:36 +11:00
|
|
|
|
|
|
|
if (critical) {
|
|
|
|
*critical = 0;
|
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
acc = getlfaccuracy(lf, wep);
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
if (isprone(victim)) {
|
|
|
|
acc += 30;
|
|
|
|
}
|
|
|
|
|
|
|
|
// remember lore about victim...
|
|
|
|
slev = getlorelevel(lf, victim->race->raceclass->id);
|
2011-03-04 12:22:36 +11:00
|
|
|
|
|
|
|
// modify for defender's evasion
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
if (isprone(victim)) {
|
|
|
|
ev = 0;
|
|
|
|
} else {
|
|
|
|
ev = getevasion(victim);
|
|
|
|
}
|
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
acc -= ev;
|
|
|
|
|
2011-04-11 15:05:45 +10:00
|
|
|
// special case
|
|
|
|
if (lfhasflag(victim, F_NONCORPOREAL) &&
|
|
|
|
!lfhasflag(lf, F_NONCORPOREAL) ) {
|
|
|
|
|
|
|
|
// using a magical or blessed weapon?
|
|
|
|
if (wep && (ismagical(wep) || isblessed(wep)) ) {
|
|
|
|
} else {
|
|
|
|
return B_FALSE; // automatic miss
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-03-22 18:06:28 +11:00
|
|
|
// size difference
|
|
|
|
szlf = getlfsize(lf);
|
|
|
|
szvictim = getlfsize(victim);
|
|
|
|
if (szvictim < szlf) {
|
|
|
|
// if defender is smaller...
|
|
|
|
// -7% per size difference
|
|
|
|
acc -= (7 * (szlf - szvictim));
|
|
|
|
} else if (szvictim > szlf) {
|
|
|
|
// if defender is bigger...
|
|
|
|
// +7% per size difference
|
|
|
|
acc += (7 * (szvictim - szlf));
|
|
|
|
}
|
|
|
|
|
2011-03-16 15:45:46 +11:00
|
|
|
// modify if we can't see the victim
|
|
|
|
if (!cansee(lf, victim)) {
|
|
|
|
acc -= 50;
|
|
|
|
}
|
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
// metal weapon versus magnetic shield?
|
|
|
|
if (lfhasflag(victim, F_MAGSHIELD) && ismetal(wep->material->id)) {
|
|
|
|
acc -= 45;
|
|
|
|
}
|
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
// victim immobile or asleep?
|
|
|
|
if (isimmobile(victim)) {
|
|
|
|
acc += 50;
|
|
|
|
}
|
|
|
|
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
// base 5% critical chance
|
2011-03-04 12:22:36 +11:00
|
|
|
if (critical) {
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
int critroll;
|
|
|
|
critroll = rnd(1,100);
|
|
|
|
|
|
|
|
// modify for lore
|
|
|
|
if (slev != PR_INEPT) {
|
|
|
|
myroll += (slev*5); // ie. up to 30% bonus
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (critroll >= 95) *critical = 1;
|
2011-03-04 12:22:36 +11:00
|
|
|
}
|
|
|
|
|
* [+] always add webs if there are randomly generated spiders on a level
- [+] non-wood doors
- [+] iron
- [+] only interrupt rest for hunger if it's 'starving' or 'vhungry'
- [+] limit the amount of jumping we can do from athletics skill.
- [+] no message when i lockpick with a -6 combat knife.
- [+] make small corpses give much less nutrition!
- [+] high unarmed skill should give you unarmed attacks with a
1-handed weapon.
- [+] dual weild
- [+] if you have twoweapon skill, when you weild a weapon, say
"weild as secondary weapon? y/n"
- [+] in attackcell(), check if we have a weapon in our second hand
AND are skilled in twoweaponing
- [+] if so, get an attack with both, but with an accuracy penalty
(until adept level)
- [+] make sure shiedl code doesn't accept weapons!
- [+] knockback() can now knock back other lfs that you hit on the way
* [+] faster resting obs (only via R)
- [+] replace F_RESTING with F_ASLEEP. v0 = onpurpose. if v0, you wake
up when at full hp/mp/etc
- [+] implement F_TRAINING with traincounter
- [+] don't say 'rest until nearby allies ar eheald' if they aren't
damaged
- [+] make listen dififculty check dependant on distance to noise
- [+] doesn't make sense for druid to be a vegetarian. use "can only
eat meat when hungry"
- [+] @@ - combine acc+dmg. ie. "weapon: mace (63%,2-9dmg)
- [+] @@ - show both weapons if dualweilding.
- [+] porcupine shoudl have F_SHARP corpse. implement F_CORPSEFLAGS
- [+] create monster - "giant ant" making "giant antlion"!
- [+] giant porcupine
- [+] implement
- [+] should attack ants on sight - f_hatesrace
- [+] if race=hatesrace or baserace = hatesrace, will attack it.
- [+] gust of wind - blow obs away!
- [+] thorns (grow spikes, attackers take dmg)
- [+] f_retaliate, v0=ndice,v1=dsides, v2=damype, text=obname
- [+] major healing (new spell)
2011-05-05 13:12:52 +10:00
|
|
|
limit(&acc, 0, 100);
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
|
2011-03-04 12:22:36 +11:00
|
|
|
//if (aidb) dblog(".oO { my modified chance to hit is %d %% }", acc);
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
myroll = rnd(1,100);
|
|
|
|
if (slev != PR_INEPT) {
|
|
|
|
myroll += (slev*10);
|
|
|
|
}
|
|
|
|
|
|
|
|
// modify for lore
|
|
|
|
if (myroll <= acc) {
|
2011-03-04 12:22:36 +11:00
|
|
|
gothit = B_TRUE;
|
|
|
|
} else {
|
|
|
|
if (critical && *critical) {
|
|
|
|
// turn a miss into a hit
|
|
|
|
gothit = B_TRUE;
|
|
|
|
} else {
|
|
|
|
gothit = B_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return gothit;
|
|
|
|
}
|
|
|
|
|
2011-04-08 13:18:54 +10:00
|
|
|
void wepeffects(flagpile_t *fp, cell_t *where, flag_t *damflag, int dam) {
|
2011-02-01 06:16:13 +11:00
|
|
|
flag_t *f;
|
|
|
|
lifeform_t *victim;
|
2011-03-04 12:22:36 +11:00
|
|
|
lifeform_t *owner;
|
2011-03-22 18:06:28 +11:00
|
|
|
object_t *wep;
|
|
|
|
|
|
|
|
if (!where) return;
|
2011-02-01 06:16:13 +11:00
|
|
|
|
2011-03-22 18:06:28 +11:00
|
|
|
wep = fp->ob;
|
2011-03-24 16:09:31 +11:00
|
|
|
if (wep) {
|
|
|
|
cell_t *c;
|
|
|
|
c = getoblocation(wep);
|
|
|
|
if (c && c->lf) {
|
|
|
|
owner = c->lf;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
owner = fp->owner;
|
|
|
|
}
|
2011-02-01 06:16:13 +11:00
|
|
|
victim = where->lf;
|
|
|
|
|
2011-03-22 18:06:28 +11:00
|
|
|
for (f = fp->first ; f ; f = f->next) {
|
2011-02-01 06:16:13 +11:00
|
|
|
if (f->id == F_FLAMESTRIKE) {
|
|
|
|
if (!hasob(where->obpile, OT_FIRESMALL)) {
|
|
|
|
// ignite!
|
|
|
|
addob(where->obpile, "small fire");
|
|
|
|
// announce
|
|
|
|
if (haslos(player, where)) {
|
|
|
|
msg("A column of fire erupts from the ground!");
|
|
|
|
f->known = B_KNOWN;
|
|
|
|
}
|
|
|
|
}
|
2011-02-16 05:21:33 +11:00
|
|
|
} else if ((f->id == F_REVENGE) && victim && !isdead(victim)) {
|
2011-03-24 16:09:31 +11:00
|
|
|
if (dam) { // only works if we did damage
|
|
|
|
lifeform_t *owner;
|
|
|
|
owner = wep->pile->owner;
|
|
|
|
if (owner && victim) {
|
|
|
|
float ratio;
|
|
|
|
float dampct;
|
|
|
|
int maxdam;
|
|
|
|
int extradam;
|
|
|
|
// figure out hp percentage
|
|
|
|
ratio = 1.0 - ((float)owner->hp / (float)owner->maxhp);
|
|
|
|
dampct = (ratio * 100); // ie. lower hp% = higher dampct
|
|
|
|
|
|
|
|
if (dampct >= 50) {
|
2011-04-08 13:18:54 +10:00
|
|
|
getdamrange(damflag, NULL, &maxdam);
|
2011-03-24 16:09:31 +11:00
|
|
|
extradam = (int)(dampct * (float)maxdam);
|
|
|
|
if (extradam > 0) {
|
|
|
|
char buf[BUFLEN];
|
|
|
|
char buf2[BUFLEN];
|
|
|
|
char obname[BUFLEN];
|
|
|
|
char damstring[BUFLEN];
|
|
|
|
char victimname[BUFLEN];
|
|
|
|
getlfname(owner, buf);
|
|
|
|
real_getlfname(owner, buf2, B_FALSE);
|
|
|
|
getlfname(victim, victimname);
|
|
|
|
getobname(wep, obname, 1);
|
|
|
|
|
|
|
|
// announce
|
|
|
|
if (isplayer(owner)) {
|
|
|
|
msg("Your %s blasts %s!",noprefix(obname),victimname);
|
|
|
|
f->known = B_TRUE;
|
|
|
|
} else if (cansee(player, owner)) {
|
|
|
|
msg("%s%s %s blasts %s!",buf, getpossessive(buf),noprefix(obname),victimname);
|
|
|
|
f->known = B_TRUE;
|
|
|
|
}
|
2011-02-16 05:21:33 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
sprintf(damstring, "%s%s blast of revenge",buf2, getpossessive(buf2));
|
|
|
|
losehp(victim, extradam, DT_DIRECT, owner, damstring);
|
|
|
|
}
|
|
|
|
} // end if dampct > 50
|
|
|
|
}
|
2011-02-16 05:21:33 +11:00
|
|
|
}
|
2011-04-06 17:27:55 +10:00
|
|
|
} else if ((f->id == F_DISARMATTACK) && victim && owner && !isdead(victim)) {
|
|
|
|
object_t *victimwep;
|
|
|
|
skill_t *sk;
|
|
|
|
int skillmod;
|
|
|
|
|
|
|
|
victimwep = getweapon(victim);
|
|
|
|
if (victimwep) {
|
|
|
|
sk = getobskill(wep);
|
|
|
|
if (sk) {
|
|
|
|
skillmod = getskill(owner, sk->id);
|
|
|
|
if (skillmod == 0) skillmod = -5;
|
|
|
|
} else {
|
|
|
|
skillmod = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (skillcheckvs(owner, SC_DEX, skillmod, victim, SC_SLIP, 0)) {
|
|
|
|
char lfname[BUFLEN];
|
|
|
|
char victimname[BUFLEN];
|
|
|
|
getlfname(owner,lfname);
|
|
|
|
getlfname(victim, victimname);
|
|
|
|
if (cansee(player, owner)) {
|
|
|
|
msg("%s disarm%s %s!",lfname, isplayer(owner) ? "" : "s", victimname);
|
|
|
|
}
|
|
|
|
drop(victimwep, ALL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if ((f->id == F_TRIPATTACK) && victim && owner && !isdead(victim)) {
|
|
|
|
skill_t *sk;
|
|
|
|
int skillmod;
|
|
|
|
sk = getobskill(wep);
|
|
|
|
if (sk) {
|
|
|
|
skillmod = getskill(owner, sk->id);
|
|
|
|
if (skillmod == 0) skillmod = -5;
|
|
|
|
} else {
|
|
|
|
skillmod = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (skillcheckvs(owner, SC_DEX, skillmod, victim, SC_SLIP, 0)) {
|
|
|
|
char lfname[BUFLEN];
|
|
|
|
char victimname[BUFLEN];
|
|
|
|
getlfname(owner,lfname);
|
|
|
|
getlfname(victim, victimname);
|
|
|
|
if (cansee(player, owner)) {
|
|
|
|
msg("%s trip%s %s.",lfname, isplayer(owner) ? "" : "s", victimname);
|
|
|
|
}
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
fall(victim, NULL, B_TRUE);
|
2011-04-06 17:27:55 +10:00
|
|
|
}
|
2011-03-04 12:22:36 +11:00
|
|
|
} else if ((f->id == F_HEAVYBLOW) && victim && owner) {
|
|
|
|
int dir;
|
|
|
|
// knock back victim
|
2011-03-24 16:09:31 +11:00
|
|
|
dir = getdirtowards(owner->cell, victim->cell, victim, B_FALSE, DT_COMPASS);
|
* [+] F_prone if you're knocked down
- [+] make sheilds very good against projectiles
- [+] make smoke just REDUCE vision, not block it.
- [+] noncorporeal should stop grabs!
* [+] don't say 'a javelin is damaged' when you throw it, just apply
the damge
- [+] increase damage bonus with every lore level. +10% each time
(ie. up to 50% at top)
* [+] give accuracy + critical bonus for lore levles too
- [+] typo: Enhance which skill enhance (1 left)? ['=next page,?=toggle]
- [+] Show Pain on botl.
* [+] more staves
- [+] low hitpoint warning for pets (or make them shriek, whine, etc)
- [+] CRITKNOCKDOWN
* [+] FINISH GRIZZLY
- [+] undead should be immune to poison!!
- [+] make code to auto add flags to undead.
- [+] if you ever move a door (ie. airblast), automatically open it.
- [+] young wolf shouldn't be able to open a door!
* [+] You throw a dart at the carpet snake. Your dart misses
you.--More--
- [+] no sprinting while burdneed
- [+] blood should be drawn BELOW stairs
- [+] weilded torch should do 1d4 fire damage (counts as a club)
* [+] The skeleton touches a leather belt then recoils in pain!The
skeleton drops a blessed leather belt.The skeleton puts on a
leather belt.
- [+] don't show "you can cast it at power level xxx" for abilities
* [+] more item randomising
- [+] make grey ooze splatter into acid
- [+] "the vine grabs you" if you walk onto an entangling vine.
- [+] don't start monsters within player's los
- [+] properly randomise sticks to snakes
- [+] stirge
- [+] leech (like stirge but can charge/leap, and slightly more hp /
damage)
- [+] treesnake
- [+] constrictor
- [+] cobra
- [+] stickes to snakes - make caster's weapon revert.
- [+] A something comes into view.
- [+] is invisibility code working properly when you see someone use
the invis spell?
- [+] don't include cosmetic objects in 'you see xxx'
* [+] monsters: don't use spells if you don't have lof.
- [+] pets not following around corners if you move diagonally. fixed a
little.
- [+] summon small animals (2-3 x SZ_SMALL)
* [+] jet of water
- [+] summon medium animals (2-4 x SZ_MEDIUM, wolf etc)
- [+] lightning storm (lightbning everyone within los, and more damage)
- [+] summon large animals (SZ_LARGE, horse, bear etc)
2011-05-03 17:34:07 +10:00
|
|
|
knockback(victim, dir , 2, owner, 30);
|
2011-03-04 12:22:36 +11:00
|
|
|
f->known = B_TRUE;
|
2011-03-22 18:06:28 +11:00
|
|
|
} else if ((f->id == F_HITCONFER) && victim ) {
|
2011-03-24 16:09:31 +11:00
|
|
|
// only works if we did damage
|
|
|
|
if (dam) {
|
|
|
|
enum FLAG fid;
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
int howlong;
|
|
|
|
flag_t *valflag = NULL;
|
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
fid = f->val[0];
|
2011-04-06 17:27:55 +10:00
|
|
|
// the f_poisoned flag stacks, others don't.
|
|
|
|
if (!lfhasflag(victim, fid) || (fid == F_POISONED)) {
|
2011-03-24 16:09:31 +11:00
|
|
|
int passedcheck = B_FALSE;
|
2011-04-01 10:54:44 +11:00
|
|
|
// do they get a saving throw?
|
|
|
|
if (f->val[1] != NA) {
|
2011-03-24 16:09:31 +11:00
|
|
|
int scdiff;
|
|
|
|
if (f->val[2] == NA) {
|
|
|
|
scdiff = 20; // default
|
|
|
|
} else {
|
|
|
|
scdiff = f->val[2];
|
|
|
|
}
|
|
|
|
if (skillcheck(victim, f->val[1], scdiff, 0)) {
|
|
|
|
passedcheck = B_TRUE;
|
|
|
|
}
|
2011-03-22 18:06:28 +11:00
|
|
|
}
|
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
if (!passedcheck) {
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
|
|
|
|
howlong = gethitconferlifetime(f->text, NULL, NULL);
|
|
|
|
|
|
|
|
// get conferred flag values
|
|
|
|
valflag = hasflag(f->pile, F_HITCONFERVALS);
|
2011-03-22 18:06:28 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
if (fid == F_POISONED) {
|
|
|
|
// need to fill in the name of what poisoned us
|
|
|
|
char frombuf[BUFLEN];
|
2011-04-14 09:44:29 +10:00
|
|
|
enum POISONTYPE ptype;
|
|
|
|
int ppower;
|
2011-03-24 16:09:31 +11:00
|
|
|
if (wep) {
|
|
|
|
if (owner) {
|
|
|
|
char lfname[BUFLEN];
|
|
|
|
char wepname[BUFLEN];
|
|
|
|
getlfnamea(owner, lfname);
|
|
|
|
getobname(wep, wepname, 1);
|
|
|
|
// ie. "a goblin's poisoned short sword"
|
|
|
|
sprintf(frombuf, "%s%s %s",lfname,getpossessive(lfname), wepname);
|
|
|
|
} else {
|
|
|
|
char wepname[BUFLEN];
|
|
|
|
getobname(wep, wepname, 1);
|
|
|
|
// ie "a poisoned short sword"
|
|
|
|
sprintf(frombuf, "%s", wepname);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
strcpy(frombuf, "something unknown");
|
|
|
|
}
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
|
|
|
|
|
|
|
|
if (valflag) {
|
|
|
|
ptype = valflag->val[0];
|
|
|
|
if (valflag->val[1] == NA) {
|
2011-04-14 09:44:29 +10:00
|
|
|
ppower = 1;
|
|
|
|
} else {
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
ppower = valflag->val[1];
|
2011-04-14 09:44:29 +10:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// should never happen.
|
|
|
|
ptype = P_VENOM;
|
|
|
|
ppower = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
poison(victim, howlong, ptype, ppower, frombuf);
|
2011-03-24 16:09:31 +11:00
|
|
|
} else {
|
* [+] bug: secret doors revealed when we walk away from them.
- [+] make lamps last heaps longer
* [+] web spell
* [+] spider monstrer
* [+] funnelweb:
* [+] redback:
- [+] if you are wracked with pain, don't clear msg
- [+] check rarity for spiders
* [+] attack/defense mod if there is stickiness in your square
- [+] replace "sticky" with "restrictive"
* [+] make some mosnters start hidden
- [+] adjust spot checks basd on distance
- [+] ensure that attacking stops you hiding
- [+] casting spells stops you from being hidden
- [+] hidden mosnters shouldn't move unless their victim is ADJACENT.
- [+] hidden mosnters shouldn't cast spells, throw missiles, etc unless
their victim is ADJACENT.
- [-] XP CALC
- [+] funnelweb and redback are the same.
- [+] check this is right...... i want funnel web to be worse.
- [+] make hitconfer check in calcxpval take lifetime into account
- [+] ALSO assign an xp rating to each hitconferred flag.
- [+] hardcode this.
* [+] entangle spell
- [+] reveal secret doors if you see them get damaged.
* [+] make askcoords list restrivitce objects
- [+] ACTUALLY make vines not damaged by struggling
* [+] object descriptions, a/an needs to change if showing condition:
"a battered entangling vine"
- [+] wizard levelled up and was prompted for "WISH, GIFT"! shouldn't
happen!
- [+] The human diety reads a blessed scroll of create monster! -- but
nothing happens??
* [+] throw code
- [+] wizard: ask for school specialty at start, from: fire, ice, xxx
? You get this + WILD.
- [+] describe varpower spells
- [+] fix mp cost for varpower spells
- [+] we're not stopping running at staircases anymore for some reason.
- [+] CHARGE ability (like swoop but don't return to original positino)
- [+] need to honor f_canlearn when displaying new skills to learn!
- [+] ai: if we are going to player's last known loc (via targetcell),
abandon if we can SEE the player!
- [+] make shatter() into a function
- [+] oil potion makes oil puddle whan smashed
- [+] make flammable objects be able to convert to others
- [+] replace 'magic item usage' with 'channeling'
- [+] a cloud of darkness descends. this is a *cursed* wand of light.
- [+] spiders shouldn't be able to be stuck in a web!
* [+] spells should be able to have MULTIPLE schools.
- [+] don't bleed into walls
- [+] in @M, use colours to show which spells are too hard so far (ie
cost > maxmp)
* [+] in @M, use schools that you know
* [+] after loading game, barbarian is getting an extra attack?
You miss the eyebat. You punch the eyebat.
- [+] show objects on top of stairs
- [+] stuck mosnters must pass a saving throw to follow you up/down
stairs
- [+] genericise: trytomove(lf)
* [+] add more snakes
- [+] undead can't eat or drink? or MOST undead can't.
* [+] why can MONSTERS shoot webs through things? (but I can't)
- [+] barkskin - doesn't reduce max mp enough?
- [+] The skeleton touches a fuming aqua potion [tried] then recoils in
pain!
The skeleton drops a blessed fuming aqua potion [tried].
The skeleton drinks a fuming aqua potion!
- [+] why can't i use abilites anymore?
- [+] infinite loop bug due to ai only having one ignorecell.
- [+] make sleet storms rust all armour
- [+] make a kind of walkdam that hits armour
- [+] add this as well as walkdam for: acid, fire, water
- [+] Takeoff isn't prompting properly. only showing weapons!
* [+] waterproof obs (ie cloak)
* [+] walkdambp doesn't hurt body if you have a cloak
NATURE SPELLS:
- [+] mending, heals 1d6 damage
- [+] spark
- [+] purify food
- [+] sticks to snakes
- [+] calm animals (power_d4 hd)
* [+] charm animal (works on one animal up to power hit dice, temporary)
- [+] airblast
- [+] barkskin (power +2 AR, firevuln, ongoing)
- [+] soften earth (makes ground into mud)
- [+] warp wood (damages wooden objects)
- [+] repel insects
- [+] reduce poison
- [+] web
- [+] windshield
- [+] call lightning, air
- [+] resist elements, ongoing
- [+] passwall
- [+] poisonbolt
- [+] quench (puts out a fire)
- [+] sleet storm (lowers movement, vision)
- [+] healing
- [+] cure poison
* [+] calming scent
- [+] dig
- [+] entangle
- [+] levitate
- [+] flamepillar
- [+] hailstorm. like sleetstorm but hurts more. power d 6.
- [+] burning wave
- [+] gaseous form
* [+] knowledge skills:
* [+] force makespellchoicelist() to show spells in level order.
* [+] druid
- [+] check OBJECT rarity list (dumplev)
- [+] fix bug where heaps of books suddently appear from dlev 3 onwards
- [+] gain skills on level up for some jobs
- [+] f_levspellschool, v0=lev, v1 = school or ANY - select one
from that school
2011-04-23 14:27:42 +10:00
|
|
|
flag_t *conferredflag;
|
|
|
|
conferredflag = addtempflag(victim->flags, fid, NA, NA, NA, NULL, howlong);
|
|
|
|
// flag values
|
|
|
|
if (valflag) {
|
|
|
|
conferredflag->val[0] = valflag->val[0];
|
|
|
|
conferredflag->val[1] = valflag->val[1];
|
|
|
|
conferredflag->val[2] = valflag->val[2];
|
|
|
|
free(conferredflag->text);
|
|
|
|
conferredflag->text = strdup(valflag->text);
|
|
|
|
}
|
2011-03-24 16:09:31 +11:00
|
|
|
}
|
|
|
|
} // end if passedcheck
|
|
|
|
} // end (if victim doesn't already have the flag)
|
2011-03-22 18:06:28 +11:00
|
|
|
|
2011-03-24 16:09:31 +11:00
|
|
|
// was this from a poisoned weapon? if so the poison vanishes
|
|
|
|
if ((f->val[0] == F_POISONED) && (f->lifetime == FROMOBMOD)) {
|
|
|
|
killflag(f);
|
|
|
|
}
|
2011-03-22 18:06:28 +11:00
|
|
|
}
|
|
|
|
} // end if (fid == hitconfer)
|
2010-12-07 18:34:26 +11:00
|
|
|
}
|
2011-03-22 18:06:28 +11:00
|
|
|
|
2010-12-02 12:17:54 +11:00
|
|
|
}
|