version 1.108 | | version 1.109 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.108 2005/07/26 00:23:00 akirschbaum Exp $"; | | * "$Id: attack.c,v 1.109 2005/08/12 13:46:34 ryo_saeba Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
*/ | | */ |
if(type&(AT_FIRE|AT_ELECTRICITY) | | if(type&(AT_FIRE|AT_ELECTRICITY) |
&&op->other_arch&&op->glow_radius) { | | &&op->other_arch&&op->glow_radius) { |
char *arch=op->other_arch->name; | | const char *arch=op->other_arch->name; |
| | |
op = decrease_ob_nr (op, 1); | | op = decrease_ob_nr (op, 1); |
if (op) | | if (op) |
| | |
{ | | { |
int simple_attack, roll, dam=0; | | int simple_attack, roll, dam=0; |
uint32 type; | | uint32 type; |
char *op_name = NULL; | | const char *op_name = NULL; |
tag_t op_tag, hitter_tag; | | tag_t op_tag, hitter_tag; |
event *evt; | | event *evt; |
| | |
| | |
CFP.Value[6] = &base_dam; | | CFP.Value[6] = &base_dam; |
CFP.Value[7] = &base_wc; | | CFP.Value[7] = &base_wc; |
CFP.Value[8] = &l; | | CFP.Value[8] = &l; |
CFP.Value[9] = evt->hook; | | CFP.Value[9] = (void*)evt->hook; |
CFP.Value[10]= evt->options; | | CFP.Value[10]= (void*)evt->options; |
if (findPlugin(evt->plugin)>=0) | | if (findPlugin(evt->plugin)>=0) |
((PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP)); | | ((PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP)); |
} | | } |
| | |
CFP.Value[6] = &base_dam; | | CFP.Value[6] = &base_dam; |
CFP.Value[7] = &base_wc; | | CFP.Value[7] = &base_wc; |
CFP.Value[8] = &l; | | CFP.Value[8] = &l; |
CFP.Value[9] = evt->hook; | | CFP.Value[9] = (void*)evt->hook; |
CFP.Value[10]= evt->options; | | CFP.Value[10]= (void*)evt->options; |
if (findPlugin(evt->plugin)>=0) | | if (findPlugin(evt->plugin)>=0) |
(PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP); | | (PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP); |
} | | } |
| | |
CFP.Value[6] = &(op->stats.dam); | | CFP.Value[6] = &(op->stats.dam); |
CFP.Value[7] = &(op->stats.wc); | | CFP.Value[7] = &(op->stats.wc); |
CFP.Value[8] = &l; | | CFP.Value[8] = &l; |
CFP.Value[9] = evt->hook; | | CFP.Value[9] = (void*)evt->hook; |
CFP.Value[10]= evt->options; | | CFP.Value[10]= (void*)evt->options; |
if (findPlugin(evt->plugin)>=0) | | if (findPlugin(evt->plugin)>=0) |
{ | | { |
CFR = (PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP); | | CFR = (PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP); |
| | |
*/ | | */ |
int kill_object(object *op,int dam, object *hitter, int type) | | int kill_object(object *op,int dam, object *hitter, int type) |
{ | | { |
char buf[MAX_BUF], *skill; | | char buf[MAX_BUF];
|
| | const char *skill; |
int maxdam=0; | | int maxdam=0; |
int battleg=0; /* true if op standing on battleground */ | | int battleg=0; /* true if op standing on battleground */ |
int pk=0; /* true if op and what controls hitter are both players*/ | | int pk=0; /* true if op and what controls hitter are both players*/ |
| | |
CFP.Value[6] = &m; | | CFP.Value[6] = &m; |
CFP.Value[7] = &m; | | CFP.Value[7] = &m; |
CFP.Value[8] = &l; | | CFP.Value[8] = &l; |
CFP.Value[9] = evt->hook; | | CFP.Value[9] = (void*)evt->hook; |
CFP.Value[10]= evt->options; | | CFP.Value[10]= (void*)evt->options; |
if (findPlugin(evt->plugin)>=0) | | if (findPlugin(evt->plugin)>=0) |
{ | | { |
CFR =(PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP); | | CFR =(PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP); |