예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     StartCoroutine(SetMoves());
     //MoveId1 = Random.Range(1, 6);
     //MoveId2 = Random.Range(6, 11);
     //MoveId3 = Random.Range(11, 16);
     //MoveId4 = Random.Range(16, 21);
     name = "The Player";
     //    es = Enemy.GetComponent<EnemyScr>();
     //we are going to want to start the player off with two random moves, one to attack, one to defend
     Stuntime        = -1;
     Muck            = -1;
     IsCharacterTurn = true;
     StartAtk        = 10;
     StartDef        = 10;
     StartLuck       = 10;
     AtkText.text    = "Atk X " + Atk.ToString();
     DefText.text    = "Def X " + Def.ToString();
     LuckText.text   = "Luck X " + Luck.ToString();
     LvlText.text    = "Lvl X " + Lvl.ToString();
     ChipsText.text  = "Chips X " + Chips.ToString();
     //   MoveId1 = 0; //id for first move
     // MoveId2 = 0; //id for second move
     // MoveId3 = 0; //id for third move
     // MoveId4 = 0; //id for fourth move
 }
        public void ShowInfo()
        {
            Console.WriteLine("\n\tINFO");

            Console.WriteLine("{0, -12}: {1, -15}", "Name", Name);
            Console.WriteLine("{0, -12}: {1, -15}", "Surname", Surname);
            Console.WriteLine("{0, -12}: {1, -15}", "Passport ID", PassportID);
            Console.WriteLine("{0, -12}: {1, -15}", "Gender", gender.ToString());
            Console.WriteLine("{0, -12}: {1, -15}", "DateBirth", date_of_birth.ToString("yyyy MMMM dd"));
            Console.WriteLine("{0, -12}: {1, -15}", "Age", Age.ToString() + " y.o");
            Console.WriteLine("{0, -12}: {1, -15}", "Weight", Weight.ToString() + " kg");
            Console.WriteLine("{0, -12}: {1, -15}", "Height", Height.ToString() + " cm\n");
            Console.WriteLine("{0, -12}: {1, -15}", "Experience", Expeience.ToString());
            Console.WriteLine("{0, -12}: {1, -15}", "Luck", Luck.ToString() + " %");
            Console.WriteLine("{0, -12}: {1, -15}", "Money", Money.ToString() + " $");
        }
예제 #3
0
        public virtual void ShowInfo()
        {
            Console.WriteLine("{0, -12}: {1, -15}", "Name", Name);
            Console.WriteLine("{0, -12}: {1, -15}", "Surname", Surname);
            Console.WriteLine("{0, -12}: {1, -15}", "Passport ID", PassportID);
            Console.WriteLine("{0, -12}: {1, -15}", "Gender", gender.ToString());
            Console.WriteLine("{0, -12}: {1, -15}", "DateBirth", date_of_birth.ToString("yyyy MMMM dd"));
            Console.WriteLine("{0, -12}: {1, -15}", "Age", Age.ToString() + " y.o");
            Console.WriteLine("{0, -12}: {1, -15}", "Weight", Weight.ToString() + " kg");
            Console.WriteLine("{0, -12}: {1, -15}", "Height", Height.ToString() + " cm");

            Console.ForegroundColor = ConsoleColor.Blue;
            Console.WriteLine("{0, -12}: {1, -15}", "Experience", Experience.ToString());
            Console.WriteLine("{0, -12}: {1, -15}", "Luck", Luck.ToString() + " %");
            Console.WriteLine("{0, -12}: {1, -15}", "Money", Money.ToString() + " $");
            Console.ResetColor();
        }
예제 #4
0
파일: Character.cs 프로젝트: Blin113/Gem
        public override string ToString()
        {
            string stats = Health.ToString() + "\n" + Strength.ToString() + "\n" + Dexterity.ToString() + "\n" + Agility.ToString() + "\n" + Inteligence.ToString() + "\n" + Luck.ToString() + "\n" + Statpoints.ToString() + "\n" + Level.ToString() + "\n" + ExperiencePoints.ToString();
            string hash  = GetSha1("Blin113" + stats);      //blin113 is just here to make sure you can't cheat without access to the code.

            stats += "\n" + hash;
            return(stats);
        }
예제 #5
0
    public IEnumerator CreateEnemy()
    {
        TraitScr.ShouldSpin   = false;
        ElementScr.ShouldSpin = false;
        MonsterScr.ShouldSpin = false;
        IsCharacterTurn       = false;
        ps.IsCharacterTurn    = true;
        wait = false;
        pc   = ps.GetComponent <Character>();
        ec   = es.GetComponent <Character>();

        //new ids and stats
        ElementId = Random.Range(1, 6);
        TraitId   = Random.Range(6, 11);
        MonsterId = Random.Range(11, 16);
        Muck      = -1;
        Chips     = 100 + (ps.Lvl * 10);
        Atk       = 0;
        Def       = 0;
        Luck      = 0;
        Frozen    = false;
        setTrait(TraitId);
        setElement(ElementId);
        setMonster(MonsterId);
        float a = (float)Atk * (((float)ps.Lvl * 0.1f) + 0.2f);
        float d = (float)Def * (((float)ps.Lvl * 0.1f) + 0.2f);
        float l = (float)Luck * (((float)ps.Lvl * 0.1f) + 0.2f);

        Atk      = (int)a;
        Def      = (int)d;
        Luck     = (int)l;
        Stuntime = -1;


        AtkText.text   = "Atk X " + Atk.ToString();
        DefText.text   = "Def X " + Def.ToString();
        LuckText.text  = "Luck X " + Luck.ToString();
        ChipsText.text = "Chips X " + Chips.ToString();
        name           = NameText.text;

        //declare the monster
        Description.text        = "A " + name + " appears!";
        mm.b1.interactable      = true;
        mm.b2.interactable      = true;
        mm.b3.interactable      = true;
        mm.b4.interactable      = true;
        Description.text       += "\nIt is your turn!";
        mm.MoveBtn.interactable = true;

        if (mm.PlayerID == 1)
        {
            mm.b1.interactable = false;
        }
        if (mm.PlayerID == 2)
        {
            mm.b2.interactable = false;
        }
        if (mm.PlayerID == 3)
        {
            mm.b3.interactable = false;
        }
        if (mm.PlayerID == 4)
        {
            mm.b4.interactable = false;
        }

        //        yield return new WaitForSeconds(1f);
        TraitScr.SetImage(TraitId - 6);

//        yield return new WaitForSeconds(1f);
        ElementScr.SetImage(ElementId - 1);

//        yield return new WaitForSeconds(1f);
        MonsterScr.SetImage(MonsterId - 11);
        yield return(null);
    }
예제 #6
0
        public void TestConstructor()
        {
            Luck luck = new Luck();

            Assert.AreEqual("Luck", luck.ToString().Substring(0, 4));
        }
        public void TestConstructor()
        {
            Luck luck = new Luck();

            Assert.AreEqual("Luck Property:\tOwned by: Banker", luck.ToString());
        }