version 1.122 | | version 1.123 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.122 2006/03/18 15:05:37 ryo_saeba Exp $"; | | * "$Id: attack.c,v 1.123 2006/04/06 21:18:35 tchize Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
op = decrease_ob_nr (op, 1); | | op = decrease_ob_nr (op, 1); |
if (op) | | if (op) |
fix_stopped_item (op, m, originator); | | fix_stopped_item (op, m, originator); |
if((op = get_archetype(arch))!=NULL) { | | if((op = create_archetype(arch))!=NULL) { |
if(env) { | | if(env) { |
op->x=env->x,op->y=env->y; | | op->x=env->x,op->y=env->y; |
insert_ob_in_ob(op,env); | | insert_ob_in_ob(op,env); |
| | |
} | | } |
if(type&(AT_FIRE|AT_ELECTRICITY)) { | | if(type&(AT_FIRE|AT_ELECTRICITY)) { |
if(env) { | | if(env) { |
op=get_archetype("burnout"); | | op=create_archetype("burnout"); |
op->x=env->x,op->y=env->y; | | op->x=env->x,op->y=env->y; |
insert_ob_in_ob(op,env); | | insert_ob_in_ob(op,env); |
} else { | | } else { |
| | |
| | |
tmp = present_in_ob_by_name(FORCE,"confusion", op); | | tmp = present_in_ob_by_name(FORCE,"confusion", op); |
if(!tmp) { | | if(!tmp) { |
tmp = get_archetype(FORCE_NAME); | | tmp = create_archetype(FORCE_NAME); |
tmp = insert_ob_in_ob(tmp,op); | | tmp = insert_ob_in_ob(tmp,op); |
} | | } |
| | |
| | |
| | |
tmp = present_in_ob(BLINDNESS,op); | | tmp = present_in_ob(BLINDNESS,op); |
if(!tmp) { | | if(!tmp) { |
tmp = get_archetype("blindness"); | | tmp = create_archetype("blindness"); |
SET_FLAG(tmp, FLAG_BLIND); | | SET_FLAG(tmp, FLAG_BLIND); |
SET_FLAG(tmp, FLAG_APPLIED); | | SET_FLAG(tmp, FLAG_APPLIED); |
/* use floats so we don't lose too much precision due to rounding errors. | | /* use floats so we don't lose too much precision due to rounding errors. |