예제 #1
0
 public void addtolist(int value, int s2ndvalue)
 {
     ExpertisePointsFromBosses.Add(value);
     ExpertisePointsFromBossesPoints.Add(s2ndvalue);
     ExpertisePointsFromBossesModded.Add("");
 }
예제 #2
0
 public void addtolistmodded(string value, int s2ndvalue)
 {
     ExpertisePointsFromBosses.Add(-1);
     ExpertisePointsFromBossesPoints.Add(s2ndvalue);
     ExpertisePointsFromBossesModded.Add(value);
 }
예제 #3
0
        public void DoExpertiseCheck(NPC npc, bool tempc = false)
        {
            if (tempc == false)
            {
                if (npc == null)
                {
                    return;
                }
                if (!npc.active)
                {
                    return;
                }
                if (npc.lifeMax < 100)
                {
                    return;
                }
            }
            if (ExpertisePointsFromBosses == null)
            {
                Main.NewText("The enemy list was somehow null... HOW?!");
                return;
            }

            if (ExpertisePointsFromBosses.Count < 1)
            {
                return;
            }

            int npcid = npc.type;

            int?found = FindBossEXP(npcid, npc);

            if (found != null && found > -1)
            {
                int collected = ExpertisePointsFromBossesPoints[(int)found];
                if (Main.expertMode)
                {
                    if (SGAWorld.NightmareHardcore > 0)
                    {
                        collected = (int)(collected * ((SGAWorld.NightmareHardcore == 1 ? 1.25f : 1.40f) + (NoHitCharm ? 1.25f : 0)));
                    }
                }
                else
                {
                    collected = (int)(collected * 0.80);
                }

                AddExpertise(collected);

                ExpertisePointsFromBosses.RemoveAt((int)found);
                ExpertisePointsFromBossesPoints.RemoveAt((int)found);
                ExpertisePointsFromBossesModded.RemoveAt((int)found);

                int?findagain = FindBossEXP(npcid, npc);

                if (findagain == null || findagain < 0)
                {
                    if (Main.myPlayer == player.whoAmI)
                    {
                        Main.NewText("You have gained Expertise! (you now have " + ExpertiseCollected + ")");
                    }
                }
            }
        }