Re: Bushido's Evasion to evade something!
osd_daedalus;558438 said:
If this is true, I don't understand why I reached to evade with 700 bushido and parrying. If it reports always a false bool, I should not reach to evade, despite every value I could set in Bushido and Parrying
I believe VerifyCast is there to avoid, for example, you evade a spell while you are casting something. The problem, if there is one there, is to let it know the Evasion activated is not a "casting in progress".
Sorry, I should have typed "The 2nd check VerifyCast( defender, false ) is always coming back false regardless of archer or dexer, so there is currently a 0% chance to evade." ... a spell if you have <= 120 Bushido when you are in the 20 second cool down period after successfully casting the Evasion spell because of this line
Code:
if ( !Caster.CanBeginAction( typeof( Evasion ) ) )
{
Caster.SendLocalizedMessage( 501789 ); // You must wait before trying again.
return false;
}
If you have 700 bushido (which you are not suppose to have).
The code
Code:
public static TimeSpan GetEvadeDuration( Mobile m )
{
/* Evasion duration now scales with Bushido skill
*
* If the player has higher than GM Bushido, and GM Tactics and Anatomy, they get a 1 second bonus
* Evasion duration range:
* o 3-6 seconds w/o tactics/anatomy
* o 6-7 seconds w/ GM+ Bushido and GM tactics/anatomy
*/
if( !Core.ML )
return TimeSpan.FromSeconds( 8.0 );
double seconds = 3;
if( m.Skills.Bushido.Value > 60 )
seconds += (m.Skills.Bushido.Value - 60) / 20;
if( m.Skills.Anatomy.Value >= 100.0 && m.Skills.Tactics.Value >= 100.0 && m.Skills.Bushido.Value > 100.0 ) //Bushido being HIGHER than 100 for bonus is intended
seconds++;
return TimeSpan.FromSeconds( (int)seconds );
}
will return something like 36 seconds for the Evasion.
So in the 16 seconds after the 20 second cool down, you will then be able to evade spells (i.e. >20 seconds and <36 seconds after first casting Evasion). But if you Bushido <= 120 you will have max duration of 7 seconds, and this weird occurence wont happen.
... something like that anyway.
btw
if( IsEvading( defender ) && ( ( GetParryScalar( defender ) - 1 ) > Utility.RandomDouble() ) )
is another alternative fix if you would like dont think its a flat 50% chance to evade a spell.
I have attached my Evasion.cs file that has test lines that you can try out with difference test senarios.