예제 #1
0
        public BitBlock GetActivePokemonBits()
        {
            var bits = new BitBlock(BitLength);

            bits[0] = IsValid;
            bits.SetRange(1, 4, Unk1);
            bits.SetInt(0, 5, 7, Level);
            bits.SetInt(0, 12, 8, MetAt);
            bits.SetInt(0, 20, 7, MetFloor);
            bits[27] = Unk2;
            bits.SetInt(0, 28, 10, IQ);
            bits.SetInt(0, 38, 10, RosterNumber);
            bits.SetRange(48, 22, Unk3);
            bits.SetInt(0, 70, 11, ID.ID);
            bits.SetInt(0, 81, 10, CurrentHP);
            bits.SetInt(0, 91, 10, MaxHP);
            bits.SetInt(0, 101, 8, Attack);
            bits.SetInt(0, 109, 8, SpAttack);
            bits.SetInt(0, 117, 8, Defense);
            bits.SetInt(0, 125, 8, SpDefense);
            bits.SetInt(0, 133, 24, Exp);
            bits.SetRange(157, ExplorersActiveAttack.BitLength, Attack1.ToBitBlock());
            bits.SetRange(186, ExplorersActiveAttack.BitLength, Attack2.ToBitBlock());
            bits.SetRange(215, ExplorersActiveAttack.BitLength, Attack3.ToBitBlock());
            bits.SetRange(244, ExplorersActiveAttack.BitLength, Attack4.ToBitBlock());
            bits.SetRange(273, 105, Unk4);
            bits.SetRange(378, 69, IQMap);
            bits.SetInt(0, 447, 4, Tactic);
            bits.SetRange(451, 15, Unk5);
            bits.SetStringPMD(0, 466, 10, Name);
            return(bits);
        }
        public BitBlock GetStoredPokemonBits()
        {
            var bits = new BitBlock(BitLength);

            bits[0] = IsValid;
            bits.SetInt(0, 1, 7, Level);
            bits.SetInt(0, 8, 11, ID.RawID);
            bits.SetInt(0, 19, 8, MetAt);
            bits.SetInt(0, 27, 7, MetFloor);
            bits[34] = Unk1;
            bits.SetInt(0, 35, 7, EvolvedAtLevel1);
            bits.SetInt(0, 42, 7, EvolvedAtLevel2);
            bits.SetInt(0, 49, 10, IQ);
            bits.SetInt(0, 59, 10, HP);
            bits.SetInt(0, 69, 8, Attack);
            bits.SetInt(0, 77, 8, SpAttack);
            bits.SetInt(0, 85, 8, Defense);
            bits.SetInt(0, 93, 8, SpDefense);
            bits.SetInt(0, 101, 24, Exp);
            bits.SetRange(125, 69, IQMap);
            bits.SetInt(0, 194, 4, Tactic);
            bits.SetRange(198, ExplorersAttack.BitLength, Attack1.ToBitBlock());
            bits.SetRange(219, ExplorersAttack.BitLength, Attack2.ToBitBlock());
            bits.SetRange(240, ExplorersAttack.BitLength, Attack3.ToBitBlock());
            bits.SetRange(261, ExplorersAttack.BitLength, Attack4.ToBitBlock());
            bits.SetStringPMD(0, 282, 10, Name);
            return(bits);
        }
예제 #3
0
 void Awake()
 {
     _move   = GetComponent <CMoveTest2> ();
     _chase  = GetComponent <chase2> ();
     _attack = GetComponent <Attack2> ();
     _Bar    = GameObject.Find(Bar_num).GetComponent <Image> ();
 }
        public BitBlock GetStoredPokemonBits()
        {
            var bits = new BitBlock(BitLength);

            // Bit 0 is always 1 for some reason
            bits[0] = true;
            bits.SetInt(0, 1, 7, Level);
            bits.SetInt(0, 8, 11, ID.RawID);
            bits.SetInt(0, 19, 8, MetAt);
            bits.SetInt(0, 27, 7, MetFloor);
            bits[34] = Unk1;
            bits.SetInt(0, 35, 7, EvolvedAtLevel1);
            bits.SetInt(0, 42, 7, EvolvedAtLevel2);
            bits.SetInt(0, 49, 10, IQ);
            bits.SetInt(0, 59, 10, HP);
            bits.SetInt(0, 69, 8, Attack);
            bits.SetInt(0, 77, 8, SpAttack);
            bits.SetInt(0, 85, 8, Defense);
            bits.SetInt(0, 93, 8, SpDefense);
            bits.SetInt(0, 101, 24, Exp);
            bits.SetRange(125, 92, IQMap);
            bits.SetInt(0, 217, 4, Tactic);
            bits.SetRange(221, ExplorersAttack.BitLength, Attack1.ToBitBlock());
            bits.SetRange(242, ExplorersAttack.BitLength, Attack2.ToBitBlock());
            bits.SetRange(263, ExplorersAttack.BitLength, Attack3.ToBitBlock());
            bits.SetRange(284, ExplorersAttack.BitLength, Attack4.ToBitBlock());
            bits.SetStringPMD(0, 305, 10, Name);
            bits.SetRange(385, 2, Unk2);
            return(bits);
        }
예제 #5
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
            case Keys.D1: Attack1.PerformClick(); break;

            case Keys.D2: Attack2.PerformClick(); break;

            case Keys.D3: Attack3.PerformClick(); break;

            case Keys.Up: GoNorth.PerformClick(); break;

            case Keys.Down: GoSouth.PerformClick(); break;

            case Keys.Left: GoWest.PerformClick(); break;

            case Keys.Right: GoEast.PerformClick(); break;

            case Keys.A: Attack.PerformClick(); break;

            case Keys.E: EndRound.PerformClick(); break;
            }

            return(base.ProcessCmdKey(ref msg, keyData));
        }
예제 #6
0
        public void DeathCheck()
        {
            if (Plane1.Hp == 0)
            {
                this.Controls.Remove(Attack1);
                Attack1.Dispose();
            }

            if (Plane2.Hp == 0)
            {
                this.Controls.Remove(button4);
                button4.Dispose();
                pictureBox5.Visible = true;
                Plane1.Target       = Tank2;
            }
            if (Tank1.Hp == 0)
            {
                this.Controls.Remove(Attack2);
                Attack2.Dispose();
            }
            if (Magic1.Hp == 0)
            {
                this.Controls.Remove(Attack3);
                Attack3.Dispose();
            }
            if (Ship1.Hp == 0)
            {
                this.Controls.Remove(Attack4);
                Attack4.Dispose();
            }
            if (Tank2.Hp == 0)
            {
                this.Controls.Remove(button3);
                button3.Dispose();
                pictureBox6.Visible = true;
                Plane1.Target       = Magic2;
            }
            if (Magic2.Hp == 0)
            {
                this.Controls.Remove(button2);
                button2.Dispose();
                pictureBox7.Visible = true;
                Plane1.Target       = Ship2;
            }
            if (Ship2.Hp == 0)
            {
                this.Controls.Remove(button1);
                button1.Dispose();
                pictureBox8.Visible = true;
            }
        }
예제 #7
0
        public BitBlock GetStoredPokemonBits()
        {
            var bits = new BitBlock(BitLength);

            bits.SetInt(0, 0, 7, Level);
            bits.SetInt(0, 7, 9, ID);
            bits.SetInt(0, 16, 7, MetAt);
            bits.SetRange(23, 21, Unk1);
            bits.SetInt(0, 44, 10, IQ);
            bits.SetInt(0, 54, 10, HP);
            bits.SetInt(0, 64, 8, Attack);
            bits.SetInt(0, 72, 8, SpAttack);
            bits.SetInt(0, 80, 8, Defense);
            bits.SetInt(0, 88, 8, SpDefense);
            bits.SetInt(0, 96, 24, Exp);
            bits.SetRange(120, 43, Unk2);
            bits.SetRange(163, RBAttack.BitLength, Attack1.ToBitBlock());
            bits.SetRange(183, RBAttack.BitLength, Attack2.ToBitBlock());
            bits.SetRange(203, RBAttack.BitLength, Attack3.ToBitBlock());
            bits.SetRange(223, RBAttack.BitLength, Attack4.ToBitBlock());
            bits.SetStringPMD(0, 243, 10, Name);
            return(bits);
        }
예제 #8
0
 public void Attack()
 {// checks if the cooldown for the attack is over
     if (cooldown == false)
     {
         //tells the animator that the fly is attack
         attacking = true;
         // creates 3 Flyball attacks
         GameObject Attack;
         GameObject Attack2;
         GameObject Attack3;
         Attack  = Instantiate(FlyBall, CurrentPosition);
         Attack2 = Instantiate(FlyBall2, CurrentPosition);
         Attack3 = Instantiate(FlyBall3, CurrentPosition);
         // activates the 3 Flyball attacks
         Attack.SetActive(true);
         Attack2.SetActive(true);
         Attack3.SetActive(true);
         // sets the attack cooldown to active
         cooldown = true;
         Invoke("cooldownfunc", 5f);
         Invoke("AttackOver", 1f);
     }
 }
        public BitBlock GetQuicksavePokemonBits()
        {
            var bits = new BitBlock(BitLength);

            bits.SetRange(0, 80, Unk1);
            bits.SetInt(0, 80, 16, TransformedID.ID);
            bits.SetInt(0, 96, 16, ID.ID);
            bits.SetRange(112, 48, Unk2);
            bits.SetInt(0, 144, 8, Level);
            bits.SetRange(152, 48, Unk3);
            bits.SetInt(0, 192, 16, CurrentHP);
            bits.SetInt(0, 208, 16, MaxHP);
            bits.SetRange(240, 32, Unk4);
            bits.SetInt(0, 256, 8, Attack);
            bits.SetInt(0, 264, 8, Defense);
            bits.SetInt(0, 272, 8, SpAttack);
            bits.SetInt(0, 280, 8, SpDefense);
            bits.SetInt(0, 288, 32, Exp);
            bits.SetRange(320, 2408, Unk5);
            bits.SetRange(2696 + 0 * SkyQuicksaveAttack.BitLength, SkyQuicksaveAttack.BitLength, Attack1.ToBitBlock());
            bits.SetRange(2696 + 1 * SkyQuicksaveAttack.BitLength, SkyQuicksaveAttack.BitLength, Attack2.ToBitBlock());
            bits.SetRange(2696 + 2 * SkyQuicksaveAttack.BitLength, SkyQuicksaveAttack.BitLength, Attack3.ToBitBlock());
            bits.SetRange(2696 + 3 * SkyQuicksaveAttack.BitLength, SkyQuicksaveAttack.BitLength, Attack4.ToBitBlock());
            bits.SetRange(2840, 592, Unk6);
            return(bits);
        }
예제 #10
0
    public override void OnAttackStateEnter(AnimatorStateInfo stateInfo)
    {
        base.OnAttackStateEnter(stateInfo);

        if (stateInfo.IsName("LightAttack1"))
        {
            GameObject main = Attack1.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack1.transform.position = transform.position + new Vector3(2.5f, 0, 0);
                main.transform.rotation    = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                Attack1.transform.position = transform.position + new Vector3(-2.5f, 0, 0);
                main.transform.rotation    = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            Attack1.Play(true);
        }

        else if (stateInfo.IsName("LightAttack2"))
        {
            GameObject main = Attack2.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack2.transform.position = transform.position + new Vector3(2.5f, 0, 0);
                main.transform.rotation    = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                Attack2.transform.position = transform.position + new Vector3(-2.5f, 0, 0);
                main.transform.rotation    = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            Attack2.Play(true);
        }

        else if (stateInfo.IsName("LightAttack3"))
        {
            GameObject main = Attack3.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack3.transform.position = transform.position + new Vector3(2.5f, 0, 0);;
                main.transform.rotation    = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                Attack3.transform.position = transform.position + new Vector3(-2.5f, 0, 0);;
                main.transform.rotation    = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            Attack3.Play(true);
        }

        if (stateInfo.IsName("Final1"))
        {
            GameObject main = FXFinal1.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                FXFinal1.transform.position = transform.position + new Vector3(2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                FXFinal1.transform.position = transform.position + new Vector3(-2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            FXFinal1.Play(true);
        }

        else if (stateInfo.IsName("Final2"))
        {
            GameObject main = FXFinal2.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                FXFinal2.transform.position = transform.position + new Vector3(2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(-0.4984911f, 0.5015043f, -0.5015043f, 0.4984911f);
            }

            else if (!IsLookingRight)
            {
                FXFinal2.transform.position = transform.position + new Vector3(-2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(-0.4984911f, -0.5015043f, 0.5015043f, 0.4984911f);
            }

            FXFinal2.Play(true);
        }

        else if (stateInfo.IsName("Final3"))
        {
            GameObject main = FXFinal3.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                FXFinal3.transform.position = transform.position + new Vector3(2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                FXFinal3.transform.position = transform.position + new Vector3(-2.5f, 0, 0);;
                main.transform.rotation     = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            FXFinal3.Play(true);
        }

        if (stateInfo.IsName("AirAttack"))
        {
            GameObject main = FXAirAttack.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                FXAirAttack.transform.position = transform.position + new Vector3(0.0f, 0, 0);;
                main.transform.rotation        = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                FXAirAttack.transform.position = transform.position + new Vector3(0.0f, 0, 0);;
                main.transform.rotation        = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            FXAirAttack.Play(true);
        }
    }
예제 #11
0
    public override void OnAttackStateEnter(AnimatorStateInfo stateInfo)
    {
        base.OnAttackStateEnter(stateInfo);

        if (stateInfo.IsName("LightAttack1"))
        {
            GameObject main = Attack1.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack1.transform.position = transform.position;
                main.transform.rotation    = new Quaternion(0, 1, 0, 0);
            }

            else if (!IsLookingRight)
            {
                Attack1.transform.position = transform.position;
                main.transform.rotation    = new Quaternion(0, 0, 0, 1);
            }

            Attack1.Play(true);
        }

        else if (stateInfo.IsName("LightAttack2"))
        {
            GameObject main = Attack2.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack2.transform.position = transform.position + new Vector3(3.0f, 0, 0);
                main.transform.rotation    = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                Attack2.transform.position = transform.position + new Vector3(-3.0f, 0, 0);
                main.transform.rotation    = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            Attack2.Play(true);
        }

        else if (stateInfo.IsName("LightAttack3"))
        {
            GameObject main = Attack3.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                Attack3.transform.position = transform.position;
                main.transform.rotation    = new Quaternion(0, 0, -0.7071068f, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                Attack3.transform.position = transform.position;
                main.transform.rotation    = new Quaternion(-0.7071068f, 0.7071068f, 0, 0);
            }

            Attack3.Play(true);
        }

        if ((stateInfo.IsName("AirAttack1")) || (stateInfo.IsName("AirAttack2")) || (stateInfo.IsName("AirAttack3")) || (stateInfo.IsName("AirAttack4")) || (stateInfo.IsName("AirAttack5")))
        {
            GameObject main = FXAirAttack.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                FXAirAttack.transform.position = transform.position;
                main.transform.rotation        = new Quaternion(0, 1, 0, 0);
            }

            else if (!IsLookingRight)
            {
                FXAirAttack.transform.position = transform.position;
                main.transform.rotation        = new Quaternion(0, 0, 0, 1);
            }

            FXAirAttack.Play(true);
        }

        else if (stateInfo.IsName("AirAttack6"))
        {
            GameObject mainHeavy = heavyAttackFX.GetComponent <ParticleSystem>().gameObject;

            if (IsLookingRight)
            {
                heavyAttackFX.transform.position = transform.position + new Vector3(3.0f, 0, 0);
                mainHeavy.transform.rotation     = new Quaternion(0.7071068f, 0, 0, 0.7071068f);
            }

            else if (!IsLookingRight)
            {
                heavyAttackFX.transform.position = transform.position + new Vector3(-3.0f, 0, 0);
                mainHeavy.transform.rotation     = new Quaternion(0.7071068f, 0, 0, 0.7071068f);
            }

            heavyAttackFX.Play(true);
        }
    }
예제 #12
0
 // Use this for initialization
 void Start()
 {
     //AtkMain = transform.FindChild("Hitboxes").GetComponent<Attack2>();
     AtkMain = GetComponent <Attack2>();
 }