Пример #1
0
 public List <CastLog> getCastLogs(BossData bossData, List <CombatItem> combatList, AgentData agentData)
 {
     if (cast_logs.Count == 0)
     {
         setCastLogs(bossData, combatList, agentData);
     }
     return(cast_logs);
 }
Пример #2
0
        public List <DamageLog> getDamageLogs(int instidFilter, BossData bossData, List <CombatItem> combatList, AgentData agentData)//isntid = 0 gets all logs if specefied sets and returns filterd logs
        {
            if (damage_logs.Count == 0)
            {
                setDamageLogs(bossData, combatList, agentData);
            }


            if (damage_logsFiltered.Count == 0)
            {
                setFilteredLogs(bossData, combatList, agentData, instidFilter);
            }
            if (instidFilter == 0)
            {
                return(damage_logs);
            }
            else
            {
                return(damage_logsFiltered);
            }
        }
Пример #3
0
        public List <DamageLog> getMinionDamageLogs(int srcagent, BossData bossData, List <CombatItem> combatList, AgentData agentData)
        {
            List <DamageLog> dls = getDamageLogs(0, bossData, combatList, agentData).Where(x => x.getSrcAgent() == srcagent).ToList();

            return(dls);
        }
Пример #4
0
        private void setFilteredLogs(BossData bossData, List <CombatItem> combatList, AgentData agentData, int instidFilter)
        {
            List <DamageLog> filterDLog = new List <DamageLog>();
            int time_start = bossData.getFirstAware();

            foreach (CombatItem c in combatList)
            {
                if (instid == c.getSrcInstid() || instid == c.getSrcMasterInstid())//selecting player
                {
                    LuckParser.Models.ParseEnums.StateChange state = c.isStateChange();
                    int time = c.getTime() - time_start;
                    if (bossData.getInstid() == c.getDstInstid() && c.getIFF().getEnum() == "FOE")//selecting boss
                    {
                        if (state.getEnum() == "NORMAL" && c.isBuffremove().getID() == 0)
                        {
                            if (c.isBuff() == 1 && c.getBuffDmg() != 0)
                            {
                                filterDLog.Add(new DamageLog(time, c.getBuffDmg(), c.getSkillID(), c.isBuff(),
                                                             c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation()));
                            }
                            else if (c.isBuff() == 0 && c.getValue() != 0)
                            {
                                if (time > 300000)
                                {
                                    int f**k = 0;
                                }
                                filterDLog.Add(new DamageLog(time, c.getValue(), c.getSkillID(), c.isBuff(),
                                                             c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation()));
                            }
                        }
                    }
                }
            }
            damage_logsFiltered = filterDLog;
        }
Пример #5
0
 public List <int> getMinionList(BossData bossData, List <CombatItem> combatList, AgentData agentData)
 {
     if (minionIDList == null)
     {
         minionIDList = combatList.Where(x => x.getSrcMasterInstid() == instid && ((x.getValue() != 0 && x.isBuff() == 0) || (x.isBuff() == 1 && x.getBuffDmg() != 0))).Select(x => (int)x.getSrcInstid()).Distinct().ToList();
         int test = 0;
     }
     return(minionIDList);
 }
Пример #6
0
        public List <BoonMap> getboonGen(BossData bossData, SkillData skillData, List <CombatItem> combatList, AgentData agentData, List <int> trgtPID)
        {
            List <BoonMap> boonGen = new List <BoonMap>();
            int            time_start = bossData.getFirstAware();
            int            fight_duration = bossData.getLastAware() - time_start;
            int            here = 0, there = 0, everywhere = 0, huh = 0;

            // Initialize Boon Map with every Boon
            foreach (Boon boon in Boon.getList())
            {
                BoonMap map = new BoonMap(boon.getName(), new List <BoonLog>());
                boonGen.Add(map);
                // boon_map.put(boon.getName(), new ArrayList<BoonLog>());
            }

            foreach (CombatItem c in combatList)
            {
                LuckParser.Models.ParseEnums.StateChange state = c.isStateChange();
                int time = c.getTime() - time_start;
                if (instid == c.getSrcInstid() && state.getEnum() == "NORMAL" && time > 0 && time < fight_duration /*|| instid == c.getSrcMasterInstid()*/)//selecting player or minion as caster
                {
                    here++;
                    foreach (AgentItem item in agentData.getPlayerAgentList())
                    {                                                                                     //selecting all
                        if (item.getInstid() == c.getDstInstid() /*&& c.getIFF().getEnum() == "FRIEND"*/) //Make sure target is friendly existing Agent
                        {
                            there++;
                            foreach (int id in trgtPID)  //Make sure trgt is within paramaters
                            {
                                if (id == c.getDstInstid())
                                {
                                    everywhere++;
                                    if (c.isBuffremove().getID() == 0 && c.isBuff() > 0 && c.getBuffDmg() == 0 && c.getValue() > 0)      //Buff application
                                    {
                                        huh++;
                                        String skill_name = skillData.getName(c.getSkillID());
                                        int    count      = 0;

                                        foreach (BoonMap bm in boonGen.ToList())
                                        {
                                            if (skill_name.Contains(bm.getName()))
                                            {
                                                List <BoonLog> loglist = bm.getBoonLog();
                                                loglist.Add(new BoonLog(time, c.getValue(), c.getOverstackValue()));
                                                bm.setBoonLog(loglist);

                                                boonGen[count] = bm;
                                            }
                                            count++;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return(boonGen);
        }
Пример #7
0
 public List <DamageLog> getDamageTakenLogs(BossData bossData, List <CombatItem> combatList, AgentData agentData, MechanicData m_data)
 {
     if (damagetaken.Count == 0)
     {
         setDamagetaken(bossData, combatList, agentData, m_data);
     }
     return(damageTaken_logs);
 }
Пример #8
0
 public List <int> getDamagetaken(BossData bossData, List <CombatItem> combatList, AgentData agentData, MechanicData m_data)
 {
     if (damagetaken.Count == 0)
     {
         setDamagetaken(bossData, combatList, agentData, m_data);
     }
     return(damagetaken);
 }
Пример #9
0
        // Constructors
        public FightData(ushort id, AgentData agentData)
        {
            ID             = id;
            _requirePhases = Properties.Settings.Default.ParsePhases;
            switch (ParseEnum.GetTargetIDS(id))
            {
            case ParseEnum.TargetIDS.ValeGuardian:
                Logic = new ValeGuardian(id, agentData);
                break;

            case ParseEnum.TargetIDS.Gorseval:
                Logic = new Gorseval(id, agentData);
                break;

            case ParseEnum.TargetIDS.Sabetha:
                Logic = new Sabetha(id, agentData);
                break;

            case ParseEnum.TargetIDS.Slothasor:
                Logic = new Slothasor(id, agentData);
                break;

            case ParseEnum.TargetIDS.Zane:
            case ParseEnum.TargetIDS.Berg:
            case ParseEnum.TargetIDS.Narella:
                Logic = new BanditTrio(id, agentData);
                break;

            case ParseEnum.TargetIDS.Matthias:
                Logic = new Matthias(id, agentData);
                break;

            /*case ParseEnum.TargetIDS.Escort:
             *  Logic = new Escort(id, agentData);
             *  break;*/
            case ParseEnum.TargetIDS.KeepConstruct:
                Logic = new KeepConstruct(id, agentData);
                break;

            case ParseEnum.TargetIDS.Xera:
                Logic = new Xera(id, agentData);
                break;

            case ParseEnum.TargetIDS.Cairn:
                Logic = new Cairn(id, agentData);
                break;

            case ParseEnum.TargetIDS.MursaatOverseer:
                Logic = new MursaatOverseer(id, agentData);
                break;

            case ParseEnum.TargetIDS.Samarog:
                Logic = new Samarog(id, agentData);
                break;

            case ParseEnum.TargetIDS.Deimos:
                Logic = new Deimos(id, agentData);
                break;

            case ParseEnum.TargetIDS.SoullessHorror:
                Logic = new SoullessHorror(id, agentData);
                break;

            case ParseEnum.TargetIDS.Desmina:
                Logic = new River(id, agentData);
                break;

            case ParseEnum.TargetIDS.BrokenKing:
                Logic = new BrokenKing(id, agentData);
                break;

            case ParseEnum.TargetIDS.SoulEater:
                Logic = new EaterOfSouls(id, agentData);
                break;

            case ParseEnum.TargetIDS.EyeOfFate:
            case ParseEnum.TargetIDS.EyeOfJudgement:
                Logic = new DarkMaze(id, agentData);
                break;

            case ParseEnum.TargetIDS.Dhuum:
                // some eyes log are registered as Dhuum
                if (agentData.GetAgentsByID((ushort)ParseEnum.TargetIDS.EyeOfFate).Count > 0 ||
                    agentData.GetAgentsByID((ushort)ParseEnum.TargetIDS.EyeOfJudgement).Count > 0)
                {
                    ID    = (ushort)ParseEnum.TargetIDS.EyeOfFate;
                    Logic = new DarkMaze((ushort)ParseEnum.TargetIDS.EyeOfFate, agentData);
                    break;
                }
                Logic = new Dhuum(id, agentData);
                break;

            case ParseEnum.TargetIDS.ConjuredAmalgamate:
                Logic = new ConjuredAmalgamate(id, agentData);
                break;

            case ParseEnum.TargetIDS.Kenut:
            case ParseEnum.TargetIDS.Nikare:
                Logic = new TwinLargos(id, agentData);
                break;

            case ParseEnum.TargetIDS.Qadim:
                Logic = new Qadim(id, agentData);
                break;

            case ParseEnum.TargetIDS.Freezie:
                Logic = new Freezie(id, agentData);
                break;

            case ParseEnum.TargetIDS.MAMA:
                Logic = new MAMA(id, agentData);
                break;

            case ParseEnum.TargetIDS.Siax:
                Logic = new Siax(id, agentData);
                break;

            case ParseEnum.TargetIDS.Ensolyss:
                Logic = new Ensolyss(id, agentData);
                break;

            case ParseEnum.TargetIDS.Skorvald:
                Logic = new Skorvald(id, agentData);
                break;

            case ParseEnum.TargetIDS.Artsariiv:
                Logic = new Artsariiv(id, agentData);
                break;

            case ParseEnum.TargetIDS.Arkk:
                Logic = new Arkk(id, agentData);
                break;

            case ParseEnum.TargetIDS.WorldVersusWorld:
                Logic = new WvWFight(id, agentData);
                break;

            case ParseEnum.TargetIDS.MassiveGolem:
            case ParseEnum.TargetIDS.AvgGolem:
            case ParseEnum.TargetIDS.LGolem:
            case ParseEnum.TargetIDS.MedGolem:
            case ParseEnum.TargetIDS.StdGolem:
                Logic = new Golem(id, agentData);
                break;

            default:
                // Unknown
                Logic = new UnknownFightLogic(id, agentData);
                break;
            }
        }