TESTED on the pre bpl17, oasis 2.0 oedid.c add to the int in void oedit_parse mod and check replace: case OEDIT_APPLYMOD: mod = atoi(arg); if (GET_LEVEL(ch) != LVL_IMPL) { check = OLC_OBJ(d)->affected[OLC_VAL(d)].location; switch (check) { case APPLY_NONE: break; case APPLY_STR: mod = MAX(MIN_APPLY_STR, MIN(MAX_APPLY_STR, mod)); break; case APPLY_DEX: mod = MAX(MIN_APPLY_DEX, MIN(MAX_APPLY_DEX, mod)); break; case APPLY_INT: mod = MAX(MIN_APPLY_INT, MIN(MAX_APPLY_INT, mod)); break; case APPLY_WIS: mod = MAX(MIN_APPLY_WIS, MIN(MAX_APPLY_WIS, mod)); break; case APPLY_CON: mod = MAX(MIN_APPLY_CON, MIN(MAX_APPLY_CON, mod)); break; case APPLY_CHA: mod = MAX(MIN_APPLY_CHA, MIN(MAX_APPLY_CHA, mod)); break; case APPLY_CLASS: mod = 0; break; case APPLY_LEVEL: mod = 0; break; case APPLY_AGE: mod = MAX(MIN_APPLY_AGE, MIN(MAX_APPLY_AGE, mod)); break; case APPLY_CHAR_WEIGHT: mod = 0; break; case APPLY_CHAR_HEIGHT: mod = 0; break; case APPLY_MANA: mod = MAX(MIN_APPLY_MANA, MIN(MAX_APPLY_MANA, mod)); break; case APPLY_HIT: mod = MAX(MIN_APPLY_HIT, MIN(MAX_APPLY_HIT, mod)); break; case APPLY_MOVE: mod = MAX(MIN_APPLY_MOVE, MIN(MAX_APPLY_MOVE, mod)); break; case APPLY_GOLD: mod = 0; break; case APPLY_EXP: mod = 0; break; case APPLY_AC: mod = MAX(MIN_APPLY_AC, MIN(MAX_APPLY_AC, mod)); break; case APPLY_HITROLL: mod = MAX(MIN_APPLY_HITROLL, MIN(MAX_APPLY_HITROLL, mod)); break; case APPLY_DAMROLL: mod = MAX(MIN_APPLY_DAMROLL, MIN(MAX_APPLY_DAMROLL, mod)); break; case APPLY_SAVING_PARA: case APPLY_SAVING_ROD: case APPLY_SAVING_PETRI: case APPLY_SAVING_BREATH: case APPLY_SAVING_SPELL: mod = MAX(MIN_APPLY_SPELL, MIN(MAX_APPLY_SPELL, mod)); break; /* * ADD MORE APPLY'S HERE THAT CORRESPONDS TO structs.h */ default: mod = 0; log("SYSERR: Default in OLC Max check.\r\n"); /* should not get here */ break; } } OLC_OBJ(d)->affected[OLC_VAL(d)].modifier = mod; oedit_disp_prompt_apply_menu(d); return; add to structs.h /* set these to your own limits */ #define MAX_APPLY_STR 2 #define MIN_APPLY_STR -2 #define MAX_APPLY_DEX 2 #define MIN_APPLY_DEX -2 #define MAX_APPLY_INT 2 #define MIN_APPLY_INT -2 #define MAX_APPLY_WIS 2 #define MIN_APPLY_WIS -2 #define MAX_APPLY_CON 2 #define MIN_APPLY_CON -2 #define MAX_APPLY_CHA 2 #define MIN_APPLY_CHA -2 #define MAX_APPLY_AGE 5 #define MIN_APPLY_AGE -5 #define MAX_APPLY_MANA 15 #define MIN_APPLY_MANA -15 #define MAX_APPLY_HIT 10 #define MIN_APPLY_HIT -10 #define MAX_APPLY_MOVE 10 #define MIN_APPLY_MOVE -10 #define MAX_APPLY_AC 10 #define MIN_APPLY_AC -10 #define MAX_APPLY_HITROLL 2 #define MIN_APPLY_HITROLL -2 #define MAX_APPLY_DAMROLL 2 #define MIN_APPLY_DAMROLL -2 #define MAX_APPLY_SPELL 10 #define MIN_APPLY_SPELL -10 +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT