public static void SummonDouble(Fight fight, Engines.Spells.SpellEffect effect, Engines.Spells.SpellLevel spellLevel, Fighter caster, int cellID) { /* Create temp template for double summoned */ Database.Records.MonstersTemplateRecord tempTemplate = new Database.Records.MonstersTemplateRecord() { ID = -1, Color1 = caster.Character.Color1, Color2 = caster.Character.Color2, Color3 = caster.Character.Color3, Skin = caster.Character.Look, Name = caster.Nickname, Exp = 0, Kamas = "0,0", Drops = "", AI = 2, }; Database.Records.MonsterLevelRecord tempLevel = new Database.Records.MonsterLevelRecord() { ID = -1, TemplateID = -1, IsTempLevel = true, TempTemplate = tempTemplate, Level = caster.Level, AP = caster.Stats.GetMaxActionPoints, MP = caster.Stats.GetMaxMovementPoints, Life = caster.Stats.MaxLife, Size = caster.Character.Scal, Stats = "0,0,0,0,0", ProtectStats = "0,0,0,0", Spells = "", }; tempLevel.InitMonster(); Fighter summonedCreature = new Fighter(fight.CurrentEntityTempID, tempLevel, null); summonedCreature.CellID = cellID; summonedCreature.SummonOwner = caster.ID; summonedCreature.IsInvoc = true; fight.CurrentEntityTempID--; fight.AddPlayer(summonedCreature, caster.Team.ID, cellID); fight.TimeLine.RemixTimeLine(); fight.TimelineDisplay(); }
public static void SummonCreature(Fight fight, Engines.Spells.SpellEffect effect, Engines.Spells.SpellLevel spellLevel, Fighter caster, int cellID) { if (fight.GetFighterOnCell(cellID) == null) { Database.Records.MonstersTemplateRecord template = World.Helper.MonsterHelper.GetMonsterTemplate(effect.Value); if (template != null) { Database.Records.MonsterLevelRecord level = template.Levels.FirstOrDefault(x => x.Level == spellLevel.Level); if (level != null) { Fighter summonedCreature = new Fighter(fight.CurrentEntityTempID, level, null); summonedCreature.CellID = cellID; summonedCreature.SummonOwner = caster.ID; summonedCreature.IsInvoc = true; fight.CurrentEntityTempID--; fight.AddPlayer(summonedCreature, caster.Team.ID, cellID); fight.TimeLine.RemixTimeLine(); fight.TimelineDisplay(); } } } }