Esempio n. 1
0
	public void getEnemyStsAndMakeInstance(int linkNo, int mapId, float mntMinusRatio, float seaMinusRatio, float rainMinusRatio, float snowMinusRatio){
		
		String map = "emap" + mapId;
		int busyoId = PlayerPrefs.GetInt(map);

		int activeBusyoLv = PlayerPrefs.GetInt ("activeBusyoLv");
		int activeButaiQty = PlayerPrefs.GetInt ("activeButaiQty");
		int activeButaiLv = PlayerPrefs.GetInt ("activeButaiLv");

		StatusGet sts = new StatusGet ();
		BusyoInfoGet info = new BusyoInfoGet();
		int hp = sts.getHp (busyoId, activeBusyoLv);
		int atk = sts.getAtk (busyoId, activeBusyoLv);
		int dfc = sts.getDfc (busyoId, activeBusyoLv);
		int spd = sts.getSpd (busyoId, activeBusyoLv);
		string busyoName = sts.getBusyoName (busyoId);
		string heisyu = sts.getHeisyu (busyoId);
		ArrayList senpouArray = sts.getSenpou (busyoId);

		//Map & Weather Minus
		if (mntMinusRatio != 0) {
			if (heisyu == "KB") {
				float tmp = (float)spd * mntMinusRatio;
				if (tmp < 1) {
					tmp = 1;
				}
				spd = Mathf.FloorToInt (tmp);
			}
		}else if (seaMinusRatio != 0) {
			if (heisyu == "TP") {
				float tmp = (float)dfc * seaMinusRatio;
				if (tmp < 1) {
					tmp = 1;
				}
				dfc = Mathf.FloorToInt (tmp);
			}else if (heisyu == "YM") {
				float tmp = (float)dfc * seaMinusRatio;
				if (tmp < 1) {
					tmp = 1;
				}
				dfc = Mathf.FloorToInt (tmp);
			}
		}
		if (rainMinusRatio != 0) {
			if (heisyu == "TP") {
				float tmp = (float)atk * rainMinusRatio;
				if (tmp < 1) {
					tmp = 1;
				}
				atk = Mathf.FloorToInt (tmp);
			}else if (heisyu == "YM") {
				float tmp = (float)atk * rainMinusRatio;
				if (tmp < 1) {
					tmp = 1;
				}
				atk = Mathf.FloorToInt (tmp);
			}		
		}else if(snowMinusRatio != 0) {
			float tmp = (float)spd * 0.5f;
			if (tmp < 1) {
				tmp = 1;
			}
			spd = Mathf.FloorToInt (tmp);

			if (heisyu == "TP") {
				float tmp2 = (float)atk * snowMinusRatio;
				if (tmp2 < 1) {
					tmp2 = 1;
				}
				atk = Mathf.FloorToInt (tmp2);
			}else if (heisyu == "YM") {
				float tmp2 = (float)atk * snowMinusRatio;
				if (tmp2 < 1) {
					tmp2 = 1;
				}
				atk = Mathf.FloorToInt (tmp2);
			}else if (heisyu == "KB") {
				float tmp2 = (float)dfc * snowMinusRatio;
				if (tmp2 < 1) {
					tmp2 = 1;
				}
				dfc = Mathf.FloorToInt (tmp2);
			}
		}

		bool enemyTaisyoFlg = false;
		if (busyoId == enemySoudaisyo) {
			enemyTaisyoFlg = true;

		}

		//View Object & pass status to it. 
		EnemyInstance inst = new EnemyInstance ();
		inst.makeInstance(mapId, busyoId, activeButaiLv, heisyu, activeButaiQty, hp, atk, dfc, spd, busyoName,linkNo,enemyTaisyoFlg);
	}
Esempio n. 2
0
    public void enemyEngunInstance(string enemyEngunList, float mntMinusRatio, float seaMinusRatio, float rainMinusRatio, float snowMinusRatio)
    {
        List <string> daimyoEnguniList = new List <string> ();

        char[] delimiterChars  = { ':' };
        char[] delimiterChars2 = { '-' };
        if (enemyEngunList.Contains(":"))
        {
            daimyoEnguniList = new List <string> (enemyEngunList.Split(delimiterChars));
        }
        else
        {
            daimyoEnguniList.Add(enemyEngunList);
        }

        for (int i = 0; i < daimyoEnguniList.Count; i++)
        {
            StatusGet     sts = new StatusGet();
            string        daimyoEngunString = daimyoEnguniList[i];
            List <string> unitEnguniList    = new List <string> ();
            unitEnguniList = new List <string> (daimyoEngunString.Split(delimiterChars2));
            int    busyoId = int.Parse(unitEnguniList[1]);
            string heisyu  = sts.getHeisyu(busyoId);

            if (busyoId != 0)
            {
                int busyoLv  = int.Parse(unitEnguniList[2]);
                int butaiQty = int.Parse(unitEnguniList[3]);
                int butaiLv  = int.Parse(unitEnguniList[4]);

                int    hp        = sts.getHp(busyoId, busyoLv);
                int    atk       = sts.getAtk(busyoId, busyoLv);
                int    dfc       = sts.getDfc(busyoId, busyoLv);
                int    spd       = sts.getSpd(busyoId, busyoLv);
                string busyoName = sts.getBusyoName(busyoId);

                int aveSenpouLv = 0;
                if (Application.loadedLevelName != "kaisen")
                {
                    aveSenpouLv = GameObject.Find("GameScene").GetComponent <GameScene> ().aveSenpouLv;
                }
                else
                {
                    aveSenpouLv = GameObject.Find("GameScene").GetComponent <KaisenScene>().aveSenpouLv;
                }
                ArrayList senpouArray = sts.getEnemySenpou(busyoId, aveSenpouLv, "");


                if (mntMinusRatio != 0)
                {
                    if (heisyu == "KB")
                    {
                        float tmp = (float)spd * mntMinusRatio;
                        if (tmp < 1)
                        {
                            tmp = 1;
                        }
                        spd = Mathf.FloorToInt(tmp);
                    }
                }
                else if (seaMinusRatio != 0)
                {
                    if (heisyu == "TP")
                    {
                        float tmp = (float)dfc * seaMinusRatio;
                        if (tmp < 1)
                        {
                            tmp = 1;
                        }
                        dfc = Mathf.FloorToInt(tmp);
                    }
                    else if (heisyu == "YM")
                    {
                        float tmp = (float)dfc * seaMinusRatio;
                        if (tmp < 1)
                        {
                            tmp = 1;
                        }
                        dfc = Mathf.FloorToInt(tmp);
                    }
                }
                if (rainMinusRatio != 0)
                {
                    if (heisyu == "TP")
                    {
                        float tmp = (float)atk * rainMinusRatio;
                        if (tmp < 1)
                        {
                            tmp = 1;
                        }
                        atk = Mathf.FloorToInt(tmp);
                    }
                    else if (heisyu == "YM")
                    {
                        float tmp = (float)atk * rainMinusRatio;
                        if (tmp < 1)
                        {
                            tmp = 1;
                        }
                        atk = Mathf.FloorToInt(tmp);
                    }
                }
                else if (snowMinusRatio != 0)
                {
                    float tmp = (float)spd * 0.5f;
                    if (tmp < 1)
                    {
                        tmp = 1;
                    }
                    spd = Mathf.FloorToInt(tmp);

                    if (heisyu == "TP")
                    {
                        float tmp2 = (float)atk * snowMinusRatio;
                        if (tmp2 < 1)
                        {
                            tmp2 = 1;
                        }
                        atk = Mathf.FloorToInt(tmp2);
                    }
                    else if (heisyu == "YM")
                    {
                        float tmp2 = (float)atk * snowMinusRatio;
                        if (tmp2 < 1)
                        {
                            tmp2 = 1;
                        }
                        atk = Mathf.FloorToInt(tmp2);
                    }
                    else if (heisyu == "KB")
                    {
                        float tmp2 = (float)dfc * snowMinusRatio;
                        if (tmp2 < 1)
                        {
                            tmp2 = 1;
                        }
                        dfc = Mathf.FloorToInt(tmp2);
                    }
                }

                //View Object & pass status to it.
                EnemyInstance inst    = new EnemyInstance();
                BusyoInfoGet  info    = new BusyoInfoGet();
                string        ch_type = info.getHeisyu(busyoId);
                int           mapId   = 22;

                if (Application.loadedLevelName != "kaisen")
                {
                    inst.makeInstance(mapId, busyoId, butaiLv, ch_type, butaiQty, hp, atk, dfc, spd, busyoName, 0, false, senpouArray, "");
                }
                else
                {
                    BusyoInfoGet busyoScript = new BusyoInfoGet();
                    int          shipId      = busyoScript.getShipId(busyoId);
                    inst.makeKaisenInstance(mapId, busyoId, shipId, butaiLv, ch_type, butaiQty, hp, atk, dfc, spd, busyoName, 0, false, senpouArray);
                }
            }
        }
        Message msg = new Message();

        msg.makeKassenMessage(msg.getMessage(131));
    }
Esempio n. 3
0
	//doramatic charactor

	// Use this for initialization
	void Start () {
		//map生成
		Instantiate(mapPrefab);
		Instantiate(treePrefab);
		Instantiate(wallPrefab);


		/*プレイヤー配置*/
	
		//ユーザ陣形データのロード
		int jinkei =PlayerPrefs.GetInt("jinkei",0);

		//1.魚麟
		if (jinkei == 1) {
			if(PlayerPrefs.HasKey("1map1")){
				int mapId = 1;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map2")){
				int mapId = 2;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map7")){
				int mapId = 7;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map8")){
				int mapId = 8;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map11")){
				int mapId = 11;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map12")){
				int mapId = 12;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map13")){
				int mapId = 13;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map14")){
				int mapId = 14;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map17")){
				int mapId = 17;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map18")){
				int mapId = 18;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map21")){
				int mapId = 21;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("1map22")){
				int mapId = 22;
				getStsAndMakeInstance(jinkei,mapId);
			}
		


		//2.鶴翼
		}else if(jinkei == 2){
			if(PlayerPrefs.HasKey("2map3")){
				int mapId = 3;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map4")){
				int mapId = 4;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map5")){
				int mapId = 5;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map7")){
				int mapId = 7;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map8")){
				int mapId = 8;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map11")){
				int mapId = 11;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map12")){
				int mapId = 12;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map17")){
				int mapId = 17;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map18")){
				int mapId = 18;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map23")){
				int mapId = 23;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map24")){
				int mapId = 24;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("2map25")){
				int mapId = 25;
				getStsAndMakeInstance(jinkei,mapId);
			}

		}
		//3.偃月
		else if(jinkei == 3){
			if(PlayerPrefs.HasKey("3map3")){
				int mapId = 3;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map7")){
				int mapId = 7;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map8")){
				int mapId = 8;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map9")){
				int mapId = 9;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map11")){
				int mapId = 11;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map12")){
				int mapId = 12;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map14")){
				int mapId = 14;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map15")){
				int mapId = 15;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map16")){
				int mapId = 16;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map20")){
				int mapId = 20;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map21")){
				int mapId = 21;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("3map25")){
				int mapId = 25;
				getStsAndMakeInstance(jinkei,mapId);
			}
		}

		//4.雁行
		else if(jinkei == 4){
			if(PlayerPrefs.HasKey("4map1")){
				int mapId = 1;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map2")){
				int mapId = 2;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map7")){
				int mapId = 7;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map8")){
				int mapId = 8;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map12")){
				int mapId = 12;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map13")){
				int mapId = 13;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map14")){
				int mapId = 14;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map18")){
				int mapId = 18;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map19")){
				int mapId = 19;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map20")){
				int mapId = 20;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map24")){
				int mapId = 24;
				getStsAndMakeInstance(jinkei,mapId);
			}
			if(PlayerPrefs.HasKey("4map25")){
				int mapId = 25;
				getStsAndMakeInstance(jinkei,mapId);
			}
		}


		/*エネミー配置*/
		//stageId取得しマスタ判別
		int tempStageId = PlayerPrefs.GetInt("activeStageId",0);
		int kuniId = PlayerPrefs.GetInt("activeKuniId",0);

		Entity_stage_mst stageMst  = Resources.Load ("Data/stage_mst") as Entity_stage_mst;

		//y=10(X-1)+z-1
		int stageId = 10*(kuniId - 1) + tempStageId;

		//Jinkei Random
		List<int> jinkeiList = new List<int> (){1,2,3,4};
		int enemyJinkei = UnityEngine.Random.Range(1,jinkeiList.Count + 1);

		/*Dynamic Enemy Setting Start*/
		int activeDaimyoId = PlayerPrefs.GetInt("activeDaimyoId");
		int activeBusyoQty = PlayerPrefs.GetInt ("activeBusyoQty");
		int activeBusyoLv = PlayerPrefs.GetInt ("activeBusyoLv");
		int activeButaiQty = PlayerPrefs.GetInt ("activeButaiQty");
		int activeButaiLv = PlayerPrefs.GetInt ("activeButaiLv");
		Entity_daimyo_mst daimyoMst = Resources.Load ("Data/daimyo_mst") as Entity_daimyo_mst;
		int daimyoBusyoId = daimyoMst.param[activeDaimyoId-1].busyoId;

		//Dimyo Setting
		int taisyoMapId = 0;
		List<int> mapList = new List<int>();

		if (enemyJinkei == 1) {
			taisyoMapId = 15;
			mapList = new List<int>(){4,5,8,9,12,13,14,18,19,24,25};

		}else if (enemyJinkei == 2) {
			taisyoMapId = 15;
			mapList = new List<int>(){1,2,3,8,9,14,18,19,21,22,23};

		}else if (enemyJinkei == 3) {
			taisyoMapId = 14;
			mapList = new List<int>(){1,5,6,10,11,12,15,17,18,19,23};
				
		}else if (enemyJinkei == 4) {
			taisyoMapId = 14;
			mapList = new List<int>(){4,5,8,9,12,13,16,17,18,21,22};

		}
		
		StatusGet sts = new StatusGet();
		int hp = sts.getHp(daimyoBusyoId,activeBusyoLv);
		int atk = sts.getAtk(daimyoBusyoId,activeBusyoLv);
		int dfc = sts.getDfc(daimyoBusyoId,activeBusyoLv);
		int spd = sts.getSpd(daimyoBusyoId,activeBusyoLv);
		
		BusyoInfoGet info = new BusyoInfoGet();
		String daimyoBusyoName = info.getName(daimyoBusyoId);
		String daimyoType = info.getHeisyu(daimyoBusyoId);
		
		EnemyInstance inst = new EnemyInstance();
		inst.makeInstance(taisyoMapId, daimyoBusyoId, activeButaiLv, daimyoType, activeButaiQty, hp, atk, dfc, spd, daimyoBusyoName);

		//Busyo Setting
		//Make busyo list
		Entity_busyo_mst busyoMst  = Resources.Load ("Data/busyo_mst") as Entity_busyo_mst;
		List<int> busyoList = new List<int> ();

		for(int i=0; i<busyoMst.param.Count; i++){
			int busyoId = busyoMst.param[i].id;
			int daimyoId = busyoMst.param[i].daimyoId;

			if(daimyoId == activeDaimyoId){

				if(busyoId != daimyoBusyoId){
					busyoList.Add (busyoId);
				}
			}
		}

		//Random Shuffle
		for (int i = 0; i < busyoList.Count; i++) {
			int temp = busyoList[i];
			int randomIndex = UnityEngine.Random.Range(0, busyoList.Count);
			busyoList[i] = busyoList[randomIndex];
			busyoList[randomIndex] = temp;
		}

		for (int i = 0; i < mapList.Count; i++) {
			int temp = mapList[i];
			int randomIndex = UnityEngine.Random.Range(0, mapList.Count);
			mapList[i] = mapList[randomIndex];
			mapList[randomIndex] = temp;
		}

		for(int j=0; j<activeBusyoQty-1; j++){
			int randomBusyoId = busyoList[j];
			int mapId = mapList[j];


			//Status
			if(randomBusyoId !=0){
				int busyoHp = sts.getHp(randomBusyoId,activeBusyoLv);
				int busyoAtk = sts.getAtk(randomBusyoId,activeBusyoLv);
				int busyoDfc = sts.getDfc(randomBusyoId,activeBusyoLv);
				int busyoSpd = sts.getSpd(randomBusyoId,activeBusyoLv);

				String busyoName = info.getName(randomBusyoId);
				String busyoType = info.getHeisyu(randomBusyoId);

				inst.makeInstance(mapId, randomBusyoId, activeButaiLv, busyoType, activeButaiQty, busyoHp, busyoAtk, busyoDfc, busyoSpd, busyoName);
			}
		}

		/*Dynamic Enemy Setting Finish*/

		//合戦開始エフェクト
		string pathBack = "Prefabs/PreKassen/backGround";
		GameObject back = Instantiate(Resources.Load (pathBack)) as GameObject;
		back.transform.localScale = new Vector2 (30, 15);

		string pathLight = "Prefabs/PreKassen/lightning";
		GameObject light = Instantiate(Resources.Load (pathLight)) as GameObject;
		light.transform.localScale = new Vector2 (10, 10);



	}
Esempio n. 4
0
	public void enemyEngunInstance(string enemyEngunList){
		
		List<string> daimyoEnguniList = new List<string> ();
		char[] delimiterChars = {':'};
		char[] delimiterChars2 = {'-'};
		if(enemyEngunList.Contains(":")){
			daimyoEnguniList = new List<string> (enemyEngunList.Split (delimiterChars));
		}else{
			daimyoEnguniList.Add(enemyEngunList);
		}
		
		for(int i=0; i<daimyoEnguniList.Count; i++){
			string daimyoEngunString = daimyoEnguniList[i];
			List<string> unitEnguniList = new List<string> ();
			unitEnguniList = new List<string> (daimyoEngunString.Split (delimiterChars2));
			int busyoId = int.Parse(unitEnguniList[0]);
			if(busyoId!=0){
				int busyoLv = int.Parse(unitEnguniList[1]);
				int butaiQty = int.Parse(unitEnguniList[2]);
				int butaiLv = int.Parse(unitEnguniList[3]);
				
				StatusGet sts = new StatusGet ();
				int hp = sts.getHp (busyoId, busyoLv);
				int atk = sts.getAtk (busyoId, busyoLv);
				int dfc = sts.getDfc (busyoId, busyoLv);
				int spd = sts.getSpd (busyoId, busyoLv);
				string busyoName = sts.getBusyoName (busyoId);
				ArrayList senpouArray = sts.getSenpou (busyoId);
				
				//View Object & pass status to it. 
				EnemyInstance inst = new EnemyInstance ();
				BusyoInfoGet info = new BusyoInfoGet ();
				string ch_type = info.getHeisyu (busyoId);
				int mapId = 22;

				inst.makeInstance(mapId, busyoId, butaiLv, ch_type, butaiQty, hp, atk, dfc, spd, busyoName, 0, false);
			}
		}
		Message msg = new Message ();
		string text = "敵軍の援軍が到着しましたぞ!";
		msg.makeKassenMessage (text);
		
		
	}
Esempio n. 5
0
    //doramatic charactor
    // Use this for initialization
    void Start()
    {
        //map生成
        Instantiate(mapPrefab);
        Instantiate(treePrefab);
        Instantiate(wallPrefab);

        /*プレイヤー配置*/

        //ユーザ陣形データのロード
        int jinkei =PlayerPrefs.GetInt("jinkei",0);

        //1.魚麟
        if (jinkei == 1) {
            if(PlayerPrefs.HasKey("1map1")){
                int mapId = 1;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }

            if(PlayerPrefs.HasKey("1map2")){
                int mapId = 2;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("1map7")){
                int mapId = 7;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("1map8")){
                 int mapId = 8;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);

            }
            if(PlayerPrefs.HasKey("1map11")){
                int mapId = 11;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("1map12")){
                int mapId = 12;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("1map13")){
                int mapId = 13;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("1map14")){
                int mapId = 14;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("1map17")){
                int mapId = 17;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("1map18")){
                int mapId = 18;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("1map21")){
                int mapId = 21;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("1map22")){
                int mapId = 22;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }

        //2.鶴翼
        }else if(jinkei == 2){
            if(PlayerPrefs.HasKey("2map3")){
                int mapId = 3;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map4")){
                int mapId = 4;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map5")){
                int mapId = 5;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map7")){
                int mapId = 7;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map8")){
                int mapId = 8;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map11")){
                int mapId = 11;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map12")){
                int mapId = 12;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map17")){
                int mapId = 17;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map18")){
                int mapId = 18;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map23")){
                int mapId = 23;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map24")){
                int mapId = 24;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("2map25")){
                int mapId = 25;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }

        }
        //3.偃月
        else if(jinkei == 3){
            if(PlayerPrefs.HasKey("3map3")){
                int mapId = 3;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map7")){
                int mapId = 7;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map8")){
                int mapId = 8;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map9")){
                int mapId = 9;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map11")){
                int mapId = 11;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map12")){
                int mapId = 12;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map14")){
                int mapId = 14;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map15")){
                int mapId = 15;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map16")){
                int mapId = 16;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map20")){
                int mapId = 20;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map21")){
                int mapId = 21;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("3map25")){
                int mapId = 25;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
        }

        //4.雁行
        else if(jinkei == 4){
            if(PlayerPrefs.HasKey("4map1")){
                int mapId = 1;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map2")){
                int mapId = 2;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map7")){
                int mapId = 7;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map8")){
                int mapId = 8;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map12")){
                int mapId = 12;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map13")){
                int mapId = 13;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map14")){
                int mapId = 14;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map18")){
                int mapId = 18;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map19")){
                int mapId = 19;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map20")){
                int mapId = 20;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map24")){
                int mapId = 24;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
            if(PlayerPrefs.HasKey("4map25")){
                int mapId = 25;
                String map = jinkei.ToString() + "map" + mapId;
                //Get Status
                int busyoInt = PlayerPrefs.GetInt(map);

                string busyoString = busyoInt.ToString();
                int lv =PlayerPrefs.GetInt(busyoString);

                StatusGet sts = new StatusGet();
                int hp = sts.getHp(busyoInt,lv);
                int atk = sts.getAtk(busyoInt,lv);
                int dfc = sts.getDfc(busyoInt,lv);
                int spd = sts.getSpd(busyoInt,lv);
                string busyoName = sts.getBusyoName(busyoInt);
                ArrayList senpouArray = sts.getSenpou(busyoInt);

                //View Object & pass status to it.
                PlayerInstance inst = new PlayerInstance();
                inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName);
            }
        }

        /*エネミー配置*/
        //stageId取得しマスタ判別
        int tempStageId = PlayerPrefs.GetInt("activeStageId",0);
        int kuniId = PlayerPrefs.GetInt("activeKuniId",0);
        Entity_stage_mst stageMst  = Resources.Load ("Data/stage_mst") as Entity_stage_mst;

        //y=10(X-1)+z-1
        int stageId = 10*(kuniId - 1) + tempStageId;
        int enemyJinkei = stageMst.param[stageId - 1].jinkei;
        int enemyLv = stageMst.param[stageId - 1].lv;

        int[] enemyArray = new int[25];
        enemyArray[0] = stageMst.param[stageId - 1].map1;
        enemyArray[1] = stageMst.param[stageId - 1].map2;
        enemyArray[2] = stageMst.param[stageId - 1].map3;
        enemyArray[3] = stageMst.param[stageId - 1].map4;
        enemyArray[4] = stageMst.param[stageId - 1].map5;
        enemyArray[5] = stageMst.param[stageId - 1].map6;
        enemyArray[6] = stageMst.param[stageId - 1].map7;
        enemyArray[7] = stageMst.param[stageId - 1].map8;
        enemyArray[8] = stageMst.param[stageId - 1].map9;
        enemyArray[9] = stageMst.param[stageId - 1].map10;
        enemyArray[10] = stageMst.param[stageId - 1].map11;
        enemyArray[11] = stageMst.param[stageId - 1].map12;
        enemyArray[12] = stageMst.param[stageId - 1].map13;
        enemyArray[13] = stageMst.param[stageId - 1].map14;
        enemyArray[14] = stageMst.param[stageId - 1].map15;
        enemyArray[15] = stageMst.param[stageId - 1].map16;
        enemyArray[16] = stageMst.param[stageId - 1].map17;
        enemyArray[17] = stageMst.param[stageId - 1].map18;
        enemyArray[18] = stageMst.param[stageId - 1].map19;
        enemyArray[19] = stageMst.param[stageId - 1].map20;
        enemyArray[20] = stageMst.param[stageId - 1].map21;
        enemyArray[21] = stageMst.param[stageId - 1].map22;
        enemyArray[22] = stageMst.param[stageId - 1].map23;
        enemyArray[23] = stageMst.param[stageId - 1].map24;
        enemyArray[24] = stageMst.param[stageId - 1].map25;
        int ch_num = stageMst.param[stageId - 1].chQty;
        int ch_lv = stageMst.param[stageId - 1].lv;

        for(int i=0; i < enemyArray.Length; i++ ){
            if(enemyArray[i] != 0){
                int enemyMapId = i+1;
                int EnemyMap = enemyArray[i];
                StatusGet sts = new StatusGet();
                int hp = sts.getHp(EnemyMap,enemyLv);
                int atk = sts.getAtk(EnemyMap,enemyLv);
                int dfc = sts.getDfc(EnemyMap,enemyLv);
                int spd = sts.getSpd(EnemyMap,enemyLv);

                BusyoInfoGet info = new BusyoInfoGet();
                String busyoName = info.getName(EnemyMap);
                String ch_type = info.getHeisyu(EnemyMap);

                EnemyInstance inst = new EnemyInstance();
                inst.makeInstance(enemyMapId, EnemyMap, ch_lv, ch_type, ch_num, hp, atk, dfc, spd, busyoName);
            }
        }

        //HP bar
        //Instantiate(hpBarPlayerPrefab);
        //Instantiate(hpBarEnemyPrefab);

        //合戦開始エフェクト
        string pathBack = "Prefabs/PreKassen/backGround";
        GameObject back = Instantiate(Resources.Load (pathBack)) as GameObject;
        back.transform.localScale = new Vector2 (30, 15);

        string pathLight = "Prefabs/PreKassen/lightning";
        GameObject light = Instantiate(Resources.Load (pathLight)) as GameObject;
        light.transform.localScale = new Vector2 (10, 10);
    }