3DMGAME论坛

标题: 如何完美地赶走竞争对手高管 [打印本页]

作者: lowieliang    时间: 2021-11-21 17:22
标题: 如何完美地赶走竞争对手高管
本帖最后由 lowieliang 于 2021-11-23 09:40 编辑

    竞争对手高管来访问了!麻烦也随之而来
    先说明下各个高管的行为
      霍里史迪克斯公司    乱扔垃圾
      巨无霸集团        破坏机器
      球体基金会        洗脑病人和员工,导致满意度迅速归零
      低端医疗科技      来找灵感的,基本不会构成破坏



    前两天遇到球体基金会的来访问,说是下一步是去全科诊疗室,可她就在前台附近打转,路过的很多病人都被洗脑了,还拿她没办法。
    网上找了下解决方案,都是用封堵大法,用贩卖机啥的把她堵住不能动。
    我分析了下代码,最好在她去前台签到之前堵住,300秒之后超时,她就会离开医院。
    这就要求手速和运气两者缺一不可,一旦失败就两个后果,要么堵不住,要么堵到天荒地老她也不会离开。


    以下是我的解决方案
    打开 dnSpy 修改 Assembly-CSharp.dll 这个文件。传送门 https://bbs.3dmgame.com/thread-5782890-1-1.html
    在 TH20.ChallengeVIP 类中添加一个新的函数
    protected override void UpdateChallenge(float timeDelta)
    {
        base.UpdateChallenge(timeDelta);
        if(this._challengeState == Challenge.ChallengeState.InProgress && this._vipVisitor != null)
        {
            VIPChallengeConfig config = base.GetConfig<VIPChallengeConfig>();
            if (config.ChallengeDisplayName.CompareTo("Rival Boss") == 0)
            {
                if(this._vipVisitor.GetComponent<CharacterCheckInComponent>() == null)
                {
                    this._vipVisitor.LeaveHospital(Character.ReasonForLeavingHospital.None);
                }
            }
        }
    }



    修改 TH20.VIPComponent 类里的两个函数
    public string GetGUIActionText()
    {
        Visitor owner = base.GetOwner<Visitor>();
        if (owner == null)
        {
            return string.Empty;
        }
        if (owner.CurrentMode == Visitor.Mode.LeavingHospital)    // 红色部分代码是从下面搬动上来的
        {
            return ScriptLocalization.HospitalEvent.VIPLeaving_CS;
        }

        if (this.TargetRoom != null)
        {
            return ScriptLocalization.HospitalEvent.VIPVisitingRoom_CS.Replace("{[ROOM]}", this.TargetRoom.GetRoomName());
        }
        if (owner.GetComponent<CharacterCheckInComponent>() != null)
        {
            return ScriptLocalization.HospitalEvent.VIPArriving_CS;
        }
        return ScriptLocalization.HospitalEvent.VIPTouring_CS;
    }


    public Sprite GetStatusSprite()
    {
        Visitor owner = base.GetOwner<Visitor>();
        if (owner == null)
        {
            return null;
        }
        if (owner.CurrentMode == Visitor.Mode.LeavingHospital)        {
            return owner.Definition.LeavingSprite;
        }

        if (this.TargetRoom != null)
        {
            return this.TargetRoom.Definition._icon;
        }
        return owner.Definition.ArrivalSprite;
    }



    经测试,达到的效果是竞争对手高管一下飞机或者出租车,立刻开始离开医院









作者: athena201    时间: 2021-11-22 09:46
遇到困难不要怂,你干脆改成直接通关,都不用浪费时间玩了
作者: SE7EN3324    时间: 2021-12-16 11:40
xinna201 发表于 2021-11-22 09:46
遇到困难不要怂,你干脆改成直接通关,都不用浪费时间玩了

你这种社会渣滓也就配在这酸言酸语了 现实中就是个被所有人孤立的垃圾玩意
作者: 暗夜笑声    时间: 2021-12-22 20:43
感谢楼主的分享,虽然我遇到这些NPC完全不管他们,洗脑走了就走了,懒得动弹,哈哈




欢迎光临 3DMGAME论坛 (https://bbs.3dmgame.com/) Powered by Discuz! X3.2