本文整理汇总了C#中Server.MirDatabase.MonsterInfo类的典型用法代码示例。如果您正苦于以下问题:C# MonsterInfo类的具体用法?C# MonsterInfo怎么用?C# MonsterInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MonsterInfo类属于Server.MirDatabase命名空间,在下文中一共展示了MonsterInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TrapRock
protected internal TrapRock(MonsterInfo info)
: base(info)
{
Visible = false;
VisibleTime = Envir.Time + 2000;
FirstAttack = true;
}
示例2: IntelligentCreatureObject
protected internal IntelligentCreatureObject(MonsterInfo info)
: base(info)
{
ActionTime = Envir.Time + 1000;
petType = (IntelligentCreatureType)info.Effect;
CustomName = info.Name;
}
示例3: Spawned
public override void Spawned()
{
base.Spawned();
if (BlockArray == null) return;
MonsterInfo bInfo = new MonsterInfo
{
HP = this.HP,
Image = Monster.EvilMirBody,
CanTame = false,
CanPush = false,
AutoRev = false
};
foreach (var block in BlockArray)
{
BlockingObject b = new BlockingObject(this, bInfo);
BlockingObjects.Add(b);
if (!b.Spawn(this.CurrentMap, new Point(this.CurrentLocation.X + block.X, this.CurrentLocation.Y + block.Y)))
{
SMain.EnqueueDebugging(string.Format("CastleGate blocking mob not spawned at {0} {1}:{2}", CurrentMap.Info.FileName, block.X, block.Y));
}
}
}
示例4: RedMoonEvil
protected internal RedMoonEvil(MonsterInfo info) : base(info)
{
Direction = MirDirection.Up;
ActionTime = Envir.Time + 300;
AttackTime = Envir.Time + AttackSpeed;
}
示例5: HellKeeper
protected internal HellKeeper(MonsterInfo info) : base(info)
{
Direction = MirDirection.Up;
ActionTime = Envir.Time + 300;
AttackTime = Envir.Time + AttackSpeed;
}
示例6: MonsterObject
protected internal MonsterObject(MonsterInfo info)
{
Info = info;
Undead = !Info.CanTame;
CoolEye = info.CoolEye > Envir.Random.Next(100);
Direction = (MirDirection)Envir.Random.Next(8);
AMode = AttackMode.All;
PMode = PetMode.Both;
RegenTime = Envir.Random.Next(RegenDelay) + Envir.Time;
SearchTime = Envir.Random.Next(SearchDelay) + Envir.Time;
RoamTime = Envir.Random.Next(RoamDelay) + Envir.Time;
}
示例7: Deer
protected internal Deer(MonsterInfo info)
: base(info)
{
if (Info.AI != 2) return;
RemainingSkinCount = 5;
if (Envir.Random.Next(7) == 0)
{
_runAway = true;
Quality = (short)(Envir.Random.Next(8) * 2000);
MoveSpeed -= 300;
}
else
Quality = (short)(Envir.Random.Next(4) * 1000);
}
示例8: SabukGate
protected internal SabukGate(MonsterInfo info)
: base(info)
{
BlockArray = new Point[]
{
new Point(0, -1),
new Point(0, -2),
new Point(1, -1),
new Point(1, -2),
new Point(-1, 0),
new Point(-2, 0),
new Point(-1, -1),
new Point(-1, 1)
};
Direction = MirDirection.Up;
}
示例9: MonsterAI
protected internal MonsterAI(MonsterInfo info) : base(info)
{
if (!uniqueAI.IgnorePets && uniqueAI.DamagePetsMore) //Pet Damage
DamageToPets = uniqueAI.PetAttackDamage;
if (uniqueAI.UseSpecialAttack) // Special Damage
SpecialAttackDamage = uniqueAI.SpecialAttackDamage;
if (uniqueAI.UseMassAttack) // Mass Damage
MassAttackDamage = uniqueAI.MassAttackDamage;
if (uniqueAI.UseMeleeAttack) // Melee Damage
MeleeAttackDamage = uniqueAI.MeleeAttackDamage;
if (uniqueAI.UseRangeAttack) // Range Damage
RangeAttackDamage = uniqueAI.RangeAttackDamage;
if (uniqueAI.UseMagicAttack) // Magic Damage
MagicAttackDamage = uniqueAI.MagicAttackDamage;
if (uniqueAI.Target) // Damage to specific Target(s)
{
AttackClass = (MirClass)uniqueAI.TargetClass;
TargetedDamage = uniqueAI.TargetAttackDamage;
}
uniqueAI.Alive = true;
if (!uniqueAI.Save(uniqueAI))
SMain.Enqueue("ERROR saving status");
}
示例10: WhiteFoxman
protected internal WhiteFoxman(MonsterInfo info)
: base(info)
{
}
示例11: NeedKill
public bool NeedKill(MonsterInfo mInfo)
{
return Info.KillTasks.Where((task, i) => KillTaskCount[i] < task.Count && task.Monster == mInfo).Any();
}
示例12: CharmedSnake
protected internal CharmedSnake(MonsterInfo info)
: base(info)
{
ActionTime = Envir.Time + 1000;
}
示例13: FromText
public static void FromText(string text)
{
string[] data = text.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
if (data.Length < 25) return; //28
MonsterInfo info = new MonsterInfo {Name = data[0]};
ushort image;
if (!ushort.TryParse(data[1], out image)) return;
info.Image = (Monster) image;
if (!byte.TryParse(data[2], out info.AI)) return;
if (!byte.TryParse(data[3], out info.Effect)) return;
if (!byte.TryParse(data[4], out info.Level)) return;
if (!byte.TryParse(data[5], out info.ViewRange)) return;
if (!uint.TryParse(data[6], out info.HP)) return;
if (!byte.TryParse(data[7], out info.MinAC)) return;
if (!byte.TryParse(data[8], out info.MaxAC)) return;
if (!byte.TryParse(data[9], out info.MinMAC)) return;
if (!byte.TryParse(data[10], out info.MaxMAC)) return;
if (!byte.TryParse(data[11], out info.MinDC)) return;
if (!byte.TryParse(data[12], out info.MaxDC)) return;
if (!byte.TryParse(data[13], out info.MinMC)) return;
if (!byte.TryParse(data[14], out info.MaxMC)) return;
if (!byte.TryParse(data[15], out info.MinSC)) return;
if (!byte.TryParse(data[16], out info.MaxSC)) return;
if (!byte.TryParse(data[17], out info.Accuracy)) return;
if (!byte.TryParse(data[18], out info.Agility)) return;
if (!byte.TryParse(data[19], out info.Light)) return;
if (!ushort.TryParse(data[20], out info.AttackSpeed)) return;
if (!ushort.TryParse(data[21], out info.MoveSpeed)) return;
if (!uint.TryParse(data[22], out info.Experience)) return;
if (!bool.TryParse(data[23], out info.CanTame)) return;
if (!bool.TryParse(data[24], out info.CanPush)) return;
//int count;
//if (!int.TryParse(data[27], out count)) return;
//if (28 + count * 3 > data.Length) return;
info.Index = ++SMain.EditEnvir.MonsterIndex;
SMain.EditEnvir.MonsterInfoList.Add(info);
}
示例14: RedFoxman
protected internal RedFoxman(MonsterInfo info)
: base(info)
{
}
示例15: Yimoogi
protected internal Yimoogi(MonsterInfo info)
: base(info)
{
SpawnTime = Envir.Time + 4000;
NoAttack = true;
}