| Message
| Well.. I'm trying new critical strikes code.. but it goes in with nothing but simple warnings of:
fight.c:1015: warning: unused variable `obj'
fight.c:1014: warning: `dam' might be used uninitialized in this function
but when I fight.. none of the messages ever come up.. anyone have any ideas?
if ( prof_gsn != -1 )
learn_from_failure( ch, prof_gsn );
act( AT_PLAIN, "Your attack misses $N!", ch, NULL, victim, TO_CHAR );
damage( ch, victim, 0, dt );
tail_chain( );
return rNONE;
}
}
/* Critical strikes based off Equipment
*/
if ( diceroll >= 19 )
{
if ( get_eq_char(ch, WEAR_SHIELD ) && !get_eq_char(ch, WEAR_LEGS) )
{
act( AT_FIRE, "You critically hit $N in the legs!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$n swings low and critically hits your legs!!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n critically hits $N in the legs!", ch, NULL, victim, TO_NOTVICT );
do_for( supermob, "$N cast 'energy drain' #" );
dam = 2 * dam;
}
else if ( get_eq_char(ch, WEAR_SHIELD) && ( get_eq_char(ch, WEAR_LEGS) )
{
act( AT_FIRE, "Your attack bounces off $n's shield!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$n's attack bounces off your shield!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n's attack bounces off $n's shield!", ch, NULL, victim, TO_NOTVICT );
dam = dam - dam/3;
}
else if ( !get_eq_char(ch, WEAR_HEAD ) )
{
act( AT_FIRE, "You critically hit $N in the head!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$n critically hits you in the head!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n critcally hits $N in the head!", ch, NULL, victim, TO_NOTVICT );
do_stun (ch, "");
do_for( supermob, "$N stun #" );
dam
= 3.6 * dam;
}
else if ( !get_eq_char(ch, WEAR_BODY ) )
{
act( AT_FIRE, "You critically hit $N in the chest!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$n critically hits you in the chest!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n critically hits $N in the chest!", ch, NULL, victim, TO_NOTVICT );
dam = 3 * dam;
}
else if ( !get_eq_char(ch, WEAR_WAIST ) )
{
act( AT_FIRE, "You critically hit $n across the waist!!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$n critically hits you in the waist!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n critically hits $N in the chest!", ch, NULL, victim, TO_NOTVICT );
dam = 2 * dam;
}
else if ( !get_eq_char(ch, WEAR_ARMS ) )
{
act( AT_FIRE, "You critically hit $N in the arm, fracturing it!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$n critically hits you in the arm, fracturing it!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n critically hits $N in the arm!", ch, NULL, victim, TO_NOTVICT );
do_for( supermob, "$N cast weaken #" );
dam = 2 * dam;
}
else if ( !get_eq_char(ch, WEAR_NECK_1 ) && !get_eq_char(ch, WEAR_NECK_2 ) )
{
act( AT_FIRE, "You critically hit $N in the neck!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$n critically hits you in the neck!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n critically hits $N in the neck!", ch, NULL, victim, TO_NOTVICT );
dam = 2.5 * dam;
}
else if ( !get_eq_char(ch, WEAR_NECK_1 ) && get_eq_char(ch, WEAR_NECK_2 ) )
{
act( AT_FIRE, "You critically hit $N in the neck!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$n critically hits you in the neck!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n critically hits $N in the neck!", ch, NULL, victim, TO_NOTVICT );
dam = 1.5 * dam;
}
else if ( !get_eq_char(ch, WEAR_LEGS ) )
{
act( AT_FIRE, "You critically hit $N in the legs!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$n critically hits you in the legs!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n critically hits $N in the legs!", ch, NULL, victim, TO_NOTVICT );
do_for( supermob, "$N cast 'energy drain' #" );
dam = 2 * dam;
}
else if ( !get_eq_char(ch, WEAR_FEET ) )
{
act( AT_FIRE, "You strike down at $N's feet!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$n strikes your feet!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n hits $N's feet!", ch, NULL, victim, TO_NOTVICT );
do_for( supermob, "$N cast 'energy drain' #" );
dam = dam - 5;
}
else if ( !get_eq_char(victim, WEAR_WIELD ) && !get_eq_char(ch, WEAR_WIELD ) && !get_eq_char(victim, WEAR_HANDS ) )
{
act( AT_FIRE, "Your hands are injured by $N's weapon!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$N's hands are injured by your weapon!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$n's strike is stopped by $N's weapon!", ch, NULL, victim, TO_NOTVICT );
dam = 2 * dam;
}
else if ( !get_eq_char(victim, WEAR_WIELD ) && !get_eq_char(ch, WEAR_WIELD ) && get_eq_char(victim, WEAR_HANDS ) )
{
act( AT_FIRE, "Your gloves protect your hands from $N's weapon!", ch, NULL, victim, TO_CHAR );
act( AT_FIRE, "$N's gloves protect $S from your weapon!", ch, NULL, victim, TO_VICT );
act( AT_FIRE, "$N's hands are protected from $N's weapon!", ch, NULL, victim, TO_NOTVICT );
dam = dam + dam/3;
}
}
/*
* Bonuses.
*/
dam += GET_DAMROLL(ch);
if ( prof_bonus )
dam += prof_bonus / 4;
|
Darkness comes along thy path, searching, wanting, calling wrath,
shadows awaken, release the light, one and only.. here to fight,
challenge the darkness, the shadows they call, hunting the living,
more and all. Roaring thunder, full of hate, a single bound, seals
your fate.
-Txzeenath
telnet://divineright.org:8088
Alumuble Arda -
*Player owned shops, clans, and housing
*Multiclass & Stat training
*Random mob name generation implemented and Overland mapping.
*Realistic equipment statistics
*Interactive enviroment(weather/sectors)
*Weapon sheaths(scabbards), Throwing weapons
*Automatic crash recovery, saving, and reporting without disconnecting
*Fully customizeable color, Automapper, "Smart" mobiles, Hiscore tables, and more!
Currently running AGE v1.9.6(Originated and modified from Smaug 1.4a) | | Top |
|