本文整理匯總了C#中Server.Items.BaseWeapon.DoFireball方法的典型用法代碼示例。如果您正苦於以下問題:C# BaseWeapon.DoFireball方法的具體用法?C# BaseWeapon.DoFireball怎麽用?C# BaseWeapon.DoFireball使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server.Items.BaseWeapon
的用法示例。
在下文中一共展示了BaseWeapon.DoFireball方法的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;
}
}
}
}
}