UOGamers Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • To obtain new Razor updates, please reinstall Razor from our new website.

[COMPLETE] Bushido's Evasion to evade something!

Status
Not open for further replies.

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

osd_daedalus;559819 said:
I am confused too... I have also reverted that patch for negative values to "ready but needs testing more"

But looks like tam has right. The formula should be correct, that delay coded in that way is ruining all

cool.


the negative number doesn't need testing. was never meant as an evasion patch, just prevents the script from going to negative numbers, won't affect many people without changing it, but it still shouldn't be sending negative numbers out like that, especially when it's not done calculating the chance. It was tested in the sense it will not crash a server.

The evasion change on page 4 i posted does need testing and i strongly urge someone who can, to test it to make sure it will run, as well as make a patch for it.

here's how the current SVN has it.

Code:
if( !Core.ML )
				return 1.5;

			double bonus = 80;

			if( m.Skills.Bushido.Value > 60 )
				bonus += m.Skills.Bushido.Value;

			if( m.Skills.Anatomy.Value >= 100 && m.Skills.Tactics.Value >= 100 &&  m.Skills.Bushido.Value > 100 )	//Bushido being HIGHER than 100 for bonus is intended
				bonus += 50;

			return 1.0 + bonus/500;

bonus = 80
Next line
if bushido is say 120. so add 120 to bonus. 80 + 120 = 200
Next line
Lets say i have no tactics. (add nothing to bonus)
Next line
1.0 + 200 / 500
= 1.4
Which is RIGHT

BUT if i lower the bushido skill it returns a wrong value.

bonus = 80
Next line
if bushido is say 61. so add 61 to bonus. 80 + 61 = 141
Next line
Lets say i have no tactics. (add nothing to bonus)
Next line
1.0 + 141 / 500
return = 1.282 That translates to 28.2% parry chance added to your parry, with only 61 bushido skill, the max at 120 is only 40% it's suppose to be. 60 skill - 120 skill && 16% - 40%
12% higher than it should be.


the change uses different math, and will always return the proper value. should anyway, i went over the numbers a few times.
 
Re: Bushido's Evasion to evade something!

and sooooo...

Removing the delay let me evade, so It's certain the matter is there.

About maths, someone could please illustrate me how to do? I tried to add at the end of GetParryScalar, just at the end of Kiluad's formula, this:
Code:
            if( m.Skills.Bushido.Value >= 60 )
                bonus += ( (m.Skills.Bushido.Value - 60 *.004) +  0.16);

            if( m.Skills.Anatomy.Value >= 100 && m.Skills.Tactics.Value >= 100 &&  m.Skills.Bushido.Value > 100 )    //Bushido being HIGHER than 100 for bonus is intended
                bonus += 0.10;

            return 1.0 + bonus;

            [COLOR=Red]m.SendMessage(String.Format("DEBUGGING: your chance to evade is {0}", bonus));[/COLOR]

but I don't have a message in return. Someone assists me?
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

osd_daedalus;559863 said:
and sooooo...

Removing the delay let me evade, so It's certain the matter is there.

About maths, someone could please illustrate me how to do? I tried to add at the end of GetParryScalar, just at the end of Kiluad's formula, this:
Code:
            if( m.Skills.Bushido.Value >= 60 )
                bonus += ( (m.Skills.Bushido.Value - 60 *.004) +  0.16);

            if( m.Skills.Anatomy.Value >= 100 && m.Skills.Tactics.Value >= 100 &&  m.Skills.Bushido.Value > 100 )    //Bushido being HIGHER than 100 for bonus is intended
                bonus += 0.10;

            return 1.0 + bonus;

            [COLOR=Red]m.SendMessage(String.Format("DEBUGGING: your chance to evade is {0}", bonus));[/COLOR]

but I don't have a message in return. Someone assists me?

defender.SendMessage(String.Format("DEBUGGING: your chance to evade is {0}", bonus))
 
Re: Bushido's Evasion to evade something!

Kiluad;559867 said:
defender.SendMessage(String.Format("DEBUGGING: your chance to evade is {0}", bonus))

"defender" is not declared in GetParryScalar!! Only m ... and in other classes (are they classes?) bonus won't appear.
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

yeah, but that's what ultimately uses it and you need to be a defender for it to calculate, why i figured it would work, since it doesn't i have no idea. sorry. :/
 
Re: Bushido's Evasion to evade something!

Kiluad;559907 said:
yeah, but that's what ultimately uses it and you need to be a defender for it to calculate, why i figured it would work, since it doesn't i have no idea. sorry. :/

ah now I have got it. You did calculations in pen&paper? I suck in maths :(
 

tam

Bug Hunter
Re: Bushido's Evasion to evade something!

It is debatable whether the chance to evade a spell is a flat 50% chance, a chance based on busido/tactics/anatomy skill values, or a chance based on parry chance. Mages will say it is based on parry, so archers or anyone without parry will have a 0% chance to evade a spell so they can kill archers easier, and archers will say it is 50% so they can survive better. IDK what it is, but lets just put in correct the calculation.
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

osd_daedalus;559924 said:
ah now I have got it. You did calculations in pen&paper? I suck in maths :(

yeah. I've tested it since. works n i was right.
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

Kiluad;558723 said:
shouldn't be able to evade

Does Archery Work with Bushido?
This is a trick question. Yes, Archery works with Bushido, however specific Bushido moves will not work without parry skill. In this case, Counter Attack and Evasion both will not work without parry, and the secondary aspects of Confidence will not either. Momentum Strike also will require the archer to be next to two opponents to get it to work effectively and the parry stipulation of a failed honorable execution will not work with archery either. The reason these do not work with archery is because you cannot ever parry with a bow, and the likelihood of this changing is pretty low
- UO site


It does work though, because if the archer has 100 bushido or parry they have 5% parry chance.


I was wrong, i didn't bother to look and see if archery ever called for a parry check. it doesn't. But, technically, archers do have .5% parry chance it's just never used, because the bushido and parry skills are suppose to add it no matter what, the real issue is that bows refuse to allow players to parry, if they were ever allowed to parry with a bow, it would be at least 5% with bushido/parry > 100.

just imaging a bow trying to block a sword 5% of the time , sure you parry it with your bow, but the bow also gets sliced in two and you get hit... just be thankful you keep your bow imo.
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

So does evasion work correctly yet? i dunno see a patch, and i've never tried it with spells.

If it's not and tam or gilgamash aren't doing it, which i thought they did fix it but can't find it so i dunno. let me know?
 
Re: Bushido's Evasion to evade something!

tam;559708 said:
The bug was introduced when the 20 second cool down timer was implemented.

This code
Code:
if ( !Caster.CanBeginAction( typeof( Evasion ) ) )
                {
                    Caster.SendLocalizedMessage( 501789 ); // You must wait before trying again.
                    return [B]false[/B];
                }
was added to VerifyCast. So when you call VerifyCast again when someone is already evading, VerifyCast will return false.

So when you have

Code:
            if( IsEvading( defender ) && VerifyCast( defender, false ) && BaseWeapon.CheckParry( defender ) ) //As per OSI, uses the exact same parry code
            {
[COLOR=Blue]                defender.Emote( "*evades*" );    //Yes.  Eew.  Blame OSI.
                defender.FixedEffect( 0x37B9, 10, 16 );
                return true;[/COLOR]
            }
when someone is already evading, it wont get into the blue bit to evade a spell, and hence you wont evade anything [if bushido <= 120].

It's certain the matter is there now.
But I don't understand this...

That line:
if( IsEvading( defender ) && VerifyCast( defender, false ) && BaseWeapon.CheckParry( defender ) )

should not mean "if the bool VerifyCast return False, then false = false, so = TRUE and continue reading" ??
 

Kiluad

Sorceror
im pretty sure it's these lines that do it. there's too many timers involved it's sending mixed messages imo.

Code:
                       Caster.BeginAction( typeof( Evasion ) );
				Timer.DelayCall( TimeSpan.FromSeconds( 20.0 ), delegate { Caster.EndAction( typeof( Evasion ) ); } );

because even with uber high parry and bushido, it waits 20 seconds to start evading.

and i just took them out and it works find. HOWEVER, now there's no limit on how many times you can use it, and it evades every time. i'll switch up the evading everytime thingy, and try to figure out how to get a proper timer in there.
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

osd_daedalus;561325 said:
should not mean "if the bool VerifyCast return False, then false = false, so = TRUE and continue reading" ??

I didn't even test that because i wasn;t sure what you meant, but now that i look, that should work better with the timer. still need a proper parry% added.
 

tam

Bug Hunter
Re: Bushido's Evasion to evade something!

fyi Evasion has a 20 second cool down timer on OSI shards.
 

tam

Bug Hunter
Re: Bushido's Evasion to evade something!

osd_daedalus;563080 said:
it is respected in last Kiluad's patch, no?

I dont know. If you can evade only every 20 seconds then yes, if you can spam it whenever you want, then no.
 
Re: Bushido's Evasion to evade something!

tam;563084 said:
I dont know. If you can evade only every 20 seconds then yes, if you can spam it whenever you want, then no.

then yes :) But if you can test it, it would be better :p
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

tam;563074 said:
fyi Evasion has a 20 second cool down timer on OSI shards.

the delay timer was making the verifycast check not work with checkspellevasion. i tried and tried and tried and tried to get checkspellevasion to work with verifycast because someone added "this is how osi does it" to the code, which was the only place that held the delaytimer check, but it was impossible, so i just added all the required checks dirctly to checkspellevasion while players were under the effect of evasion, instead of using them from verifycast.

i didn't want to fatten up the code, but there was no other way. and the reason it was so confusing imo, is because someone added a few misleading comments to the script.
 
Re: Bushido's Evasion to evade something!

Kiluad;563233 said:
the delay timer was making the verifycast check not work with checkspellevasion. i tried and tried and tried and tried to get checkspellevasion to work with verifycast because someone added "this is how osi does it" to the code, which was the only place that held the delaytimer check, but it was impossible, so i just added all the required checks dirctly to checkspellevasion while players were under the effect of evasion, instead of using them from verifycast.

i didn't want to fatten up the code, but there was no other way. and the reason it was so confusing imo, is because someone added a few misleading comments to the script.

oh well, I have tried by pumping bushido to 1000 (to have a big evasion time) and to try to evade when casting flamestrike, and you can't evade.

Although, I have did better checks, and the problem "to not evade during spell casting" is almost virtual: even with 120 bushido, as you cast Evasion you have to wait a little before casting something else... the "window" between you cast a spell while in evasion and while the evasion ends is... about 0,5 seconds. Not a great gain, after all.

I repeat, looks like it works now.

Someone please do a test, so I can put this in ready for commit! Evasion will return working in next server wars!
 
Status
Not open for further replies.
Top