diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-06-02 18:12:48 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-06-02 18:12:48 +0000 |
| commit | c9afda3ab74614fb36986f96b7972c082f275eca (patch) | |
| tree | 1b7c0b31950597d6ed562d94158dd3f8701496da /pokemod/Move.cpp | |
| parent | f71140fae5218ee9839ffcd4ec83abfded5124f4 (diff) | |
| download | sigen-c9afda3ab74614fb36986f96b7972c082f275eca.tar.gz sigen-c9afda3ab74614fb36986f96b7972c082f275eca.tar.xz sigen-c9afda3ab74614fb36986f96b7972c082f275eca.zip | |
Finished off all PokeMod classes, added move validations, fixed up some GUI, various other fixes
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@18 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Move.cpp')
| -rw-r--r-- | pokemod/Move.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index 05577f5a..6dee45f6 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -92,7 +92,7 @@ void PokeGen::PokeMod::Move::Validate() LogVarNotValid("Move", id, "numTargets", name);
isValid = false;
}
- if (TAC_END <= targetChoice)
+ if (CHC_END <= targetChoice)
{
LogVarNotValid("Move", id, "targetChoice", name);
isValid = false;
@@ -157,7 +157,7 @@ void PokeGen::PokeMod::Move::Validate(const wxListBox &output) output.append(ConsoleLogVarNotValid("Move", id, "numTargets", name));
isValid = false;
}
- if (TAC_END <= targetChoice)
+ if (CHC_END <= targetChoice)
{
LogVarNotValid("Move", id, "targetChoice", name);
output.append(ConsoleLogVarNotValid("Move", id, "targetChoice", name));
@@ -199,7 +199,7 @@ void PokeGen::PokeMod::Move::ImportIni(Ini &ini, const unsigned _id) LogImportStart("Move");
if (_id == UINT_MAX)
{
- ini.GetValue("id", id, UINT_MAX);
+ ini.GetValue("id", id);
if (id == UINT_MAX)
LogIdNotFound("Move");
}
@@ -299,7 +299,7 @@ void PokeGen::PokeMod::Move::SetType(const unsigned t) void PokeGen::PokeMod::Move::SetType(const String &t)
{
LogSetVar("Move", id, "type string", t, name);
- if (Type *temp = curPokeMod.GetType(t))
+ if (const Type *temp = curPokeMod.GetType(t))
type = temp->GetId();
}
@@ -338,13 +338,13 @@ void PokeGen::PokeMod::Move::SetNumTargets(const unsigned n) void PokeGen::PokeMod::Move::SetTargetChoice(const unsigned t)
{
LogSetVar("Move", id, "targetChoice", t, name);
- if (t < TAC_END)
+ if (t < CHC_END)
targetChoice = t;
}
void PokeGen::PokeMod::Move::SetTargetChoice(const String &t)
{
- SetTargetChoice(FindIn(TAC_END, t, TargetChoiceStr));
+ SetTargetChoice(FindIn(CHC_END, t, ChoiceStr));
}
void PokeGen::PokeMod::Move::SetIgnoreAccuracy(const bool i)
@@ -453,7 +453,7 @@ unsigned PokeGen::PokeMod::Move::GetType() const PokeGen::PokeMod::String PokeGen::PokeMod::Move::GetTypeString() const
{
LogFetchVar("Move", id, "type string", type, name);
- if (Type *t = curPokeMod.GetType(type))
+ if (const Type *t = curPokeMod.GetType(type))
return t->GetName();
return "";
}
@@ -499,8 +499,8 @@ unsigned PokeGen::PokeMod::Move::GetTargetChoice() const PokeGen::PokeMod::String PokeGen::PokeMod::Move::GetTargetChoiceString() const
{
LogFetchVar("Move", id, "targetChoice string", targetChoice, name);
- if (targetChoice < TARC_END)
- return TargetChoiceStr[targetChoice];
+ if (targetChoice < CHC_END)
+ return ChoiceStr[targetChoice];
return "";
}
@@ -619,7 +619,7 @@ void PokeGen::PokeMod::Move::NewMoveEffect(Ini *const ini) void PokeGen::PokeMod::Move::DeleteMoveEffect(unsigned _id)
{
LogSubmoduleRemoveStart("Move", id, "effect", _id, name);
- for (std::vector<MoveEffect>::const_iterator i = effects.begin(); i != effects.end(); ++i)
+ for (std::vector<MoveEffect>::iterator i = effects.begin(); i != effects.end(); ++i)
{
if (i->GetId() == _id)
{
|
