Difference for server/apply.c from version 1.165 to 1.166


version 1.165 version 1.166
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_apply_c =   * static char *rcsid_apply_c =
  *   "$Id: apply.c,v 1.165 2006/03/18 15:05:36 ryo_saeba Exp $";   *   "$Id: apply.c,v 1.166 2006/04/06 21:18:35 tchize Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 314
 
Line 314
     yield = get_ob_key_value(tmp,"on_use_yield");      yield = get_ob_key_value(tmp,"on_use_yield");
     if (yield != NULL)      if (yield != NULL)
     {      {
         object* drop = get_archetype(yield);          object* drop = create_archetype(yield);
         if (tmp->env)          if (tmp->env)
         {          {
             drop = insert_ob_in_ob(drop,tmp->env);              drop = insert_ob_in_ob(drop,tmp->env);
Line 446
 
Line 446
   
      new_draw_info(NDI_UNIQUE,0,op, "Yech!  Your lungs are on fire!");       new_draw_info(NDI_UNIQUE,0,op, "Yech!  Your lungs are on fire!");
             /* Explodes a fireball centered at player */              /* Explodes a fireball centered at player */
             fball = get_archetype(EXPLODING_FIREBALL);              fball = create_archetype(EXPLODING_FIREBALL);
             fball->dam_modifier=random_roll(1, op->level, op, PREFER_LOW)/5+1;              fball->dam_modifier=random_roll(1, op->level, op, PREFER_LOW)/5+1;
             fball->stats.maxhp=random_roll(1, op->level, op, PREFER_LOW)/10+2;              fball->stats.maxhp=random_roll(1, op->level, op, PREFER_LOW)/10+2;
             fball->x = op->x;              fball->x = op->x;
Line 465
 
Line 465
     force=NULL;      force=NULL;
     for (i=0; i<NROFATTACKS; i++) {      for (i=0; i<NROFATTACKS; i++) {
  if (tmp->resist[i]) {   if (tmp->resist[i]) {
      if (!force) force=get_archetype(FORCE_NAME);       if (!force) force=create_archetype(FORCE_NAME);
      memcpy(force->resist, tmp->resist, sizeof(tmp->resist));       memcpy(force->resist, tmp->resist, sizeof(tmp->resist));
      force->type=POTION_EFFECT;       force->type=POTION_EFFECT;
      break;  /* Only need to find one protection since we copy entire batch */       break;  /* Only need to find one protection since we copy entire batch */
Line 1632
 
Line 1632
   
  new_draw_info_format(NDI_UNIQUE, 0, originator, "The %s seems to be broken!", query_name(trap));   new_draw_info_format(NDI_UNIQUE, 0, originator, "The %s seems to be broken!", query_name(trap));
   
  op = get_archetype("burnout");   op = create_archetype("burnout");
  if (op != NULL) {   if (op != NULL) {
      op->x = trap->x;       op->x = trap->x;
      op->y = trap->y;       op->y = trap->y;
Line 2440
 
Line 2440
  * A valid 2 way exit means:   * A valid 2 way exit means:
  *   -You can come back (there is another exit at the other side)   *   -You can come back (there is another exit at the other side)
  *   -You are   *   -You are
  *         ° the owner of the exit   *          the owner of the exit
  *         ° or in the same party as the owner   *          or in the same party as the owner
  *   *
  * Note: a owner in a 2 way exit is saved as the owner's name   * Note: a owner in a 2 way exit is saved as the owner's name
  * in the field exit->name cause the field exit->owner doesn't   * in the field exit->name cause the field exit->owner doesn't
Line 3698
 
Line 3698
     int i, did_one=0;       int i, did_one=0;
     sint8 k;      sint8 k;
   
     force = get_archetype(FORCE_NAME);      force = create_archetype(FORCE_NAME);
   
     for (i=0; i < NUM_STATS; i++) {      for (i=0; i < NUM_STATS; i++) {
  k = get_attr_value(&food->stats, i);   k = get_attr_value(&food->stats, i);
Line 3840
 
Line 3840
  object *tmp;   object *tmp;
   
  new_draw_info(NDI_UNIQUE, 0,op,"Your spell warps!.");   new_draw_info(NDI_UNIQUE, 0,op,"Your spell warps!.");
  tmp=get_archetype(SPELL_WONDER);   tmp=create_archetype(SPELL_WONDER);
  cast_wonder(op, op, 0, tmp);   cast_wonder(op, op, 0, tmp);
  free_object(tmp);   free_object(tmp);
     } else if (failure <= -15&&failure > -35) {/* drain mana */      } else if (failure <= -15&&failure > -35) {/* drain mana */
Line 3860
 
Line 3860
      blind_player(op,op,power);       blind_player(op,op,power);
  } else if (failure <= -80) {/* blast the immediate area */   } else if (failure <= -80) {/* blast the immediate area */
      object *tmp;       object *tmp;
      tmp=get_archetype(LOOSE_MANA);       tmp=create_archetype(LOOSE_MANA);
      cast_magic_storm(op,tmp, power);       cast_magic_storm(op,tmp, power);
      new_draw_info(NDI_UNIQUE, 0,op,"You unlease uncontrolled mana!");       new_draw_info(NDI_UNIQUE, 0,op,"You unlease uncontrolled mana!");
      free_object(tmp);       free_object(tmp);
Line 4017
 
Line 4017
     got[len] = '\0';      got[len] = '\0';
   
     /* Now create new item, remove used ones when required. */      /* Now create new item, remove used ones when required. */
     new_item = get_archetype( got );      new_item = create_archetype( got );
     if ( !new_item )      if ( !new_item )
         {          {
         new_draw_info_format( NDI_UNIQUE, 0, pl, "This %s is strange, better to not use it.", query_base_name( marked, 0 ) );          new_draw_info_format( NDI_UNIQUE, 0, pl, "This %s is strange, better to not use it.", query_base_name( marked, 0 ) );


Legend:
line(s) removed in v.1.165 
line(s) changed
 line(s) added in v.1.166

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:22