Quick way to get the number of attacks.

This commit is contained in:
Jason Felds
2012-05-21 21:10:10 -04:00
parent db3b93f79e
commit 55e1eff14c
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -81,6 +81,13 @@ RString Attack::GetTextDescription() const
return s;
}
int Attack::GetNumAttacks() const
{
vector<RString> tmp;
split(this->sModifiers, ",", tmp);
return tmp.size();
}
bool AttackArray::ContainsTransformOrTurn() const
{
FOREACH_CONST( Attack, *this, a )
+2
View File
@@ -65,6 +65,8 @@ struct Attack
bool ContainsTransformOrTurn() const;
static Attack FromGlobalCourseModifier( const RString &sModifiers );
RString GetTextDescription() const;
int GetNumAttacks() const;
};
struct AttackArray : public vector<Attack>