ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/attack.C
(Generate patch)

Comparing deliantra/server/server/attack.C (file contents):
Revision 1.31 by root, Thu Dec 21 23:37:05 2006 UTC vs.
Revision 1.32 by root, Fri Dec 22 16:34:00 2006 UTC

1190 else if (attacknum == ATNR_FEAR) 1190 else if (attacknum == ATNR_FEAR)
1191 scare_creature (op, hitter); 1191 scare_creature (op, hitter);
1192 else if (attacknum == ATNR_CANCELLATION) 1192 else if (attacknum == ATNR_CANCELLATION)
1193 cancellation (op); 1193 cancellation (op);
1194 else if (attacknum == ATNR_DEPLETE) 1194 else if (attacknum == ATNR_DEPLETE)
1195 drain_stat (op); 1195 op->drain_stat ();
1196 else if (attacknum == ATNR_BLIND && !QUERY_FLAG (op, FLAG_UNDEAD) && !QUERY_FLAG (op, FLAG_GENERATOR)) 1196 else if (attacknum == ATNR_BLIND && !QUERY_FLAG (op, FLAG_UNDEAD) && !QUERY_FLAG (op, FLAG_GENERATOR))
1197 blind_player (op, hitter, dam); 1197 blind_player (op, hitter, dam);
1198 } 1198 }
1199 dam = 0; /* These are all effects and don't do real damage */ 1199 dam = 0; /* These are all effects and don't do real damage */
1200 } 1200 }
1239 if (op->type == PLAYER) 1239 if (op->type == PLAYER)
1240 esrv_send_item (op, tmp); 1240 esrv_send_item (op, tmp);
1241 } 1241 }
1242 } 1242 }
1243 if (flag) 1243 if (flag)
1244 fix_player (op); /* Something was corroded */ 1244 op->update_stats (); /* Something was corroded */
1245 } 1245 }
1246 } 1246 }
1247 break; 1247 break;
1248 case ATNR_DRAIN: 1248 case ATNR_DRAIN:
1249 { 1249 {
1504 * player that the object belonged to - so if you killed another player 1504 * player that the object belonged to - so if you killed another player
1505 * with spells, pets, whatever, there was no penalty. 1505 * with spells, pets, whatever, there was no penalty.
1506 * Changed to make luck penalty configurable in settings. 1506 * Changed to make luck penalty configurable in settings.
1507 */ 1507 */
1508 if (op->type == PLAYER && owner != op && !battleg) 1508 if (op->type == PLAYER && owner != op && !battleg)
1509 change_luck (owner, -settings.pk_luck_penalty); 1509 owner->change_luck (-settings.pk_luck_penalty);
1510 1510
1511 /* This code below deals with finding the appropriate skill 1511 /* This code below deals with finding the appropriate skill
1512 * to credit exp to. This is a bit problematic - we should 1512 * to credit exp to. This is a bit problematic - we should
1513 * probably never really have to look at current_weapon->skill 1513 * probably never really have to look at current_weapon->skill
1514 */ 1514 */
2053 tmp->stats.Con = MAX (-(dam / 4 + 1), -10); 2053 tmp->stats.Con = MAX (-(dam / 4 + 1), -10);
2054 tmp->stats.Str = MAX (-(dam / 3 + 2), -10); 2054 tmp->stats.Str = MAX (-(dam / 3 + 2), -10);
2055 tmp->stats.Dex = MAX (-(dam / 6 + 1), -10); 2055 tmp->stats.Dex = MAX (-(dam / 6 + 1), -10);
2056 tmp->stats.Int = MAX (-dam / 7, -10); 2056 tmp->stats.Int = MAX (-dam / 7, -10);
2057 SET_FLAG (tmp, FLAG_APPLIED); 2057 SET_FLAG (tmp, FLAG_APPLIED);
2058 fix_player (op); 2058 op->update_stats ();
2059 new_draw_info (NDI_UNIQUE, 0, op, "You suddenly feel very ill."); 2059 new_draw_info (NDI_UNIQUE, 0, op, "You suddenly feel very ill.");
2060 } 2060 }
2061 if (hitter->type == PLAYER) 2061 if (hitter->type == PLAYER)
2062 new_draw_info_format (NDI_UNIQUE, 0, hitter, "You poison %s.", &op->name); 2062 new_draw_info_format (NDI_UNIQUE, 0, hitter, "You poison %s.", &op->name);
2063 else if (hitter->owner != NULL && hitter->owner->type == PLAYER) 2063 else if (hitter->owner != NULL && hitter->owner->type == PLAYER)
2087 } 2087 }
2088 else 2088 else
2089 tmp->stats.food++; 2089 tmp->stats.food++;
2090 SET_FLAG (tmp, FLAG_APPLIED); 2090 SET_FLAG (tmp, FLAG_APPLIED);
2091 tmp->speed_left = 0; 2091 tmp->speed_left = 0;
2092 fix_player (op); 2092 op->update_stats ();
2093} 2093}
2094 2094
2095void 2095void
2096confuse_player (object *op, object *hitter, int dam) 2096confuse_player (object *op, object *hitter, int dam)
2097{ 2097{
2141 */ 2141 */
2142 tmp->speed = tmp->speed * (100.0 - (float) op->resist[ATNR_BLIND]) / 100; 2142 tmp->speed = tmp->speed * (100.0 - (float) op->resist[ATNR_BLIND]) / 100;
2143 2143
2144 tmp = insert_ob_in_ob (tmp, op); 2144 tmp = insert_ob_in_ob (tmp, op);
2145 change_abil (op, tmp); /* Mostly to display any messages */ 2145 change_abil (op, tmp); /* Mostly to display any messages */
2146 fix_player (op); /* This takes care of some other stuff */ 2146 op->update_stats (); /* This takes care of some other stuff */
2147 2147
2148 if (hitter->owner) 2148 if (hitter->owner)
2149 owner = hitter->owner; 2149 owner = hitter->owner;
2150 else 2150 else
2151 owner = hitter; 2151 owner = hitter;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines