Esempio n. 1
0
 public static bool OnWorkCoolTimeEnd_StraitJacket(StraitJacket __instance, ref CreatureFeelingState oldState)
 {
     if (oldState == CreatureFeelingState.NORM)
     {
         __instance.model.SubQliphothCounter();
     }
     return(true);
 }
Esempio n. 2
0
        public static bool OnFinishWork_Fairy(ref UseSkill skill)
        {
            CreatureFeelingState currentFeelingState = skill.GetCurrentFeelingState();

            if (currentFeelingState == CreatureFeelingState.GOOD)
            {
                skill.agent.Die();
            }
            return(true);
        }
Esempio n. 3
0
        public static bool OnFinishWork_BloodBath(ref UseSkill skill)
        {
            CreatureFeelingState currentFeelingState = skill.GetCurrentFeelingState();

            if (currentFeelingState == CreatureFeelingState.BAD)
            {
                skill.agent.Die();
                return(false);
            }
            return(true);
        }
        public static bool OnReleaseWork_Mhz_1_76(Mhz_1_76 __instance, ref UseSkill skill)
        {
            CreatureFeelingState currentFeelingState = skill.GetCurrentFeelingState();

            if (currentFeelingState == CreatureFeelingState.NORM)
            {
                if (__instance.Prob(50))
                {
                    var rand = new Random();
                    List <CreatureModel> list = new List <CreatureModel>();
                    foreach (CreatureModel creatureModel in CreatureManager.instance.GetCreatureList())
                    {
                        if (creatureModel.qliphothCounter > 0 && creatureModel.script.GetQliphothCounterMax() > 0)
                        {
                            list.Add(creatureModel);
                        }
                    }
                    if (list.Count > 0)
                    {
                        list[rand.Next(0, list.Count)].SetQliphothCounter(0);
                    }
                }
            }
            else if (currentFeelingState == CreatureFeelingState.BAD)
            {
                var rand = new Random();
                List <CreatureModel> list = new List <CreatureModel>();
                foreach (CreatureModel creatureModel in CreatureManager.instance.GetCreatureList())
                {
                    if (creatureModel.qliphothCounter > 0 && creatureModel.script.GetQliphothCounterMax() > 0)
                    {
                        list.Add(creatureModel);
                    }
                }
                if (list.Count > 0)
                {
                    var Exnum = rand.Next(2, 6);
                    for (int i = 0; i < Exnum; i++)
                    {
                        var Num = rand.Next(0, list.Count);
                        list[Num].SetQliphothCounter(0);
                        list.RemoveAt(Num);
                        if (list.Count == 0)
                        {
                            break;
                        }
                    }
                }
            }

            return(true);
        }
Esempio n. 5
0
        public static bool OnReleaseWork_Baku(Baku __instance, ref UseSkill skill)
        {
            CreatureFeelingState currentFeelingState = skill.GetCurrentFeelingState();

            if (currentFeelingState == CreatureFeelingState.NORM)
            {
                if (__instance.Prob(50))
                {
                    __instance.model.SubQliphothCounter();
                }
            }

            return(true);
        }
Esempio n. 6
0
        public static bool OnReleaseWork_Ppodae(Ppodae __instance, ref UseSkill skill)
        {
            if (skill.skillTypeInfo.rwbpType != RwbpType.R)
            {
                skill.agent.Die();
            }
            CreatureFeelingState currentFeelingState = skill.GetCurrentFeelingState();

            if (currentFeelingState == CreatureFeelingState.NORM)
            {
                if (__instance.Prob(50))
                {
                    __instance.model.SubQliphothCounter();
                }
            }
            return(true);
        }
Esempio n. 7
0
        public static bool OnFinishWork_SpiderMom(ref UseSkill skill)
        {
            CreatureFeelingState currentFeelingState = skill.GetCurrentFeelingState();

            if (currentFeelingState == CreatureFeelingState.BAD)
            {
                skill.agent.Die();
                return(true);
            }

            skill.agent.hp -= (60 - (skill.agent.temperanceLevel * 10));
            if (skill.agent.hp <= 0)
            {
                skill.agent.Die();
                return(true);
            }
            return(true);
        }
Esempio n. 8
0
        public static bool OnReleaseWork_Cosmos(Cosmos __instance, ref UseSkill skill)
        {
            CreatureFeelingState currentFeelingState = skill.GetCurrentFeelingState();

            if (currentFeelingState == CreatureFeelingState.NORM)
            {
                __instance.model.SubQliphothCounter();
            }
            else if (currentFeelingState == CreatureFeelingState.BAD)
            {
                __instance.model.SubQliphothCounter();
                __instance.model.SubQliphothCounter();
            }

            if (skill.agent.fortitudeLevel >= 3)
            {
                __instance.model.SubQliphothCounter();
            }
            return(true);
        }