http://www.uodemise.com/forum/showthread.php?t=145364 BOD turn-in should have 10 second timer since pub 50 http://www.uodemise.com/forum/showthread.php?t=156441 Vet reward ore carts, gem carts, and stumps have missing range check added http://www.uodemise.com/forum/showthread.php?t=156380 Blood Oath: missing 35hp pvp dmg cap added, correct credit for kills/dmg given to caster, ML magic resist now applies. http://www.uodemise.com/forum/showthread.php?t=118729&page=3 Missing ore sizes added http://www.uodemise.com/forum/showthread.php?t=119888 Player-cast gates reveal stealthers/hiders. http://www.uodemise.com/forum/showthread.php?t=149218 Some necro spells should disturb a casting target http://www.uodemise.com/forum/showthread.php?t=149361 Failed snoop attempts should reveal thief if hidden. http://www.uodemise.com/forum/showthread.php?t=153962 Pets do not autostable in the case of a server restart/cash: fixed http://www.uodemise.com/forum/showthread.php?t=122745 Misc Aesthetic changes to spells, etc. earthquake wrong sound magic arrow inappropriate particles curse wrong sound agility wrong sound chain lightning should always play sound poison wrong sound dispel evil missing sound noble sacrifice male/female, diff sounds sacred journey missing sound
75 lines
2.1 KiB
C#
75 lines
2.1 KiB
C#
using System;
|
|
using System.Collections;
|
|
using Server.Network;
|
|
using Server.Items;
|
|
using Server.Mobiles;
|
|
using Server.Targeting;
|
|
|
|
namespace Server.Spells.Bushido
|
|
{
|
|
public class LightningStrike : SamuraiMove
|
|
{
|
|
public LightningStrike()
|
|
{
|
|
}
|
|
|
|
public override int BaseMana{ get{ return 5; } }
|
|
public override double RequiredSkill{ get{ return 50.0; } }
|
|
|
|
public override TextDefinition AbilityMessage{ get{ return new TextDefinition( 1063167 ); } } // You prepare to strike quickly.
|
|
|
|
public override bool DelayedContext{ get{ return true; } }
|
|
|
|
public override int GetAccuracyBonus( Mobile attacker )
|
|
{
|
|
return 50;
|
|
}
|
|
|
|
public override bool Validate(Mobile from)
|
|
{
|
|
bool isValid=base.Validate(from);
|
|
if (isValid)
|
|
{
|
|
PlayerMobile ThePlayer = from as PlayerMobile;
|
|
ThePlayer.ExecutesLightningStrike = BaseMana;
|
|
}
|
|
return isValid;
|
|
}
|
|
|
|
public override bool IgnoreArmor( Mobile attacker )
|
|
{
|
|
double bushido = attacker.Skills[SkillName.Bushido].Value;
|
|
double criticalChance = (bushido * bushido) / 72000.0;
|
|
return ( criticalChance >= Utility.RandomDouble() );
|
|
}
|
|
|
|
public override bool OnBeforeSwing( Mobile attacker, Mobile defender )
|
|
{
|
|
/* no mana drain before actual hit */
|
|
bool enoughMana = CheckMana(attacker, false);
|
|
return Validate(attacker);
|
|
}
|
|
|
|
public override bool ValidatesDuringHit { get { return false; } }
|
|
|
|
public override void OnHit( Mobile attacker, Mobile defender, int damage )
|
|
{
|
|
ClearCurrentMove(attacker);
|
|
if (CheckMana(attacker, true))
|
|
{
|
|
attacker.SendLocalizedMessage(1063168); // You attack with lightning precision!
|
|
defender.SendLocalizedMessage(1063169); // Your opponent's quick strike causes extra damage!
|
|
defender.FixedParticles(0x3818, 1, 11, 0x13A8, 0, 0, EffectLayer.Waist);
|
|
defender.PlaySound(0x51D);
|
|
CheckGain(attacker);
|
|
SetContext(attacker);
|
|
}
|
|
}
|
|
|
|
public override void OnClearMove( Mobile attacker )
|
|
{
|
|
PlayerMobile ThePlayer = attacker as PlayerMobile; // this can be deletet if the PlayerMobile parts are moved to Server.Mobile
|
|
ThePlayer.ExecutesLightningStrike = 0;
|
|
}
|
|
}
|
|
}
|