diff -i smaug14/src/fight.c smaug18/src/fight.c 8c8 < * Tricops and Fireblade | * --- > * Tricops, Fireblade, Edmond, Conran | * 24a25 > 53a55,57 > if ( IS_AFFECTED( ch, AFF_GRAPPLE ) ) > return TRUE; > 130a135,163 > void strip_grapple( CHAR_DATA * ch ) > { > if ( IS_NPC( ch ) ) > return; > > if ( IS_AFFECTED( ch, AFF_GRAPPLE ) ) > { > affect_strip( ch, gsn_grapple ); > set_char_color( AT_WEAROFF, ch ); > send_to_char( skill_table[gsn_grapple]->msg_off, ch ); > send_to_char( "\n\r", ch ); > if ( get_timer( ch, TIMER_PKILLED ) > 0 ) > remove_timer( ch, TIMER_ASUPRESSED ); > } > if ( who_fighting( ch ) ) > { > if ( who_fighting( ch->fighting->who ) == ch && IS_AFFECTED( who_fighting( ch ), AFF_GRAPPLE ) ) > { > affect_strip( who_fighting( ch ), gsn_grapple ); > set_char_color( AT_WEAROFF, who_fighting( ch ) ); > send_to_char( skill_table[gsn_grapple]->msg_off, who_fighting( ch ) ); > send_to_char( "\n\r", who_fighting( ch ) ); > if ( get_timer( who_fighting( ch ), TIMER_PKILLED ) > 0 ) > remove_timer( who_fighting( ch ), TIMER_ASUPRESSED ); > } > } > return; > } > 217a251,253 > > > 307a344,358 > > if ( ch->fighting && timer->type == TIMER_DO_FUN ) > { > int tempsub; > > tempsub = ch->substate; > ch->substate = SUB_TIMER_DO_ABORT; > ( timer->do_fun ) ( ch, "" ); > if ( char_died( ch ) ) > break; > ch->substate = tempsub; > extract_timer( ch, timer ); > continue; > } > 332a384,385 > if ( timer->count > 0 ) > continue; 394c447 < if ( IS_SET( ch->in_room->room_flags, ROOM_SAFE ) ) --- > if ( xIS_SET( ch->in_room->room_flags, ROOM_SAFE ) ) 410a464,477 > /* Zednakk patch - remove next check */ > if ( !str_cmp( ch->name, "zednakk" ) ) > { > act( AT_DGREEN, > "$N rips your head clean from your shoulders. As your spinal cord dangles limply in the breeze, the old adage echoes in your dying thoughts 'Be careful what you wish for!'", > ch, NULL, victim, TO_CHAR ); > act( AT_DGREEN, > "Spurts of thick green sarcasm erupt from Zednakk as his head is sliced clean from his shoulders.", ch, > NULL, victim, TO_NOTVICT ); > do_mp_slay( victim, "zednakk" ); > if ( char_died( ch ) || char_died( victim ) ) > continue; > } > 539a607,612 > /* > * Fix for character not here bugs --Shaddai > */ > if ( char_died( ch ) || char_died( victim ) ) > continue; > 597c670 < if ( ch->first_affect ) --- > if ( victim->first_affect ) 789c862 < if ( who_fighting( ch ) != victim || dt == gsn_backstab || dt == gsn_circle ) --- > if ( who_fighting( ch ) != victim || dt == gsn_backstab || dt == gsn_circle || dt == gsn_pounce ) 831c904,914 < for ( chance = 0; chance < ch->numattacks; chance++ ) --- > int temp_attacks; > > /* > * We could put a penalty on mobs if their stances aren't GM but > * * Why? :) SHADDAI > */ > > temp_attacks = ch->numattacks; > if ( victim->stance != STANCE_MONKEY && ch->stance != STANCE_MONKEY ) > temp_attacks += stance_index[ch->stance].num_attacks; > for ( chance = 0; chance < temp_attacks; chance++ ) 839a923,938 > > /* > * Support added for stances on chars. Only give them the extra bonus > * * attacks if their stance is GM. SHADDAI > */ > if ( !IS_NPC( ch ) && ch->stance != STANCE_MONKEY && victim->stance != STANCE_MONKEY ) > { > if ( ch->pcdata->stances[ch->stance] >= STANCE_GRAND_MASTER ) > for ( chance = 0; chance < stance_index[ch->stance].num_attacks; chance++ ) > { > retcode = one_hit( ch, victim, dt ); > if ( retcode != rNONE || who_fighting( ch ) != victim ) > return retcode; > } > } > 1252a1352 > 1255a1356,1358 > if ( dt == gsn_pounce ) > dam *= ( 2 + URANGE( 2, ch->level - ( victim->level / 4 ), 30 ) / 11 ); > 1323d1425 < 1377c1479 < if ( wield && !IS_SET( victim->immune, RIS_MAGIC ) && !IS_SET( victim->in_room->room_flags, ROOM_NO_MAGIC ) ) --- > if ( wield && !IS_SET( victim->immune, RIS_MAGIC ) && !xIS_SET( victim->in_room->room_flags, ROOM_NO_MAGIC ) ) 1644d1745 < 1728c1829 < if ( wield && !IS_SET( victim->immune, RIS_MAGIC ) && !IS_SET( victim->in_room->room_flags, ROOM_NO_MAGIC ) ) --- > if ( wield && !IS_SET( victim->immune, RIS_MAGIC ) && !xIS_SET( victim->in_room->room_flags, ROOM_NO_MAGIC ) ) 1769c1870 < if ( IS_SET( ch->immune, ris ) && !IS_SET( ch->no_immune, ris ) ) --- > if ( ( IS_SET( ch->immune, ris ) || IS_SET( ch->stance_immune, ris ) ) && !IS_SET( ch->no_immune, ris ) ) 1771c1872 < if ( IS_SET( ch->resistant, ris ) && !IS_SET( ch->no_resistant, ris ) ) --- > if ( ( IS_SET( ch->resistant, ris ) || IS_SET( ch->stance_resistant, ris ) ) && !IS_SET( ch->no_resistant, ris ) ) 1773c1874,1875 < if ( IS_SET( ch->susceptible, ris ) && !IS_SET( ch->no_susceptible, ris ) ) --- > if ( ( IS_SET( ch->susceptible, ris ) || IS_SET( ch->stance_susceptible, ris ) ) > && !IS_SET( ch->no_susceptible, ris ) ) 1795a1898 > char filename2[256]; 1891c1994 < if ( IS_SET( victim->in_room->room_flags, ROOM_SAFE ) ) --- > if ( xIS_SET( victim->in_room->room_flags, ROOM_SAFE ) && !str_cmp( victim->in_room->area->filename, "limbo.are" ) ) 1931a2035 > 1946a2051,2053 > if ( victim == supermob ) /* Stop any damage */ > return rNONE; > 2116a2224,2275 > /* > * Support for stance damage modifiers. SHADDAI > * If anyone thinks of a quicker easier way to do this > * Please tell me! Maybe calculate some variable off of how well > * They know the stance and only recalculate that when they > * change stances or get better in the stance they are in. > */ > if ( ch->stance != STANCE_MONKEY && victim->stance != STANCE_MONKEY ) > { > if ( ch->stance > STANCE_NONE && stance_index[ch->stance].dam_done > 0 ) > { > float temp_dam; > > if ( IS_NPC( ch ) ) > { > dam *= ( stance_index[ch->stance].dam_done / 100.0 ); > temp_dam = ( ch->pIndexData->stances[ch->stance] / 200.0 ); > if ( temp_dam < .5 ) > temp_dam = .5; > } > else > { > dam *= ( stance_index[ch->stance].dam_done / 100.0 ); > temp_dam = ( ch->pcdata->stances[ch->stance] / 200.0 ); > if ( temp_dam < .5 ) > temp_dam = .5; > } > dam *= temp_dam; > } > > if ( victim->stance > STANCE_NONE && stance_index[victim->stance].dam_taken > 0 ) > { > float temp_dam; > > if ( IS_NPC( victim ) ) > { > dam *= ( stance_index[victim->stance].dam_taken / 100.0 ); > temp_dam = ( victim->pIndexData->stances[victim->stance] / 200.0 ); > if ( temp_dam < .5 ) > temp_dam = .5; > } > else > { > dam *= ( stance_index[victim->stance].dam_taken / 100.0 ); > temp_dam = ( victim->pcdata->stances[victim->stance] / 200.0 ); > if ( temp_dam < .5 ) > temp_dam = .5; > } > dam /= temp_dam; > } > } > 2149c2308,2313 < dampmod = sysdata.dam_mob_vs_plr; --- > { > if ( victim->level < 50 ) > dampmod = sysdata.dam_mob_vs_nonav; > else > dampmod = sysdata.dam_mob_vs_plr; > } 2154c2318,2323 < dampmod = sysdata.dam_plr_vs_mob; --- > { > if ( ch->level < 50 ) > dampmod = sysdata.dam_nonav_vs_mob; > else > dampmod = sysdata.dam_plr_vs_mob; > } 2157a2327 > 2192a2363 > /* ch_printf( ch, "(%d damage)\n\r", dam ); */ 2204c2375 < xp_gain = 0; --- > xp_gain = ( int ) ( xp_gain * 0.05 ); 2337a2509,2510 > if ( !victim->desc ) > add_loginmsg( victim->name, 17, ( IS_NPC( ch ) ? ch->short_descr : ch->name ) ); 2340,2342c2513,2514 < log_string( log_buf ); < to_channel( log_buf, CHANNEL_MONITOR, "Monitor", LEVEL_IMMORTAL ); < --- > log_string_plus( log_buf, LOG_ALL, 65 ); > to_channel( log_buf, CHANNEL_DEATH, "Death", LEVEL_IMMORTAL ); 2355c2527 < if ( victim->pcdata->clan && victim->pcdata->clan->name == ch->pcdata->clan->name ) --- > if ( victim->pcdata && victim->pcdata->clan && victim->pcdata->clan->name == ch->pcdata->clan->name ) 2359a2532,2549 > if ( !IS_NPC( victim ) && !IS_IMMORTAL( victim ) && victim->pcdata->clan > && victim->pcdata->clan->clan_type != CLAN_ORDER > && victim->pcdata->clan->clan_type != CLAN_GUILD && ch != victim && !IS_NPC( ch ) ) > { > sprintf( filename2, "%s%s.defeats", CLAN_DIR, victim->pcdata->clan->name ); > sprintf( log_buf, "&P(%2d) %-12s &wdefeated by &P(%2d) %s &P%s ... &w%s", > victim->level, > victim->name, > ch->level, > !CAN_PKILL( ch ) ? "&W<Peaceful>" : > ch->pcdata->clan ? ch->pcdata->clan->badge : > "&P(&WUnclanned&P)", ch->name, victim->in_room->area->name ); > if ( ch->pcdata && ch->pcdata->clan && ch->pcdata->clan->name == victim->pcdata->clan->name ) > ; > else > append_to_file( filename2, log_buf ); > } > 2365,2366c2555,2559 < if ( victim->exp > exp_level( victim, victim->level ) ) < gain_exp( victim, ( exp_level( victim, victim->level ) - victim->exp ) / 2 ); --- > if ( !IS_PKILL( victim ) ) /* August, 2000 */ > { > if ( victim->exp > exp_level( victim, victim->level ) ) > gain_exp( victim, ( exp_level( victim, victim->level ) - victim->exp ) / 2 ); > } 2377a2571,2575 > if ( !IS_NPC( ch ) && ch->pcdata->clan ) > update_member( ch ); > if ( !IS_NPC( victim ) && victim->pcdata->clan ) > update_member( victim ); > 2458d2655 < 2486c2683 < if ( IS_SET( victim->in_room->room_flags, ROOM_SAFE ) ) --- > if ( xIS_SET( victim->in_room->room_flags, ROOM_SAFE ) ) 2654,2655c2851,2854 < * Any character in the arena is ok to kill. < * Added pdeath and pkills here --- > * Checks to see if character is in an area flagged FREEKILL and then checks > * whether combatants are within 10 honour of each other. This is all for > * the purpose of awarding honour for pkills and the pkill data. > * -- Raltaris 2657c2856,2858 < if ( in_arena( ch ) ) --- > > if ( IS_SET( ch->in_room->area->flags, AFLAG_FREEKILL ) > && abs( ch->pcdata->honour - victim->pcdata->honour ) <= 10 ) 2659c2860,2866 < if ( !IS_NPC( ch ) && !IS_NPC( victim ) ) --- > set_char_color( AT_IMMORT, ch ); > /* > * If loser/victim has no honour don't award or take any away. > */ > if ( victim->pcdata->honour == 0 ) > send_to_char( "You gain no honour for this kill. \n\r", ch ); > else 2661,2662c2868,2874 < ch->pcdata->pkills++; < victim->pcdata->pdeaths++; --- > /* > * Take care of the winner/ch, award honour, award pkill > */ > send_to_char( "You gain 1 honour for triumph in combat. \n\r", ch ); > ch->pcdata->honour++; > send_to_char( "You lose 1 honour for defeat in combat. \n\r", victim ); > victim->pcdata->honour--; 2664c2876,2883 < return; --- > /* > * Now check to see if the winner has gained a new rank > */ > if ( ch->pcdata->honour == 5 > || ch->pcdata->honour == 10 > || ch->pcdata->honour == 20 > || ch->pcdata->honour == 40 || ch->pcdata->honour == 65 || ch->pcdata->honour == 100 ) > send_to_char( "Congratulations. You have obtained a new rank of honour. \n\r", ch ); 2668c2887,2888 < * So are killers and thieves. --- > * Any character in the arena is ok to kill, so are killers and thieves > * Added pdeath and pkills here 2670c2890 < if ( xIS_SET( victim->act, PLR_KILLER ) || xIS_SET( victim->act, PLR_THIEF ) ) --- > if ( in_arena( ch ) || xIS_SET( victim->act, PLR_KILLER ) || xIS_SET( victim->act, PLR_THIEF ) ) 2672c2892 < if ( !IS_NPC( ch ) ) --- > if ( !IS_NPC( ch ) && !IS_NPC( victim ) ) 2674,2690d2893 < if ( ch->pcdata->clan ) < { < if ( victim->level < 10 ) < ch->pcdata->clan->pkills[0]++; < else if ( victim->level < 15 ) < ch->pcdata->clan->pkills[1]++; < else if ( victim->level < 20 ) < ch->pcdata->clan->pkills[2]++; < else if ( victim->level < 30 ) < ch->pcdata->clan->pkills[3]++; < else if ( victim->level < 40 ) < ch->pcdata->clan->pkills[4]++; < else if ( victim->level < 50 ) < ch->pcdata->clan->pkills[5]++; < else < ch->pcdata->clan->pkills[6]++; < } 2692c2895 < ch->in_room->area->pkills++; --- > victim->pcdata->pdeaths++; 2696a2900 > 2960c3164,3167 < if ( victim->position <= POS_STUNNED ) --- > if ( victim->position <= POS_STUNNED && !IS_AFFECTED( victim, AFF_PARALYSIS ) ) > { > int gm_stance = FALSE; > 2961a3169,3181 > if ( ( get_stance_mastery( victim ) >= 200 ) ) > gm_stance = TRUE; > if ( ( ( victim->max_hit / 4 ) > victim->hit ) || !gm_stance ) > { > act( AT_ACTION, "$n clambers back to $s feet.", victim, NULL, NULL, TO_ROOM ); > act( AT_ACTION, "You clamber back to your feet.", victim, NULL, NULL, TO_CHAR ); > } > else > { > act( AT_ACTION, "$n flips back up to $s feet.", victim, NULL, NULL, TO_ROOM ); > act( AT_ACTION, "You flip back up to your feet.", victim, NULL, NULL, TO_CHAR ); > } > } 3008,3011c3228,3235 < char buf[MAX_STRING_LENGTH]; < < sprintf( buf, "Set_fighting: %s -> %s (already fighting %s)", ch->name, victim->name, ch->fighting->who->name ); < bug( buf, 0 ); --- > /* > * Spam! Spammity spam! Spammity spam spamalicious spam! > * char buf[MAX_STRING_LENGTH]; > * > * sprintf( buf, "Set_fighting: %s -> %s (already fighting %s)", > * ch->name, victim->name, ch->fighting->who->name ); > * bug( buf, 0 ); > */ 3058a3283,3290 > #ifdef SHADDAI > if ( IS_NPC( ch ) && ch->stance < STANCE_NORMAL ) > if ( ch->pIndexData->stances[0] > STANCE_NONE ) > do_stance( ch, get_stance_name( ch->pIndexData->stances[0] ) ); > if ( IS_NPC( victim ) && victim->stance < STANCE_NORMAL ) > if ( victim->pIndexData->stances[0] > STANCE_NONE ) > do_stance( victim, get_stance_name( victim->pIndexData->stances[0] ) ); > #endif 3107a3340,3348 > /* > if ( IS_AFFECTED( ch, AFF_GRAPPLE ) ) > { > affect_strip( ch, gsn_grapple ); > set_char_color( AT_WEAROFF, ch ); > send_to_char( skill_table[gsn_grapple]->msg_off, ch ); > send_to_char( "\n\r", ch ); > } > */ 3118a3360 > strip_grapple( ch ); 3167c3409 < 0, /* r1 */ --- > 120050, /* husk_shell */ 3203c3445 < "r1 message.", --- > "$n's shell remains.", 3373a3616,3628 > #ifdef MYSTARIC > /* > * Bug fix below since was using pIndexData on non NPC's -Shaddai > */ > if ( victim->pIndexData->pCasino ) > { > CASINO_DATA *casino; > > casino = victim->pIndexData->pCasino; > UNLINK( casino, first_casino, last_casino, next, prev ); > } > #endif > 3530d3784 < 3532c3786,3789 < obj = obj_to_room( obj, ch->in_room ); --- > if ( in_arena( ch ) ) > obj = obj_to_char( obj, ch ); > else > obj = obj_to_room( obj, ch->in_room ); 4004c4261 < log_string_plus( log_buf, LOG_NORMAL, ch->level ); --- > log_string_plus( log_buf, LOG_ALL, 65 ); 4024c4281 < if ( IS_SET( ch->in_room->room_flags, ROOM_ARENA ) ) --- > if ( xIS_SET( ch->in_room->room_flags, ROOM_ARENA ) ) 4053c4310 < sprintf( log_buf, "&p%s on %s%s in &W***&rILLEGAL PKILL&W*** &pattempt at %d", --- > sprintf( log_buf, "&p%s on %s%s in &G&R***&rILLEGAL PKILL&G&R*** &pattempt at %d", 4094a4352,4356 > if ( IS_AFFECTED( ch, AFF_GRAPPLE ) ) > { > send_to_char( "You're too wrapped up to flee!\n\r", ch ); > return; > } 4116a4379,4380 > || ( IS_PKILL( ch ) > && xIS_SET( pexit->to_room->room_flags, ROOM_DEATH ) ) 4119c4383 < || ( IS_NPC( ch ) && IS_SET( pexit->to_room->room_flags, ROOM_NO_MOB ) ) ) --- > || ( IS_NPC( ch ) && xIS_SET( pexit->to_room->room_flags, ROOM_NO_MOB ) ) ) 4140,4142c4404,4412 < sprintf( buf, "Curse the gods, you've lost %d experience!", los ); < act( AT_FLEE, buf, ch, NULL, NULL, TO_CHAR ); < gain_exp( ch, 0 - los ); --- > if ( !IS_PKILL( ch ) ) > { > if ( ch->level > 1 ) > { > sprintf( buf, "Curse the gods, you've lost %d experience!", los ); > act( AT_FLEE, buf, ch, NULL, NULL, TO_CHAR ); > gain_exp( ch, 0 - los ); > } > } 4163,4165c4433,4438 < sprintf( buf, "Curse the gods, you've lost %d experience!\n\r", los ); < act( AT_FLEE, buf, ch, NULL, NULL, TO_CHAR ); < gain_exp( ch, 0 - los ); --- > if ( !IS_PKILL( ch ) ) > { > sprintf( buf, "Curse the gods, you've lost %d experience!\n\r", los ); > act( AT_FLEE, buf, ch, NULL, NULL, TO_CHAR ); > gain_exp( ch, 0 - los ); > } 4177d4449 <