Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re:Create Missile
- To:
- Subject: re:Create Missile
- From: "tuan (t.) doan" <>
- Date: Fri, 28 Oct 1994 17:21:00 -0500
- Cc: crossfire (at) ifi.uio.no
- Sender: "tuan (t.) doan" <>
- X400-Content-Type: P2-1984 (2)
- X400-MTS-Identifier: [/PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/;bcars735.b.348:28.09.94.22.22.02]
- X400-Originator: /dd.id=1627294/g=tuan/i=t/s=doan/@bnr.ca
- X400-Received: by mta bnr.ca in /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Fri, 28 Oct 1994 19:20:51 -0400
- X400-Received: by /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Fri, 28 Oct 1994 18:22:02 -0400
- X400-Received: by /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Fri, 28 Oct 1994 18:21:00 -0400
Hello,
I've got _a_ fix for the create missile problem; it's short so I'll
included here.
spell_effect.c :
int cast_create_missile(object *op, int dir, char *stringarg)
{
int missile_plus=0, missile_nrof;
char *missile_name = NULL;
archetype *at=NULL;
object *tmp, *missile=NULL, *weap=NULL;
for (tmp=op->inv; tmp != NULL; tmp=tmp->below)
if (tmp->type == BOW && QUERY_FLAG(tmp, FLAG_APPLIED))
weap= tmp;
if (weap==NULL) missile_name = "arrow";
else missile_name = weap->race;
if (!stringarg || ((1 + SP_level_strength_adjust(op, SP_CREATE_MISSILE)) -
(3 * missile_plus)) < 0)
missile_plus = SP_PARAMETERS[SP_CREATE_MISSILE].bdam +
SP_level_dam_adjust(op, SP_CREATE_MISSILE);
else
missile_plus = atoi(stringarg);
if (missile_plus > 4)
missile_plus = 4;
else if (missile_plus < -4)
missile_plus = -4;
missile_nrof = SP_PARAMETERS[SP_CREATE_MISSILE].bdur *
((1 + SP_level_strength_adjust(op, SP_CREATE_MISSILE)) -
(3 * missile_plus));
if (missile_nrof<0) {
draw_info(op,"Unable to create missile: bonus too high.");
return 0;
}
missile = get_object();
copy_object(&at->clone,missile);
missile->nrof = missile_nrof;
missile->magic = missile_plus;
SET_FLAG(missile, FLAG_IDENTIFIED);
if (!cast_create_obj(op,missile,dir))
pick_up(op, missile);
return 1;
}
Regards,
__ __/ / / __ / | / Tuan T. Doan
/ / / / / / | / IEC Layer Testing and Advance Technology
/ / / __ / / | / 2201 Lakeside Blvd. P.O. Box 833871
__/ ______/ __/ __/ __/ __/ Richardson, TX 75083-3871
"It's a kind of magic" -Highlander Phone: 6-444-4575/214-684-4575
Internet: Fax: 6-444-3716/214-684-3716