本文整理汇总了C#中BaseCreature类的典型用法代码示例。如果您正苦于以下问题:C# BaseCreature类的具体用法?C# BaseCreature怎么用?C# BaseCreature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseCreature类属于命名空间,在下文中一共展示了BaseCreature类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CheckSpeech
public static bool CheckSpeech(BaseCreature m_Mobile, SpeechEventArgs e)
{
string response = null;
Region reg = Region.Find(m_Mobile.Location, m_Mobile.Map);
//Check Job
//Check Region
if (reg.Name == "Britain")
{
if (m_Mobile.Sophistication == SophisticationLevel.High)
response = BritainHigh(m_Mobile, e);
else if (m_Mobile.Sophistication == SophisticationLevel.Medium)
response = BritainMedium(m_Mobile, e);
else if (m_Mobile.Sophistication == SophisticationLevel.Low)
response = BritainLow(m_Mobile, e);
}
//Check World
if (m_Mobile.Sophistication == SophisticationLevel.High)
response = BritanniaHigh(m_Mobile, e);
else if (m_Mobile.Sophistication == SophisticationLevel.Medium)
response = BritanniaMedium(m_Mobile, e);
else if (m_Mobile.Sophistication == SophisticationLevel.Low)
response = BritanniaLow(m_Mobile, e);
if (response != null)
return true;
else
return false;
}
开发者ID:Godkong,项目名称:RunUO,代码行数:31,代码来源:BaseSpeech.cs
示例2: CheckArtifactGiving
public static void CheckArtifactGiving( BaseCreature boss )
{
int basePoints = ( boss is DemonKnight ) ? 500 : 100;
List<DamageStore> rights = BaseCreature.GetLootingRights( boss.DamageEntries, boss.HitsMax );
for ( int i = 0; i < rights.Count; i++ )
{
DamageStore store = rights[i];
if ( !store.HasRight )
continue;
PlayerMobile pm = store.Mobile as PlayerMobile;
if ( pm != null )
{
int awardPoints = (int) ( basePoints * ( 1.0 - Math.Ceiling( i / 2.0 ) * 0.02 ) );
pm.DoomCredits += awardPoints;
int chance = (int) ( pm.DoomCredits * ( 1.0 + LootPack.GetLuckChance( pm, boss ) / 10000.0 ) );
if ( chance > Utility.Random( 1000000 ) )
GiveArtifactTo( pm );
}
}
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:28,代码来源:DoomArtifactGiver.cs
示例3: RudeFarewellLow
public static string RudeFarewellLow(BaseCreature m_Mobile, Mobile from)
{
string response = null;
if (m_Mobile.Attitude == AttitudeLevel.Wicked)
{
switch (Utility.Random(3))
{
case 0: response = "Fine."; break;
case 1: response = "Same to ye."; break;
case 2: response = "Ye's rude."; break;
}
}
else if (m_Mobile.Attitude == AttitudeLevel.Neutral || m_Mobile.Attitude == AttitudeLevel.Goodhearted)
{
switch (Utility.Random(3))
{
case 0: response = "Fine. "; break;
case 1: response = "Same to ye."; break;
case 2: response = "Aye, whatever."; break;
}
}
return response;
}
开发者ID:Godkong,项目名称:Origins,代码行数:25,代码来源:RudeFarewellLow.cs
示例4: PetReviveGump
public PetReviveGump( Mobile from, BaseCreature mount,PetHoldingChamber petchamber,PetReviver doctor ) : base( 50,50 )
{
from.CloseGump( typeof( PetReviveGump ) );
m_from = from;
m_mount = mount;
i_petchamber = petchamber;
m_doctor = doctor;
AddPage( 0 );
AddBackground( 10, 10, 265, 140, 0x242C );
AddItem( 205, 40, 0x4 );
AddItem( 227, 40, 0x5 );
AddItem( 180, 78, 0xCAE );
AddItem( 195, 90, 0xCAD );
AddItem( 218, 95, 0xCB0 );
//AddHtmlLocalized( 30, 30, 150, 75, 1049665, false, false ); // <div align=center>Wilt thou sanctify the resurrection of:</div>
AddHtml(30,30,150,75, String.Format( "Would you like to spend 6000 gold to revive this pet?", 0 ), false,false);
AddHtml( 30, 70, 150, 25, String.Format( "<div align=CENTER>{0}</div>", mount.Name ), true, false );
AddButton( 40, 105, 0x81A, 0x81B, 1, GumpButtonType.Reply, 0 ); // Okay
AddButton( 110, 105, 0x819, 0x818, 0, GumpButtonType.Reply, 0 ); // Cancel
}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:27,代码来源:PetReviveGump.cs
示例5: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Creature = (BaseCreature)reader.ReadMobile();
}
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:MiniaturePet.cs
示例6: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
{
m_Caster = (BaseCreature)reader.ReadMobile();
goto case 0;
}
case 0:
{
m_End = reader.ReadDeltaTime();
m_Timer = new InternalTimer(this, TimeSpan.Zero, true, true);
m_Timer.Start();
break;
}
}
}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:25,代码来源:AOE.cs
示例7: UnConvert
public static void UnConvert( BaseCreature bc )
{
if ( !bc.IsParagon )
return;
bc.Hue = 0;
bc.HitsMaxSeed = (int)( bc.HitsMaxSeed / HitsBuff );
bc.Hits = bc.HitsMax;
bc.RawStr = (int)( bc.RawStr / StrBuff );
bc.RawInt = (int)( bc.RawInt / IntBuff );
bc.RawDex = (int)( bc.RawDex / DexBuff );
for( int i = 0; i < bc.Skills.Length; i++ )
{
Skill skill = (Skill)bc.Skills[i];
if ( skill.Base == 0.0 )
continue;
else
skill.Base /= SkillsBuff;
}
bc.PassiveSpeed *= SpeedBuff;
bc.ActiveSpeed *= SpeedBuff;
bc.DamageMin -= DamageBuff;
bc.DamageMax -= DamageBuff;
if ( bc.Fame > 0 )
bc.Fame = (int)( bc.Fame / FameBuff );
if ( bc.Karma != 0 )
bc.Karma = (int)( bc.Karma / KarmaBuff );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:34,代码来源:Paragon.cs
示例8: Convert
public static void Convert( BaseCreature bc )
{
if ( bc.IsPlagued )
return;
bc.Hue = Hue;
bc.HitsMaxSeed = (int)( bc.HitsMaxSeed * HitsBuff );
bc.Hits = bc.HitsMax;
bc.RawStr = (int)( bc.RawStr * StrBuff );
bc.RawInt = (int)( bc.RawInt * IntBuff );
bc.RawDex = (int)( bc.RawDex * DexBuff );
for( int i = 0; i < bc.Skills.Length; i++ )
{
Skill skill = (Skill)bc.Skills[i];
if ( skill.Base == 0.0 )
continue;
else
skill.Base *= SkillsBuff;
}
bc.PassiveSpeed /= SpeedBuff;
bc.ActiveSpeed /= SpeedBuff;
bc.DamageMin += DamageBuff;
bc.DamageMax += DamageBuff;
if ( bc.Fame > 0 )
bc.Fame = (int)( bc.Fame * FameBuff );
if ( bc.Karma != 0 )
bc.Karma = (int)( bc.Karma * KarmaBuff );
}
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:34,代码来源:Plague.cs
示例9: OnAttack
public override void OnAttack( BaseCreature creature )
{
HaochisTrialsQuest htq = System as HaochisTrialsQuest;
if ( htq == null )
{
return;
}
if ( creature is FierceDragon )
{
Complete();
htq.Opponent = OpponentType.FierceDragon;
System.AddObjective( new SecondTrialCompleteObjective() );
}
if ( creature is DeadlyImp )
{
Complete();
htq.Opponent = OpponentType.DeadlyImp;
System.AddObjective( new SecondTrialCompleteObjective() );
}
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:27,代码来源:Objectives.cs
示例10: PetResurrectGump
public PetResurrectGump(Mobile from, BaseCreature pet, double hitsScalar)
: base(50, 50)
{
from.CloseGump(typeof(PetResurrectGump));
m_Pet = pet;
m_HitsScalar = hitsScalar;
AddPage(0);
AddBackground(10, 10, 265, 140, 0x242C);
AddItem(205, 40, 0x4);
AddItem(227, 40, 0x5);
AddItem(180, 78, 0xCAE);
AddItem(195, 90, 0xCAD);
AddItem(218, 95, 0xCB0);
AddHtmlLocalized(30, 30, 150, 75, 1049665, false, false); // <div align=center>Wilt thou sanctify the resurrection of:</div>
AddHtml(30, 70, 150, 25, String.Format("<div align=CENTER>{0}</div>", pet.Name), true, false);
AddButton(40, 105, 0x81A, 0x81B, 0x1, GumpButtonType.Reply, 0); // Okay
AddButton(110, 105, 0x819, 0x818, 0x2, GumpButtonType.Reply, 0); // Cancel
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:25,代码来源:PetResurrectGump.cs
示例11: FindAbility
public virtual void FindAbility(BaseCreature target, BaseMetaPet pet)
{
if (MetaSkillType.GoldFind == MetaSkillType)
{
DoAbilityGoldFind(target, pet);
}
if (MetaSkillType.VenemousBlood == MetaSkillType && DateTime.UtcNow >= NextUse &&
Utility.RandomDouble() <= ChanceToActivate)
{
DoAbilityNoxiousBlood(target, pet);
}
if (MetaSkillType.Quicksilver == MetaSkillType && DateTime.UtcNow >= NextUse &&
Utility.RandomDouble() <= ChanceToActivate && pet.GetStatMod("QuickSilver") == null)
{
DoAbilityQuicksilver(target, pet);
}
if (MetaSkillType.Bleed == MetaSkillType && DateTime.UtcNow >= NextUse &&
Utility.RandomDouble() <= ChanceToActivate)
{
DoAbilityBleed(target, pet);
}
if (MetaSkillType.Molten == MetaSkillType && DateTime.UtcNow >= NextUse &&
Utility.RandomDouble() <= ChanceToActivate)
{
DoAbilityMoltenBreath(target, pet);
}
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:31,代码来源:MetaSkill.cs
示例12: Scale
public static void Scale( BaseCreature bc, double scalar, bool scaleStats )
{
if ( scaleStats )
{
if ( bc.RawStr > 0 )
bc.RawStr = (int)Math.Max( 1, bc.RawStr * scalar );
if ( bc.RawDex > 0 )
bc.RawDex = (int)Math.Max( 1, bc.RawDex * scalar );
if ( bc.HitsMaxSeed > 0 )
{
bc.HitsMaxSeed = (int)Math.Max( 1, bc.HitsMaxSeed * scalar );
bc.Hits = bc.Hits;
}
if ( bc.StamMaxSeed > 0 )
{
bc.StamMaxSeed = (int)Math.Max( 1, bc.StamMaxSeed * scalar );
bc.Stam = bc.Stam;
}
}
for ( int i = 0; i < bc.Skills.Length; ++i )
bc.Skills[i].Base *= scalar;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:26,代码来源:AnimalTaming.cs
示例13: DoAntiEscape
//END ANTI ARCHERY
//BEGIN ANTI ESCAPE
public static void DoAntiEscape(BaseCreature mobile, Mobile player)
{
if ( mobile.Combatant != null )
if ( !player.InRange( mobile, 5 ) )
{
Point3D from = mobile.Location;
Point3D to = player.Location;
if ( mobile.Mana >= 10 )
{
mobile.Location = to;
mobile.Mana -= 10;
mobile.Say( "Grrrr" );
Effects.SendLocationParticles( EffectItem.Create( from, mobile.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
Effects.SendLocationParticles( EffectItem.Create( to, mobile.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 5023 );
mobile.PlaySound( 0x1FE );
}
else if ( !player.InRange( mobile, 20 ) )
return;
}
}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:29,代码来源:MobileFeatures.cs
示例14: PetResurrectGump
public PetResurrectGump( Mobile from, BaseCreature pet ) : base( 50, 50 )
{
from.CloseGump( typeof( PetResurrectGump ) );
bool bStatLoss = false;
if( pet.BondedDeadPetStatLossTime > DateTime.Now )
{
bStatLoss = true;
}
m_Pet = pet;
AddPage( 0 );
AddBackground( 10, 10, 265, bStatLoss ? 250 : 140, 0x242C );
AddItem( 205, 40, 0x4 );
AddItem( 227, 40, 0x5 );
AddItem( 180, 78, 0xCAE );
AddItem( 195, 90, 0xCAD );
AddItem( 218, 95, 0xCB0 );
AddHtmlLocalized( 30, 30, 150, 75, 1049665, false, false ); // <div align=center>Wilt thou sanctify the resurrection of:</div>
AddHtml( 30, 70, 150, 25, String.Format( "<div align=CENTER>{0}</div>", pet.Name ), true, false );
if( bStatLoss )
{
string statlossmessage = "Your pet lacks the ability to return to the living at this time without suffering skill loss.";
AddHtml( 30, 105, 150, 105, String.Format( "<div align=CENTER>{0}</div>", statlossmessage), true, false);
}
AddButton( 40, bStatLoss ? 215 : 105, 0x81A, 0x81B, 0x1, GumpButtonType.Reply, 0 ); // Okay
AddButton( 110, bStatLoss ? 215 : 105, 0x819, 0x818, 0x2, GumpButtonType.Reply, 0 ); // Cancel
}
开发者ID:zerodowned,项目名称:angelisland,代码行数:35,代码来源:PetResurrectGump.cs
示例15: AddSheep
public static void AddSheep( Mobile m, BaseCreature sheep )
{
if ( SheepList == null )
m.SendMessage( "An Error has occured, please contact a GM" );
else
{
if ( SheepList.ContainsKey( m ) )
{
List<BaseCreature> list;
if ( SheepList.TryGetValue( m, out list ) )
{
if ( list == null ) //Should never happen but crash preventative.
{
list = new List<BaseCreature>();
SheepList[m] = list;
SheepList[m].Add( sheep );
}
else
{
SheepList[m].Add( sheep );
}
}
}
else
{
List<BaseCreature> list = new List<BaseCreature>();
SheepList.Add( m, list );
SheepList[m].Add( sheep );
}
}
}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:33,代码来源:NightSheepSystem.cs
示例16: OnKill
public override void OnKill( BaseCreature creature, Container corpse )
{
if ( creature is DeathWatchBeetleHatchling && corpse.Map == Map.Tokuno )
{
CurProgress++;
}
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:7,代码来源:Objectives.cs
示例17: OnKill
public override void OnKill( BaseCreature creature, Container corpse )
{
if ( creature is CursedSoul )
{
if ( m_CursedSoulsKilled == 0 )
System.AddConversation( new GainKarmaConversation( true ) );
m_CursedSoulsKilled++;
// Cursed Souls killed: ~1_COUNT~
System.From.SendLocalizedMessage( 1063038, m_CursedSoulsKilled.ToString() );
}
else if ( creature is YoungRonin )
{
if ( m_YoungRoninKilled == 0 )
System.AddConversation( new GainKarmaConversation( false ) );
m_YoungRoninKilled++;
// Young Ronin killed: ~1_COUNT~
System.From.SendLocalizedMessage( 1063039, m_YoungRoninKilled.ToString() );
}
CurProgress = Math.Max( m_CursedSoulsKilled, m_YoungRoninKilled );
}
开发者ID:Godkong,项目名称:Origins,代码行数:25,代码来源:Objectives.cs
示例18: ComputePoints
public static void ComputePoints( BaseCreature creature )
{
List<DamageStore> rights = BaseCreature.GetLootingRights( creature.DamageEntries, creature.HitsMax );
for ( int i = rights.Count - 1; i >= 0; --i )
{
DamageStore ds = rights[i];
if ( ds.m_HasRight )
{
double baseChance, factor;
if ( creature is DemonKnight )
baseChance = 1.5;
else
baseChance = 0.75;
switch ( i )
{
case 0: factor = 0.1; break;
case 1: factor = 0.065; break;
case 2: factor = 0.05; break;
default: factor = 0.04; break;
}
PlayerMobile pm = ds.m_Mobile as PlayerMobile;
if ( pm != null )
pm.GauntletPoints += ( factor * baseChance );
}
}
}
开发者ID:suiy187,项目名称:runuocustom,代码行数:31,代码来源:DemonKnight.cs
示例19: IsFireBreathingCreature
private static bool IsFireBreathingCreature( BaseCreature bc )
{
if ( bc == null )
return false;
return bc.HasBreath;
}
开发者ID:jamison654321,项目名称:xmlspawner,代码行数:7,代码来源:LevelItemManager.cs
示例20: ParagonStamRegen
public ParagonStamRegen(Mobile m)
: base(FastRegenRate, FastRegenRate)
{
this.Priority = TimerPriority.FiftyMS;
m_Owner = m as BaseCreature;
}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:7,代码来源:Paragon.cs
注:本文中的BaseCreature类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论