本文整理汇总了C#中BaseCreature.Say方法的典型用法代码示例。如果您正苦于以下问题:C# BaseCreature.Say方法的具体用法?C# BaseCreature.Say怎么用?C# BaseCreature.Say使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseCreature
的用法示例。
在下文中一共展示了BaseCreature.Say方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
}
示例2: RoarAttack
public static void RoarAttack(BaseCreature from, Mobile target)
{
if (from.RoarAttack < 10 || from == null || target == null)
return;
int power = from.RoarAttack / 10;
int mindam = from.RoarAttack / 3;
int maxdam = from.RoarAttack / 2;
from.Say("*Roars*");
ArrayList targets = new ArrayList();
foreach (Mobile m in from.GetMobilesInRange(power))
{
if (m != from && from.CanBeHarmful(m))
targets.Add(m);
}
for (int i = 0; i < targets.Count; ++i)
{
Mobile m = (Mobile)targets[i];
if (m is BaseCreature)
{
BaseCreature bc = (BaseCreature)m;
// if (bc.Controlled == true && bc.ControlMaster != null)
// return;//////////////////////////////////////////////////////////////////////////////
// else
bc.BeginFlee(TimeSpan.FromSeconds(10.0));
AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 100, 0, 0, 0, 0);
}
}
}
示例3: GetSpeech
public static void GetSpeech(BaseCreature m_Mobile, SpeechEventArgs e)
{
string response = null;
Region reg = Region.Find(m_Mobile.Location, m_Mobile.Map);
//Check Job
//TODO
//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 (response == null)
{
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);
}
//No answer found
if (response == null)
{
if (m_Mobile.Sophistication == SophisticationLevel.High)
response = DefaultHigh(m_Mobile, e.Mobile);
else if (m_Mobile.Sophistication == SophisticationLevel.Medium)
response = DefaultMedium(m_Mobile, e.Mobile);
else if (m_Mobile.Sophistication == SophisticationLevel.Low)
response = DefaultLow(m_Mobile, e.Mobile);
}
m_Mobile.Say(true, response);
}
示例4: FireBreathAttack
public static void FireBreathAttack(BaseCreature from, Mobile target)
{
if (from.FireBreathAttack < 10 || from == null || target == null)
return;
// Scale FireBreath Attack, IE 100 points = 100% of the standard 25% breath scaler, then drop to 75% since it later reburns them.
// Confused yet? 100 points is equal to 75% of the damage of every other fire breathing monster.
int damage = (int)((from.Hits * (0.01 * ((28 * from.FireBreathAttack) / 100))) * 0.75);
from.MovingParticles(target, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160);
from.PlaySound(Core.AOS ? 0x15E : 0x44B);
from.Say("Fire Breath");
target.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot);
target.PlaySound(0x208);
AOS.Damage(target, from, damage, 0, 0, 0, 0, 100);
new FireBreathDOT(target, from, from.FireBreathAttack).Start();
}
示例5: PetPoisonAttack
public static void PetPoisonAttack(BaseCreature from, Mobile target)
{
if (from.PetPoisonAttack < 10 || from == null || target == null)
return;
Effects.SendLocationParticles(EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 63, 7, 9915, 0);
Effects.PlaySound(target.Location, target.Map, 0x229);
int mindam = from.PetPoisonAttack / 3;
int maxdam = from.PetPoisonAttack / 2;
int level = from.PetPoisonAttack / 20;
if (level > 3)
level = 3; // 3 is Deadly
from.Say("Poison Attack");
target.ApplyPoison(from.ControlMaster, Poison.GetPoison(level));
AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 0, 0, 100);
}
示例6: ShockAttack
public static void ShockAttack(BaseCreature from, Mobile target)
{
if (from.ShockAttack < 10 || from == null || target == null)
return;
int mindam = from.ShockAttack / 2;
int maxdam = from.ShockAttack;
from.Say("Shock Attack");
target.SendMessage("Your body is paralyzed from the electrical current!");
target.Freeze(TimeSpan.FromSeconds(3));
AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 0, 0, 100);
}
示例7: IcyWindAttack
public static void IcyWindAttack(BaseCreature from, Mobile target)
{
if (from.IcyWindAttack < 10 || from == null || target == null)
return;
Effects.SendLocationParticles(EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x37CC, 1, 40, 97, 3, 9917, 0);
int mindam = from.IcyWindAttack / 3;
int maxdam = from.IcyWindAttack / 2;
ArrayList targets = new ArrayList();
foreach (Mobile m in from.GetMobilesInRange(from.IcyWindAttack / 10))
{
if (m != from && from.CanBeHarmful(m))
targets.Add(m);
}
for (int i = 0; i < targets.Count; ++i)
{
Mobile m = (Mobile)targets[i];
from.Say("Icy Wind Attack");
AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 100, 0, 0);
Slow.SlowWalk(m, 10);
}
}