Example #1
0
 public static void SetThumbnailFrame(UISprite background, UISprite frame, int growStep)
 {
     if (MonsterGrowStepData.IsEggScope(growStep) || MonsterGrowStepData.IsChild1Scope(growStep) || MonsterGrowStepData.IsChild2Scope(growStep))
     {
         background.spriteName = "Common02_Thumbnail_bg1";
         frame.spriteName      = "Common02_Thumbnail_waku1";
     }
     else if (MonsterGrowStepData.IsGrowingScope(growStep))
     {
         background.spriteName = "Common02_Thumbnail_bg2";
         frame.spriteName      = "Common02_Thumbnail_waku2";
     }
     else if (MonsterGrowStepData.IsRipeScope(growStep))
     {
         background.spriteName = "Common02_Thumbnail_bg3";
         frame.spriteName      = "Common02_Thumbnail_waku3";
     }
     else if (MonsterGrowStepData.IsPerfectScope(growStep))
     {
         background.spriteName = "Common02_Thumbnail_bg4";
         frame.spriteName      = "Common02_Thumbnail_waku4";
     }
     else if (MonsterGrowStepData.IsUltimateScope(growStep))
     {
         background.spriteName = "Common02_Thumbnail_bg5";
         frame.spriteName      = "Common02_Thumbnail_waku5";
     }
     else
     {
         background.spriteName = "Common02_Thumbnail_Question";
         frame.spriteName      = "Common02_Thumbnail_wakuQ";
     }
 }
Example #2
0
        public static int CalcClusterForModeChange(string monsterId)
        {
            GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterId(monsterId).Group;
            int num      = 0;
            int num2     = 0;
            int growStep = group.growStep.ToInt32();

            if (MonsterGrowStepData.IsRipeScope(growStep))
            {
                num = ConstValue.MODE_CHANGE_COEFFICIENT_FOR_5;
            }
            else if (MonsterGrowStepData.IsPerfectScope(growStep))
            {
                num = ConstValue.MODE_CHANGE_COEFFICIENT_FOR_6;
            }
            else if (MonsterGrowStepData.IsUltimateScope(growStep))
            {
                num = ConstValue.MODE_CHANGE_COEFFICIENT_FOR_7;
            }
            else
            {
                Debug.Log("growStepの値が不正です");
            }
            GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(monsterId).Simple;
            int arousal = simple.GetArousal();

            if (arousal >= 0 && arousal < ConstValue.MODE_CHANGE_COEFFICIENT_RARE.Length)
            {
                num2 = ConstValue.MODE_CHANGE_COEFFICIENT_RARE[arousal];
            }
            return(num2 * num);
        }
        private float GetAbilityUpgradeRate(string baseAbility, string materialAbility, string baseGrowStep, ref bool hasMedal)
        {
            if (this.abilityUpgradeDataList == null)
            {
                this.SetupAbilityUpgradeDataList();
            }
            float result = 0f;

            hasMedal = this.ExistMedalByParcentage(baseAbility);
            int   medalParcentage = this.GetMedalParcentage(baseAbility);
            int   growStep        = int.Parse(baseGrowStep);
            float num             = 1f;
            float num2            = 1f;

            if (MonsterGrowStepData.IsGrowingScope(growStep))
            {
                num  = ConstValue.ABILITY_UPGRADE_MULRATE_GROWING;
                num2 = (float)ConstValue.ABILITY_INHERITRATE_GROWING;
            }
            else if (MonsterGrowStepData.IsRipeScope(growStep))
            {
                num  = ConstValue.ABILITY_UPGRADE_MULRATE_RIPE;
                num2 = (float)ConstValue.ABILITY_INHERITRATE_RIPE;
            }
            else if (MonsterGrowStepData.IsPerfectScope(growStep))
            {
                num  = ConstValue.ABILITY_UPGRADE_MULRATE_PERFECT;
                num2 = (float)ConstValue.ABILITY_INHERITRATE_PERFECT;
            }
            else if (MonsterGrowStepData.IsUltimateScope(growStep))
            {
                num  = ConstValue.ABILITY_UPGRADE_MULRATE_ULTIMATE;
                num2 = (float)ConstValue.ABILITY_INHERITRATE_ULTIMATE;
            }
            if (medalParcentage < 20)
            {
                if (hasMedal)
                {
                    string key = baseAbility + "_" + materialAbility;
                    if (this.abilityUpgradeDataList.ContainsKey(key))
                    {
                        result = num * this.abilityUpgradeDataList[key];
                    }
                }
                else
                {
                    result = num2;
                }
            }
            return(result);
        }
Example #4
0
        public IEnumerator StartAnimation()
        {
            this.circleParticleRoot.Play();
            this.subCamera.fieldOfView             = 30f;
            this.subCamera.transform.localPosition = new Vector3(2f, 1f, 0f);
            if (MonsterGrowStepData.IsUltimateScope(this.growStep))
            {
                this.mainCamera.backgroundColor = this.bgColorRareHigh;
                this.subCamera.backgroundColor  = this.bgColorRareHigh;
            }
            this.gashaMonster.SetActive(true);
            CharacterParams charaParam = this.gashaMonster.GetComponent <CharacterParams>();

            charaParam.PlayAnimation(CharacterAnimationType.idle, SkillType.Attack, 0, null, null);
            CutsceneCommon.SetBillBoardCamera(this.gashaMonster, this.subCamera);
            this.cameraSwitcher.SetLookAtObject(charaParam.characterFaceCenterTarget);
            if (MonsterGrowStepData.IsRipeScope(this.growStep))
            {
                this.animationTextImage = this.StartAnimationRareTextImage("RareLow");
                yield return(AppCoroutine.Start(this.animationTextImage, false));
            }
            else if (MonsterGrowStepData.IsPerfectScope(this.growStep))
            {
                this.animationTextImage = this.StartAnimationRareTextImage("RareMiddle");
                yield return(AppCoroutine.Start(this.animationTextImage, false));
            }
            else if (MonsterGrowStepData.IsUltimateScope(this.growStep))
            {
                this.animationTextImage = this.StartAnimationRareTextImage("RareHigh");
                yield return(AppCoroutine.Start(this.animationTextImage, false));
            }
            else
            {
                yield return(null);
            }
            this.seHandle2 = this.sound.PlaySE("SEInternal/Cutscene/se_214");
            base.EndCallback();
            yield break;
        }
    private void SetupMedalAndEfc()
    {
        List <string> strList = this.CheckHaveMedal(this.Data.userMonster);
        int           num     = 0;

        this.spInharitance.gameObject.SetActive(false);
        if (this.Data.GetCommonSkill() != null)
        {
            int num2 = int.Parse(this.Data.GetCommonSkill().rank);
            if (num2 >= ConstValue.GASHA_INHARITANCE_PRIZE_LEVEL)
            {
                this.spInharitance.gameObject.SetActive(true);
                num++;
            }
        }
        this.spLeaderSkill.gameObject.SetActive(false);
        if (this.Data.GetLeaderSkill() != null)
        {
            int num3 = int.Parse(this.Data.GetLeaderSkill().rank);
            if (num3 >= ConstValue.GASHA_LEADERSKILL_PRIZE_LEVEL)
            {
                this.spLeaderSkill.gameObject.SetActive(true);
                num++;
            }
        }
        int num4 = this.CheckMedalNum(strList, "Common02_Talent_Gold");
        int num5 = this.CheckMedalNum(strList, "Common02_Talent_Silver");

        for (int i = 0; i < this.spMedalList.Count; i++)
        {
            this.spMedalList[i].gameObject.SetActive(false);
        }
        bool flag = false;
        int  num6 = 0;

        if (num4 > 0)
        {
            flag = true;
            this.spMedalList[num6].spriteName = "Common02_Talent_Gold";
            this.spMedalList[num6].gameObject.SetActive(true);
            Animation component = this.spMedalList[num6].gameObject.GetComponent <Animation>();
            this.medalAnimeList.Add(component);
            num6++;
        }
        if (num5 > 0)
        {
            flag = true;
            this.spMedalList[num6].spriteName = "Common02_Talent_Silver";
            this.spMedalList[num6].gameObject.SetActive(true);
            Animation   component2 = this.spMedalList[num6].gameObject.GetComponent <Animation>();
            IEnumerator enumerator = this.spMedalList[num6].gameObject.transform.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    object    obj        = enumerator.Current;
                    Transform transform  = (Transform)obj;
                    UILabel   component3 = transform.gameObject.GetComponent <UILabel>();
                    if (component3 != null)
                    {
                        component3.gameObject.SetActive(true);
                        component3.text = StringMaster.GetString("MissionRewardKakeru") + num5.ToString();
                        break;
                    }
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
            this.medalAnimeList.Add(component2);
            num6++;
        }
        if (flag)
        {
            num++;
        }
        this.shiningEffect.gameObject.SetActive(false);
        int growStep = int.Parse(this.Data.monsterMG.growStep);

        if (MonsterGrowStepData.IsPerfectScope(growStep) || MonsterGrowStepData.IsUltimateScope(growStep) || num >= this.PERFECT_HIT_NUM)
        {
            this.outerLuster.gameObject.SetActive(true);
            this.innerLuster.gameObject.SetActive(true);
        }
        else
        {
            this.outerLuster.gameObject.SetActive(false);
            this.innerLuster.gameObject.SetActive(false);
        }
        if (this.shiningList.Count > 0)
        {
            base.StartCoroutine(this.LoopMedalShine());
        }
    }
    private ChipSphereIconButton.Parameter CreateParameter(int myGrowStep, int myArousal, int buttonNo)
    {
        int type = 0;

        CMD_ChipSphere.MenuType menuType = CMD_ChipSphere.MenuType.Empty;
        string chipName   = string.Empty;
        string chipDetail = string.Empty;
        int    userChipId = 0;
        int    itemCount  = 0;

        GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.Manage slotStatus = CMD_ChipSphere.DataChg.GetChipEquip().GetSlotStatus();
        int num = slotStatus.maxSlotNum + slotStatus.extraSlotNum;

        if (buttonNo == 1)
        {
            if (MonsterGrowStepData.IsRipeScope(myGrowStep) || MonsterGrowStepData.IsPerfectScope(myGrowStep) || MonsterGrowStepData.IsUltimateScope(myGrowStep))
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.NotYet;
                string growStepName = MonsterGrowStepData.GetGrowStepName(5.ToString());
                chipName = growStepName;
                string @string = StringMaster.GetString("ChipInstallingEvolutionInfo");
                chipDetail = string.Format(@string, growStepName);
            }
        }
        else if (buttonNo == 2)
        {
            if (MonsterGrowStepData.IsPerfectScope(myGrowStep) || MonsterGrowStepData.IsUltimateScope(myGrowStep))
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.NotYet;
                string growStepName2 = MonsterGrowStepData.GetGrowStepName(6.ToString());
                chipName = growStepName2;
                string string2 = StringMaster.GetString("ChipInstallingEvolutionInfo");
                chipDetail = string.Format(string2, growStepName2);
            }
        }
        else if (buttonNo == 3)
        {
            if (MonsterGrowStepData.IsUltimateScope(myGrowStep))
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.NotYet;
                string growStepName3 = MonsterGrowStepData.GetGrowStepName(7.ToString());
                chipName = growStepName3;
                string string3 = StringMaster.GetString("ChipInstallingEvolutionInfo");
                chipDetail = string.Format(string3, growStepName3);
                this.chipSphereLines.OpenMiddleToLeftUp(ChipSphereLines.LineType.None);
            }
        }
        else if (buttonNo == 4)
        {
            if (myArousal >= 2)
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.NotYet;
                string string4 = StringMaster.GetString("CharaStatus-23");
                chipName   = string.Format("{0}{1}", string4, 2);
                chipDetail = string4;
                this.chipSphereLines.OpenMiddleToRightDown(ChipSphereLines.LineType.None);
            }
        }
        else if (buttonNo == 5)
        {
            if (myArousal >= 4)
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.NotYet;
                string string5 = StringMaster.GetString("CharaStatus-23");
                chipName   = string.Format("{0}{1}", string5, 4);
                chipDetail = string5;
                this.chipSphereLines.OpenMiddleToRightUp(ChipSphereLines.LineType.None);
            }
        }
        else if (buttonNo >= 6)
        {
            type      = 1;
            itemCount = ConstValue.CHIP_EXTEND_SLOT_NEEDS[buttonNo - 6];
            if (buttonNo <= num)
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.Extendable;
            }
        }
        if (CMD_ChipSphere.DataChg.GetSlotEquip() == null)
        {
            global::Debug.Log("装着はありません.");
        }
        else
        {
            foreach (GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.Equip equip in CMD_ChipSphere.DataChg.GetSlotEquip())
            {
                int num2 = ChipTools.ConvertToButtonNo(equip);
                if (buttonNo == num2)
                {
                    menuType   = CMD_ChipSphere.MenuType.Detail;
                    userChipId = equip.userChipId;
                    break;
                }
            }
        }
        return(new ChipSphereIconButton.Parameter
        {
            type = type,
            buttonNo = buttonNo,
            menuType = menuType,
            itemCount = itemCount,
            chipName = chipName,
            chipDetail = chipDetail,
            userChipId = userChipId
        });
    }