Ejemplo n.º 1
0
        private static void CallFoul(int plIdx, String move)
        {
            //Determine if this is a no contest or disqualification based on defender's status
            Player defender = PlayerMan.inst.GetPlObj(plIdx);

            if (defender.isKO)
            {
                //Determine the attacker
                int foulIndex = 0;
                if (plIdx > 3)
                {
                    foulIndex = 1;
                }
                if (UnityEngine.Random.Range(0, 3) > foulCeiling - foulCount[foulIndex])
                {
                    CallDQ(plIdx);
                }
                else
                {
                    CallNoContest();
                }
            }
            MatchConfiguration.ShowCommentaryMessage("Foul! " + DataBase.GetWrestlerFullName(PlayerMan.inst.GetPlObj(plIdx).WresParam) + " is warned for usage of an illegal " + move + ".");

            ForceCleanBreak();
        }
Ejemplo n.º 2
0
        public static bool SetMatchRestrictions(Player matchPlayer)
        {
            //Disable for Battle Royal Matches
            if (!isFirstBlood)
            {
                return(false);
            }
            else
            {
                //Get the player reference targetting the CURRENT player (matchPlayer) being modified.
                Player playerObj = PlayerMan.inst.GetPlObj(matchPlayer.TargetPlIdx);
                if (playerObj == null)
                {
                    return(false);
                }

                //Get the attacker's current skill and add it to the sum of bleeding damage done to the receiving (matchPlayer).
                SkillData currentSkill = playerObj.animator.CurrentSkill;
                if (currentSkill != null)
                {
                    bloodMeter[matchPlayer.PlIdx] += currentSkill.bleedingRate;

                    string defender = DataBase.GetWrestlerFullName(matchPlayer.WresParam);
                    string attacker = DataBase.GetWrestlerFullName(playerObj.WresParam);

                    if (bloodMeter[matchPlayer.PlIdx] <= 100)
                    {
                        MatchConfiguration.ShowCommentaryMessage(attacker + " is trying to bust open " + defender + ".");
                    }
                    else if (bloodMeter[matchPlayer.PlIdx] <= 200)
                    {
                        MatchConfiguration.ShowCommentaryMessage(attacker + " is really working over " + defender + "!");
                    }
                    else
                    {
                        MatchConfiguration.ShowCommentaryMessage(attacker + " is trying to put " + defender + " in the hospital! Such savagery!");
                    }
                }

                //Disable bleeding if match time has not passed the given value
                if (MatchMain.inst.matchTime.min < UnityEngine.Random.Range(8, 12))
                {
                    return(true);
                }

                if (bloodMeter[matchPlayer.PlIdx] >= 300)
                {
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
        }
Ejemplo n.º 3
0
        private static void SendInMember()
        {
            if (changeFlag.Equals("blue"))
            {
                if (blueTeam.Count == 0 && redTeam.Count != 0)
                {
                    changeFlag = "red";
                    SendInMember();
                }
                else if (blueTeam.Count != 0)
                {
                    Player pl = blueTeam.Dequeue();
                    pl.hasRight = true;
                    pl.Start_ForceControl(ForceCtrlEnum.GoBackToRing);
                }
            }
            else if (changeFlag.Equals("red"))
            {
                if (redTeam.Count == 0 && blueTeam.Count != 0)
                {
                    changeFlag = "blue";
                    SendInMember();
                }
                else if (redTeam.Count != 0)
                {
                    Player pl = redTeam.Dequeue();
                    pl.hasRight = true;
                    pl.Start_ForceControl(ForceCtrlEnum.GoBackToRing);
                }
            }

            SwitchFlag();

            Announcer.inst.PlayGong_Eliminated();
            minutePassed = MatchMain.inst.matchTime.min;

            //Determine if match rules should change
            if (blueTeam.Count == 0 && redTeam.Count == 0)
            {
                Announcer.inst.PlayGong_MatchStart();
                GlobalWork.inst.MatchSetting.VictoryCondition = VictoryConditionEnum.Count3;
                GlobalWork.inst.MatchSetting.isOutOfRingCount = outOfRingCount;
                GlobalWork.inst.MatchSetting.CriticalRate     = critRate;
                MatchConfiguration.ShowCommentaryMessage("Pinfall victories are now possible!");
            }
        }
Ejemplo n.º 4
0
        public static void CheckBleeding(Player p)
        {
            if (!isBoxing)
            {
                return;
            }
            int bloodLevel = global::MatchEvaluation.inst.PlResult[p.PlIdx].bledCnt;

            if (bloodLevel == bleedCeiling - 1)
            {
                MatchConfiguration.ShowCommentaryMessage(refName + " is watching " + DataBase.GetWrestlerFullName(p.WresParam) + " closely.");
            }
            else if (bloodLevel >= bleedCeiling)
            {
                MatchConfiguration.ShowCommentaryMessage(refName + " calls for a doctor stoppage!");
                Referee mRef = RefereeMan.inst.GetRefereeObj();
                mRef.PlDir = PlDirEnum.Left;
                mRef.State = RefeStateEnum.DeclareVictory;
                mRef.ReqRefereeAnm(BasicSkillEnum.Refe_Stand_MatchEnd_Front_Left);
                mRef.matchResult = MatchResultEnum.GiveUp;
                PlayerMan.inst.GetPlObj(p.PlIdx).isLoseAndStop = true;
                mRef.SentenceLose(p.PlIdx);
            }
        }