version 1.59 | | version 1.60 |
---|
| | |
/* | | /* |
* static char *rcsid_skill_util_c = | | * static char *rcsid_skill_util_c = |
* "$Id: skill_util.c,v 1.59 2005/10/28 19:08:53 akirschbaum Exp $"; | | * "$Id: skill_util.c,v 1.60 2005/11/16 08:16:09 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
| | |
switch(skill->subtype) { | | switch(skill->subtype) { |
case SK_LEVITATION: | | case SK_LEVITATION: |
if(QUERY_FLAG(op,FLAG_FLYING)) { | | /* Not 100% sure if this will work with new movement code - |
CLEAR_FLAG(op,FLAG_FLYING); | | * the levitation skill has move_type for flying, so when |
| | * equipped, that should transfer to player, when not, |
| | * shouldn't. |
| | */ |
| | if(QUERY_FLAG(skill,FLAG_APPLIED)) { |
| | CLEAR_FLAG(skill,FLAG_APPLIED); |
new_draw_info(NDI_UNIQUE,0,op,"You come to earth."); | | new_draw_info(NDI_UNIQUE,0,op,"You come to earth."); |
} | | } |
else { | | else { |
SET_FLAG(op,FLAG_FLYING); | | SET_FLAG(skill,FLAG_APPLIED); |
new_draw_info(NDI_UNIQUE,0,op,"You rise into the air!."); | | new_draw_info(NDI_UNIQUE,0,op,"You rise into the air!."); |
} | | } |
| | fix_player(op); |
success=1; | | success=1; |
break; | | break; |
| | |
| | |
| | |
mflags = get_map_flags(m, &m, tx, ty, &tx, &ty); | | mflags = get_map_flags(m, &m, tx, ty, &tx, &ty); |
if (mflags & P_OUT_OF_MAP) return 0; | | if (mflags & P_OUT_OF_MAP) return 0; |
| | |
/* space must be blocked for there to be anything interesting to do */ | | /* space must be blocked for there to be anything interesting to do */ |
if (!(mflags & P_BLOCKED)) return 0; | | if (!OB_TYPE_MOVE_BLOCK(pl, GET_MAP_MOVE_BLOCK(m, tx,ty))) return 0; |
| | |
for(tmp=get_map_ob(m, tx, ty); tmp; tmp=tmp->above) | | for(tmp=get_map_ob(m, tx, ty); tmp; tmp=tmp->above) |
if((QUERY_FLAG(tmp,FLAG_ALIVE) && tmp->stats.hp>=0) | | if((QUERY_FLAG(tmp,FLAG_ALIVE) && tmp->stats.hp>=0) |
| | |
return skill_attack(NULL,op,dir,string, skill); | | return skill_attack(NULL,op,dir,string, skill); |
| | |
} | | } |
| | |