Project 1999

Project 1999 (/forums/index.php)
-   Blue Server Chat (/forums/forumdisplay.php?f=17)
-   -   Skill to % chance? (/forums/showthread.php?t=37145)

Kika Maslyaka 05-16-2011 01:55 PM

Skill to % chance?
 
Does anyone knows an aproximate formula how does my skill in Double Attack and Dual Wield translate into actual chance to hit?

So I have DW skill at 100 - what is the actual chance?
150? 200?
DA of a 100?
DA on off hand?

thanks!

Nagash 05-16-2011 02:30 PM

That's a very good question :) The closest I could find is the last post here, not sure how true it is though.

naez 05-16-2011 02:35 PM

PHP Code:

bool Client::CheckDoubleAttack(bool tripleAttack) {

    
// If you don't have the double attack skill, return
    
if(!HasSkill(DOUBLE_ATTACK) && !(GetClass() == BARD || GetClass() == BEASTLORD))
        return 
false;
    
    
// You start with no chance of double attacking
    
int chance 0;
    
    
// Used for maxSkill and triple attack calcs
    
int8 classtype GetClass();
    
    
// The current skill level
    
uint16 skill GetSkill(DOUBLE_ATTACK);

    
// Discipline bonuses give you 100% chance to double attack
    
sint16 buffs spellbonuses.DoubleAttackChance itembonuses.DoubleAttackChance;
    
    
// The maximum value for the Class based on the server rule of MaxLevel
    
int16 maxSkill MaxSkill(DOUBLE_ATTACKclasstypeRuleI(CharacterMaxLevel));

    
// AA bonuses for the melee classes
    
int32 aaBonus =
        
GetAA(aaBestialFrenzy) +
        
GetAA(aaHarmoniousAttack) +
        
GetAA(aaKnightsAdvantage)*10 +
        
GetAA(aaFerocity)*10;
    
    
// Bard Dance of Blades Double Attack bonus is not cumulative
    
if(GetAA(aaDanceofBlades)) {
        
aaBonus += 500;
    }
    
    
// Half of Double Attack Skill used to check chance for Triple Attack
    
if(tripleAttack) {
        
// Only some Double Attack classes get Triple Attack
        
if((classtype == MONK) || (classtype == WARRIOR) || (classtype == RANGER) || (classtype == BERSERKER)) {
            
// We only get half the skill, but should get all the bonuses
            
chance = (skill/2) + buffs aaBonus;
        }
        else {
            return 
false;
        }
    }
    else {
        
// This is the actual Double Attack chance
        
chance skill buffs aaBonus;
    }
    
    
// If your chance is greater than the RNG you are successful! Always have a 5% chance to fail at max skills+bonuses.
    
if(chance MakeRandomInt(0, (maxSkill itembonuses.DoubleAttackChance aaBonus)*1.05)) {
        return 
true;
    }

    return 
false;



Kika Maslyaka 05-16-2011 03:07 PM

Ok, to complite the calculations then, I need to know what is the maxskill?
is that per class or universal for all?

Extunarian 05-16-2011 03:07 PM

If the public emu snippied naez posted hasn't been changed for this server, it looks like the calculation is simply

% chance to double attack = (your skill) / [(max skill for your class at max level)*1.05]

right?

Kika Maslyaka 05-16-2011 03:09 PM

yeah but we need to know where maxskill comes from and what its set for

naez 05-16-2011 03:14 PM

Can't recall the max skill for level 60, and dual wield is more complicated to find the calculation for (i.e. can only find HAND==14 (secondary) in attack.cpp and I don't have Visual Studio installed, +lazy)

Extunarian 05-16-2011 03:16 PM

Quote:

Originally Posted by Kika Maslyaka (Post 292360)
yeah but we need to know where maxskill comes from and what its set for

The code says it's the max your class can get to given the server's max level:

Code:

    // The maximum value for the Class based on the server rule of MaxLevel
    int16 maxSkill = MaxSkill(DOUBLE_ATTACK, classtype, RuleI(Character, MaxLevel));

Doesn't really make sense to me though...if it went by your class' max skill then classes with a lower maximum skill would be at an advantage until it was maxed out, and then they would just have the same 95% chance as those with a higher max skill...

Kika Maslyaka 05-16-2011 03:18 PM

yeah exactly. would be no point for say warrior to have higher skill than a ranger

maxskill must be universal for all classes, or it doesn't make sence

Doors 05-16-2011 03:18 PM

All hail naez master of java


All times are GMT -4. The time now is 11:04 PM.

Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.