chulchultrain / factoryhead Goto Github PK
View Code? Open in Web Editor NEWIncrease Win Rate in Pokemon Platinum Battle Factory.
Increase Win Rate in Pokemon Platinum Battle Factory.
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/
The Menu for both PETester and DRTester are disgusting. Also, DR and PE are not great. Fix all 4.
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];
};
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?
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.
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.
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.
Need to use our PokemonEntry data structure to get info.
Then, we need to make a LiveEntry data structure with stuff like
probably not necessary yet
-Move
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.
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.
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;
}`
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.
Textboxes to input data. Send to server.
Textboxes to display results.
Again, think about how to split the work in this new model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.