本文整理汇总了C#中Server.Items.BaseWeapon.DoLightning方法的典型用法代码示例。如果您正苦于以下问题:C# BaseWeapon.DoLightning方法的具体用法?C# BaseWeapon.DoLightning怎么用?C# BaseWeapon.DoLightning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.BaseWeapon
的用法示例。
在下文中一共展示了BaseWeapon.DoLightning方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShenStrike
public void ShenStrike(Mobile attacker, Mobile defender, BaseWeapon weapon)
{
if (Level >= PerkLevel.Fifth)
{
if (weapon is Fists && Utility.RandomDouble() <= 0.10)
{
int element = Utility.RandomMinMax(2, 4);
switch (element)
{
case 1:
{
weapon.DoLightning(attacker, defender);
break;
}
case 2:
{
weapon.DoMagicArrow(attacker, defender);
break;
}
case 3:
{
weapon.DoHarm(attacker, defender);
break;
}
case 4:
{
weapon.DoFireball(attacker, defender);
break;
}
}
}
}
}
示例2: Capacitor
public void Capacitor(Mobile attacker, Mobile defender, BaseWeapon weapon)
{
if (Level >= PerkLevel.Fourth)
{
if (!(weapon is Fists) && !(weapon is BaseRanged) && weapon is BaseWeapon && Utility.RandomDouble() <= 0.10)
{
int element = Utility.RandomMinMax(1, 4);
switch (element)
{
case 1:
{
weapon.DoLightning(attacker, defender);
break;
}
case 2:
{
weapon.DoMagicArrow(attacker, defender);
break;
}
case 3:
{
weapon.DoHarm(attacker, defender);
break;
}
case 4:
{
weapon.DoFireball(attacker, defender);
break;
}
}
}
}
}