GithubHelp home page GithubHelp logo

chulchultrain / factoryhead Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 167 KB

Increase Win Rate in Pokemon Platinum Battle Factory.

C++ 53.49% Makefile 4.59% CSS 2.81% HTML 5.57% JavaScript 33.54%
battle-factory pokemon pokemon-platinum

factoryhead's People

Contributors

chulchultrain avatar

Stargazers

 avatar

Watchers

 avatar

factoryhead's Issues

New Direction and Ending of Project

I have found a good simulator between 2 pokemon which will calculate damage. So all that I need is to find the data of the Pokemon given the data that I know. And that shall be the end of this project.

Because I will as a result, have all the functionality that I need, from the combination of my project on the web damage calculator from http://pokemonshowdown.com/damagecalc/

Battle Eval Class

Move Result currently fits into the class as an element of an array of MoveResults wihch tells us the result of the Battle. The result of a battle is always an array of MoveResult, as of right now.
And so we want a structure that holds an entire Battle(all of the attacks one way) in itself.

struct MoveDamage {
string name;
int lower,upper;
};

struct Battle {
string attacker,defender;
MoveDamage md[4];
};

Interesting Way for Get Set of Fields

I recently read the Calendar API for Java online, and something interesting to me was that they used singular get and set functions rather than getMonth/setMonth,getDate/setDate for manipulating all the fields. I think this allows for easily manipulating the fields and allowing ease of addition of new attributes to get and set.

int Get(int field);
int Set(int field, int value);

Problem: How to set something that has no easily translatable integer/enumerator.
In Calendar, this problem did not happen because months and days of the week both have a easy enumerator. Can count 1 to 12 and 1 to 7, or make an enumerable type for both.

What can I do about Pokemon names or Pokemon moves?

More InDepth Factory Simulation(Reason for quits)

Right now, we have simulation for what would happen if a Pokemon attacked another Pokemon just at the beginning of the battle.

But how would this change after turns due to status changes, stat changes, in-battle move effects?

Therefore, I see no choice but to model the actual battle happening and the user updates the Pokemon Entry by doing moves done in the battle.

This is similar to modeling a Chessboard in game and seeing the next state of the Chessboard if a player were to make a certain move, and to see the result of that move( whether a piece would be taken, whether it would result in check/checkmate).

Here, the result of a move in Chess is quite obvious. But not quite as obvious, becusae given a base power and type and all the information of the 2 pokemon, we need to calculate the damage done and possible side effects.

Need to Refactor some aspects.

BS and WS are both structs/classes right now. However, in essence, they are just a list of 6 integers. So, we should just use a vector for both. And our functions that we had in WorkingStats class, we can simply move out of the class and as a function. Our functions were Constructing Workingstats from Basestats and other information, Calculating IVs from Working Stats, Calculating EVs from IVs and WorkingStats, and Calculating EVs from WorkingStats.

Also, our functions with BaseStats were mapping BaseStats from DexID, so now we map to a vector of 6 ints.

So every place that makes use of this map has to be fixed. And every place with workingStats has to be fixed.

EntryFilterTester FileInput

File Input is set in stone. Should pass by parameter. That would be cool.
Also should put a file size limit of maybe 20 lines or so.

Github Page

Finally, this console application will have a nice little website with a few nice pictures with relevance to Battle Factory, just giving a nice description about what it does, and maybe a DL or link to this github repo.

Couple of Magic Numbers

Throughout the project, I have a couple of magic numbers, namely,
4 for number of moves a pokemon can have.
2 number of types a pokemon can have.

2 size of the battle evaluator in the battle sim subtask.

We keep these at multiple places throughout the project. What if one day, gonna have 5 moves instead of 4. Well, I mean On some level, it's okay because this project is specifically meant for BF of Platinum.

EntryFilter Bug with indices

FactoryHead/EntryFilter/EntryFilter.cpp

no out of bounds checking for arrays

`void EntryFilter::ResetMoveFilter(int which) {
moves[which] = "";
}

void EntryFilter::ResetNameFilter() {
name = "";
}

void EntryFilter::ResetAllTypeFilters() {
for(int i = 0; i < 2; i++)
ResetTypeFilter(i);
}

void EntryFilter::ResetTypeFilter(int which) {
types[which] = "";
}

void EntryFilter::SetMoveFilter(int which,string move) {
moves[which] = move;
}

void EntryFilter::SetNameFilter(string s) {
name = s;
}

void EntryFilter::SetTypeFilter(int which, string type) {
types[which] = type;
}`

Optional: Multi-threaded Server

Split components of program into pieces that are on client side and those that are on server side. Also, split components of program into pieces that run separately on different threads.

Website Interface

Textboxes to input data. Send to server.
Textboxes to display results.
Again, think about how to split the work in this new model.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.