1 | %{ |
1 | %{ |
2 | /* |
2 | /* |
3 | * static char *rcsid_object_c = |
3 | * static char *rcsid_object_c = |
4 | * "$Id: loader.l,v 1.6 2006/07/01 21:06:06 root Exp $"; |
4 | * "$Id: loader.l,v 1.7 2006/08/13 17:16:00 elmex Exp $"; |
5 | */ |
5 | */ |
6 | |
6 | |
7 | /* |
7 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
8 | CrossFire, A Multiplayer game for X-windows |
9 | |
9 | |
… | |
… | |
57 | * If you are adding a new spell, you should not modify this - you |
57 | * If you are adding a new spell, you should not modify this - you |
58 | * new spell won't have been used, and thus won't have any legacy object. |
58 | * new spell won't have been used, and thus won't have any legacy object. |
59 | * NULL entries in this table are valid - to denote objects that should |
59 | * NULL entries in this table are valid - to denote objects that should |
60 | * not be updated for whatever reason. |
60 | * not be updated for whatever reason. |
61 | */ |
61 | */ |
62 | const char *const spell_mapping[] = { |
62 | const char *spell_mapping[] = { |
63 | "spell_magic_bullet", /* 0 */ |
63 | "spell_magic_bullet", /* 0 */ |
64 | "spell_small_fireball", /* 1 */ |
64 | "spell_small_fireball", /* 1 */ |
65 | "spell_medium_fireball", /* 2 */ |
65 | "spell_medium_fireball", /* 2 */ |
66 | "spell_large_fireball", /* 3 */ |
66 | "spell_large_fireball", /* 3 */ |
67 | "spell_burning_hands", /* 4 */ |
67 | "spell_burning_hands", /* 4 */ |
… | |
… | |
984 | ^resist_disease{S} SET_RESIST(op, ATNR_DISEASE, IVAL); |
984 | ^resist_disease{S} SET_RESIST(op, ATNR_DISEASE, IVAL); |
985 | |
985 | |
986 | /* Old style resistances */ |
986 | /* Old style resistances */ |
987 | ^immune{S} set_protection(op, IVAL, RESIST_IMMUNE); |
987 | ^immune{S} set_protection(op, IVAL, RESIST_IMMUNE); |
988 | ^protected{S} set_protection(op, IVAL, RESIST_PROT); |
988 | ^protected{S} set_protection(op, IVAL, RESIST_PROT); |
989 | ^vulnerable{S} set_protection(op, IVAL, RESIST_VULN); |
989 | ^vulnerable{S} set_protection(op, IVAL, (uint16) RESIST_VULN); |
990 | |
990 | |
991 | /* old values - keep them around for now, but they should be removed at some point */ |
991 | /* old values - keep them around for now, but they should be removed at some point */ |
992 | ^has_ready_rod{S} SET_OR_CLEAR_FLAG(op, FLAG_READY_RANGE, IVAL); |
992 | ^has_ready_rod{S} SET_OR_CLEAR_FLAG(op, FLAG_READY_RANGE, IVAL); |
993 | ^has_ready_horn{S} SET_OR_CLEAR_FLAG(op, FLAG_READY_RANGE, IVAL); |
993 | ^has_ready_horn{S} SET_OR_CLEAR_FLAG(op, FLAG_READY_RANGE, IVAL); |
994 | ^has_ready_wand{S} SET_OR_CLEAR_FLAG(op, FLAG_READY_RANGE, IVAL); |
994 | ^has_ready_wand{S} SET_OR_CLEAR_FLAG(op, FLAG_READY_RANGE, IVAL); |
… | |
… | |
1033 | ^can_impale{S} { /* That these are for the new combat code */ } |
1033 | ^can_impale{S} { /* That these are for the new combat code */ } |
1034 | ^can_cut{S} { /* just ignore for now */ } |
1034 | ^can_cut{S} { /* just ignore for now */ } |
1035 | ^can_dam_armour{S} { } |
1035 | ^can_dam_armour{S} { } |
1036 | ^weapontype{S} op->weapontype = IVAL; |
1036 | ^weapontype{S} op->weapontype = IVAL; |
1037 | ^tooltype{S} op->tooltype = IVAL; |
1037 | ^tooltype{S} op->tooltype = IVAL; |
1038 | ^casting_time{S} op->casting_time = FVAL; |
1038 | ^casting_time{S} op->casting_time = (sint16) FVAL; |
1039 | ^elevation{S} op->elevation = IVAL; |
1039 | ^elevation{S} op->elevation = IVAL; |
1040 | ^smoothlevel{S} op->smoothlevel = IVAL; |
1040 | ^smoothlevel{S} op->smoothlevel = IVAL; |
1041 | ^client_type{S} op->client_type = IVAL; |
1041 | ^client_type{S} op->client_type = IVAL; |
1042 | ^body_{A} set_body_info(op, yytext); |
1042 | ^body_{A} set_body_info(op, yytext); |
1043 | ^duration{S} op->duration = IVAL; |
1043 | ^duration{S} op->duration = IVAL; |
… | |
… | |
1992 | get_string_move_type(op->move_slow), |
1992 | get_string_move_type(op->move_slow), |
1993 | 10); |
1993 | 10); |
1994 | } |
1994 | } |
1995 | |
1995 | |
1996 | if (op->move_slow_penalty != op2->move_slow_penalty) { |
1996 | if (op->move_slow_penalty != op2->move_slow_penalty) { |
1997 | FAST_SAVE_LONG(fastbuf,"move_slow_penalty ",op->move_slow_penalty,18); |
1997 | FAST_SAVE_LONG(fastbuf,"move_slow_penalty ",(long) op->move_slow_penalty,18); |
1998 | } |
1998 | } |
1999 | |
1999 | |
2000 | if (!COMPARE_FLAGS(op,op2)) { |
2000 | if (!COMPARE_FLAGS(op,op2)) { |
2001 | for (tmp=0; tmp <= NUM_FLAGS; tmp++) { |
2001 | for (tmp=0; tmp <= NUM_FLAGS; tmp++) { |
2002 | if (flag_names[tmp] && (QUERY_FLAG(op, tmp) != QUERY_FLAG(op2, tmp))) { |
2002 | if (flag_names[tmp] && (QUERY_FLAG(op, tmp) != QUERY_FLAG(op2, tmp))) { |