Beispiel #1
0
        public MonsterFighter(FightTeam team, Monster monster)
            : base(team, monster.Grade.Spells.ToArray(), monster.Grade.MonsterId)
        {
            Id      = Fight.GetNextContextualId();
            Monster = monster;
            Look    = monster.Look.Clone();

            m_stats = new StatsFields(this);
            m_stats.Initialize(Monster.Grade);

            Fight.FindRandomFreeCell(this, out var cell, false);
            Position = new ObjectPosition(monster.Group.Map, cell, monster.Group.Direction);
        }
Beispiel #2
0
        public SummonedMonster(int id, FightTeam team, FightActor summoner, MonsterGrade template, Cell cell)
            : base(id, team, template.Spells.ToArray(), summoner, cell, template.MonsterId)
        {
            Monster = template;
            Look    = Monster.Template.EntityLook.Clone();
            m_stats = new StatsFields(this);
            m_stats.Initialize(template);

            if (Monster.Template.Race.SuperRaceId == 28) //Invocations
            {
                AdjustStats();
            }
        }
Beispiel #3
0
        public void LoadRecord()
        {
            Stats = new StatsFields(this);
            Stats.Initialize(Record);

            Inventory = new Inventory();
            Inventory.LoadData(Id);

            Position = new ObjectPosition(new Map()
            {
                SceneId = Record.SceneId
            }, this.Record.X, Record.Y, Record.Z);
        }
Beispiel #4
0
        public TaxCollectorFighter(FightTeam team, TaxCollectorNpc taxCollector)
            : base(team, taxCollector.Guild.GetTaxCollectorSpells(), taxCollector.GlobalId)
        {
            Id = Fight.GetNextContextualId();
            TaxCollectorNpc = taxCollector;
            Look            = TaxCollectorNpc.Look.Clone();
            Items           = TaxCollectorNpc.Bag.SelectMany(x => Enumerable.Repeat(x.Template.Id, (int)x.Stack))
                              .Shuffle()
                              .ToList();
            Kamas = TaxCollectorNpc.GatheredKamas;

            m_stats = new StatsFields(this);
            m_stats.Initialize(TaxCollectorNpc);

            if (!Fight.FindRandomFreeCell(this, out var cell, false))
            {
                return;
            }

            Position = new ObjectPosition(TaxCollectorNpc.Map, cell, TaxCollectorNpc.Direction);
        }
Beispiel #5
0
        public SummonedTurret(int id, FightActor summoner, MonsterGrade template, Spell spell, Cell cell)
            : base(id, summoner.Team, template.Spells, summoner, cell)
        {
            Caster  = summoner;
            Monster = template;
            Look    = Monster.Template.EntityLook.Clone();

            m_spell = spell;
            m_stats = new StatsFields(this);
            m_stats.Initialize(template);

            m_stats.MP.Modified += OnMPModified;

            AdjustStats();

            Fight.TurnStarted += OnTurnStarted;

            if (Monster.Template.Id == (int)MonsterIdEnum.TACTIRELLE_3289)
            {
                Team.FighterAdded += OnFighterAdded;
            }
        }
Beispiel #6
0
        public SummonedBomb(int id, FightTeam team, SpellBombTemplate spellBombTemplate, MonsterGrade monsterBombTemplate, FightActor summoner, Cell cell)
            : base(team)
        {
            Id                  = id;
            Position            = summoner.Position.Clone();
            Look                = monsterBombTemplate.Template.EntityLook.Clone();
            Cell                = cell;
            MonsterBombTemplate = monsterBombTemplate;
            Summoner            = summoner;
            SpellBombTemplate   = spellBombTemplate;
            m_stats             = new StatsFields(this);
            m_stats.Initialize(monsterBombTemplate);
            WallSpell = new Spell((int)wallsSpells[SpellBombTemplate.WallId], (byte)MonsterBombTemplate.GradeId);
            m_color   = wallsColors[SpellBombTemplate.WallId];
            AdjustStats();

            ExplodSpell = new Spell(spellBombTemplate.ExplodReactionSpell, (byte)MonsterBombTemplate.GradeId);

            Fight.TurnStarted += OnTurnStarted;
            Team.FighterAdded += OnFighterAdded;

            m_initialized = true;
        }