Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Destruction





BTW. I forgot to tell you that I've changed destructions damage. Desruction
couldn't be constructed to make this damage....

(just an example of 4x4 squares damage, damage=6 and
   SP_level_dam_adjust(op,SP_DESTRUCTION)=3 )


9  12 15 18

21 24 27 30

33 36 39 42

45 48 51 54


Shouldn't it be like this...

9  9  9  9

9  9  9  9

9  9  9  9

9  9  9  9


the line
  dam += SP_level_dam_adjust(op,SP_DESTRUCTION);

is increasing the damage after every square (with a monster) as it is
written now.
This would sometimes make 50 times damage in the lower right square ?

Should destruction be constructed like this ??


I've changed it to :

spell_effect.c

int cast_destruction(object *op, int dam, int attacktype) {
  int i,j;
  int r;    /*  peterm:  added to make area of effect level dep.  */
  object *tmp;
  if(op->type!=PLAYER)
     return 0;

  r=5 + SP_level_strength_adjust(op,SP_DESTRUCTION);
  dam += SP_level_dam_adjust(op,SP_DESTRUCTION); /* d1mag add damage here!! */

  for(i= -r;i<r;i++) {
    for(j= -r;j<r;j++) {
      if(out_of_map(op->map,op->x+i,op->y+j))
        continue;
      tmp=get_map_ob(op->map,op->x+i,op->y+j);
      while(tmp!=NULL&&(!QUERY_FLAG(tmp, FLAG_ALIVE)||tmp->type==PLAYER))
        tmp=tmp->above;
      if(tmp==NULL)
        continue;
      hit_player(tmp,dam,op,attacktype);
    }
  }
  return 1;
}


/Mag

-- 
|  Christian 'Mag' Magnusson		Computer Science and Engineering
|  Internet: d1mag@dtek.chalmers.se	Chalmers University of Technology
|  Amiga Programmer:	VoiXEL, HP28S-Com