summaryrefslogtreecommitdiffstats
path: root/battle/Ghost.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-06-07 17:17:56 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-06-07 17:17:56 +0000
commit73a9660e15ccd5bbabd5c90a63a3e15e36cee9fa (patch)
treec80e1689278951c2637fced0e9b1ed738411d20a /battle/Ghost.cpp
parent86d1186803981df134dd9869bac7da1c89e1bd55 (diff)
[FIX] UI files now use <> including rather than "" for KDE classes
[FIX] Moved battle to pokebattle [FIX] Starting to figure out the battle system git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@197 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'battle/Ghost.cpp')
-rw-r--r--battle/Ghost.cpp98
1 files changed, 0 insertions, 98 deletions
diff --git a/battle/Ghost.cpp b/battle/Ghost.cpp
deleted file mode 100644
index b994da05..00000000
--- a/battle/Ghost.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// 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/>.
-/////////////////////////////////////////////////////////////////////////////
-
-#include "Ghost.h"
-
-Ghost(const PokeMod::Pokemod& par, const unsigned s, const unsigned l, const unsigned t) :
- Pokemon(par, s, l),
- teamSize(t),
- unknownMoves(par->GetMaxMoves())
-{
- for (unsigned i = 0; i < PokeMod::ST_End_GSC; ++i)
- {
- dv[i] = 0;
- statExp[i] = 0;
- minStats[i] = GetStat(i);
- dv[i] = pokemod->GetMaxDV();
- statExp[i] = 65535;
- maxStats[i] = GetStat(i);
- }
- Species* pkmn = pokemod->GetSpeciesByID(s);
- if (pkmn->GetNumAbilities() == 1)
- FeedAbility(pkmn->GetAbility(0));
-}
-
-void FeedAttack(const unsigned actualDamage, const unsigned stat, const unsigned otherLevel, const unsigned power, const bool isAttacker)
-{
-
-}
-
-void FeedItem(const unsigned i)
-{
- items.append(i);
-}
-
-void FeedMove(const unsigned m)
-{
- if (!moves.contains(m))
- {
- moves.insert(m);
- --unknownMoves;
- moveChances[m] = UINT_MAX;
- for (QMutableMapIterator<unsigned, unsigned> i(moveChances); i.hasNext(); i.next())
- {
- if (i.value() != UINT_MAX)
- {
- i.value() *= unknownMoves;
- i.value() /= (unknownMoves + 1);
- if (!i.value())
- moveChances.erase(i);
- }
- }
- for (QListIterator<MoveCombo> i(moveCombos); i.hasNext(); i.next())
- {
- if (i.prereqs.intersect(moves).size() && !moves.contains(i.move))
- moves[i.move] *= i.chance;
- }
- }
-}
-
-void FeedMoveChance(const unsigned m, const unsigned weight)
-{
- moveChances[m] = weight;
-}
-
-void FeedAbility(const unsigned a)
-{
- ability = a;
-}
-
-void UpdateHP()
-{
- curHP = hpPercent * maxStats[PokeMod::ST_HP];
-}
-
-void SetHP(const Frac p)
-{
- hpPercent = p;
- UpdateHP();
-}