Heritage items, talismans
This commit is contained in:
parent
e7db1fd9f7
commit
129cac945b
109 changed files with 11659 additions and 188 deletions
|
|
@ -815,11 +815,24 @@ namespace Server.Engines.Craft
|
|||
if( m_ForceNonExceptional )
|
||||
return 0.0;
|
||||
|
||||
double bonus = 0.0;
|
||||
|
||||
if ( from.Talisman is BaseTalisman )
|
||||
{
|
||||
BaseTalisman talisman = (BaseTalisman) from.Talisman;
|
||||
|
||||
if ( talisman.Skill == system.MainSkill )
|
||||
{
|
||||
chance -= talisman.SuccessBonus / 100.0;
|
||||
bonus = talisman.ExceptionalBonus / 100.0;
|
||||
}
|
||||
}
|
||||
|
||||
switch ( system.ECA )
|
||||
{
|
||||
default:
|
||||
case CraftECA.ChanceMinusSixty: return chance - 0.6;
|
||||
case CraftECA.FiftyPercentChanceMinusTenPercent: return (chance * 0.5) - 0.1;
|
||||
case CraftECA.ChanceMinusSixty: chance -= 0.6; break;
|
||||
case CraftECA.FiftyPercentChanceMinusTenPercent: chance = chance * 0.5 - 0.1; break;
|
||||
case CraftECA.ChanceMinusSixtyToFourtyFive:
|
||||
{
|
||||
double offset = 0.60 - ((from.Skills[system.MainSkill].Value - 95.0) * 0.03);
|
||||
|
|
@ -829,9 +842,15 @@ namespace Server.Engines.Craft
|
|||
else if ( offset > 0.60 )
|
||||
offset = 0.60;
|
||||
|
||||
return chance - offset;
|
||||
chance -= offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( chance > 0 )
|
||||
return chance + bonus;
|
||||
|
||||
return chance;
|
||||
}
|
||||
|
||||
public bool CheckSkills( Mobile from, Type typeRes, CraftSystem craftSystem, ref int quality, ref bool allRequiredSkills )
|
||||
|
|
@ -886,6 +905,14 @@ namespace Server.Engines.Craft
|
|||
else
|
||||
chance = 0.0;
|
||||
|
||||
if ( allRequiredSkills && from.Talisman is BaseTalisman )
|
||||
{
|
||||
BaseTalisman talisman = (BaseTalisman) from.Talisman;
|
||||
|
||||
if ( talisman.Skill == craftSystem.MainSkill )
|
||||
chance += talisman.SuccessBonus / 100.0;
|
||||
}
|
||||
|
||||
if ( allRequiredSkills && valMainSkill == maxMainSkill )
|
||||
chance = 1.0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue