--- deliantra/server/server/attack.c 2006/02/22 18:53:56 1.4 +++ deliantra/server/server/attack.c 2006/03/31 17:20:10 1.9 @@ -1191,15 +1191,10 @@ int rate; if(op->resist[ATNR_DRAIN] >= 0) - rate = 50 + op->resist[ATNR_DRAIN] / 2; - else if(op->resist[ATNR_DRAIN] < 0) - rate = 5000 / (100 - op->resist[ATNR_DRAIN]); + rate = 400 + op->resist[ATNR_DRAIN] * 3; + else + rate = 400 * 100 / (100 - op->resist[ATNR_DRAIN]); - /* full protection has no effect. Nothing else in this - * function needs to get done, so just return. */ - if(!rate) - return 0; - if(op->stats.exp <= rate) { if(op->type == GOLEM) dam = 999; /* Its force is "sucked" away. 8) */ @@ -1655,6 +1650,18 @@ if (QUERY_FLAG (op, FLAG_WIZ) || QUERY_FLAG (op, FLAG_NO_DAMAGE)) return 0; +#ifdef PROHIBIT_PLAYERKILL + if (op->type == PLAYER) { + object *owner = get_owner (hitter); + if (!owner) owner = hitter; + if (owner->type == PLAYER + && (!op_on_battleground (op, 0, 0) || op->contr->peaceful || op->contr->peaceful) + && op != owner) { + return 0; + } + } +#endif + op_tag = op->count; hitter_tag = hitter->count;