Difference for server/spell_effect.c from version 1.28 to 1.29


version 1.28 version 1.29
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_spell_effect_c =   * static char *rcsid_spell_effect_c =
  *   "$Id: spell_effect.c,v 1.28 2000/11/18 23:19:31 peterm Exp $";   *   "$Id: spell_effect.c,v 1.29 2000/11/19 07:33:30 peterm Exp $";
  */   */
   
   
Line 1139
 
Line 1139
     We should be able to have more than one thing in force! */      We should be able to have more than one thing in force! */
   force=get_archetype("force");    force=get_archetype("force");
   switch(spell_type) {    switch(spell_type) {
     case SP_RAGE:
       {
         if(tmp->type!=PLAYER)
    break;
         /* Str, Dex, Con */
         cast_change_attr(op,caster,dir,SP_HEROISM);
         /* haste */
         cast_change_attr(op,caster,dir,SP_HASTE);
         /* armour */
         cast_change_attr(op,caster,dir,SP_ARMOUR);
         /* regeneration */
         cast_change_attr(op,caster,dir,SP_REGENERATION);
         /* weapon class */
         force->stats.wc += SP_level_dam_adjust(op,caster,SP_BLESS);
   
         break;
       }
   case SP_STRENGTH:    case SP_STRENGTH:
     if(tmp->type!=PLAYER)      if(tmp->type!=PLAYER)
       break;        break;
Line 1175
 
Line 1192
   
     break;      break;
   case SP_ARMOUR: {    case SP_ARMOUR: {
    /* peterm, modified so that it uses my functions */     /* peterm, modified so that it uses level-depend functions */
     force->stats.ac=2+SP_level_dam_adjust(op,caster,spell_type);      force->stats.ac=2+SP_level_dam_adjust(op,caster,spell_type);
     if((tmp->stats.ac-force->stats.ac)<-20)       if((tmp->stats.ac-force->stats.ac)<-20)
  force->stats.ac=tmp->stats.ac+20;   force->stats.ac=tmp->stats.ac+20;
   
 /*    if(force->stats.ac>5)  
       force->stats.ac=5;  */  
     force->armour = 5+4*SP_level_dam_adjust(op,caster,spell_type);      force->armour = 5+4*SP_level_dam_adjust(op,caster,spell_type);
     if (force->armour > 25)      if (force->armour > 25)
       force->armour = 25;        force->armour = 25;
Line 1196
 
Line 1211
   case SP_HEROISM:    case SP_HEROISM:
     if (tmp->type != PLAYER)      if (tmp->type != PLAYER)
       break;        break;
 /*    if (tmp->contr->orig_stats.Str > 19)  
       force->stats.Str = 1;  
     else  
       force->stats.Str = 2;  
     if (tmp->contr->orig_stats.Con > 19)  
       force->stats.Con = 1;  
     else if (tmp->contr->orig_stats.Con > 15)  
       force->stats.Con = 2;  
     else  
       force->stats.Con = 3;  */  
   /*  peterm: heroism is much more elegantly implemented by  
  having it cast stat spells for con, str, dex.  Repeated  
  castings will make you more heroic, but only up to a point */  
     cast_change_attr(op,caster,dir,SP_STRENGTH);      cast_change_attr(op,caster,dir,SP_STRENGTH);
     cast_change_attr(op,caster,dir,SP_DEXTERITY);      cast_change_attr(op,caster,dir,SP_DEXTERITY);
     cast_change_attr(op,caster,dir,SP_CONSTITUTION);      cast_change_attr(op,caster,dir,SP_CONSTITUTION);
Line 3497
 
Line 3499
               
   
      
   void move_peacemaker(object *op) {
     object *tmp;
     char buf[MAX_BUF];
     for(tmp=get_map_ob(op->map,op->x,op->y);tmp!=NULL;tmp=tmp->above) {
       int atk_lev, def_lev, kill_lev;
       if(!QUERY_FLAG(tmp,FLAG_MONSTER)) continue;
       if(QUERY_FLAG(tmp,FLAG_UNAGGRESSIVE)) continue;
       if(tmp->stats.exp == 0) continue;
       def_lev = MAX(1,tmp->level);
       atk_lev = MAX(1,op->level);
       if(RANDOM() % atk_lev > def_lev) {
   
         /* make this sucker peaceful. */
         tmp->stats.dam = 0;
         add_exp(op,tmp->stats.exp);
         tmp->stats.exp=0;
         tmp->stats.sp = 0;
         tmp->stats.grace = 0;
         tmp->stats.Pow = 0;
         tmp->move_type = RANDO2;
         SET_FLAG(tmp,FLAG_UNAGGRESSIVE);
         SET_FLAG(tmp,FLAG_RUN_AWAY);
         SET_FLAG(tmp,FLAG_RANDOM_MOVE);
         CLEAR_FLAG(tmp,FLAG_MONSTER);
         if(tmp->name) {
    sprintf(buf,"%s no longer feels like fighting.",tmp->name);
    new_draw_info(NDI_UNIQUE,0,op->owner,buf);
         }
       }
     }
   }   
         
      


Legend:
line(s) removed in v.1.28 
line(s) changed
 line(s) added in v.1.29

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