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.

tam

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

Can someone please test on OSI whether elf archers with 0 parry and 120 bushido can evade spells at a success chance of greater than 0% or 5%.

Note that evading [spells] is different from parrying a blow or arrow, because it is a separate calculation on OSI. "Attacks can be parried or evaded - those are completely different calculations that happen after the hit chance is calculated."

I believe archers used to be able to evade spells at 50%. It would not be very time consuming to test. Just hold the Nox rangers bow, cast Evasion and then cast fireball on self, like 10 times.

And before anyone posts something like, "you dont have a clue, I am always 100% right and it is definitely 0%", maybe this is why we are in this situation now.
 

EvilChild

Knight
Re: Bushido's Evasion to evade something!

tam;564677 said:
Can someone please test on OSI whether elf archers with 0 parry and 120 bushido can evade spells at a success chance of greater than 0% or 5%.

Note that evading [spells] is different from parrying a blow or arrow, because it is a separate calculation on OSI. "Attacks can be parried or evaded - those are completely different calculations that happen after the hit chance is calculated."

I believe archers used to be able to evade spells at 50%. It would not be very time consuming to test. Just hold the Nox rangers bow, cast Evasion and then cast fireball on self, like 10 times.

And before anyone posts something like, "you dont have a clue, I am always 100% right and it is definitely 0%", maybe this is why we are in this situation now.

In order to successfully evade a spell you need to be able to parry

you can never parry with a bow in your hand. Your quote from OSI is taken out of context. When they reference 2 seperate calculations they are NOT referring parry and evasion being seperate. They are referring to hit chance being seperate from parry chance. Please do not try to mislead people by taking things out of context, and then making a false assumption as fact to get your way.

The way combat works is attacker wep skill + HCI vs defender wep skill + DCI = hit probability

Then if the attack is successfully a *hit* then if applicable defenders parry chance is taken into effect and this determines if you successfully block the attack. Archers can never parry weapon attacks.

What does this have to do with evasion?

Evasion uses the same formula from above to dodge spells. So you can't parry with a bow = no evasion with a bow either.


If anyone wants to test it on OSI they are more than welcome to... but this is the way it's *supposed* to work.
 

Lucifall

Knight
Re: Bushido's Evasion to evade something!

120 bushido
120 parry

40% parry chance

Evasion 60% of your current parry chance is added to your real parry chance.

40 / 100 * 60 = 24% added to 40% = 64%. It rounds down to 60% I believe. That's how it should be.

Seems like Kiluad though it was a 60% direct addition to your parry chance, leading 120 parry/bush to have 100% parry chance on everything, which would explain why any lower bushido and parry than that has a chance to actually be hit. (Example, 30% @ 100/100 = 90%)
 

Malafor

Knight
Re: Bushido's Evasion to evade something!

Im not sure if this is how its suppose to be since i dont have OSI access, But evasion wont work with an UBWS weapon for me.

I get this message when i try to use evasion with my UBWS weapon.
Your skill with your equipped weapon must be 50 or higher to use evasion.

I currently have 120 fencing and the weapon im using is a nodachi with UBWS on.
 
Re: Bushido's Evasion to evade something!

Malafor;565025 said:
Im not sure if this is how its suppose to be since i dont have OSI access, But evasion wont work with an UBWS weapon for me.

I get this message when i try to use evasion with my UBWS weapon.


I currently have 120 fencing and the weapon im using is a nodachi with UBWS on.
That's how it's supposed to be.
 

EvilChild

Knight
Re: Bushido's Evasion to evade something!

Lucifall;564914 said:
120 bushido
120 parry

40% parry chance

Evasion 60% of your current parry chance is added to your real parry chance.

40 / 100 * 60 = 24% added to 40% = 64%. It rounds down to 60% I believe. That's how it should be.

Seems like Kiluad though it was a 60% direct addition to your parry chance, leading 120 parry/bush to have 100% parry chance on everything, which would explain why any lower bushido and parry than that has a chance to actually be hit. (Example, 30% @ 100/100 = 90%)

Evasion
Mana Cost: 10
Minimum Skill Needed: 60 (Also requires minimum 50 skill with the weapon being wielded.)
For a short duration after activating this ability, the Samurai can attempt to parry any attack (including attacks like dragon breath and lightning bolts). The chance to parry is increased by between 16-40% of the Samurai's normal chance to parry an attack, with a 10% bonus for Bushido above 100 AND both Tactics and Anatomy that are 100 or better.

The duration is 3-6 seconds, with a 2 second bonus for Bushido above 100 AND both Tactics and Anatomy that are 100 or better. Evasion can only be used once every 20 seconds.

So at 120bush 120parry 2h weapon and 100+ tact and anat you will have 50% of your current parry chance added onto your current parry chance. So the forumla should look something like

(.16+(bushido skill/5)) = x (although this does not account for minimum skill... at 0 bushido you would gain 16% and at 120bushido you would gain 40%... if they actually mean 16% at 60bushido which is the minimum skill level and 40% at 120 bushido the formula is different)

If bushido > 100
and if tactics, anatomy >= 100

then x + .1 = y (this adds the 10% boost)

and parry chance (1+y) = adjusted parry chance when bush>100 anat, tact >= 100

else

parry chance (1+x) = adjusted parry chance when 10% bonus criteria isn't met


This formula will calculate evasion chance correctly and is based on a sliding scale of 0-120 bushido. In reality instead of 16-40% it would be 28-40% because you can not cast evasion at less than 60 bushido. It is possible to create an adjusted formula that goes from 60-120 bushido and not 0-120bushido.
 

Lucifall

Knight
Re: Bushido's Evasion to evade something!

That would work indeed. Mine was just a scratch based on what info I currently had.
 

Nikki_Demise

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

osd_daedalus;565456 said:
I wish to know: is this issue fixed and in Mark's hands, or it still need someone to resolve it?

He has the fix but I think the kitchen may have eaten him

<Nikki> so i think we can call this fixed
<Mark> yea
<Mark> i will clean up evasion code more though
<Mark> its kind of some hacky logic
<Mark> but now i will cook some food :p
<Mark> be back in a little bit

And that was the last he was heard from... *glances around nervously*
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

Wish someone would have told me evasion wasn't working right, aside from the evading all the time. the problem was if someone cast it while wearing a shield without a weapon, forgot to test that, which is why i wanted more people to test. Anyway here's the anti crash fix, to deal with shields properly.

Code:
Index: Spells/Bushido/Evasion.cs
===================================================================
--- Spells/Bushido/Evasion.cs	(revision 321)
+++ Spells/Bushido/Evasion.cs	(working copy)
@@ -33,7 +33,16 @@
 		{
 			if( Caster == null ) // Sanity
 				return false;
+			
+			if ( !Caster.CanBeginAction( typeof( Evasion ) ) )
+					{
+					Caster.SendLocalizedMessage( 501789 ); // You must wait before trying again.
+					return false;
+					}
 
+			if( Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null )
+				return true;  
+
 			BaseWeapon weap = Caster.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;
 
 			if( weap == null )
@@ -49,13 +58,6 @@
 
 					return false;
 				}
-
-				if ( !Caster.CanBeginAction( typeof( Evasion ) ) )
-				{
-					Caster.SendLocalizedMessage( 501789 ); // You must wait before trying again.
-					return false;
-				}
-
 				return true;
 			}
 
@@ -67,17 +69,23 @@
 
 		public static bool CheckSpellEvasion( Mobile defender )
 		{
+			if ( Core.ML && defender.Spell != null && defender.Spell.IsCasting )
+				return false;
+			
+			if ( IsEvading( defender ) && BaseWeapon.CheckParry( defender ) && defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null )
+			{
+				defender.Emote( "*evades*" ); // Yes.  Eew.  Blame OSI.
+				defender.FixedEffect( 0x37B9, 10, 16 );
+				return true;
+			}
+
 			BaseWeapon weap = defender.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;
 
 			if ( weap == null )
 				weap = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon;
 
-			if ( Core.ML && defender.Spell != null && defender.Spell.IsCasting )
+			else if ( IsEvading( defender ) && BaseWeapon.CheckParry( defender ) && ( !Core.ML || defender.Skills[weap.Skill].Base > 50 ) && weap != null ) 
 			{
-				return false;
-			}
-			else if ( IsEvading( defender ) && BaseWeapon.CheckParry( defender ) && ( !Core.ML || defender.Skills[weap.Skill].Base > 50 ) && ( weap != null || defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null ) ) 
-			{
 				defender.Emote( "*evades*" ); // Yes.  Eew.  Blame OSI.
 				defender.FixedEffect( 0x37B9, 10, 16 );
 				return true;
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

While driving into town just now, i was thinking about this and i think i forgot to add a set of braces to avoid that fix returning true and false at the same time if someone has a weapon equiped with less than 50 real skill. check it out. i can't right now, not at home.
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

And here;'s a complete updated version, i am extremely confident in this version. i tested it under every circumstance i could think of. AND why it would evade spells everytime is because i forget a STUPID bracket, instead of subtracting 60 from your skill, it would multiply 60 by . 004 then subtract, it, so everytime you parried you would get more than 1. which is a block. still can't believe i forgot the stupid bracket lol.

As before add these two line to BaseCreature.cs to enable evading dragons breath.

Code:
                        int poisDamage = BreathPoisonDamage;
			int nrgyDamage = BreathEnergyDamage;
			
			[COLOR="Red"]if( Evasion.CheckSpellEvasion( target ) ) 
		        return;[/COLOR]


			if ( physDamage == 0 && fireDamage == 0 && coldDamage == 0 && poisDamage == 0 && nrgyDamage == 0 )

Patches to current SVN.

Code:
Index: Bushido/Evasion.cs
===================================================================
--- Bushido/Evasion.cs	(revision 321)
+++ Bushido/Evasion.cs	(working copy)
@@ -33,7 +33,16 @@
 		{
 			if( Caster == null ) // Sanity
 				return false;
+			
+			if ( !Caster.CanBeginAction( typeof( Evasion ) ) )
+					{
+					Caster.SendLocalizedMessage( 501789 ); // You must wait before trying again.
+					return false;
+					}
 
+			if( Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null )
+				return true;  
+
 			BaseWeapon weap = Caster.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;
 
 			if( weap == null )
@@ -49,13 +58,6 @@
 
 					return false;
 				}
-
-				if ( !Caster.CanBeginAction( typeof( Evasion ) ) )
-				{
-					Caster.SendLocalizedMessage( 501789 ); // You must wait before trying again.
-					return false;
-				}
-
 				return true;
 			}
 
@@ -67,17 +69,23 @@
 
 		public static bool CheckSpellEvasion( Mobile defender )
 		{
+			if ( Core.ML && defender.Spell != null && defender.Spell.IsCasting )
+				return false;
+			
+			if ( IsEvading( defender ) && BaseWeapon.CheckParry( defender ) && defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null )
+			{
+				defender.Emote( "*evades*" ); // Yes.  Eew.  Blame OSI.
+				defender.FixedEffect( 0x37B9, 10, 16 );
+				return true;
+			}
+
 			BaseWeapon weap = defender.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;
 
 			if ( weap == null )
 				weap = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon;
 
-			if ( Core.ML && defender.Spell != null && defender.Spell.IsCasting )
+			else if ( IsEvading( defender ) && BaseWeapon.CheckParry( defender ) && ( !Core.ML || defender.Skills[weap.Skill].Base > 50 ) && weap != null ) 
 			{
-				return false;
-			}
-			else if ( IsEvading( defender ) && BaseWeapon.CheckParry( defender ) && ( !Core.ML || defender.Skills[weap.Skill].Base > 50 ) && ( weap != null || defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null ) ) 
-			{
 				defender.Emote( "*evades*" ); // Yes.  Eew.  Blame OSI.
 				defender.FixedEffect( 0x37B9, 10, 16 );
 				return true;
@@ -166,7 +174,7 @@
 			double bonus = 0;
 
 			if( m.Skills.Bushido.Value >= 60 )
-				bonus += ( ( m.Skills.Bushido.Value - 60 * .004 ) + 0.16 );
+				bonus += ( ( ( m.Skills.Bushido.Value - 60.0 ) * 0.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;
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

Next time someone knows there's an issue with a script i post here, could you please tell me, instead of attacking me or anyone else for thinking it works right, it's easy for me to fix something i've been working on if i know what it's not doing, or if it's malfunctioning sometimes, especially if im told what the malfunction is which i wasn't at all and had to read all thread on this forum untill i found a crash thread in general on page two or three, then went into my server, loaded up evasion and started doing heavy testing, found out it would crash the server sometimes, looked at the script and fixed it. the shield crash was happening because of a conflict in two handed and shield weapons. i know what i changed originally and i know how to work around it. the evading every time was because i forgot a bracket in the math update, so the calculations weren't being done in the correct sequence. i didn't pay attention to this because i thought it was suppose to be 100%, didn't make much sense why it was turning out 100% every time though, which is why i asked if checkparry was rounding for some reason.

Still i would like people to test this script please.
 
Re: Bushido's Evasion to evade something!

Kiluad;566028 said:
Next time someone knows there's an issue with a script i post here, could you please tell me, instead of attacking me or anyone else for thinking it works right, it's easy for me to fix something i've been working on if i know what it's not doing, or if it's malfunctioning sometimes, especially if im told what the malfunction is which i wasn't at all and had to read all thread on this forum untill i found a crash thread in general on page two or three, then went into my server, loaded up evasion and started doing heavy testing, found out it would crash the server sometimes, looked at the script and fixed it. the shield crash was happening because of a conflict in two handed and shield weapons. i know what i changed originally and i know how to work around it. the evading every time was because i forgot a bracket in the math update, so the calculations weren't being done in the correct sequence. i didn't pay attention to this because i thought it was suppose to be 100%, didn't make much sense why it was turning out 100% every time though, which is why i asked if checkparry was rounding for some reason.

Still i would like people to test this script please.

Keep in mind that one that posted "OMG THE SERVER IS CRASHED!!" usually is not who caused it. Who caused it usually don't know why the server crashed. So take it easy! Glad we discovered a serious bug about :)
 
Re: Bushido's Evasion to evade something!

Although I have already demonstrated I should be put off-limits by testing... :D

To evading spells, looks like it goes well now.
To evading melee, looks like the same... it's only a bonus about parrying at the end, no? I haven't got perfectly the formula about, but looks like I can evade more when using evasion.
I have tried also shield without weapon. Evasion looks like enhances the (little) parry chance you have.

I ask someone that will do some serious testing to give the highest priority on this, since there is a major bug associated - a possibility to cause a server crash.
 

EvilChild

Knight
Re: Bushido's Evasion to evade something!

osd_daedalus;566651 said:
Although I have already demonstrated I should be put off-limits by testing... :D

To evading spells, looks like it goes well now.
To evading melee, looks like the same... it's only a bonus about parrying at the end, no? I haven't got perfectly the formula about, but looks like I can evade more when using evasion.
I have tried also shield without weapon. Evasion looks like enhances the (little) parry chance you have.

I ask someone that will do some serious testing to give the highest priority on this, since there is a major bug associated - a possibility to cause a server crash.

This looks like its behaving correctly. Evasion is only supposed to modify your parry chance. Even with just a shield you would still have very low chances to parry... which would be modified by evasion for the better... (5%-7% or so)
 

Kiluad

Sorceror
Re: Bushido's Evasion to evade something!

osd_daedalus;566077 said:
Keep in mind that one that posted "OMG THE SERVER IS CRASHED!!" usually is not who caused it. Who caused it usually don't know why the server crashed. So take it easy! Glad we discovered a serious bug about :)

you missed my point Daed. and i wasn't talking to you or the person who caused the server to crash. i was talking to <i>anyone</i> who "might" be trying to hurt this whole project by letting their unjustified ego get in the way of actual progress.
 
Re: [Development] Bushido's Evasion to evade something!

That concerns me. Is it already implemented? Is it implemented only in part? Or what?

I have still this mentioned as a critical fix, much for the server crash exploit than the wrong evasion values, and I don't know if this is still valid.
 

Kiluad

Sorceror
Re: [Development] Bushido's Evasion to evade something!

osd_daedalus;571375 said:
That concerns me. Is it already implemented? Is it implemented only in part? Or what?

I have still this mentioned as a critical fix, much for the server crash exploit than the wrong evasion values, and I don't know if this is still valid.

Seems to work good in game, there is one issue that shouldn't exist in game that does.

if you have a melee weapon and a shield equipped with less than 50 skill in the weapon, you can't cast evasion, but with a shield and no melee weapon/no wrestling skill, you can cast evasion. shouldn't be like that. should cast it with a shield no matter whats in your hands weapon skill or not..
 

Kiluad

Sorceror
Re: [Development] Bushido's Evasion to evade something!

should also note, there's a one or two minor tweaks that needs to be done to baseweapon.cs the calculations are done in the wrong order. which needs to be added to the list of evasion fix's.

The dex penalty should be calculated before the evasion bonus, not after.
 
Status
Not open for further replies.
Top