本文整理匯總了C#中Server.Mobiles.PlayerMobile.ApplyFortune方法的典型用法代碼示例。如果您正苦於以下問題:C# PlayerMobile.ApplyFortune方法的具體用法?C# PlayerMobile.ApplyFortune怎麽用?C# PlayerMobile.ApplyFortune使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server.Mobiles.PlayerMobile
的用法示例。
在下文中一共展示了PlayerMobile.ApplyFortune方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: TellFortune
public static void TellFortune( PlayerMobile from )
{
switch ( Utility.Random( 20 ) )
{
case 0: from.ApplyFortune( 1, Utility.RandomMinMax( 1, 15 ) ); break; //+1 to +15 Phys
case 1: from.ApplyFortune( 2, Utility.RandomMinMax( 1, 15 ) ); break; //+1 to +15 Fire
case 2: from.ApplyFortune( 3, Utility.RandomMinMax( 1, 15 ) ); break; //+1 to +15 Cold
case 3: from.ApplyFortune( 4, Utility.RandomMinMax( 1, 15 ) ); break; //+1 to +15 Poison
case 4: from.ApplyFortune( 5, Utility.RandomMinMax( 1, 15 ) ); break; //+1 to +15 Energy
case 5: from.ApplyFortune( 6, Utility.RandomMinMax( 10, 50 ) ); break; //+10 to +50 Luck
case 6: from.ApplyFortune( 7, Utility.RandomMinMax( 1, 5 ) * 5 ); break; //+5 to +25 Enhance Potions
case 7: from.ApplyFortune( 8, Utility.RandomMinMax( 50, 100 ) ); break; //+50 to +100 Luck
case 8: from.ApplyFortune( 9, Utility.RandomMinMax( 1, 15 ) ); break; //+1 to +15 Defense
case 9: from.ApplyFortune( 10, Utility.RandomMinMax( 1, 3 ) ); break; //+1 to +3 Mana regan
case 10: from.ApplyFortune( 11, Utility.RandomMinMax( 1, 15 ) ); break; //-1 to -15 Phys
case 11: from.ApplyFortune( 12, Utility.RandomMinMax( 1, 15 ) ); break; //-1 to -15 Fire
case 12: from.ApplyFortune( 13, Utility.RandomMinMax( 1, 15 ) ); break; //-1 to -15 Cold
case 13: from.ApplyFortune( 14, Utility.RandomMinMax( 1, 15 ) ); break; //-1 to -15 Poison
case 14: from.ApplyFortune( 15, Utility.RandomMinMax( 1, 15 ) ); break; //-1 to -15 Energy
case 15: from.ApplyFortune( 16, Utility.RandomMinMax( 10, 50 ) ); break; //-10 to -50 Luck
case 16: from.ApplyFortune( 17, Utility.RandomMinMax( 1, 5 ) * 5 ); break; //-5 to -25 Enhance Potions
case 17: from.ApplyFortune( 18, Utility.RandomMinMax( 50, 100 ) ); break; //-50 to -100 Luck
case 18: from.ApplyFortune( 19, Utility.RandomMinMax( 1, 10 ) ); break; //-1 to -10 Defense
case 19: from.ApplyFortune( 20, Utility.RandomMinMax( 1, 3 ) ); break; //-1 to -3 Mana Regen
}
}