diff options
57 files changed, 427 insertions, 670 deletions
@@ -1,4 +1,13 @@ ----------------- +Rev: 197 +Date: 7 June 2008 +User: MathStuf +----------------- +[FIX] UI files now use <> including rather than "" for KDE classes +[FIX] Moved battle to pokebattle +[FIX] Starting to figure out the battle system + +----------------- Rev: 196 Date: 6 June 2008 User: MathStuf diff --git a/battle/Arena.cpp b/battle/Arena.cpp deleted file mode 100644 index 0927a50c..00000000 --- a/battle/Arena.cpp +++ /dev/null @@ -1,39 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: ai/AlphaBeta.cpp -// Purpose: Alpha-Beta pruning MiniMax tree -// Author: Ben Boeckel -// Modified by: Ben Boeckel -// Created: Tue Oct 16 2007 09:09:44 -// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions -// Licence: -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program. If not, see <http://www.gnu.org/licenses/>. -///////////////////////////////////////////////////////////////////////////// - -#include "Arena.h" - -long Arena::AlphaBeta(AIProfile ai, Arena arena, const unsigned depth, const long alpha, const long beta) -{ - long val; - if (!depth) - return ai.eval(Arena); - while (CanSimulate()) - { - val = -AlphaBeta(Arena.Simulate(), depth - 1, -beta, -alpha); - if (beta <= val) - return beta; - if (alpha < val) - alpha = val; - } - return alpha; -} diff --git a/battle/Arena.h b/battle/Arena.h deleted file mode 100644 index 3745b065..00000000 --- a/battle/Arena.h +++ /dev/null @@ -1,79 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: battle/Arena.h -// Purpose: Class to handle the battle environment -// Author: Ben Boeckel -// Modified by: Ben Boeckel -// Created: Tue Oct 16 2007 09:21:30 -// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions -// Licence: -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program. If not, see <http://www.gnu.org/licenses/>. -///////////////////////////////////////////////////////////////////////////// - -#ifndef __BATTLE_ARENA__ -#define __BATTLE_ARENA__ - -#include <QString> -#include "Pokemon.h" -#include "Team.h" -#include "pokemod/Ability.h" -#include "pokemod/Item.h" -#include "pokemod/MapTrainer.h" -#include "pokemod/Move.h" -#include "pokemod/Nature.h" -#include "pokemod/Pokemon.h" -#include "pokemod/Type.h" - -class Arena -{ - public: - typedef struct - { - unsigned action; - union - { - Pokemon pokemon; - unsigned value; - }; - }Action; - - enum - { - A_Fight = 0, - A_Switch = 1, - A_Item = 2, - A_Run = 3, - A_End_Choices = 4, - A_Ability = 4, - A_HeldItem = 5, - A_End_All = 6 - }; - - Arena(Team& p, Team& e); - - bool Play(); - - unsigned CheckWeather() const; - private: - void AskForActions(); - void ParseActions(const Action action1, const Action action2); - - long PokeGen::AlphaBeta(AIProfile ai, Arena arena, const unsigned depth, const long alpha = LONG_MIN, const long beta = LONG_MAX); - - Team player; - Team opponent; - - unsigned weather; -}; - -#endif diff --git a/battle/Bot.h b/battle/Bot.h deleted file mode 100644 index d20333da..00000000 --- a/battle/Bot.h +++ /dev/null @@ -1,47 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: battle/Bot.h -// Purpose: AI interface to the Team class -// Author: Ben Boeckel -// Modified by: Ben Boeckel -// Created: Tue Oct 16 2007 11:44:16 -// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions -// Licence: -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program. If not, see <http://www.gnu.org/licenses/>. -///////////////////////////////////////////////////////////////////////////// - -#ifndef __POKEGEN_BOT__ -#define __POKEGEN_BOT__ - -#include <QList> -#include <QMap> -#include "../general/Ini.h" -#include "AIProfile.h" -#include "Arena.h" -#include "GhostBot.h" -#include "Team.h" -#include "../pokemod/MapTrainer.h" - -class Bot : public Team -{ - public: - Bot(const PokeMod::Pokemod& par, PokeMod::MapTrainer trainer); - - void InformOfAction(Arena::Action action); - Arena::Action RequestAction(Arena arena); - private: - GhostBot simulator; - AIProfile ai; -}; - -#endif diff --git a/battle/Ghost.h b/battle/Ghost.h deleted file mode 100644 index 84d0d09e..00000000 --- a/battle/Ghost.h +++ /dev/null @@ -1,70 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: battle/Ghost.h -// Purpose: Ghost used by the AI for simulations -// Author: Ben Boeckel -// Modified by: Ben Boeckel -// Created: Tue Oct 16 2007 11:52:23 -// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions -// Licence: -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program. If not, see <http://www.gnu.org/licenses/>. -///////////////////////////////////////////////////////////////////////////// - -#ifndef __POKEGEN_GHOST__ -#define __POKEGEN_GHOST__ - -#include <QList> -#include <QMap> -#include <QSet> -#include "../general/Ini.h" -#include "../pokemod/Frac.h" -#include "Arena.h" -#include "Team.h" - -class Ghost : public Pokemon -{ - public: - Ghost(const PokeMod::Pokemod& par, const unsigned s, const unsigned l); - - void FeedAttack(const unsigned actualDamage, const unsigned stat, const unsigned otherLevel, const unsigned power, const bool isAttacker); - void FeedItem(const unsigned i); - void FeedMove(const unsigned m); - void FeedMoveChance(const unsigned m, const unsigned weight); - void FeedMoveCombo(const MoveCombo m); - void FeedAbility(const unsigned a); - - void UpdateHP(); - void SetHP(const Frac p); - private: - struct MoveCombo - { - public: - MoveCombo(const QSet<unsigned> p, const unsigned m, const unsigned c) : - prereqs(p), - move(m), - chance(c) - { - } - QSet<unsigned> prereqs; - unsigned move; - const unsigned chance; - }; - - unsigned minStats[PokeMod::ST_End_GSC]; - unsigned maxStats[PokeMod::ST_End_GSC]; - QMap<unsigned, unsigned> moveChances; - QList<MoveCombo> moveCombos; - unsigned unknownMoves; -}; - -#endif diff --git a/battle/GhostBot.h b/battle/GhostBot.h deleted file mode 100644 index f5c986d8..00000000 --- a/battle/GhostBot.h +++ /dev/null @@ -1,47 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pokegen/GhostBot.h -// Purpose: Ghost player used by the AI for simulations -// Author: Ben Boeckel -// Modified by: Ben Boeckel -// Created: Tue Oct 16 2007 11:52:23 -// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions -// Licence: -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program. If not, see <http://www.gnu.org/licenses/>. -///////////////////////////////////////////////////////////////////////////// - -#ifndef __POKEGEN_GHOSTBOT__ -#define __POKEGEN_GHOSTBOT__ - -#include <QList> -#include <QMap> -#include "../Ini.h" -#include "AIProfile.h" -#include "Arena.h" -#include "Ghost.h" -#include "Team.h" - -class GhostBot : public Team -{ - public: - Ghost(const PokeMod::Pokemod& par, const QString aiFile, Bot host, const unsigned s, const unsigned l); - - void FeedAttack(const unsigned stat, const unsigned otherLevel, const unsigned power, const bool isAttacker); - void FeedItem(const unsigned i); - void FeedMove(const unsigned m); - void FeedAbility(const unsigned a); - private: - AIProfile ai; -}; - -#endif diff --git a/battle/Pokemon.h b/battle/Pokemon.h deleted file mode 100644 index 5b5b7a8c..00000000 --- a/battle/Pokemon.h +++ /dev/null @@ -1,95 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: pokegen/Pokemon.h -// Purpose: Data relevant to a Pokemon in the game -// Author: Ben Boeckel -// Modified by: Ben Boeckel -// Created: Tue Oct 16 2007 09:21:30 -// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions -// Licence: -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program. If not, see <http://www.gnu.org/licenses/>. -///////////////////////////////////////////////////////////////////////////// - -#ifndef __POKEGEN_POKEMON__ -#define __POKEGEN_POKEMON__ - -#include <QList> -#include <QSet> -#include <QString> -#include "../general/Frac.h" -#include "../general/Ini.h" -#include "../pokemod/Ability.h" -#include "../pokemod/Item.h" -#include "../pokemod/Nature.h" -#include "../pokemod/Pokemod.h" -#include "../pokemod/Species.h" - -class Pokemon -{ - public: - Pokemon(const PokeMod::Pokemod& par, Ini ini); - Pokemon(const PokeMod::Pokemod& par, const unsigned s, const unsigned l); - - unsigned GetStat(const unsigned s) const; - unsigned GetLevel() const; - - unsigned GetNumMoves() const; - bool SimulateMove(const unsigned m) const; - bool UseMove(const unsigned m); - bool UnlearnMove(const unsigned m); - - bool SetStatus(const unsigned s); - - bool UseItemOn(const unsigned i); - - unsigned GetNumHeldItems() const; - unsigned GetHeldItem(const unsigned h); - bool GiveItem(const unsigned i); - bool TakeItem(const unsigned i); - bool SimulateTakeItem(const unsigned i) const; - - bool CanFight() const; - - void OutOfBattle(); - protected: - typedef struct - { - Frac statMultipliers[PokeMod::ST_End_Battle]; - bool isConfused; - bool isAttracted; - QList<bool> diabled; - unsigned substituteHP; - Frac toxicMultiplier; - }BattleSettings; - - void GrowLevel(); - - unsigned species; - QString name; - QSet<unsigned> moves; - QList<unsigned> heldItems; - QList<Frac> powerPoints; - unsigned dv[PokeMod::ST_End_GSC]; - unsigned statExp[PokeMod::ST_End_GSC]; - unsigned curHP; - unsigned experience; - unsigned nature; - unsigned ability; - unsigned status; - - BattleSettings battleSettings; - - const PokeMod::Pokemod& pokemod; -}; - -#endif diff --git a/battle/Team.cpp b/battle/Team.cpp deleted file mode 100644 index f1d83b54..00000000 --- a/battle/Team.cpp +++ /dev/null @@ -1,77 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: battle/Team.cpp -// Purpose: Base class which is used to interface with the arena -// Author: Ben Boeckel -// Modified by: Ben Boeckel -// Created: Tue Oct 16 2007 19:22:20 -// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions -// Licence: -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program. If not, see <http://www.gnu.org/licenses/>. -///////////////////////////////////////////////////////////////////////////// - -#include "Team.h" - -Team::Team(const PokeMod::Pokemod& par) : - active(0), - parent(par) -{ -} - -void Team::AddItem(const unsigned i, const unsigned amt) -{ - if (amt) - items[i] = amt; -} - -void Team::UseItem(const unsigned i) -{ - if (items.contains(i) && (items[i] != UINT_MAX)) - { - --items[i]; - if (!items[i]) - items.remove(i); - } -} - -void Team::AddPokemon(Pokemon& p) -{ - pokemon.append(&p); -} - -void Team::SwapPokemon(const unsigned a, const unsigned b) -{ - if ((a < pokemon.size()) && (b < pokemon.size())) - { - Pokemon* p = pokemon[a]; - pokemon[a] = pokemon[b]; - pokemon[b] = p; - } -} - -bool Team::SetActivePokemon(const unsigned a) -{ - if ((a < pokemon.size()) && pokemon[a]->CanFight()) - active = a; -} - -unsigned Team::CanFight() const -{ - unsigned alive = 0; - for (unsigned i = 0; (i < pokemon.size()) && !alive; ++i) - { - if (pokemon[i]->CanFight()) - ++alive; - } - return alive; -} diff --git a/battle/Team.h b/battle/Team.h deleted file mode 100644 index b18b60fa..00000000 --- a/battle/Team.h +++ /dev/null @@ -1,55 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: battle/Team.h -// Purpose: Base class which is used to interface with the arena -// Author: Ben Boeckel -// Modified by: Ben Boeckel -// Created: Tue Oct 16 2007 09:21:30 -// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions -// Licence: -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program. If not, see <http://www.gnu.org/licenses/>. -///////////////////////////////////////////////////////////////////////////// - -#ifndef __BATTLE_TEAM__ -#define __BATTLE_TEAM__ - -#include <QList> -#include <QMap> -#include "Arena.h" -#include "Pokemon.h" - -class Team -{ - public: - Team(const PokeMod::Pokemod& par); - - void AddItem(const unsigned i, const unsigned amt); - void UseItem(const unsigned i); - - void AddPokemon(Pokemon& p); - void SwapPokemon(const unsigned a, const unsigned b); - bool SetActivePokemon(const unsigned a); - - unsigned CanFight() const; - - virtual void InformOfAction(Arena::Action action); - virtual Arena::Action RequestAction(Arena arena); - protected: - QList<Pokemon*> pokemon; - QMap<unsigned, unsigned> items; - unsigned active; - - const PokeMod::Pokemod& parent; -}; - -#endif diff --git a/battle/battle.pro b/battle/battle.pro deleted file mode 100644 index 818d3fe7..00000000 --- a/battle/battle.pro +++ /dev/null @@ -1,60 +0,0 @@ -OBJECTS_DIR = .obj -DESTDIR = ../../lib -TEMPLATE = lib -LIBS += -L../../lib -lgeneral -lpokemod - -CONFIG += qt warn_on dll exceptions - -# Following is reformatted from the KTIGCC .pro file -win32 { - KDEPREFIX = $$(KDEPREFIX) - isEmpty(KDEPREFIX){ - # Try running kde4-config, however chances are it's not in the path or it was compiled with a bad prefix. - KDEPREFIX = $$system(kde4-config --prefix) - isEmpty(KDEPREFIX) : error("KDE 4 kdelibs not found, set KDEPREFIX.") - !exists($$KDEPREFIX) : error("KDE 4 kdelibs not found, set KDEPREFIX.") - } - KDEINCDIR = $$KDEPREFIX/include - # $$KDEINCDIR/mingw contains the kdewin32 headers, defining stuff like mkdtemp. - INCLUDEPATH += $$KDEINCDIR/mingw $$KDEINCDIR - LIBS += -lkdewin32 - QMAKE_LIBDIR = $$KDEPREFIX/lib $$QMAKE_LIBDIR -}else { - KDEPREFIX = $$system(kde4-config --prefix) - isEmpty(KDEPREFIX) : error("KDE 4 kdelibs required.") - exists($$KDEPREFIX/include/kde4/KDE){ - KDEINCDIR = $$KDEPREFIX/include/kde4 - } else : exists($$KDEPREFIX/include/kde/KDE){ - KDEINCDIR = $$KDEPREFIX/include/kde - } else { - KDEINCDIR = $$KDEPREFIX/include - } - INCLUDEPATH += $$KDEINCDIR - KDELIBDIR = $$KDEPREFIX/lib$$system(kde4-config --libsuffix) - KDEDEVELLIBDIR = $$KDELIBDIR - exists($$KDEDEVELLIBDIR/kde4/devel){ - KDEDEVELLIBDIR = $$KDEDEVELLIBDIR/kde4/devel - } - !equals(KDEDEVELLIBDIR,/usr/lib) : !equals(KDEDEVELLIBDIR,/usr/lib64){ - QMAKE_LIBDIR = $$KDEDEVELLIBDIR $$QMAKE_LIBDIR - } - !equals(KDELIBDIR,/usr/lib):!equals(KDELIBDIR,/usr/lib64){ - !darwin-* : !macx-* { - LIBS += -Wl,--rpath,"$$KDELIBDIR" - } - } -} - -INCLUDEPATH += ../pokemod ../general -TARGETDEPS += ../../lib/libpokemod.so ../../lib/libgeneral.so - -SOURCES += Arena.cpp \ - Ghost.cpp \ - Team.cpp - -HEADERS += Arena.h \ - Bot.h \ - GhostBot.h \ - Ghost.h \ - Pokemon.h \ - Team.h diff --git a/pokebattle/Arena.cpp b/pokebattle/Arena.cpp new file mode 100644 index 00000000..7894db93 --- /dev/null +++ b/pokebattle/Arena.cpp @@ -0,0 +1,19 @@ +/* + * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "Arena.h" + diff --git a/pokebattle/Arena.h b/pokebattle/Arena.h new file mode 100644 index 00000000..9b291222 --- /dev/null +++ b/pokebattle/Arena.h @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __POKEBATTLE_ARENA__ +#define __POKEBATTLE_ARENA__ + +class Arena : public QObject +{ + Q_OBJECT + + public: + Arena(Team& p, Team& e); + + bool Play(); + + unsigned CheckWeather() const; + private: + long PokeGen::AlphaBeta(AIProfile ai, Arena arena, const unsigned depth, const long alpha = LONG_MIN, const long beta = LONG_MAX); + + Team player; + Team opponent; + + unsigned weather; +}; + +#endif diff --git a/pokebattle/Bot.h b/pokebattle/Bot.h new file mode 100644 index 00000000..64f48a89 --- /dev/null +++ b/pokebattle/Bot.h @@ -0,0 +1,29 @@ +/* + * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __POKEBATTLE_BOT__ +#define __POKEBATTLE_BOT__ + +class Bot : public Team +{ + Q_OBJECT + + private: + long alphaBeta(const Arena& arena, const Trainer& , const long alpha = LONG_MIN, const long beta = LONG_MAX); +}; + +#endif diff --git a/battle/Ghost.cpp b/pokebattle/Ghost.cpp index b994da05..79c08ff0 100644 --- a/battle/Ghost.cpp +++ b/pokebattle/Ghost.cpp @@ -1,24 +1,19 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: battle/Ghost.cpp -// Purpose: Ghost used by the AI for simulations -// Author: Ben Boeckel -// Modified by: Ben Boeckel -// Created: Tue Oct 16 2007 19:29:30 -// Copyright: ©2007-2008 Ben Boeckel and Nerdy Productions -// Licence: -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program. If not, see <http://www.gnu.org/licenses/>. -///////////////////////////////////////////////////////////////////////////// +/* + * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ #include "Ghost.h" diff --git a/pokebattle/Ghost.h b/pokebattle/Ghost.h new file mode 100644 index 00000000..17824298 --- /dev/null +++ b/pokebattle/Ghost.h @@ -0,0 +1,59 @@ +/* + * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __POKEBATTLE_GHOST__ +#define __POKEBATTLE_GHOST__ + +class Ghost : public Pokemon +{ + Q_OBJECT + + public: + Ghost(const PokeMod::Pokemod& par, const unsigned s, const unsigned l); + + void FeedAttack(const unsigned actualDamage, const unsigned stat, const unsigned otherLevel, const unsigned power, const bool isAttacker); + void FeedItem(const unsigned i); + void FeedMove(const unsigned m); + void FeedMoveChance(const unsigned m, const unsigned weight); + void FeedMoveCombo(const MoveCombo m); + void FeedAbility(const unsigned a); + + void UpdateHP(); + void SetHP(const Frac p); + private: + struct MoveCombo + { + public: + MoveCombo(const QSet<unsigned> p, const unsigned m, const unsigned c) : + prereqs(p), + move(m), + chance(c) + { + } + QSet<unsigned> prereqs; + unsigned move; + const unsigned chance; + }; + + unsigned minStats[PokeMod::ST_End_GSC]; + unsigned maxStats[PokeMod::ST_End_GSC]; + QMap<unsigned, unsigned> moveChances; + QList<MoveCombo> moveCombos; + unsigned unknownMoves; +}; + +#endif diff --git a/pokebattle/GhostBot.h b/pokebattle/GhostBot.h new file mode 100644 index 00000000..9fd2474c --- /dev/null +++ b/pokebattle/GhostBot.h @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __POKEBATTLE_GHOSTBOT__ +#define __POKEBATTLE_GHOSTBOT__ + +class GhostBot : public Team +{ + Q_OBJECT +}; + +#endif diff --git a/pokebattle/Pokemon.h b/pokebattle/Pokemon.h new file mode 100644 index 00000000..04d3a0b9 --- /dev/null +++ b/pokebattle/Pokemon.h @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __POKEBATTLE_TEAMMEMBER__ +#define __POKEBATTLE_TEAMMEMBER__ + +class TeamMember : public QObject +{ + Q_OBJECT +}; + +#endif diff --git a/pokebattle/Team.cpp b/pokebattle/Team.cpp new file mode 100644 index 00000000..707b05d9 --- /dev/null +++ b/pokebattle/Team.cpp @@ -0,0 +1,72 @@ +/* + * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "Team.h" + +Team::Team(const PokeMod::Pokemod& par) : + active(0), + parent(par) +{ +} + +void Team::AddItem(const unsigned i, const unsigned amt) +{ + if (amt) + items[i] = amt; +} + +void Team::UseItem(const unsigned i) +{ + if (items.contains(i) && (items[i] != UINT_MAX)) + { + --items[i]; + if (!items[i]) + items.remove(i); + } +} + +void Team::AddPokemon(Pokemon& p) +{ + pokemon.append(&p); +} + +void Team::SwapPokemon(const unsigned a, const unsigned b) +{ + if ((a < pokemon.size()) && (b < pokemon.size())) + { + Pokemon* p = pokemon[a]; + pokemon[a] = pokemon[b]; + pokemon[b] = p; + } +} + +bool Team::SetActivePokemon(const unsigned a) +{ + if ((a < pokemon.size()) && pokemon[a]->CanFight()) + active = a; +} + +unsigned Team::CanFight() const +{ + unsigned alive = 0; + for (unsigned i = 0; (i < pokemon.size()) && !alive; ++i) + { + if (pokemon[i]->CanFight()) + ++alive; + } + return alive; +} diff --git a/pokebattle/Team.h b/pokebattle/Team.h new file mode 100644 index 00000000..5ec14807 --- /dev/null +++ b/pokebattle/Team.h @@ -0,0 +1,26 @@ +/* + * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __POKEBATTLE_TEAM__ +#define __POKEBATTLE_TEAM__ + +class Team : public QObject +{ + Q_OBJECT +}; + +#endif diff --git a/pokebattle/battle.pro b/pokebattle/battle.pro new file mode 100644 index 00000000..391e4160 --- /dev/null +++ b/pokebattle/battle.pro @@ -0,0 +1,25 @@ +include(../version.pri) +OBJECTS_DIR = .obj +DESTDIR = ../bin +TEMPLATE = lib +LIBS += -L../bin \ + -lpokemod + +CONFIG += qt \ + warn_on \ + dll + +include(../install.pri) + +SOURCES += Arena.cpp \ + Ghost.cpp \ + Team.cpp + +HEADERS += Arena.h \ + Bot.h \ + GhostBot.h \ + Ghost.h \ + Pokemon.h \ + Team.h + +include(../headers.pri) diff --git a/pokemodr/gui/ability.ui b/pokemodr/gui/ability.ui index ffbfaa69..c750096e 100644 --- a/pokemodr/gui/ability.ui +++ b/pokemodr/gui/ability.ui @@ -64,7 +64,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>ScriptWidget</class> diff --git a/pokemodr/gui/author.ui b/pokemodr/gui/author.ui index 25c63ce7..328f07be 100644 --- a/pokemodr/gui/author.ui +++ b/pokemodr/gui/author.ui @@ -78,7 +78,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/badge.ui b/pokemodr/gui/badge.ui index c8f0b7e2..ad5030b6 100644 --- a/pokemodr/gui/badge.ui +++ b/pokemodr/gui/badge.ui @@ -162,22 +162,22 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>KPushButton</class> <extends>QPushButton</extends> - <header>kpushbutton.h</header> + <header location="global" >KPushButton</header> </customwidget> <customwidget> <class>FractionWidget</class> diff --git a/pokemodr/gui/coinlist.ui b/pokemodr/gui/coinlist.ui index fd763d5a..f30c4275 100644 --- a/pokemodr/gui/coinlist.ui +++ b/pokemodr/gui/coinlist.ui @@ -52,7 +52,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>ScriptWidget</class> diff --git a/pokemodr/gui/coinlistobject.ui b/pokemodr/gui/coinlistobject.ui index a5027bc8..f7c6570d 100644 --- a/pokemodr/gui/coinlistobject.ui +++ b/pokemodr/gui/coinlistobject.ui @@ -91,12 +91,12 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/egggroup.ui b/pokemodr/gui/egggroup.ui index a50ab2bf..42a66df2 100644 --- a/pokemodr/gui/egggroup.ui +++ b/pokemodr/gui/egggroup.ui @@ -40,7 +40,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/fraction.ui b/pokemodr/gui/fraction.ui index d3eb9587..51bd76f9 100644 --- a/pokemodr/gui/fraction.ui +++ b/pokemodr/gui/fraction.ui @@ -35,12 +35,12 @@ <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/globalscript.ui b/pokemodr/gui/globalscript.ui index fb920252..e07aacf1 100644 --- a/pokemodr/gui/globalscript.ui +++ b/pokemodr/gui/globalscript.ui @@ -49,7 +49,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>ScriptWidget</class> diff --git a/pokemodr/gui/item.ui b/pokemodr/gui/item.ui index c47c47a8..473572a5 100644 --- a/pokemodr/gui/item.ui +++ b/pokemodr/gui/item.ui @@ -116,17 +116,17 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>ScriptWidget</class> diff --git a/pokemodr/gui/itemtype.ui b/pokemodr/gui/itemtype.ui index 87ed946f..b8413a23 100644 --- a/pokemodr/gui/itemtype.ui +++ b/pokemodr/gui/itemtype.ui @@ -94,17 +94,17 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/map.ui b/pokemodr/gui/map.ui index c180b5d4..9f9883d5 100644 --- a/pokemodr/gui/map.ui +++ b/pokemodr/gui/map.ui @@ -136,17 +136,17 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>KPushButton</class> <extends>QPushButton</extends> - <header>kpushbutton.h</header> + <header location="global" >KPushButton</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/mapeffect.ui b/pokemodr/gui/mapeffect.ui index c842f7f9..33c44760 100644 --- a/pokemodr/gui/mapeffect.ui +++ b/pokemodr/gui/mapeffect.ui @@ -133,12 +133,12 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>KPushButton</class> <extends>QPushButton</extends> - <header>kpushbutton.h</header> + <header location="global" >KPushButton</header> </customwidget> <customwidget> <class>ScriptWidget</class> diff --git a/pokemodr/gui/maptrainer.ui b/pokemodr/gui/maptrainer.ui index 3555a3df..694d1ad8 100644 --- a/pokemodr/gui/maptrainer.ui +++ b/pokemodr/gui/maptrainer.ui @@ -115,17 +115,17 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>ScriptWidget</class> diff --git a/pokemodr/gui/maptrainerteammember.ui b/pokemodr/gui/maptrainerteammember.ui index 73412ac3..1191e86f 100644 --- a/pokemodr/gui/maptrainerteammember.ui +++ b/pokemodr/gui/maptrainerteammember.ui @@ -132,17 +132,17 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KListWidget</class> <extends>QListWidget</extends> - <header>klistwidget.h</header> + <header location="global" >KListWidget</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/mapwarp.ui b/pokemodr/gui/mapwarp.ui index 284f7f4c..89b05b8c 100644 --- a/pokemodr/gui/mapwarp.ui +++ b/pokemodr/gui/mapwarp.ui @@ -116,12 +116,12 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>ScriptWidget</class> diff --git a/pokemodr/gui/mapwildlist.ui b/pokemodr/gui/mapwildlist.ui index 77360138..c14c85f3 100644 --- a/pokemodr/gui/mapwildlist.ui +++ b/pokemodr/gui/mapwildlist.ui @@ -40,7 +40,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/mapwildlistencounter.ui b/pokemodr/gui/mapwildlistencounter.ui index 980e8da5..e329b892 100644 --- a/pokemodr/gui/mapwildlistencounter.ui +++ b/pokemodr/gui/mapwildlistencounter.ui @@ -75,12 +75,12 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/move.ui b/pokemodr/gui/move.ui index 841c7524..86e419c9 100644 --- a/pokemodr/gui/move.ui +++ b/pokemodr/gui/move.ui @@ -167,17 +167,17 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>FractionWidget</class> diff --git a/pokemodr/gui/nature.ui b/pokemodr/gui/nature.ui index 38683034..c782442c 100644 --- a/pokemodr/gui/nature.ui +++ b/pokemodr/gui/nature.ui @@ -91,17 +91,17 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>FractionWidget</class> diff --git a/pokemodr/gui/point.ui b/pokemodr/gui/point.ui index cb1db190..13b71c63 100644 --- a/pokemodr/gui/point.ui +++ b/pokemodr/gui/point.ui @@ -28,7 +28,7 @@ <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/pokemod.ui b/pokemodr/gui/pokemod.ui index 71201558..6ea2d44b 100644 --- a/pokemodr/gui/pokemod.ui +++ b/pokemodr/gui/pokemod.ui @@ -438,22 +438,22 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>KPushButton</class> <extends>QPushButton</extends> - <header>kpushbutton.h</header> + <header location="global" >KPushButton</header> </customwidget> <customwidget> <class>KTabWidget</class> <extends>QTabWidget</extends> - <header>ktabwidget.h</header> + <header location="global" >KTabWidget</header> <container>1</container> </customwidget> <customwidget> diff --git a/pokemodr/gui/pokemodr.ui b/pokemodr/gui/pokemodr.ui index 39cca87a..c9b6a74c 100644 --- a/pokemodr/gui/pokemodr.ui +++ b/pokemodr/gui/pokemodr.ui @@ -83,12 +83,12 @@ <customwidget> <class>KPushButton</class> <extends>QPushButton</extends> - <header>kpushbutton.h</header> + <header location="global" >KPushButton</header> </customwidget> <customwidget> <class>KMainWindow</class> <extends>QMainWindow</extends> - <header>kmainwindow.h</header> + <header location="global" >KMainWindow</header> <container>1</container> </customwidget> <customwidget> diff --git a/pokemodr/gui/rules.ui b/pokemodr/gui/rules.ui index 4afd943e..5e287c11 100644 --- a/pokemodr/gui/rules.ui +++ b/pokemodr/gui/rules.ui @@ -451,17 +451,17 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KTabWidget</class> <extends>QTabWidget</extends> - <header>ktabwidget.h</header> + <header location="global" >KTabWidget</header> <container>1</container> </customwidget> <customwidget> diff --git a/pokemodr/gui/script.ui b/pokemodr/gui/script.ui index 62d6a2ce..4853c8e6 100644 --- a/pokemodr/gui/script.ui +++ b/pokemodr/gui/script.ui @@ -39,12 +39,12 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KTextEdit</class> <extends>QTextEdit</extends> - <header>ktextedit.h</header> + <header location="global" >KTextEdit</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/sound.ui b/pokemodr/gui/sound.ui index 2aa1e980..03d11ea1 100644 --- a/pokemodr/gui/sound.ui +++ b/pokemodr/gui/sound.ui @@ -62,7 +62,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>Phonon::SeekSlider</class> diff --git a/pokemodr/gui/species.ui b/pokemodr/gui/species.ui index b72eb5e3..071fd759 100644 --- a/pokemodr/gui/species.ui +++ b/pokemodr/gui/species.ui @@ -670,32 +670,32 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>KListWidget</class> <extends>QListWidget</extends> - <header>klistwidget.h</header> + <header location="global" >KListWidget</header> </customwidget> <customwidget> <class>KPushButton</class> <extends>QPushButton</extends> - <header>kpushbutton.h</header> + <header location="global" >KPushButton</header> </customwidget> <customwidget> <class>KTabWidget</class> <extends>QTabWidget</extends> - <header>ktabwidget.h</header> + <header location="global" >KTabWidget</header> <container>1</container> </customwidget> <customwidget> diff --git a/pokemodr/gui/speciesability.ui b/pokemodr/gui/speciesability.ui index bd3555f6..6d2fbb66 100644 --- a/pokemodr/gui/speciesability.ui +++ b/pokemodr/gui/speciesability.ui @@ -56,12 +56,12 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/speciesitem.ui b/pokemodr/gui/speciesitem.ui index 4af1340d..ee13b2d9 100644 --- a/pokemodr/gui/speciesitem.ui +++ b/pokemodr/gui/speciesitem.ui @@ -56,12 +56,12 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/speciesmove.ui b/pokemodr/gui/speciesmove.ui index 43af96c7..bc13fd85 100644 --- a/pokemodr/gui/speciesmove.ui +++ b/pokemodr/gui/speciesmove.ui @@ -75,12 +75,12 @@ <customwidget> <class>KComboBox</class> <extends>QComboBox</extends> - <header>kcombobox.h</header> + <header location="global" >KComboBox</header> </customwidget> <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/sprite.ui b/pokemodr/gui/sprite.ui index 01b5df1b..e93314af 100644 --- a/pokemodr/gui/sprite.ui +++ b/pokemodr/gui/sprite.ui @@ -78,12 +78,12 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>KPushButton</class> <extends>QPushButton</extends> - <header>kpushbutton.h</header> + <header location="global" >KPushButton</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/status.ui b/pokemodr/gui/status.ui index 5037c86b..762bdaf5 100644 --- a/pokemodr/gui/status.ui +++ b/pokemodr/gui/status.ui @@ -52,7 +52,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>ScriptWidget</class> diff --git a/pokemodr/gui/store.ui b/pokemodr/gui/store.ui index 36267b2a..befd88ef 100644 --- a/pokemodr/gui/store.ui +++ b/pokemodr/gui/store.ui @@ -56,12 +56,12 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>KListWidget</class> <extends>QListWidget</extends> - <header>klistwidget.h</header> + <header location="global" >KListWidget</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/tile.ui b/pokemodr/gui/tile.ui index 9d55d8ed..f8f654c7 100644 --- a/pokemodr/gui/tile.ui +++ b/pokemodr/gui/tile.ui @@ -119,17 +119,17 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>KListWidget</class> <extends>QListWidget</extends> - <header>klistwidget.h</header> + <header location="global" >KListWidget</header> </customwidget> <customwidget> <class>KPushButton</class> <extends>QPushButton</extends> - <header>kpushbutton.h</header> + <header location="global" >KPushButton</header> </customwidget> <customwidget> <class>ScriptWidget</class> diff --git a/pokemodr/gui/time.ui b/pokemodr/gui/time.ui index e8761143..0ea13ae0 100644 --- a/pokemodr/gui/time.ui +++ b/pokemodr/gui/time.ui @@ -62,7 +62,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/trainer.ui b/pokemodr/gui/trainer.ui index a2ba99f8..dedd7565 100644 --- a/pokemodr/gui/trainer.ui +++ b/pokemodr/gui/trainer.ui @@ -101,17 +101,17 @@ <customwidget> <class>KIntNumInput</class> <extends>QWidget</extends> - <header>knuminput.h</header> + <header location="global" >KIntNumInput</header> </customwidget> <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>KPushButton</class> <extends>QPushButton</extends> - <header>kpushbutton.h</header> + <header location="global" >KPushButton</header> </customwidget> </customwidgets> <resources/> diff --git a/pokemodr/gui/type.ui b/pokemodr/gui/type.ui index ff8cfdb2..8b712978 100644 --- a/pokemodr/gui/type.ui +++ b/pokemodr/gui/type.ui @@ -59,7 +59,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>FractionWidget</class> diff --git a/pokemodr/gui/weather.ui b/pokemodr/gui/weather.ui index 2525b0aa..8cc59eb8 100644 --- a/pokemodr/gui/weather.ui +++ b/pokemodr/gui/weather.ui @@ -52,7 +52,7 @@ <customwidget> <class>KLineEdit</class> <extends>QLineEdit</extends> - <header>klineedit.h</header> + <header location="global" >KLineEdit</header> </customwidget> <customwidget> <class>ScriptWidget</class> |