Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class dziki : MonoBehaviour
- {
- public static int dupa;
- public static int dzikipok;
- public static float poziom;
- public static string numer;
- public static string nazwa;
- public static float HP;
- public static float MaxHpValue;
- public static float atak;
- public static float obrona;
- public static float spid;
- public static float specatak;
- public static float specobrona;
- public static string typ1;
- public static string typ2;
- public static float HP_mnoznik;
- public static float atak_mnoznik;
- public static float obrona_mnoznik;
- public static float spid_mnoznik;
- public static float specatak_mnoznik;
- public static float specobrona_mnoznik;
- public static string atak1_nazwa;
- public static string atak1_numer;
- public static string atak1_type;
- public static string atak1_pp_current;
- public static string atak1_pp_max;
- public static string atak1_power;
- public static string atak1_accuracy;
- public static string atak1_is_special;
- public static string atak2_nazwa;
- public static string atak2_numer;
- public static string atak2_type;
- public static string atak2_pp_current;
- public static string atak2_pp_max;
- public static string atak2_power;
- public static string atak2_accuracy;
- public static string atak2_is_special;
- public static string atak3_numer;
- public static string atak3_nazwa;
- public static string atak3_type;
- public static string atak3_pp_current;
- public static string atak3_pp_max;
- public static string atak3_power;
- public static string atak3_accuracy;
- public static string atak3_is_special;
- public static string atak4_numer;
- public static string atak4_nazwa;
- public static string atak4_type;
- public static string atak4_pp_current;
- public static string atak4_pp_max;
- public static string atak4_power;
- public static string atak4_accuracy;
- public static string atak4_is_special;
- public static string atak_chosen;
- public static string atak_type_chosen;
- public static string atak_pp_chosen;
- public static string atak_power_chosen;
- public static string atak_accuracy_chosen;
- public static string status_poison;
- public static string status_burn;
- public static string status_sleep;
- public static string status_paralyze;
- public static string status_freeze;
- public static int atak1_przyb;
- public static int atak2_przyb;
- public static int atak3_przyb;
- public static int atak4_przyb;
- // Use this for initialization
- void Start()
- {
- TextAsset pokemon = Resources.Load<TextAsset>("pokemon_1");
- string[] data = pokemon.text.Split(new char[] { '\n' });
- for (int i = (cube.pokenumber * 2) - 1; i <= (cube.pokenumber * 2) - 1; i++)
- {
- string[] row = data[i].Split(new char[] { ';' });
- Pokemon q = new Pokemon();
- q.poziom = row[0];
- q.numer = row[1];
- q.nazwa = row[2];
- q.HP = row[3];
- q.HP_mnoznik = row[4];
- q.atak = row[5];
- q.atak_mnoznik = row[6];
- q.obrona = row[7];
- q.obrona_mnoznik = row[8];
- q.spid = row[9];
- q.spid_mnoznik = row[10];
- q.specatak = row[11];
- q.specatak_mnoznik = row[12];
- q.specobrona = row[13];
- q.specobrona_mnoznik = row[14];
- q.typ1 = row[15];
- q.typ2 = row[16];
- dupa = int.Parse(q.numer);
- poziom = float.Parse(q.poziom) * cube.pokelevel;
- numer = q.numer;
- nazwa = q.nazwa;
- HP = Mathf.Round(float.Parse(q.HP) + cube.pokelevel * float.Parse(q.HP_mnoznik));
- atak = Mathf.Round(float.Parse(q.atak) + cube.pokelevel * float.Parse(q.atak_mnoznik));
- obrona = Mathf.Round(float.Parse(q.obrona) + cube.pokelevel * float.Parse(q.obrona_mnoznik));
- spid = Mathf.Round(float.Parse(q.spid) + cube.pokelevel * float.Parse(q.spid_mnoznik));
- specatak = Mathf.Round(float.Parse(q.specatak) + cube.pokelevel * float.Parse(q.specatak_mnoznik));
- specobrona = Mathf.Round(float.Parse(q.specobrona) + cube.pokelevel * float.Parse(q.specobrona_mnoznik));
- typ1 = q.typ1;
- typ2 = q.typ2;
- TextAsset pokemon2 = Resources.Load<TextAsset>("ataki");
- string[] data2 = pokemon2.text.Split(new char[] { '\n' });
- for (int i2 = cube.pokelevel; i2 <= cube.pokelevel; i2++)
- {
- string[] row2 = data2[i2].Split(new char[] { ';' });
- atakingenemy w = new atakingenemy();
- w.atak = row2[dupa];
- print(w.atak);
- string[] cell = w.atak.Split(new char[] { ',' });
- atak1_numer = cell[0];
- print(atak1_numer);
- atak2_numer = cell[1];
- print(atak2_numer);
- atak3_numer = cell[2];
- print(atak3_numer);
- atak4_numer = cell[3];
- print(atak4_numer);
- }
- TextAsset pokemon3 = Resources.Load<TextAsset>("moveset");
- atak1_przyb = int.Parse(atak1_numer);
- string[] data3 = pokemon3.text.Split(new char[] { '\n' });
- atak1_przyb = int.Parse(atak1_numer);
- for (int i3 = atak1_przyb - 1; i3 <= atak1_przyb - 1; i3++)
- {
- string[] row3 = data3[i3].Split(new char[] { ';' });
- moveset e = new moveset();
- atak1_nazwa = row3[0];
- print(atak1_nazwa);
- atak1_type = row3[1];
- atak1_pp_max = row3[2];
- atak1_pp_current = atak1_pp_max;
- atak1_power = row3[3];
- atak1_accuracy = row3[4];
- atak1_is_special = row3[5];
- }
- atak2_przyb = int.Parse(atak2_numer);
- if (atak2_przyb != 0)
- {
- for (int i4 = atak2_przyb - 1; i4 <= atak2_przyb - 1; i4++)
- {
- string[] row4 = data3[i4].Split(new char[] { ';' });
- moveset e = new moveset();
- atak2_nazwa = row4[0];
- atak2_type = row4[1];
- atak2_pp_max = row4[2];
- atak2_pp_current = atak2_pp_max;
- atak2_power = row4[3];
- atak2_accuracy = row4[4];
- atak2_is_special = row4[5];
- }
- }
- atak3_przyb = int.Parse(atak3_numer);
- if (atak3_przyb != 0)
- {
- for (int i5 = atak3_przyb - 1; i5 <= atak3_przyb - 1; i5++)
- {
- string[] row5 = data3[i5].Split(new char[] { ';' });
- moveset e = new moveset();
- atak3_nazwa = row5[0];
- atak3_type = row5[1];
- atak3_pp_max = row5[2];
- atak3_pp_current = user_pok1.atak3_pp_max;
- atak3_power = row5[3];
- atak3_accuracy = row5[4];
- atak3_is_special = row5[5];
- }
- }
- atak4_przyb = int.Parse(atak4_numer);
- print("atak 3 przyb to: " + atak3_przyb);
- if (atak3_przyb != 0)
- {
- for (int i6 = atak4_przyb - 1; i6 <= atak4_przyb - 1; i6++)
- {
- string[] row6 = data3[i6].Split(new char[] { ';' });
- moveset e = new moveset();
- atak4_nazwa = row6[0];
- atak4_type = row6[1];
- atak4_pp_max = row6[2];
- atak4_pp_current = atak4_pp_max;
- atak4_power = row6[3];
- atak4_accuracy = row6[4];
- atak4_is_special = row6[5];
- }
- }
- enemy.przypisanie();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement