本文整理汇总了C#中Server.Mobile.CheckSkill方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.CheckSkill方法的具体用法?C# Mobile.CheckSkill怎么用?C# Mobile.CheckSkill使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobile
的用法示例。
在下文中一共展示了Mobile.CheckSkill方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( !this.VerifyMove( from ) )
return;
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, true, "I can't reach that." ); // I can't reach that.
return;
}
Point3D fireLocation = GetFireLocation( from );
if ( fireLocation == Point3D.Zero )
{
from.SendAsciiMessage( "There is not a spot nearby to place your campfire." ); // There is not a spot nearby to place your campfire.
}
else if ( !from.CheckSkill( SkillName.Camping, 0.0, 100.0 ) )
{
from.SendAsciiMessage("You fail to ignite the campfire."); // You fail to ignite the campfire.
}
else
{
Consume();
if ( !this.Deleted && this.Parent == null )
from.PlaceInBackpack( this );
new Campfire(from).MoveToWorld( fireLocation, from.Map );
}
}
示例2: OnUse
public static TimeSpan OnUse( Mobile m )
{
m.RevealingAction();
Timer t = m_Table[m] as Timer;
if ( t != null && t.Running )
t.Stop();
if ( m.CheckSkill( SkillName.SpiritSpeak, 0, 100 ) )
{
if ( t == null )
m_Table[m] = t = new SpiritSpeakTimer( m );
double secs = m.Skills[SkillName.SpiritSpeak].Base / 50;
secs *= 90;
if ( secs < 10 )
secs = 10;
t.Delay = TimeSpan.FromSeconds( secs );//15 seconds to 3 minutes
t.Start();
m.CanHearGhosts = true;
m.PlaySound( 0x24A );
m.SendLocalizedMessage( 502444 );//You contact the neitherworld.
}
else
{
m_Table.Remove( m );
m.SendLocalizedMessage( 502443 );//You fail to contact the neitherworld.
m.CanHearGhosts = false;
}
return TimeSpan.FromSeconds( 10.0 );
}
示例3: CheckResistedEasyStatic
public static bool CheckResistedEasyStatic( Mobile target, int Circle )
{
int sk = (1 + Circle) * 10; // easy resist for mana vamp, poison, etc
if (!target.Player)
sk *= 2; // make it easy to use these spells on monsters
return target.CheckSkill(SkillName.MagicResist, sk - 20, sk + 20);
}
示例4: OnTarget
public void OnTarget(Mobile from, object obj)
{
if (!(obj is AlchemyVial))
{
from.SendMessage("Chauffer cette solution ne vous servira à rien");
return;
}
AlchemyVial vial = (AlchemyVial)obj;
if (vial.AlchemyLiquidType == LiquidType.None)
{
from.SendMessage("Votre fiole est vide");
return;
}
if (vial.AlchemyLiquidType != LiquidType.ChangelingBlood)
{
from.SendMessage("Il ne servirait à rien de tenter de faire chauffer cette éprouvette");
return;
}
if (!from.CheckSkill(SkillName.Alchemy,20,90))
{
from.SendMessage("L'éprouvette explose!");
from.Hits -= 5;
return;
}
from.SendMessage("Le liquide bout et se transforme. Vous le versez lentement dans une autre éprouvette");
vial.Consume();
from.AddToBackpack(new MorphBase());
}
示例5: OnTarget
protected override void OnTarget( Mobile from, object targeted )
{
if ( targeted is BaseAssembly )
{
BaseAssembly creature = (BaseAssembly)targeted;
if ( from.Skills[SkillName.Tinkering].Value < 100.0 && creature.Creator != from )
from.SendMessage( "At your skill level, you can only examine assemblies that you have crafted" ); // At your skill level, you can only lore tamed creatures
else
{
if ( from.CheckSkill( SkillName.Tinkering, 0, 60 ) )
{
from.CloseGump( typeof( AnimalLoreGump ) );
from.SendGump( new AnimalLoreGump( (BaseCreature)creature ) );
}
else
{
creature.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 500334, from.NetState ); // You can't think of anything you know offhand.
}
}
}
else
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "That is not an assemby" );
}
}
示例6: ScaleDamageAgainstResist
public static int ScaleDamageAgainstResist( double damage, double maxResisted, Mobile target )
{
target.CheckSkill( SkillName.MagicResist, 00.0, 100.0 );
double resistFraction = target.Skills[SkillName.MagicResist].Value / 100;
double resisted = ( maxResisted * damage ) * resistFraction;
return (int)(damage - resisted);
}
示例7: TrackWhatGump
public TrackWhatGump( Mobile from ) : base( 20, 30 )
{
m_From = from;
m_Success = from.CheckSkill( SkillName.Tracking, 0.0, 21.1 );
AddPage( 0 );
AddBackground( 0, 0, 440, 135, 5054 );
AddBackground( 10, 10, 420, 75, 2620 );
AddBackground( 10, 85, 420, 25, 3000 );
AddItem( 20, 20, 9682 );
AddButton( 20, 110, 4005, 4007, 1, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 20, 90, 100, 20, 1018087, false, false ); // Animals
AddItem( 120, 20, 9607 );
AddButton( 120, 110, 4005, 4007, 2, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 120, 90, 100, 20, 1018088, false, false ); // Monsters
AddItem( 220, 20, 8454 );
AddButton( 220, 110, 4005, 4007, 3, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 220, 90, 100, 20, 1018089, false, false ); // Human NPCs
AddItem( 320, 20, 8455 );
AddButton( 320, 110, 4005, 4007, 4, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 320, 90, 100, 20, 1018090, false, false ); // Players
}
示例8: OnUse
public static TimeSpan OnUse(Mobile m)
{
if (!m.Hidden)
{
m.SendLocalizedMessage(502725); // You must hide first
}
else if (m.Skills[SkillName.Hiding].Base < 80.0)
{
m.SendLocalizedMessage(502726); // You are not hidden well enough. Become better at hiding.
}
else if (GetArmorOffset(m) >= 15)
{
m.SendLocalizedMessage(502727); // You could not hope to move quietly wearing this much armor.
}
else if (m.CheckSkill(SkillName.Stealth, 0.0, 100.0))
{
int steps = (int)(m.Skills[SkillName.Stealth].Value / (Core.AOS ? 5.0 : 10.0));
if (steps < 1)
steps = 1;
m.AllowedStealthSteps = steps;
m.SendLocalizedMessage(502730); // You begin to move quietly.
return TimeSpan.FromSeconds(10.0);
}
else
{
m.SendLocalizedMessage(502731); // You fail in your attempt to move unnoticed.
m.RevealingAction();
}
return TimeSpan.FromSeconds(10.0);
}
示例9: Use
public void Use( Mobile from, BaseWeapon weapon )
{
BeginSwing();
from.Direction = from.GetDirectionTo( GetWorldLocation() );
weapon.PlaySwingAnimation( from );
from.CheckSkill( weapon.Skill, m_MinSkill, m_MaxSkill );
}
示例10: GetResistSkill
public override double GetResistSkill( Mobile m )
{
int maxSkill = (1 + (int)Circle) * 10;
maxSkill += (1 + ((int)Circle / 6)) * 25;
if( m.Skills[SkillName.MagicResist].Value < maxSkill )
m.CheckSkill( SkillName.MagicResist, 0.0, m.Skills[SkillName.MagicResist].Cap );
return m.Skills[SkillName.MagicResist].Value;
}
示例11: CheckBonusSkill
private static void CheckBonusSkill( Mobile m, int cur, int max, SkillName skill )
{
if ( !m.Alive )
return;
double n = (double)cur / max;
double v = Math.Sqrt( m.Skills[skill].Value * 0.005 );
n *= (1.0 - v);
n += v;
m.CheckSkill( skill, n );
}
示例12: OnCarve
public override void OnCarve(Mobile from, Corpse corpse, Item with)
{
if (corpse.Carved)
base.OnCarve(from, corpse, with);
if (Utility.RandomDouble() < 0.15)
{
if (!from.CheckSkill(SkillName.Forensics, 30, 80))
from.SendMessage("Vous auriez gagné à mieux appréhender les cadavres");
else
{
corpse.DropItem(new UndeadRelic());
from.SendMessage("Vous arrachez un morceau de chair à la liche");
}
}
base.OnCarve(from, corpse, with);
}
示例13: OnCarve
public override void OnCarve(Mobile from, Corpse corpse, Item with)
{
if (corpse.Carved)
base.OnCarve(from, corpse, with);
if (Utility.RandomDouble() < 0.15)
{
if (!from.CheckSkill(SkillName.Forensics, 30, 80))
from.SendMessage("Vous auriez gagné à mieux appréhender les cadavres");
else
{
corpse.DropItem(new ElementalRelic());
from.SendMessage("L'élémental se crystallise");
}
}
base.OnCarve(from, corpse, with);
}
示例14: OnCarve
public override void OnCarve(Mobile from, Corpse corpse, Item with)
{
if (corpse.Carved)
base.OnCarve(from, corpse, with);
if (Utility.RandomDouble() < 0.15)
{
if (!from.CheckSkill(SkillName.Forensics, 30, 80))
from.SendMessage("Vous auriez gagné à mieux appréhender les cadavres");
else
{
corpse.DropItem(new ReptiledRelic());
from.SendMessage("Un pan de cuir se détache du ventre de la bête");
}
}
base.OnCarve(from, corpse, with);
}
示例15: Use
public void Use( Mobile from )
{
from.Direction = from.GetDirectionTo( GetWorldLocation() );
Effects.PlaySound( GetWorldLocation(), Map, 0x4F );
if ( from.CheckSkill( SkillName.Stealing, m_MinSkill, m_MaxSkill ) )
{
SendLocalizedMessageTo( from, 501834 ); // You successfully avoid disturbing the dip while searching it.
}
else
{
Effects.PlaySound( GetWorldLocation(), Map, 0x390 );
BeginSwing();
ProcessDelta();
SendLocalizedMessageTo( from, 501831 ); // You carelessly bump the dip and start it swinging.
}
}