Skip to content

delexi/Pokemon-MMO

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

---
This project is open source and open to any and all productive input. 

It is a fan project designed with the hope of creating a free and enjoyable
experience for fans of the games.

All artwork, sounds, and game mechanics are sole property of GameFreak, The
Pokemon Company, and Nintendo.

Pokedex provided graciously by Veekun. All credit goes to him. Check out his
website @ http://veekun.com/ to support him, and also to download the csvs for
our db.

Now that that's out of the way, time for to do list and progress!

TODO:
- Our goal right now is to establish a working battle system that can handle any
  Pokemon with any moves, held items, etc.

PROGRESS:
- Database is successfully implemented. Species Array can be created, entering
  the dex number into the array returns base stats, more info such as dex
  entries and stuff still required as of writing this.
- Battle math is near-complete. (Requires some item implementation still)
- PokemonFactory class complete. Inserting a species into the class along with
  EV/IV values will provide a pokemon with correct stats.
  
DATABASE STRUCTURE FOR GENDER RATIOS:
-------------------------------------
Unfortunatley, veekun's pokedex db does not include a table detailing the meaning
behind the values for gender ratios in the 'pokemon' table. The following is what I
found to be correct, if there is any discrepency please adjust accordingly, but this
should be right:

-1 = Genderless
0 = Always male
1 = 87.5% male
2 = 75% male
4 = 50% - 50%
6 = 75% female
8 = Always female

Note that there is no 87.5% female, I checked and this is not a mistake.

DATABASE STRUCTURE FOR STATUS EFFECTS:
--------------------------------------
Veekun's pokedex also doesn't store data for secondary effects like poison and stat stages.
Instead, a table titled move_effects_prose exists which explains what each "move class" does.
This table includes moves which have a 10% chance of burn, causing flinch, always lower the 
target's speed, as well as more complicated moves like Trick Room and Whirlwind. For moves like
Flamethrower and Sand-Attack, despite having an effect other than "do damage" (like Tackle
for instance, which is the simplest move) we can still group them into a common move class.
In order to do this, I've created a table titled move_secondary_effects. This table contains an
primary id column along with 5 other pertinent columns of data. These are:

move_id: ties the data in the row to the move's id which all other move tables refer to.

non_volatile_status_effects: int which corresponds to non-volatile status effects the move can
	induce. these are status effects which appear on the pokemon's status bar in-game, and remain
	after battle. Poison, Paralyze, Burn, Sleep, and Paralysis. While nearly all non-volatile status
	inducing moves can only induce 1 effect, a select few (such as Tri-Attack) have a chance of
	inflicting more than one. We need to account for this, I've come up with the following integer-based
	setup:
	
0 none
1 poison
2 bad poison (toxic)
3 sleep
4 burn
5 paralyze
6 freeze
33 triattack (10% chance of burn paralyze or freeze)
//More if necessary, I don't think there are any other strange combos like tri-attack's

volatile_status_effects: int which corresponds to the volatile effects moves can inflict. these status
	effects do not appear in the pokemon's status bar, do not stay after battle ends, and can stack. There
	are a lot more of these, including confusion, attract, mean look, etc. Setup:
	
//separated into baton passable and non-baton passable
0 none
/**baton-passable vol vals*/
1 confusion 
2 curse (per turn dmg from a ghost)
3 leech seed
4 mindreader/lockon
5 perish song
6 embargo
7 heal block
8 ingrain
9 aqua ring
10 substitute
11 magnet rise/telekinesis

/**non-baton-passable*/
12 torment
13 taunt
14 partialtrap
15 meanlook
16 nightmare
17 infatuation
18 identify
19 flinch
20 encore

user_stat_changes: moves can change the user's stats by a stage. For instance, using steel wing has a chance
	of raising the user's attack by one stage. This is stored in a different column than the stat changes
	the target experiences. It should also be noted that for stat stage changing moves which are not just secondary
	effects (moves like Growth, Harden, etc) can either affect the user or target, depending on the move. What
	I mean by this is some stat-affecting moves can target allies as well as the user, in which case the effect 
	would be target-specific not user-specific.
	
	The structure of this column is a JSON object. For those unfamiliar this is a grouping of key/value
	pairs which can be parsed to extract data. It's more conveinient than having a bunch of columns for data that
	is never changed and will be stored in an array anyhow.
	
	EXAMPLE: {"attack":"0","defense":"0","special_attack":"1","special_defense":"0","speed":"1","accuracy":"0","evasion":"0"}
	
	This example would raise the user's special attack and speed by one stage each.

target_stat_changes: same as above, only it affects the target instead. This is for moves like Psychic, which
	have a chance (0-100%, this value is already accounted for in the moves table) of inflicting a stat stage 
	change on hit.

PROJECT STRUCTURE:
------------------

The project's root directory contains following subdirectory and files:

src/
	This is where the source code is located. This directory has subdirectories
	structured in the standard java way with the directory structure
	representing the package structure.

bin/
	This is where the compiled class files can be found.

assets/
	Everything that is not source-, class- and library files. This directory
	contains databases, images, sounds, etc.

libs/
	External libraries needed to compile this project.

README
	This readme file.

.gitignore
	The exclude file for git. Currently excludes the bin/ directory.

options
	Arg file for javac listing default options.

classes
	Arg file for javac listing all classes to be compiled.

HOW TO BUILD:
-------------
* Dependencies:

	- Java Developing Kit (JDK) 6

* If not already present create new folder called 'dir' at the root of
  this project.

* From the root of this project execute the following:

	javac @options @classes

* All compiled .class-files will be placed under bin/.

HOW TO RUN:
-----------
* From the root of this project execute the following:

* Linux:

       java -classpath \
       'libs/lwjgl-2.7.1/jar/lwjgl.jar:libs/sqlitejdbc-v056.jar:bin' \
       -Djava.library.path=libs/lwjgl-2.7.1/native/linux/ \
       com.pokemon.mmo.Main

* Windows:
		java -classpath \
       'libs/lwjgl-2.7.1/jar/lwjgl.jar:libs/sqlitejdbc-v056.jar:bin' \
       -Djava.library.path=libs/lwjgl-2.7.1/native/windows/ \
       com.pokemon.mmo.Main

* Mac:
		java -classpath \
       'libs/lwjgl-2.7.1/jar/lwjgl.jar:libs/sqlitejdbc-v056.jar:bin' \
       -Djava.library.path=libs/lwjgl-2.7.1/native/mac/ \
       com.pokemon.mmo.Main

* Solaris:
		java -classpath \
       'libs/lwjgl-2.7.1/jar/lwjgl.jar:libs/sqlitejdbc-v056.jar:bin' \
       -Djava.library.path=libs/lwjgl-2.7.1/native/solaris/ \
       com.pokemon.mmo.Main

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.5%
  • Shell 0.5%