void do_report( CHAR_DATA * ch, const char *argument ) { char buf[MAX_INPUT_LENGTH]; if ( IS_NPC( ch ) && ch->fighting ) return; if ( IS_AFFECTED( ch, AFF_POSSESS ) ) { send_to_char( "You can't do that in your current state of mind!\r\n", ch ); return; } if ( IS_VAMPIRE( ch ) ) ch_printf( ch, "You report: %d/%d hp %d/%d blood %d/%d mv %d xp.\r\n", ch->hit, ch->max_hit, ch->pcdata->condition[COND_BLOODTHIRST], 10 + ch->level, ch->move, ch->max_move, ch->exp ); else ch_printf( ch, "You report: %d/%d hp %d/%d mana %d/%d mv %d xp.\r\n", ch->hit, ch->max_hit, ch->mana, ch->max_mana, ch->move, ch->max_move, ch->exp ); if ( IS_VAMPIRE( ch ) ) snprintf( buf, MAX_INPUT_LENGTH, "$n reports: %d/%d hp %d/%d blood %d/%d mv %d xp.\r\n", ch->hit, ch->max_hit, ch->pcdata->condition[COND_BLOODTHIRST], 10 + ch->level, ch->move, ch->max_move, ch->exp ); else snprintf( buf, MAX_INPUT_LENGTH, "$n reports: %d/%d hp %d/%d mana %d/%d mv %d xp.", ch->hit, ch->max_hit, ch->mana, ch->max_mana, ch->move, ch->max_move, ch->exp ); act( AT_REPORT, buf, ch, NULL, NULL, TO_ROOM ); return; }
void gain_condition(CharData * ch, int condition, int value) { bool intoxicated = (GET_COND(ch, DRUNK) > 0); if (GET_COND(ch, condition) == -1) /* No change */ return; GET_COND(ch, condition) += value; GET_COND(ch, condition) = MAX(0, GET_COND(ch, condition)); if(condition == THIRST && IS_VAMPIRE(ch)) GET_COND(ch, condition) = MIN(48, GET_COND(ch, condition)); else GET_COND(ch, condition) = MIN(24, GET_COND(ch, condition)); // Do not spam hungry players who are trying to write. if (PLR_FLAGGED(ch, PLR_WRITING)) return; if( GET_COND(ch, condition) == 2){ switch (condition) { case HUNGER: send_to_char("You begin to experience hunger pangs.\r\n", ch); return; case THIRST: send_to_char("Your mouth is as dry as a desert.\r\n", ch); return; default: return; } } if(GET_COND(ch, condition) >= 1) return; switch (condition) { case HUNGER: send_to_char("Your stomach grumbles loudly.\r\n", ch); return; case THIRST: if (IS_VAMPIRE(ch)) { send_to_char("Your desire for &08blood&00 consumes you.\r\n", ch); return; } else { send_to_char("You are parched.\r\n", ch); return; } case DRUNK: if(intoxicated) send_to_char("You are now sober.\r\n", ch); return; default: break; } }
/* manapoint gain per game hour */ int mana_gain(CharData * ch) { int malnourishCount = 0; struct affected_type *hjp, *next; if (IN_ROOM(ch) == -1) return 0; if(!IS_NPC(ch) && ((GET_COND(ch, HUNGER) == 0 && !IS_VAMPIRE(ch)) || GET_COND(ch, THIRST) == 0)) { if(ch->desc && percentSuccess(2)) { if(!affected_by_spell(ch, SKILL_EMACIATED)) add_affect( ch, ch, SKILL_EMACIATED, GET_LEVEL(ch), 0, 0, -1, 0, FALSE, FALSE, FALSE, FALSE); for (hjp = ch->affected; hjp; hjp = next) { next = hjp->next; if (hjp->type == SKILL_EMACIATED_MANA) malnourishCount++; } if(malnourishCount < 18) add_affect( ch, ch, SKILL_EMACIATED_MANA, GET_LEVEL(ch), APPLY_MANA, -MIN(50, GET_MANA(ch)/20), -1, 0, FALSE, FALSE, FALSE, FALSE); } } int base = calcManaBase(ch); int multiplier = calcManaMulti(ch); int bonus = calcManaBonus(ch); int gain = base*multiplier/100 + bonus; if (affected_by_spell(ch, SKILL_POTENCY)) gain *= 5; return (gain); }
int calcMoveMulti(CharData *ch) { int multi = 100; if(IS_AFFECTED(ch, AFF_PLAGUE) > 0) multi -= 50; /* vampires barely regen vigor in sunlight, unless they're shadow sphered */ if (!IS_NPC(ch) && IS_VAMPIRE(ch) && IS_SUNLIGHT(IN_ROOM(ch)) && !IS_AFFECTED(ch, AFF_SHADOW_SPHERE)) multi -= 90; else if (IS_AFFECTED(ch, AFF_POISON)) multi -= 90; else if ((GET_COND(ch, HUNGER) == 0 && !IS_VAMPIRE(ch)) || (GET_COND(ch, THIRST) == 0)) multi -= 90; if( ROOM_FLAGGED(ch->in_room, ROOM_SUFFER) && ( GET_LEVEL(ch) < LVL_IMMORT )) multi -= 90; else if (!GET_COND(ch, THIRST) && IS_AMARA(ch)) multi -= 90; else if (IS_IZARTI(ch) && IS_EVIL(ch)) multi -= 90; else if (IS_DEMON(ch) && IS_GOOD(ch)) multi -= 90; /* Position calculations */ switch (GET_POS(ch)) { case POS_MEDITATING: case POS_SLEEPING: multi += 120; break; case POS_RESTING: multi += 80; break; case POS_SITTING: multi += 40; /* Divide by 8 */ break; } // Don't let a player's regeneration completely stagnate... multi = MAX(multi, 25); return multi; }
/* Hitpoint gain per game hour */ int hit_gain(CharData * ch) { // Character is messed if (IN_ROOM(ch) == -1) return 0; // Delusion health deflates fairly quickly if(affected_by_spell(ch, SKILL_DELUSION)) return -(GET_MAX_HIT(ch) * spell_level(ch, SKILL_DELUSION) / 9); /* Are they rotting away ? */ if (!IS_NPC(ch) && IS_UNDEAD(ch)) { return ( (GET_LEVEL(ch) < 50) && (ch->desc) ) ? -GET_LEVEL(ch) : 0; } /* Race calculations */ /* vampires don't regenerate in sunlight, unless they're shadow sphered */ if (!IS_NPC(ch) && IS_VAMPIRE(ch) && IS_SUNLIGHT(IN_ROOM(ch)) && !IS_AFFECTED(ch, AFF_SHADOW_SPHERE)) return 0; if(!IS_NPC(ch)) { int suffer = 0; if(ROOM_FLAGGED(ch->in_room, ROOM_SUFFER) && ( GET_LEVEL(ch) < LVL_IMMORT )) suffer = 1; else if(!GET_COND(ch, THIRST) && IS_AMARA(ch)) suffer = 1; else if (IS_IZARTI(ch) && IS_EVIL(ch)) suffer = 1; else if (IS_DEMON(ch) && IS_GOOD(ch)) suffer = 1; if(suffer == 1) { if(percentSuccess(2)) damage(ch, ch, -SUFFER_RATE, TYPE_ROOM_SUFFER); return 0; } } int base = calcHitBase(ch); int multiplier = calcHitMulti(ch); int bonus = calcHitBonus(ch); int gain = base*multiplier/100 + bonus; return (gain); }/* hit_gain */
/* * New stat and statreport command coded by Morphina * Bug fixes by Shaddai */ void do_statreport( CHAR_DATA* ch, const char* argument) { char buf[MAX_STRING_LENGTH]; if( IS_NPC( ch ) ) { send_to_char( "Huh?\r\n", ch ); return; } if( IS_VAMPIRE( ch ) ) { ch_printf( ch, "You report: %d/%d hp %d/%d blood %d/%d mv %d xp.\r\n", ch->hit, ch->max_hit, ch->pcdata->condition[COND_BLOODTHIRST], 10 + ch->level, ch->move, ch->max_move, ch->exp ); snprintf( buf, MAX_STRING_LENGTH, "$n reports: %d/%d hp %d/%d blood %d/%d mv %d xp.", ch->hit, ch->max_hit, ch->pcdata->condition[COND_BLOODTHIRST], 10 + ch->level, ch->move, ch->max_move, ch->exp ); act( AT_REPORT, buf, ch, NULL, NULL, TO_ROOM ); } else { ch_printf( ch, "You report: %d/%d hp %d/%d mana %d/%d mv %d xp.\r\n", ch->hit, ch->max_hit, ch->mana, ch->max_mana, ch->move, ch->max_move, ch->exp ); snprintf( buf, MAX_STRING_LENGTH, "$n reports: %d/%d hp %d/%d mana %d/%d mv %d xp.", ch->hit, ch->max_hit, ch->mana, ch->max_mana, ch->move, ch->max_move, ch->exp ); act( AT_REPORT, buf, ch, NULL, NULL, TO_ROOM ); } ch_printf( ch, "Your base stats: %-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.\r\n", ch->perm_str, ch->perm_wis, ch->perm_int, ch->perm_dex, ch->perm_con, ch->perm_cha, ch->perm_lck ); snprintf( buf, MAX_STRING_LENGTH, "$n's base stats: %-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.", ch->perm_str, ch->perm_wis, ch->perm_int, ch->perm_dex, ch->perm_con, ch->perm_cha, ch->perm_lck ); act( AT_REPORT, buf, ch, NULL, NULL, TO_ROOM ); ch_printf( ch, "Your current stats: %-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.\r\n", get_curr_str( ch ), get_curr_wis( ch ), get_curr_int( ch ), get_curr_dex( ch ), get_curr_con( ch ), get_curr_cha( ch ), get_curr_lck( ch ) ); snprintf( buf, MAX_STRING_LENGTH, "$n's current stats: %-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.", get_curr_str( ch ), get_curr_wis( ch ), get_curr_int( ch ), get_curr_dex( ch ), get_curr_con( ch ), get_curr_cha( ch ), get_curr_lck( ch ) ); act( AT_REPORT, buf, ch, NULL, NULL, TO_ROOM ); return; }
void do_stat( CHAR_DATA * ch, const char *argument ) { if ( IS_NPC( ch ) ) { send_to_char( "Huh?\r\n", ch ); return; } if ( IS_VAMPIRE( ch ) ) ch_printf( ch, "You report: %d/%d hp %d/%d blood %d/%d mv %d xp.\r\n", ch->hit, ch->max_hit, ch->pcdata->condition[COND_BLOODTHIRST], 10 + ch->level, ch->move, ch->max_move, ch->exp ); else ch_printf( ch, "You report: %d/%d hp %d/%d mana %d/%d mv %d xp.\r\n", ch->hit, ch->max_hit, ch->mana, ch->max_mana, ch->move, ch->max_move, ch->exp ); ch_printf( ch, "Your base stats: %-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.\r\n", ch->perm_str, ch->perm_wis, ch->perm_int, ch->perm_dex, ch->perm_con, ch->perm_cha, ch->perm_lck ); ch_printf( ch, "Your current stats: %-2d str %-2d wis %-2d int %-2d dex %-2d con %-2d cha %-2d lck.\r\n", get_curr_str( ch ), get_curr_wis( ch ), get_curr_int( ch ), get_curr_dex( ch ), get_curr_con( ch ), get_curr_cha( ch ), get_curr_lck( ch ) ); return; }
int calcHitMulti(CharData *ch) { int multi = 100; if (GET_RACE(ch) == RACE_TROLL) multi += 200; /* Trolls regenerate VERY fast. */ if (GET_RACE(ch) == RACE_STROLL) multi += 300; if(IS_AFFECTED(ch, AFF_PLAGUE)) multi -= 50; if (IS_AFFECTED(ch, AFF_POISON) || IS_AFFECTED(ch, AFF_DISEASE)) multi -= 75; if( ROOM_FLAGGED( ch->in_room, ROOM_HEALTH_REGEN )) multi += 50; /* Position calculations */ switch (GET_POS(ch)) { case POS_MEDITATING: case POS_SLEEPING: multi += 120; break; case POS_RESTING: multi += 60; break; } // During the day, vampires have a difficult time regenerating mana if(!IS_NPC(ch) && ((GET_COND(ch, HUNGER) == 0 && !IS_VAMPIRE(ch)) || (GET_COND(ch, THIRST) == 0))) { multi = 25; return multi; } // Don't let a player's regeneration completely stagnate... multi = MAX(multi, 25); return multi; }
void regen_update( void ) { CharData *i, *next_char; int hit, mana, move; int vivify_level; for( i = character_list; i; i = next_char ) { next_char = i->next; if(affected_by_spell(i, SKILL_EMACIATED) && (GET_COND(i, HUNGER) != 0 || IS_VAMPIRE(i)) && GET_COND(i, THIRST) != 0) { if(!affected_by_spell(i, SKILL_EMACIATED_MANA) && !affected_by_spell(i, SKILL_EMACIATED_HIT)) affect_from_char(i, SKILL_EMACIATED); else if(percentSuccess(4)) { affect_from_char(i, SKILL_EMACIATED_MANA); affect_from_char(i, SKILL_EMACIATED_HIT); } } // Dwarves sober up 3x faster than most races (unless they drink more...) if(IS_DWARF(i) && !number(0, 35)) gain_condition(i, DRUNK, -1); vivify_level = spell_level(i, SPELL_VIVIFY); affect_from_char(i, SPELL_VIVIFY); if(GET_POS(i) <= POS_MEDITATING) { add_affect(i, i, SPELL_VIVIFY, MIN(vivify_level + 1, 100), APPLY_NONE, 0, -1, 0, FALSE, FALSE, FALSE, FALSE); } if(GET_POS(i) >= POS_MORTALLYW) { hit = hit_gain(i); mana = mana_gain(i); move = move_gain(i); if(affected_by_spell(i, SPELL_VIVIFY)) { if(hit > 0) hit += spell_level(i, SPELL_VIVIFY) * GET_MAX_HIT(i)/600; if(mana > 0) mana += spell_level(i, SPELL_VIVIFY) * GET_MAX_MANA(i)/600; if(move > 0) move += spell_level(i, SPELL_VIVIFY) * GET_MAX_MOVE(i)/600; } // Regeneration is increased on pvp holidays. If you're incapactitated, you will // eventually recover. if(pvpHoliday(i)) { if (GET_POS(i) < POS_SLEEPING) hit = 20; else { hit = (hit > 0) ? hit *3 : 20; mana = (mana > 0) ? mana*2 : 40; move = (move > 0) ? move*2 : 40; } } // 72 seconds per tick... if(hit < 0 || GET_HIT(i) < GET_MAX_HIT(i)) { if(hit>0) GET_HIT(i) += hit/72 + (hit % 72 > number(0, 71)? 1:0); else GET_HIT(i) = MAX(GET_HIT(i) + hit/72 + (-hit % 72 > number(0, 71)?-1:0), -9); } else { int surplus = (GET_HIT(i) - GET_MAX_HIT(i)); GET_HIT(i) -= surplus / 72 + (surplus % 72 > number(0, 71)? 1:0); } if(mana>0) GET_MANA(i) = MAX(MIN(GET_MANA(i) + mana/72 + (mana % 72 > number(0, 71)?1:0), GET_MAX_MANA(i)), 0); else GET_MANA(i) = MIN(GET_MANA(i) + mana/72 + (-mana % 72 > number(0, 71)?-1:0), GET_MAX_MANA(i)); if(move>0) GET_MOVE(i) = MIN(GET_MOVE(i) + move/72 + (move % 72 > number(0, 71)?1:0), GET_MAX_MOVE(i)); else GET_MOVE(i) = MAX(MIN(GET_MOVE(i) + move/72 + (-move % 72 > number(0, 71)?-1:0), GET_MAX_MOVE(i)), 0); update_pos(i); } } }
int calcManaBase(CharData *ch) { int base = 0; /* Set base regeneration */ if (IS_NPC(ch)) { base += GET_LEVEL(ch) * 2; } else { base += graf(age(ch).year, 34, 32, 24, 26, 30, 41, 42); /* Class bonuses */ switch(GET_CLASS(ch)) { case CLASS_MAGIC_USER: case CLASS_NECROMANCER: base += GET_LEVEL(ch); break; case CLASS_CLERIC: case CLASS_SHADOW_DANCER: base += GET_LEVEL(ch)*2/3; break; case CLASS_SOLAMNIC_KNIGHT: case CLASS_DEATH_KNIGHT: base += GET_LEVEL(ch)/2; break; case CLASS_SHOU_LIN: case CLASS_RANGER: base += GET_LEVEL(ch)/3; break; case CLASS_WARRIOR: case CLASS_THIEF: case CLASS_ASSASSIN: break; default: mudlog(NRM, LVL_IMMORT, TRUE, "ERROR calcManaBase: %s's class not recognized!", GET_NAME(ch)); break; } /* Race bonuses*/ if(IS_DROW(ch)) base += (GET_LEVEL(ch)/8); /* Position calculations */ switch (GET_POS(ch)) { case POS_MEDITATING: if(IS_CHI_WARRIOR(ch) && GET_ADVANCE_LEVEL(ch) >= SECOND_ADVANCE_SKILL) base += GET_LEVEL(ch)/10; case POS_SLEEPING: base += 16; break; case POS_RESTING: base += 8; /* Divide by 2 */ break; } } /* Int/wis bonus */ base += (GET_WIS(ch) + GET_INT(ch) - 30); if(!IS_NPC(ch) && IS_VAMPIRE(ch) && IS_SUNLIGHT(IN_ROOM(ch)) && !IS_AFFECTED(ch, AFF_SHADOW_SPHERE)) base = 0; return base; }
/* * New score command by Haus */ void do_score( CHAR_DATA* ch, const char* argument ) { char buf[MAX_STRING_LENGTH]; AFFECT_DATA *paf; int iLang; /*const char *suf; short day; day = ch->pcdata->day + 1; if( day > 4 && day < 20 ) suf = "th"; else if( day % 10 == 1 ) suf = "st"; else if( day % 10 == 2 ) suf = "nd"; else if( day % 10 == 3 ) suf = "rd"; else suf = "th"; * - Uncomment this if you want Birthdays dispayed on score for players - Kayle 1/22/08 */ set_pager_color( AT_SCORE, ch ); pager_printf( ch, "\r\nScore for %s%s.\r\n", ch->name, IS_NPC(ch) ? "" : ch->pcdata->title ); if( get_trust( ch ) != ch->level ) pager_printf( ch, "You are trusted at level %d.\r\n", get_trust( ch ) ); send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); /*if( time_info.day == ch->pcdata->day && time_info.month == ch->pcdata->month ) send_to_char( "Today is your birthday!\r\n", ch ); else ch_printf( ch, "Your birthday is: Day of %s, %d%s day in the Month of %s, in the year %d.\r\n", day_name[ch->pcdata->day % sysdata.daysperweek], day, suf, month_name[ch->pcdata->month], ch->pcdata->year ); send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); * - Uncomment this if you want players to see their birthday's on score. - Kayle 1/22/08 */ pager_printf( ch, "LEVEL: %-3d Race : %-10.10s Played: %ld hours\r\n", ch->level, capitalize( get_race( ch ) ), ( long int )GET_TIME_PLAYED( ch ) ); pager_printf( ch, "YEARS: %-6d Class: %-11.11s Log In: %s\r", calculate_age( ch ), capitalize( get_class( ch ) ), ctime( &( ch->logon ) ) ); if( ch->level >= 15 || IS_PKILL( ch ) ) { pager_printf( ch, "STR : %2.2d(%2.2d) HitRoll: %-4d Saved: %s\r", get_curr_str( ch ), ch->perm_str, GET_HITROLL( ch ), ch->save_time ? ctime( &( ch->save_time ) ) : "no save this session\n" ); pager_printf( ch, "INT : %2.2d(%2.2d) DamRoll: %-4d Time: %s\r", get_curr_int( ch ), ch->perm_int, GET_DAMROLL( ch ), ctime( ¤t_time ) ); } else { pager_printf( ch, "STR : %2.2d(%2.2d) Saved: %s\r", get_curr_str( ch ), ch->perm_str, ch->save_time ? ctime( &( ch->save_time ) ) : "no\n" ); pager_printf( ch, "INT : %2.2d(%2.2d) Time: %s\r", get_curr_int( ch ), ch->perm_int, ctime( ¤t_time ) ); } if( GET_AC( ch ) >= 101 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "the rags of a beggar" ); else if( GET_AC( ch ) >= 80 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "improper for adventure" ); else if( GET_AC( ch ) >= 55 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "shabby and threadbare" ); else if( GET_AC( ch ) >= 40 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "of poor quality" ); else if( GET_AC( ch ) >= 20 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "scant protection" ); else if( GET_AC( ch ) >= 10 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "that of a knave" ); else if( GET_AC( ch ) >= 0 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "moderately crafted" ); else if( GET_AC( ch ) >= -10 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "well crafted" ); else if( GET_AC( ch ) >= -20 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "the envy of squires" ); else if( GET_AC( ch ) >= -40 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "excellently crafted" ); else if( GET_AC( ch ) >= -60 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "the envy of knights" ); else if( GET_AC( ch ) >= -80 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "the envy of barons" ); else if( GET_AC( ch ) >= -100 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "the envy of dukes" ); else if( GET_AC( ch ) >= -200 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "the envy of emperors" ); else snprintf( buf, MAX_STRING_LENGTH, "%s", "that of an avatar" ); if( ch->level > 24 ) pager_printf( ch, "WIS : %2.2d(%2.2d) Armor: %4.4d, %s\r\n", get_curr_wis( ch ), ch->perm_wis, GET_AC( ch ), buf ); else pager_printf( ch, "WIS : %2.2d(%2.2d) Armor: %s \r\n", get_curr_wis( ch ), ch->perm_wis, buf ); if( ch->alignment > 900 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "devout" ); else if( ch->alignment > 700 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "noble" ); else if( ch->alignment > 350 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "honorable" ); else if( ch->alignment > 100 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "worthy" ); else if( ch->alignment > -100 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "neutral" ); else if( ch->alignment > -350 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "base" ); else if( ch->alignment > -700 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "evil" ); else if( ch->alignment > -900 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "ignoble" ); else snprintf( buf, MAX_STRING_LENGTH, "%s", "fiendish" ); if( ch->level < 10 ) pager_printf( ch, "DEX : %2.2d(%2.2d) Align: %-20.20s Items: %5.5d (max %5.5d)\r\n", get_curr_dex( ch ), ch->perm_dex, buf, ch->carry_number, can_carry_n( ch ) ); else pager_printf( ch, "DEX : %2.2d(%2.2d) Align: %+4.4d, %-14.14s Items: %5.5d (max %5.5d)\r\n", get_curr_dex( ch ), ch->perm_dex, ch->alignment, buf, ch->carry_number, can_carry_n( ch ) ); switch ( ch->position ) { case POS_DEAD: snprintf( buf, MAX_STRING_LENGTH, "%s", "slowly decomposing" ); break; case POS_MORTAL: snprintf( buf, MAX_STRING_LENGTH, "%s", "mortally wounded" ); break; case POS_INCAP: snprintf( buf, MAX_STRING_LENGTH, "%s", "incapacitated" ); break; case POS_STUNNED: snprintf( buf, MAX_STRING_LENGTH, "%s", "stunned" ); break; case POS_SLEEPING: snprintf( buf, MAX_STRING_LENGTH, "%s", "sleeping" ); break; case POS_RESTING: snprintf( buf, MAX_STRING_LENGTH, "%s", "resting" ); break; case POS_STANDING: snprintf( buf, MAX_STRING_LENGTH, "%s", "standing" ); break; case POS_FIGHTING: snprintf( buf, MAX_STRING_LENGTH, "%s", "fighting" ); break; case POS_EVASIVE: snprintf( buf, MAX_STRING_LENGTH, "%s", "fighting (evasive)" ); /* Fighting style support -haus */ break; case POS_DEFENSIVE: snprintf( buf, MAX_STRING_LENGTH, "%s", "fighting (defensive)" ); break; case POS_AGGRESSIVE: snprintf( buf, MAX_STRING_LENGTH, "%s", "fighting (aggressive)" ); break; case POS_BERSERK: snprintf( buf, MAX_STRING_LENGTH, "%s", "fighting (berserk)" ); break; case POS_MOUNTED: snprintf( buf, MAX_STRING_LENGTH, "%s", "mounted" ); break; case POS_SITTING: snprintf( buf, MAX_STRING_LENGTH, "%s", "sitting" ); break; } pager_printf( ch, "CON : %2.2d(%2.2d) Pos'n: %-21.21s Weight: %5.5d (max %7.7d)\r\n", get_curr_con( ch ), ch->perm_con, buf, ch->carry_weight, can_carry_w( ch ) ); /* * Fighting style support -haus */ pager_printf( ch, "CHA : %2.2d(%2.2d) Wimpy: %-5d ", get_curr_cha( ch ), ch->perm_cha, ch->wimpy ); switch ( ch->style ) { case STYLE_EVASIVE: snprintf( buf, MAX_STRING_LENGTH, "%s", "evasive" ); break; case STYLE_DEFENSIVE: snprintf( buf, MAX_STRING_LENGTH, "%s", "defensive" ); break; case STYLE_AGGRESSIVE: snprintf( buf, MAX_STRING_LENGTH, "%s", "aggressive" ); break; case STYLE_BERSERK: snprintf( buf, MAX_STRING_LENGTH, "%s", "berserk" ); break; default: snprintf( buf, MAX_STRING_LENGTH, "%s", "standard" ); break; } pager_printf( ch, "Style: %-10.10s\r\n", buf ); pager_printf( ch, "LCK : %2.2d(%2.2d) \r\n", get_curr_lck( ch ), ch->perm_lck ); pager_printf( ch, "Glory: %4.4d(%4.4d) \r\n", ch->pcdata->quest_curr, ch->pcdata->quest_accum ); pager_printf( ch, "PRACT: %3.3d Hitpoints: %-5d of %5d Pager: (%c) %3d AutoExit(%c)\r\n", ch->practice, ch->hit, ch->max_hit, IS_SET( ch->pcdata->flags, PCFLAG_PAGERON ) ? 'X' : ' ', ch->pcdata->pagerlen, xIS_SET( ch->act, PLR_AUTOEXIT ) ? 'X' : ' ' ); if( IS_VAMPIRE( ch ) ) pager_printf( ch, "XP : %-9d Blood: %-5d of %5d MKills: %-5.5d AutoLoot(%c)\r\n", ch->exp, ch->pcdata->condition[COND_BLOODTHIRST], 10 + ch->level, ch->pcdata->mkills, xIS_SET( ch->act, PLR_AUTOLOOT ) ? 'X' : ' ' ); else if( ch->Class == CLASS_WARRIOR ) pager_printf( ch, "XP : %-9d MKills: %-5.5d AutoLoot(%c)\r\n", ch->exp, ch->pcdata->mkills, xIS_SET( ch->act, PLR_AUTOLOOT ) ? 'X' : ' ' ); else pager_printf( ch, "XP : %-9d Mana: %-5d of %5d MKills: %-5.5d AutoLoot(%c)\r\n", ch->exp, ch->mana, ch->max_mana, ch->pcdata->mkills, xIS_SET( ch->act, PLR_AUTOLOOT ) ? 'X' : ' ' ); pager_printf( ch, "GOLD : %-13s Move: %-5d of %5d Mdeaths: %-5.5d AutoSac (%c)\r\n", num_punct( ch->gold ), ch->move, ch->max_move, ch->pcdata->mdeaths, xIS_SET( ch->act, PLR_AUTOSAC ) ? 'X' : ' ' ); if( !IS_NPC( ch ) && ch->pcdata->condition[COND_DRUNK] > 10 ) send_to_pager( "You are drunk.\r\n", ch ); if( !IS_NPC( ch ) && ch->pcdata->condition[COND_THIRST] == 0 ) send_to_pager( "You are in danger of dehydrating.\r\n", ch ); if( !IS_NPC( ch ) && ch->pcdata->condition[COND_FULL] == 0 ) send_to_pager( "You are starving to death.\r\n", ch ); if( ch->position != POS_SLEEPING ) switch ( ch->mental_state / 10 ) { default: send_to_pager( "You're completely messed up!\r\n", ch ); break; case -10: send_to_pager( "You're barely conscious.\r\n", ch ); break; case -9: send_to_pager( "You can barely keep your eyes open.\r\n", ch ); break; case -8: send_to_pager( "You're extremely drowsy.\r\n", ch ); break; case -7: send_to_pager( "You feel very unmotivated.\r\n", ch ); break; case -6: send_to_pager( "You feel sedated.\r\n", ch ); break; case -5: send_to_pager( "You feel sleepy.\r\n", ch ); break; case -4: send_to_pager( "You feel tired.\r\n", ch ); break; case -3: send_to_pager( "You could use a rest.\r\n", ch ); break; case -2: send_to_pager( "You feel a little under the weather.\r\n", ch ); break; case -1: send_to_pager( "You feel fine.\r\n", ch ); break; case 0: send_to_pager( "You feel great.\r\n", ch ); break; case 1: send_to_pager( "You feel energetic.\r\n", ch ); break; case 2: send_to_pager( "Your mind is racing.\r\n", ch ); break; case 3: send_to_pager( "You can't think straight.\r\n", ch ); break; case 4: send_to_pager( "Your mind is going 100 miles an hour.\r\n", ch ); break; case 5: send_to_pager( "You're high as a kite.\r\n", ch ); break; case 6: send_to_pager( "Your mind and body are slipping apart.\r\n", ch ); break; case 7: send_to_pager( "Reality is slipping away.\r\n", ch ); break; case 8: send_to_pager( "You have no idea what is real, and what is not.\r\n", ch ); break; case 9: send_to_pager( "You feel immortal.\r\n", ch ); break; case 10: send_to_pager( "You are a Supreme Entity.\r\n", ch ); break; } else if( ch->mental_state > 45 ) send_to_pager( "Your sleep is filled with strange and vivid dreams.\r\n", ch ); else if( ch->mental_state > 25 ) send_to_pager( "Your sleep is uneasy.\r\n", ch ); else if( ch->mental_state < -35 ) send_to_pager( "You are deep in a much needed sleep.\r\n", ch ); else if( ch->mental_state < -25 ) send_to_pager( "You are in deep slumber.\r\n", ch ); send_to_pager( "Languages: ", ch ); for( iLang = 0; lang_array[iLang] != LANG_UNKNOWN; iLang++ ) if( knows_language( ch, lang_array[iLang], ch ) || ( IS_NPC( ch ) && ch->speaks == 0 ) ) { if( lang_array[iLang] & ch->speaking || ( IS_NPC( ch ) && !ch->speaking ) ) set_pager_color( AT_RED, ch ); send_to_pager( lang_names[iLang], ch ); send_to_pager( " ", ch ); set_pager_color( AT_SCORE, ch ); } send_to_pager( "\r\n", ch ); if( ch->pcdata->bestowments && ch->pcdata->bestowments[0] != '\0' ) pager_printf( ch, "You are bestowed with the command(s): %s.\r\n", ch->pcdata->bestowments ); if( ch->morph && ch->morph->morph ) { send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); if( IS_IMMORTAL( ch ) ) pager_printf( ch, "Morphed as (%d) %s with a timer of %d.\r\n", ch->morph->morph->vnum, ch->morph->morph->short_desc, ch->morph->timer ); else pager_printf( ch, "You are morphed into a %s.\r\n", ch->morph->morph->short_desc ); send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); } if( CAN_PKILL( ch ) ) { send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); pager_printf( ch, "PKILL DATA: Pkills (%3.3d) Illegal Pkills (%3.3d) Pdeaths (%3.3d)\r\n", ch->pcdata->pkills, ch->pcdata->illegal_pk, ch->pcdata->pdeaths ); } if( ch->pcdata->clan && ch->pcdata->clan->clan_type != CLAN_ORDER && ch->pcdata->clan->clan_type != CLAN_GUILD ) { send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); pager_printf( ch, "CLAN STATS: %-14.14s Clan AvPkills : %-5d Clan NonAvpkills : %-5d\r\n", ch->pcdata->clan->name, ch->pcdata->clan->pkills[6], ( ch->pcdata->clan->pkills[1] + ch->pcdata->clan->pkills[2] + ch->pcdata->clan->pkills[3] + ch->pcdata->clan->pkills[4] + ch->pcdata->clan->pkills[5] ) ); pager_printf( ch, " Clan AvPdeaths: %-5d Clan NonAvpdeaths: %-5d\r\n", ch->pcdata->clan->pdeaths[6], ( ch->pcdata->clan->pdeaths[1] + ch->pcdata->clan->pdeaths[2] + ch->pcdata->clan->pdeaths[3] + ch->pcdata->clan->pdeaths[4] + ch->pcdata->clan->pdeaths[5] ) ); } if( ch->pcdata->deity ) { send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); if( ch->pcdata->favor > 2250 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "loved" ); else if( ch->pcdata->favor > 2000 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "cherished" ); else if( ch->pcdata->favor > 1750 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "honored" ); else if( ch->pcdata->favor > 1500 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "praised" ); else if( ch->pcdata->favor > 1250 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "favored" ); else if( ch->pcdata->favor > 1000 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "respected" ); else if( ch->pcdata->favor > 750 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "liked" ); else if( ch->pcdata->favor > 250 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "tolerated" ); else if( ch->pcdata->favor > -250 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "ignored" ); else if( ch->pcdata->favor > -750 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "shunned" ); else if( ch->pcdata->favor > -1000 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "disliked" ); else if( ch->pcdata->favor > -1250 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "dishonored" ); else if( ch->pcdata->favor > -1500 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "disowned" ); else if( ch->pcdata->favor > -1750 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "abandoned" ); else if( ch->pcdata->favor > -2000 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "despised" ); else if( ch->pcdata->favor > -2250 ) snprintf( buf, MAX_STRING_LENGTH, "%s", "hated" ); else snprintf( buf, MAX_STRING_LENGTH, "%s", "damned" ); pager_printf( ch, "Deity: %-20s Favor: %s\r\n", ch->pcdata->deity->name, buf ); } if( ch->pcdata->clan && ch->pcdata->clan->clan_type == CLAN_ORDER ) { send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); pager_printf( ch, "Order: %-20s Order Mkills: %-6d Order MDeaths: %-6d\r\n", ch->pcdata->clan->name, ch->pcdata->clan->mkills, ch->pcdata->clan->mdeaths ); } if( ch->pcdata->clan && ch->pcdata->clan->clan_type == CLAN_GUILD ) { send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); pager_printf( ch, "Guild: %-20s Guild Mkills: %-6d Guild MDeaths: %-6d\r\n", ch->pcdata->clan->name, ch->pcdata->clan->mkills, ch->pcdata->clan->mdeaths ); } if( IS_IMMORTAL( ch ) ) { send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); pager_printf( ch, "IMMORTAL DATA: Wizinvis [%s] Wizlevel (%d)\r\n", xIS_SET( ch->act, PLR_WIZINVIS ) ? "X" : " ", ch->pcdata->wizinvis ); pager_printf( ch, "Bamfin: %s %s\r\n", ch->name, ( ch->pcdata->bamfin[0] != '\0' ) ? ch->pcdata->bamfin : "appears in a swirling mist." ); pager_printf( ch, "Bamfout: %s %s\r\n", ch->name, ( ch->pcdata->bamfout[0] != '\0' ) ? ch->pcdata->bamfout : "leaves in a swirling mist." ); /* * Area Loaded info - Scryn 8/11 */ if( ch->pcdata->area ) { pager_printf( ch, "Vnums: Room (%-5.5d - %-5.5d) Object (%-5.5d - %-5.5d) Mob (%-5.5d - %-5.5d)\r\n", ch->pcdata->area->low_r_vnum, ch->pcdata->area->hi_r_vnum, ch->pcdata->area->low_o_vnum, ch->pcdata->area->hi_o_vnum, ch->pcdata->area->low_m_vnum, ch->pcdata->area->hi_m_vnum ); pager_printf( ch, "Area Loaded [%s]\r\n", ( IS_SET( ch->pcdata->area->status, AREA_LOADED ) ) ? "yes" : "no" ); } } if( ch->first_affect ) { int i; SKILLTYPE *sktmp; i = 0; send_to_pager( "----------------------------------------------------------------------------\r\n", ch ); send_to_pager( "AFFECT DATA: ", ch ); for( paf = ch->first_affect; paf; paf = paf->next ) { if( ( sktmp = get_skilltype( paf->type ) ) == NULL ) continue; if( ch->level < 20 ) { pager_printf( ch, "[%-34.34s] ", sktmp->name ); if( i == 0 ) i = 2; if( ( ++i % 3 ) == 0 ) send_to_pager( "\r\n", ch ); } if( ch->level >= 20 ) { if( paf->modifier == 0 ) pager_printf( ch, "[%-24.24s;%5d rds] ", sktmp->name, paf->duration ); else if( paf->modifier > 999 ) pager_printf( ch, "[%-15.15s; %7.7s;%5d rds] ", sktmp->name, tiny_affect_loc_name( paf->location ), paf->duration ); else pager_printf( ch, "[%-11.11s;%+-3.3d %7.7s;%5d rds] ", sktmp->name, paf->modifier, tiny_affect_loc_name( paf->location ), paf->duration ); if( i == 0 ) i = 1; if( ( ++i % 2 ) == 0 ) send_to_pager( "\r\n", ch ); } } } send_to_pager( "\r\n", ch ); return; }
/* Some initializations for characters, including initial skills If mode == 0, then act as though the character was entering the game for the first time. Otherwise, act as though the character is being set to that level. */ void do_start(struct creature *ch, int mode) { void advance_level(struct creature *ch, int8_t keep_internal); int8_t new_player = 0; int i; struct obj_data *implant_save[NUM_WEARS]; struct obj_data *tattoo_save[NUM_WEARS]; // remove implant affects for (i = 0; i < NUM_WEARS; i++) { if (GET_IMPLANT(ch, i)) implant_save[i] = raw_unequip_char(ch, i, EQUIP_IMPLANT); else implant_save[i] = NULL; if (GET_TATTOO(ch, i)) tattoo_save[i] = raw_unequip_char(ch, i, EQUIP_TATTOO); else tattoo_save[i] = NULL; } if (GET_EXP(ch) == 0 && !IS_REMORT(ch) && !IS_VAMPIRE(ch)) new_player = true; GET_LEVEL(ch) = 1; GET_EXP(ch) = 1; if (mode) roll_real_abils(ch); for (i = 1; i <= MAX_SKILLS; i++) SET_SKILL(ch, i, 0); if (IS_VAMPIRE(ch)) GET_LIFE_POINTS(ch) = 1; else GET_LIFE_POINTS(ch) = 3 * (GET_WIS(ch) + GET_CON(ch)) / 40; ch->points.max_hit = 20; ch->points.max_mana = 100; ch->points.max_move = 82; if (IS_TABAXI(ch)) { SET_SKILL(ch, SKILL_CLAW, LEARNED(ch)); SET_SKILL(ch, SKILL_BITE, LEARNED(ch)); } if (IS_ELF(ch)) { SET_SKILL(ch, SKILL_ARCHERY, LEARNED(ch)); } switch (GET_CLASS(ch)) { case CLASS_MAGIC_USER: SET_SKILL(ch, SKILL_PUNCH, 10); break; case CLASS_CLERIC: SET_SKILL(ch, SKILL_PUNCH, 10); break; case CLASS_THIEF: SET_SKILL(ch, SKILL_PUNCH, 15); SET_SKILL(ch, SKILL_SNEAK, 10); SET_SKILL(ch, SKILL_HIDE, 5); SET_SKILL(ch, SKILL_STEAL, 15); break; case CLASS_WARRIOR: SET_SKILL(ch, SKILL_PUNCH, 20); break; case CLASS_BARB: SET_SKILL(ch, SKILL_PUNCH, 15); break; case CLASS_PSIONIC: SET_SKILL(ch, SKILL_PUNCH, 10); break; case CLASS_PHYSIC: SET_SKILL(ch, SKILL_PUNCH, 10); break; case CLASS_CYBORG: SET_SKILL(ch, SKILL_PUNCH, 10); break; case CLASS_KNIGHT: SET_SKILL(ch, SKILL_PUNCH, 20); break; case CLASS_RANGER: SET_SKILL(ch, SKILL_PUNCH, 15); GET_MAX_MOVE(ch) += dice(4, 9); break; case CLASS_MONK: SET_SKILL(ch, SKILL_PUNCH, 20); break; case CLASS_MERCENARY: SET_SKILL(ch, SKILL_PUNCH, 20); case CLASS_BARD: SET_SKILL(ch, SKILL_PUNCH, 25); SET_SKILL(ch, SKILL_ARCHERY, 25); break; } if (new_player) { if (PAST_CLASS(GET_CLASS(ch))) { deposit_past_bank(ch->desc->account, 8192 + number(256, 2048) + GET_INT(ch) + GET_WIS(ch)); ch->points.gold = 8192 + number(256, 2048) + GET_INT(ch) + GET_WIS(ch); } else if (FUTURE_CLASS(GET_CLASS(ch))) { deposit_future_bank(ch->desc->account, 8192 + number(256, 2048) + GET_INT(ch) + GET_WIS(ch)); ch->points.cash = 8192 + number(256, 2048) + GET_INT(ch) + GET_WIS(ch); } // New players do not start with the gown at this point // This has been left in for reference for generic newbie starting gear for the future. // New players start with a hospital gown and items most dear to them /* struct obj_data *gown = read_object(33800); if (gown != NULL) { equip_char(ch, gown, WEAR_ABOUT, EQUIP_WORN); } */ // Good clerics start with a holy symbol on neck if ((GET_CLASS(ch) == CLASS_CLERIC) && IS_GOOD(ch)) { struct obj_data *talisman = read_object(1280); if (talisman != NULL) { equip_char(ch, talisman, WEAR_NECK_1, EQUIP_WORN); } } // Evil clerics start with a holy symbol on hold if ((GET_CLASS(ch) == CLASS_CLERIC) && IS_EVIL(ch)) { struct obj_data *symbol = read_object(1260); if (symbol != NULL) { equip_char(ch, symbol, WEAR_HOLD, EQUIP_WORN); } } // Good knights start with a holy symbol on finger if ((GET_CLASS(ch) == CLASS_KNIGHT) && IS_GOOD(ch)) { struct obj_data *ring = read_object(1287); if (ring != NULL) { equip_char(ch, ring, WEAR_FINGER_L, EQUIP_WORN); } } // Evil knights start with a holy symbol on neck if ((GET_CLASS(ch) == CLASS_KNIGHT) && IS_EVIL(ch)) { struct obj_data *pendant = read_object(1270); if (pendant != NULL) { equip_char(ch, pendant, WEAR_NECK_1, EQUIP_WORN); } } // Bards start with a percussion instrument held, and stringed in inventory if (GET_CLASS(ch) == CLASS_BARD) { struct obj_data *lute = read_object(3218); if (lute != NULL) { obj_to_char(lute, ch); } } set_title(ch, "the complete newbie"); } advance_level(ch, 0); GET_MAX_MOVE(ch) += GET_CON(ch); GET_HIT(ch) = GET_MAX_HIT(ch); GET_MANA(ch) = GET_MAX_MANA(ch); GET_MOVE(ch) = GET_MAX_MOVE(ch); GET_COND(ch, THIRST) = 24; GET_COND(ch, FULL) = 24; GET_COND(ch, DRUNK) = 0; if (new_player) { ch->player.time.played = 0; ch->player.time.logon = time(NULL); } for (i = 0; i < NUM_WEARS; i++) { if (implant_save[i]) equip_char(ch, implant_save[i], i, EQUIP_IMPLANT); if (tattoo_save[i]) equip_char(ch, tattoo_save[i], i, EQUIP_TATTOO); } }
int invalid_char_class(struct creature *ch, struct obj_data *obj) { // Protected object if (IS_PC(ch) && obj->shared->owner_id != 0 && obj->shared->owner_id != GET_IDNUM(ch)) { return true; } // Unapproved object if (!OBJ_APPROVED(obj) && !is_tester(ch) && GET_LEVEL(ch) < LVL_IMMORT) return true; // Anti class restrictions if ((IS_OBJ_STAT(obj, ITEM_ANTI_MAGIC_USER) && IS_MAGIC_USER(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_CLERIC) && IS_CLERIC(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_WARRIOR) && IS_WARRIOR(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_THIEF) && IS_THIEF(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_BARB) && IS_BARB(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_PSYCHIC) && IS_PSYCHIC(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_PHYSIC) && IS_PHYSIC(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_CYBORG) && IS_CYBORG(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_KNIGHT) && IS_KNIGHT(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_RANGER) && IS_RANGER(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_BARD) && IS_BARD(ch)) || (IS_OBJ_STAT(obj, ITEM_ANTI_MONK) && IS_MONK(ch)) || (IS_OBJ_STAT2(obj, ITEM2_ANTI_MERC) && IS_MERC(ch))) return true; // Required class restrictions - any one of them must be met if ((IS_OBJ_STAT3(obj, ITEM3_REQ_MAGE) && IS_MAGE(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_CLERIC) && IS_CLERIC(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_THIEF) && IS_THIEF(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_WARRIOR) && IS_WARRIOR(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_BARB) && IS_BARB(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_PSIONIC) && IS_PSIONIC(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_PHYSIC) && IS_PHYSIC(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_CYBORG) && IS_CYBORG(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_KNIGHT) && IS_KNIGHT(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_RANGER) && IS_RANGER(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_BARD) && IS_BARD(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_MONK) && IS_MONK(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_VAMPIRE) && IS_VAMPIRE(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_MERCENARY) && IS_MERC(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_SPARE1) && IS_SPARE1(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_SPARE2) && IS_SPARE2(ch)) || (IS_OBJ_STAT3(obj, ITEM3_REQ_SPARE3) && IS_SPARE3(ch))) return false; // A required class existed and the creature didn't fulfill any if (IS_OBJ_STAT3(obj, ITEM3_REQ_MAGE | ITEM3_REQ_CLERIC | ITEM3_REQ_THIEF | ITEM3_REQ_WARRIOR | ITEM3_REQ_BARB | ITEM3_REQ_PSIONIC | ITEM3_REQ_PHYSIC | ITEM3_REQ_CYBORG | ITEM3_REQ_KNIGHT | ITEM3_REQ_RANGER | ITEM3_REQ_BARD | ITEM3_REQ_MONK | ITEM3_REQ_VAMPIRE | ITEM3_REQ_MERCENARY | ITEM3_REQ_SPARE1 | ITEM3_REQ_SPARE2 | ITEM3_REQ_SPARE3)) return true; // Passes all tests return false; }