示例#1
0
        public static NPC SetModifierStat(NPC npc)
        {
            ARPGGlobalNPC ArNpc = npc.GetGlobalNPC <ARPGGlobalNPC>();

            if (ArNpc.HaveModifier(NPCModifier.Golden))
            {
                npc.lifeMax = Mathf.HugeCalc((int)(npc.lifeMax * 3f), npc.lifeMax);
                if (npc.damage > 0)
                {
                    npc.damage = Mathf.HugeCalc((int)(npc.damage * 1.5f), npc.damage);
                }
                npc.value += Item.buyPrice(0, 1, 50, 0);
                npc.value *= 2 * ArNpc.getRank;
            }

            if (ArNpc.HaveModifier(NPCModifier.Size))
            {
                npc = SetSizeStat(npc, (string)ArNpc.GetBufferProperty("size"));
            }

            if (ArNpc.HaveModifier(NPCModifier.Vampire))
            {
                npc.lifeMax = Mathf.HugeCalc((int)(npc.lifeMax * 1.5f), npc.lifeMax);
            }
            if (npc.damage > 0)
            {
                npc.damage = Mathf.HugeCalc((int)(npc.damage * 1.3f), npc.damage);
            }

            if (ArNpc.HaveModifier(NPCModifier.Berserker))
            {
                npc.color = Color.Lerp(npc.color, new Color(1.0f, 0.0f, 0.0f), 0.3f);
            }
            if (ArNpc.HaveModifier(NPCModifier.Golden))
            {
                npc.color = Color.Lerp(npc.color, new Color(1.0f, 0.8f, 0.5f), 0.8f);
            }



            npc.life = npc.lifeMax;

            return(npc);
        }
示例#2
0
        public static string GetNpcNameChange(NPC npc, int tier, int level, NPCRank rank)
        {
            string name = npc.GivenOrTypeName;

            if (npc.townNPC)
            {
                return(name);
            }
            if (name == "")
            {
                name = npc.GivenName;
            }
            if (name == "")
            {
                name = npc.TypeName;
            }
            if (name == "")
            {
                return(name);
            }



            string sufix  = " the ";
            string Prefix = "";

            /*
             * if (Config.gpConfig.NPCProgress)
             * Prefix+= "Lvl. " + (tier + level) + " ";
             * if (WorldManager.GetWorldAdditionalLevel() > 0)
             * Prefix += "(+" + GetWorldTier(npc,level) + ") ";
             */
            switch (rank)
            {
            case NPCRank.Weak:
                Prefix += "Weak ";
                break;

            case NPCRank.Alpha:
                Prefix += "Alpha ";
                break;

            case NPCRank.Elite:
                Prefix += "Elite ";
                break;

            case NPCRank.Legendary:
                Prefix += "Legendary ";
                break;

            case NPCRank.Mythical:
                Prefix += "Mythical ";
                break;

            case NPCRank.Godly:
                Prefix += "Godly ";
                break;

            case NPCRank.DIO:
                Prefix += "Kono Dio Da ";
                break;
            }

            ARPGGlobalNPC anpc = npc.GetGlobalNPC <ARPGGlobalNPC>();

            if (anpc.HaveModifier(NPCModifier.Dancer))
            {
                sufix += "Dancing ";
            }
            if (anpc.HaveModifier(NPCModifier.Cluster))
            {
                sufix += "Clustered ";
            }
            if (anpc.HaveModifier(NPCModifier.Golden))
            {
                sufix += "Golden ";
            }
            if (anpc.HaveModifier(NPCModifier.ArmorBreaker))
            {
                sufix += "Armor Breaker ";
            }
            if (anpc.HaveModifier(NPCModifier.Berserker))
            {
                sufix += "Berserker ";
            }
            if (anpc.HaveModifier(NPCModifier.Vampire))
            {
                sufix += "Vampire ";
            }

            if (anpc.HaveModifier(NPCModifier.Size))
            {
                string size = (string)anpc.GetBufferProperty("size");
                Prefix += (size + " ");
            }
            if (sufix == " the ")
            {
                sufix = "";
            }
            return(Prefix + name + sufix);
        }