Esempio n. 1
0
int CChar::NPC_GetWeaponUseScore( CItem * pWeapon )
{
	ADDTOCALLSTACK("CChar::NPC_GetWeaponUseScore");
	// How good would i be at this weapon ?

	SKILL_TYPE skill;

	if ( !pWeapon )
		skill = SKILL_WRESTLING;
	else
	{
		// Is it a weapon ?
		skill = pWeapon->Weapon_GetSkill();
		if ( skill == SKILL_WRESTLING )
			return( 0 );

		// I can't equip this anyhow.
		if ( CanEquipLayer( pWeapon, LAYER_QTY, NULL, true ) == LAYER_NONE )
			return( 0 );
		// How much damage could i do with this ?
	}

	int iDmg = Fight_CalcDamage( pWeapon );
	int iSkillLevel = Skill_GetAdjusted( skill );

	return( iSkillLevel + iDmg * 50 );
}
Esempio n. 2
0
int CChar::NPC_GetWeaponUseScore(CItem *pWeapon)
{
	ADDTOCALLSTACK("CChar::NPC_GetWeaponUseScore");
	// How good would i be at this weapon ?

	SKILL_TYPE skill = SKILL_WRESTLING;
	if ( pWeapon )
	{
		skill = pWeapon->Weapon_GetSkill();
		if ( skill == SKILL_WRESTLING )
			return 0;
		if ( CanEquipLayer(pWeapon, LAYER_QTY, NULL, true) == LAYER_NONE )		// I can't equip this
			return 0;
	}

	return Skill_GetAdjusted(skill) + Fight_CalcDamage(pWeapon) * 50;
}