Beispiel #1
0
        public static int GetActorTotalDebuff(int actorId, DebuffType countDebuffType)
        {
            int totalHpDebuffValue = 0;
            int totalSpDebuffValue = 0;

            if (DateFile.instance.ActorIsInBattle(actorId) != 0)
            {
                List <int> list = new List <int>(DateFile.instance.battleActorsInjurys[actorId].Keys);
                for (int i = 0; i < list.Count; i++)
                {
                    int injuryId    = list[i];
                    int debuffValue = ActorDebuff.GetActorDebuff(actorId, injuryId);
                    if (countDebuffType == getDebuffType(injuryId))
                    {
                        if (getDebuffSubType(injuryId) == DebuffSubType.Hp)
                        {
                            totalHpDebuffValue += debuffValue;
                        }
                        else if (getDebuffSubType(injuryId) == DebuffSubType.Sp)
                        {
                            totalSpDebuffValue += debuffValue;
                        }
                    }
                }
            }
            else
            {
                List <int> list2 = new List <int>(DateFile.instance.actorInjuryDate[actorId].Keys);
                for (int j = 0; j < list2.Count; j++)
                {
                    int injuryId    = list2[j];
                    int debuffValue = ActorDebuff.GetActorDebuff(actorId, injuryId);
                    if (countDebuffType == getDebuffType(injuryId))
                    {
                        if (getDebuffSubType(injuryId) == DebuffSubType.Hp)
                        {
                            totalHpDebuffValue += debuffValue;
                        }
                        else if (getDebuffSubType(injuryId) == DebuffSubType.Sp)
                        {
                            totalSpDebuffValue += debuffValue;
                        }
                    }
                }
            }

            return(Math.Max(totalHpDebuffValue, totalSpDebuffValue));
        }
Beispiel #2
0
        public static void Postfix(int actorId, ref float __result)
        {
            if (!Main.enabled || !Main.settings.hasDebuff)
            {
                return;
            }

            if (actorId <= 0)
            {
                return;
            }

            int totalDebuff = 0;

            totalDebuff += ActorDebuff.GetActorTotalDebuff(actorId, ActorDebuff.DebuffType.Mind);
            __result     = ((100 - totalDebuff * (__result) / 100));
        }
Beispiel #3
0
        public static void Postfix(int actorId, ref int __result, int index)
        {
            if (!Main.enabled || !Main.settings.hasDebuff)
            {
                return;
            }

            if (actorId <= 0)
            {
                return;
            }
            if (index != 601 && index != 602 && index != 603)
            {
                return;
            }

            int totalDebuff = 0;

            totalDebuff += ActorDebuff.GetActorTotalDebuff(actorId, ActorDebuff.DebuffType.LeftHand);
            totalDebuff += ActorDebuff.GetActorTotalDebuff(actorId, ActorDebuff.DebuffType.RightHand);
            __result     = ((100 - totalDebuff * (__result) / 100));
        }
Beispiel #4
0
        public static void Postfix(WindowManage __instance, bool on, GameObject tips = null)
        {
            if (!Main.enabled || !Main.settings.hasDebuff)
            {
                return;
            }
            bool flag = false;

            if (tips != null && on)
            {
                string tag = tips.tag;
                if (tag == "ActorInjury")
                {
                    int injuryId = int.Parse(tips.transform.parent.name.Split(new char[]
                    {
                        ','
                    })[1]);
                    int actorId     = ActorMenu.instance.acotrId;
                    int debuffValue = ActorDebuff.GetActorDebuff(actorId, injuryId);
                    __instance.informationMassage.text += getDebuffStr(debuffValue, ActorDebuff.getDebuffType(injuryId));
                }
            }
        }