davidthefat
I Love C++
- 437
- Posts
- 15
- Years
- Seen Mar 3, 2012
Well, if you're hard-coding the normal poison effect, why not the toxic poison effect too? There's not much point in having random bits of the battle engine done in scripts if the majority is done in straight C++...
I'm using C++ at the moment too, and I'm currently not planning on including any scripting system. Although a scripting system allows users to make more complex events, not using one gives me an incentive to improve the event/database system. Although a using a script for a menu system may be easier for me to implement, a GUI menu editor with drag and drop customisability is much easier to use for people who aren't as confident with programming, which means there will be more variety among games using the engine.
The engine is nowhere near finished at the moment, but though progress is slow, it's definitely proceeding. I'm working on the map/database editor first, rather than the actual game engine, so it won't be playable for a long time.
Code:
class Pokemon
{
private:
int hp;
int MaxHP;
bool Poisoned;
//Not complete implementation
public:
Pokemon();
void AddHealth(int Amount);
bool isPoisoned();
int getMaxHP();
//Not Complete
};
int main()
{
Pokemon Party[PARTY_MAX];
/*
*
*
*Add code here
*
*
*
*
*/
for(int idkWhatToCallIt = 0; idkWhatToCallIt < PARTY_MAX; idkWhatToCallIt ++)
{
if(Party[idkWhatToCallIt].isPoisoned() == 1)
{
Party[idkWhatToCallIt].addHealth(-1 * Party[idkWhatToCallIt].getMaxHP() / 32);
}
}
Thats a rough sketch, its not very hard to do... it only takes 5 lines of code really...