本文整理汇总了C#中BaseCreature类的典型用法代码示例。如果您正苦于以下问题:C# BaseCreature类的具体用法?C# BaseCreature怎么用?C# BaseCreature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseCreature类属于命名空间,在下文中一共展示了BaseCreature类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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 );
}
}
}
示例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;
}
示例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
}
示例5: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Creature = (BaseCreature)reader.ReadMobile();
}
示例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;
}
}
}
示例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 );
}
示例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 );
}
示例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() );
}
}
示例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
}
示例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);
}
}
示例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;
}
示例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;
}
}
示例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
}
示例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 );
}
}
}