Example #1
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(6, new Zap(true)));
     Moveset.Add(new MovesetItem(7, new ChargeUp(true)));
     Moveset.Add(new MovesetItem(25, new StaticShock(true)));
     Moveset.Add(new MovesetItem(33, new Lightning(true)));
 }
Example #2
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(6, new IronCharge(true)));
     Moveset.Add(new MovesetItem(8, new Forge(true)));
     Moveset.Add(new MovesetItem(12, new Gear(true)));
     Moveset.Add(new MovesetItem(16, new Slice(true)));
 }
Example #3
0
        public void DefineSkills(int numSkills, Skill newSkill)
        {
            Random selector = new Random();

            if (numSkills > 3)
            {
                numSkills = 3;
            }
            if (numSkills <= 0)
            {
                numSkills = 1;
            }

            if (Moveset.Count == 0 && newSkill is AttackSkill)
            {
                Moveset.Add(newSkill);
            }
            else if (Moveset.Count != 0 && Moveset.Count < numSkills)
            {
                Moveset.Add(newSkill);
            }
            else if (Moveset.Count == 0 && newSkill is SupportSkill)
            {
                AttackSkill remplaceSkill = new AttackSkill("basicPunch", selector.Next(1, 11), selector.Next(0, 7));
                Moveset.Add(remplaceSkill);
            }
        }
Example #4
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(6, new GrassWhip(true)));
     Moveset.Add(new MovesetItem(8, new Bite(true)));
     Moveset.Add(new MovesetItem(12, new Leech(true)));
     Moveset.Add(new MovesetItem(15, new Sunshine(true)));
 }
Example #5
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(8, new Headbutt(true)));
     Moveset.Add(new MovesetItem(13, new Lullaby(true)));
     Moveset.Add(new MovesetItem(16, new PsychicBlast(true)));
     //Moveset.Add(new MovesetItem(22, new Karma(true)));
 }
Example #6
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(8, new Bite(true)));
     Moveset.Add(new MovesetItem(13, new Roundhouse(true)));
     Moveset.Add(new MovesetItem(16, new SeismicChop(true)));
     Moveset.Add(new MovesetItem(22, new Meditate(true)));
 }
Example #7
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(13, new Gust(true)));
     Moveset.Add(new MovesetItem(19, new Bite(true)));
     Moveset.Add(new MovesetItem(23, new EvasiveManeuvers(true)));
     Moveset.Add(new MovesetItem(32, new DiveBomb(true)));
 }
Example #8
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(8, new Headbutt(true)));
     Moveset.Add(new MovesetItem(13, new Disarm(true)));
     Moveset.Add(new MovesetItem(16, new Teleport(true)));
     Moveset.Add(new MovesetItem(22, new NetherPunch(true)));
 }
Example #9
0
    // Start is called before the first frame update
    void Start()
    {
        //Make some moves here. TODO: Will implement reading from text

        Moveset move0  = new Moveset("Empty", "Empty", "Empty", "Empty", 0, 0);
        Moveset move1  = new Moveset("Blaze", "Fire", "Enemy", "Health", 5.0f, 5.0f);
        Moveset move2  = new Moveset("Pound", "Normal", "Enemy", "Health", 5.0f, 3.0f);
        Moveset move3  = new Moveset("Bless", "Normal", "Self", "Health", 20.0f, 10.0f);
        Moveset move4  = new Moveset("Fire Dance", "Fire", "Enemy", "Health", 3.0f, 5.0f);
        Moveset move5  = new Moveset("Fullever Blaze", "Fire", "Enemy", "Health", 12.0f, 10.0f);
        Moveset move6  = new Moveset("One For All", "Normal", "Enemy", "Health", 15.0f, 17.0f);
        Moveset move7  = new Moveset("Ice Wall", "Water", "Enemy", "Health", 3.0f, 5.0f);
        Moveset move8  = new Moveset("Tidal Wave", "Water", "Enemy", "Health", 12.0f, 10.0f);
        Moveset move9  = new Moveset("Ice Shot", "Water", "Enemy", "Health", 6.0f, 5.0f);
        Moveset move10 = new Moveset("Water Whip", "Water", "Enemy", "Health", 3.0f, 2.0f);
        Moveset move11 = new Moveset("Fire Blast", "Fire", "Enemy", "Health", 6.0f, 5.0f);
        Moveset move12 = new Moveset("Earth Tomb", "Earth", "Enemy", "Defence", 3.0f, 5.0f);
        Moveset move13 = new Moveset("Plate Shot", "Earth", "Enemy", "Health", 6.0f, 5.0f);
        Moveset move14 = new Moveset("Rock Barrage", "Earth", "Enemy", "Health", 3.0f, 2.0f);
        Moveset move15 = new Moveset("Full Earthquake", "Earth", "Enemy", "Health", 12.0f, 10.0f);
        Moveset move16 = new Moveset("Fury Wind", "Wind", "Enemy", "Health", 3.0f, 2.0f);
        Moveset move17 = new Moveset("Air Bubble", "Wind", "Enemy", "Health", 3.0f, 5.0f);
        Moveset move18 = new Moveset("Air Sphere Shot", "Wind", "Enemy", "Health", 6.0f, 5.0f);
        Moveset move19 = new Moveset("Wind Tunnel Blast", "Wind", "Enemy", "Health", 12.0f, 10.0f);
        Moveset move20 = new Moveset("Fist Barrage", "Normal", "Enemy", "Health", 3.0f, 2.0f);

        // Add to List first
        move_list.Add(move0);
        move_list.Add(move1);
        move_list.Add(move2);
        move_list.Add(move3);
        move_list.Add(move4);
        move_list.Add(move5);
        move_list.Add(move6);
        move_list.Add(move7);
        move_list.Add(move8);
        move_list.Add(move9);
        move_list.Add(move10);
        move_list.Add(move11);
        move_list.Add(move12);
        move_list.Add(move13);
        move_list.Add(move14);
        move_list.Add(move15);
        move_list.Add(move16);
        move_list.Add(move17);
        move_list.Add(move18);
        move_list.Add(move19);
        move_list.Add(move20);


        //After making the moves add to dictionary

        foreach (Moveset m in move_list)
        {
            move_dictionary.Add(m.GetMoveName(), m);
        }

        load_status = true;
    }
Example #10
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(8, new Crave(true)));
     Moveset.Add(new MovesetItem(13, new Forgiveness(true)));
     Moveset.Add(new MovesetItem(16, new SparkleStrike(true)));
     Moveset.Add(new MovesetItem(22, new Wish(true)));
     //Moveset.Add(new MovesetItem(30, new Sunshine(true)));
     //Moveset.Add(new MovesetItem(30, new Heatwave(true)));
 }
Example #11
0
        public static string Grade(int pokeId, int move1, int move2)
        {
            Moveset ms = pokems[pokeId - 1].Find(move1, move2);

            if (ms != null)
            {
                return("O:" + ms.offense_grade + " D:" + ms.defense_grade);
            }

            return("O:" + move1 + " D:" + move2);
        }
Example #12
0
        // Select the next attack based on the current action and input (Melee / Magic)
        // Return the current action if there is no match or if there is no moveset
        // Note: The time complexity of this algorithm is O(n^4), but since the move size is typically less than 15 moves (<1 ms runtime), it should be okay
        public bool ChooseMove(PlayerInput.Action moveType)
        {
            foreach (Moveset moveset in movesets)
            {
                if (moveset == null)
                {
                    continue;
                }

                // Moveset: Melee, Magic or Utility?
                if (moveType == moveset.moveType)
                {
                    foreach (Move move in moveset.moves)
                    {
                        bool skip = false;
                        // Iterate through each equipped move's transitions to find one that matches the current action
                        foreach (string transition in move.canTransitionFrom)
                        {
                            // If a valid transition matches the current action, return the corresponding move
                            if (transition == playerStateName)
                            {
                                if (InCorrectPosition(move))
                                {
                                    selectedMoveset = moveset;
                                    selectedMove    = move;
                                    return(true);
                                }
                            }
                        }
                        if (move.canTransitionFrom[0] == "All")
                        {
                            // Exceptions to any transitions
                            foreach (string nonTransition in move.cannotTransitionFrom)
                            {
                                if (nonTransition == playerStateName)
                                {
                                    skip = true;
                                    break;
                                }
                            }
                            if (!skip && InCorrectPosition(move))
                            {
                                selectedMoveset = moveset;
                                selectedMove    = move;
                                return(true);
                            }
                        }
                    }
                }
            }
            return(false);
        }
Example #13
0
        private void AddFieldMovesToActions(PartyPokemon pkmn, int index)
        {
            void Add(PBEMove move, Action command)
            {
                string str = PBELocalizedString.GetMoveName(move).English;

                _textChoices.Add(new TextGUIChoice(str, command, fontColors: Font.DefaultBlue_I));
            }

            Moveset moves = pkmn.Moveset;

            if (moves.Contains(PBEMove.Surf))
            {
                Add(PBEMove.Surf, () => Action_FieldSurf(index));
            }
        }
Example #14
0
        static void Main(string[] args)
        {
            Fighter player1 = new Pirate.PirateFighter(500, 300, 400, 20);
            Fighter player2 = new Barbarian.BarbarianFighter(700, 250, 300, 15);

            Console.WriteLine("Health: " + player1.Health.ToString() + '\n' + "Speed: " + player1.Speed.ToString());

            Moveset moveset = new Moveset(player1.Speed);

            moveset.Push(new Tuple <Move, Fighter>(player1.AvailableMoves[0], player2));
            moveset.Push(new Tuple <Move, Fighter>(player1.AvailableMoves[1], player2));
            player1.ProcessMoveset(moveset);
            Console.WriteLine('\n');
            Console.WriteLine("Health: " + player1.Health.ToString() + '\n' + "Speed: " + player1.Speed.ToString());
            Console.WriteLine("Health: " + player2.Health.ToString() + '\n' + "Speed: " + player2.Speed.ToString());
            Console.Read();
        }
        public void populatePanel()
        {
            Moveset moveset = TurnOrder.getActiveCharacter().GetComponent <CombatCharacterController>().moveset;

            List <GameObject> children = (from Transform child in this.gameObject.transform select child.gameObject).ToList();

            children.ForEach(Object.Destroy);

            //for some reason, destroying the object does not set the childCount immediately. So I'm using DetachChildren which resets the childcount to 0.
            this.gameObject.transform.DetachChildren();

            foreach (KeyValuePair <string, Dictionary <string, BaseAbility> > jobSelection in moveset.movelist)
            {
                string menuJobTab = jobSelection.Key;

                GameObject button = GameObject.Instantiate(Resources.Load("Prefabs/UI/ActionSelectionButton") as GameObject, this.gameObject.transform);
                button.name = menuJobTab;
                button.GetComponentInChildren <Text>().text = menuJobTab;
            }

            this.gameObject.GetComponent <PanelManager>().resizePanel();
        }
Example #16
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(19, new IceFang(true)));
     Moveset.Add(new MovesetItem(23, new FrostBreath(true)));
     Moveset.Add(new MovesetItem(32, new MeteorStrike(true)));
 }
Example #17
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(6, new Singe(true)));
     Moveset.Add(new MovesetItem(8, new Curl(true)));
     Moveset.Add(new MovesetItem(12, new FlameSpin(true)));
 }
Example #18
0
 public Attack(GameObject _target, Moveset _move)
 {
     this.state_name = "Attack";
     this.target     = _target;
     this.move       = _move;
 }
Example #19
0
        public Fox()
        {
            Name = "Fox";

            Moveset.Add(new Move(MoveType.NeutralAttack, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.ForwardTilt, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.UpTilt, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.DownTilt, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.DashAttack, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.ForwardSmash, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.UpSmash, "Flip Kick", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.DownSmash, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.NeutralAerial, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.ForwardAerial, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.BackAerial, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.UpAerial, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.DownAerial, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.Grab, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.Pummel, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.ForwardThrow, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.BackThrow, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.UpThrow, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.DownThrow, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.FloorAttackFront, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.FloorAttackBack, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.EdgeAttackFast, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.EdgeAttackSlow, "", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.NeutralSpecial, "Blaster", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.SideSpecial, "Fox Illusion", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.UpSpecial, "Fire Fox", "", new List <Int32>()
            {
                4, 4, 1
            }));
            Moveset.Add(new Move(MoveType.DownSpecial, "Reflector", "", new List <Int32>()
            {
                4, 4, 1
            }));
        }
Example #20
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(5, new Poke(true)));
     Moveset.Add(new MovesetItem(7, new Curl(true)));
     Moveset.Add(new MovesetItem(15, new Drowsy(true)));
 }
Example #21
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(7, new Drench(true)));
     Moveset.Add(new MovesetItem(25, new Torrent(true)));
     Moveset.Add(new MovesetItem(33, new HydroJet(true)));
 }
Example #22
0
        private unsafe void DrawMovesPage(uint *bmpAddress, int bmpWidth, int bmpHeight)
        {
            const float winX         = 0.08f;
            const float winY         = 0.15f;
            const float winW         = 0.75f - winX;
            const float winH         = 0.9f - winY;
            const float moveColX     = winX + 0.03f;
            const float moveTextX    = moveColX + 0.02f;
            const float moveColW     = 0.69f - winX;
            const float itemSpacingY = winH / (PkmnConstants.NumMoves + 0.75f);
            const float moveX        = 0.21f;
            const float moveY        = 0.03f;
            const float ppX          = 0.12f;
            const float ppNumX       = 0.35f;
            const float ppY          = itemSpacingY / 2;
            const float cancelY      = winY + moveY + (PkmnConstants.NumMoves * itemSpacingY);

            RenderUtils.FillRoundedRectangle(bmpAddress, bmpWidth, bmpHeight, winX, winY, winX + winW, winY + winH, 15, RenderUtils.Color(250, 128, 120, 255));

            Font moveFont = Font.Default;

            uint[] moveColors = Font.DefaultWhite_DarkerOutline_I;
            uint[] ppColors   = Font.DefaultBlack_I;

            void Place(int i, PBEMove move, int pp, int maxPP)
            {
                PBEMoveData mData = PBEMoveData.Data[move];
                float       x     = moveTextX;
                float       y     = winY + moveY + (i * itemSpacingY);
                string      str   = PBELocalizedString.GetTypeName(mData.Type).English;

                moveFont.DrawString(bmpAddress, bmpWidth, bmpHeight, x, y, str, moveColors);
                x  += moveX;
                str = PBELocalizedString.GetMoveName(move).English;
                moveFont.DrawString(bmpAddress, bmpWidth, bmpHeight, x, y, str, moveColors);
                x   = moveTextX + ppX;
                y  += ppY;
                str = "PP";
                moveFont.DrawString(bmpAddress, bmpWidth, bmpHeight, x, y, str, ppColors);
                x   = moveTextX + ppNumX;
                str = string.Format("{0}/{1}", pp, maxPP);
                moveFont.MeasureString(str, out int strW, out _);
                moveFont.DrawString(bmpAddress, bmpWidth, bmpHeight, RenderUtils.GetCoordinatesForCentering(bmpWidth, strW, x), (int)(bmpHeight * y), str, ppColors);

                DrawSelection(i);
            }

            void DrawSelection(int i)
            {
                if (_selectingMove != i)
                {
                    return;
                }
                float x = moveColX;
                float y = winY + moveY + (i * itemSpacingY);
                float w = moveColW;
                float h = i == PkmnConstants.NumMoves ? itemSpacingY / 2 : itemSpacingY;

                RenderUtils.DrawRoundedRectangle(bmpAddress, bmpWidth, bmpHeight, x, y, x + w, y + h, 5, RenderUtils.Color(48, 180, 255, 200));
            }

            // Moves
            if (_pPkmn is not null)
            {
                Moveset moves = _pPkmn.Moveset;
                for (int m = 0; m < PkmnConstants.NumMoves; m++)
                {
                    Moveset.MovesetSlot slot = moves[m];
                    PBEMove             move = slot.Move;
                    if (move == PBEMove.None)
                    {
                        continue;
                    }
                    int pp    = slot.PP;
                    int maxPP = PBEDataUtils.CalcMaxPP(move, slot.PPUps, PkmnConstants.PBESettings);
                    Place(m, move, pp, maxPP);
                }
            }
            else if (_pcPkmn is not null)
            {
                BoxMoveset moves = _pcPkmn.Moveset;
                for (int m = 0; m < PkmnConstants.NumMoves; m++)
                {
                    BoxMoveset.BoxMovesetSlot slot = moves[m];
                    PBEMove move = slot.Move;
                    if (move == PBEMove.None)
                    {
                        continue;
                    }
                    int maxPP = PBEDataUtils.CalcMaxPP(move, slot.PPUps, PkmnConstants.PBESettings);
                    Place(m, move, maxPP, maxPP);
                }
            }
            else
            {
                PBEBattlePokemon bPkmn = _bPkmn.Pkmn;
                PBEBattleMoveset moves = bPkmn.Status2.HasFlag(PBEStatus2.Transformed) ? bPkmn.TransformBackupMoves : bPkmn.Moves;
                for (int m = 0; m < PkmnConstants.NumMoves; m++)
                {
                    PBEBattleMoveset.PBEBattleMovesetSlot slot = moves[m];
                    PBEMove move = slot.Move;
                    if (move == PBEMove.None)
                    {
                        continue;
                    }
                    int pp    = slot.PP;
                    int maxPP = slot.MaxPP;
                    Place(m, move, pp, maxPP);
                }
            }

            // Cancel or new move
            if (_learningMove != PBEMove.None)
            {
                uint[]      learnColors = Font.DefaultBlue_I;
                PBEMoveData mData       = PBEMoveData.Data[_learningMove];
                float       x           = moveTextX;
                string      str         = PBELocalizedString.GetTypeName(mData.Type).English;
                moveFont.DrawString(bmpAddress, bmpWidth, bmpHeight, x, cancelY, str, learnColors);
                x  += moveX;
                str = PBELocalizedString.GetMoveName(_learningMove).English;
                moveFont.DrawString(bmpAddress, bmpWidth, bmpHeight, x, cancelY, str, learnColors);
                DrawSelection(PkmnConstants.NumMoves);
            }
            else
            {
                if (_selectingMove != -1)
                {
                    string str = "Cancel";
                    moveFont.DrawString(bmpAddress, bmpWidth, bmpHeight, moveTextX, cancelY, str, moveColors);
                    DrawSelection(PkmnConstants.NumMoves);
                }
            }
        }
Example #23
0
 public override void MoveSetup()
 {
     Moveset.Add(new MovesetItem(13, new Harden(true)));
     Moveset.Add(new MovesetItem(16, new RockFall(true)));
     Moveset.Add(new MovesetItem(22, new BoulderSlam(true)));
 }