david2999999 / PokeLegends

Using Java to replicate Pokemon's Battle System. (Currently Implementing Using Angular)

Home Page:https://david2999999.github.io/PokeLegends/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pokemon Battle System ϞϞ(๑⚈ ꇴ ⚈๑)∩

Using object oriented programming to replicate Pokemon's Battle System. (Currently Still Under Development)

Listing the main mechanics

  • Turn Order: Deciding turn of Player1 and Player2. This will also decide the order in which the Pokémon will make their move.
  • Accuracy: Determine if a move will hit a given target, by putting in consideration of status effects and accuracy value of a skill.
  • Critical Hit Calculation: Determine the probability of whether a move will be critical hit, which will be determine by the speed of Pokemon and effect of a skill or item.
  • Secondary Effect: Deciding whether secondary effects of moves should be activated.
  • Damage Calculation: Determine the total damage of a skill, by taking in consideration of effectiveness, type , weather, etc. Total Damage Calculation Formula:
    ( ( ( ( ( (2 * Level) / 2) + 2) * Power * A / D) / 50 ) + 2 ) * Modifier
    • Level is the level of the attacking Pokémon
    • A is the effective Attack stat of the attacking Pokémon if the used move is a physical move, or the effective Special Attack stat of the attacking Pokémon if the used move is a special move
    • D is the effective Defense stat of the target if the used move is a physical move or a special move that uses the target's Defense stat, or the effective Special Defense of the target if the used move is an other special move
    • Power is the effective power of the used move.
  • Modifier = Targets * Weather * Badge * Critical * random * STAB * Type * Burn * Other
    • Targets is 0.75 if the move has more than one target, and 1 otherwise.
    • Weather is 1.5 if a Water-type move is being used during rain or a Fire-type move during harsh sunlight, and 0.5 if a Water-type move is used during harsh sunlight or a Fire-type move during rain, and 1 otherwise.
    • Badge is applied in Generation II only. It is 1.25 if the attacking Pokémon is controlled by the player and if the player has obtained the Badge corresponding to the used move's type, and 1 otherwise.
    • Critical is applied starting in Generation II. It is 2 for a critical hit in Generations II-V, 1.5 for a critical hit from Generation VI onward, and 1 otherwise. random is a random factor between 0.85 and 1.00 (inclusive).
    • STAB is the same-type attack bonus. This is equal to 1.5 if the move's type matches any of the user's types, 2 if the user of the move additionally has Adaptability, and 1 if otherwise.
    • Type is the type effectiveness. This can be 0 (ineffective); 0.25, 0.5 (not very effective); 1 (normally effective); 2 or 4 (super effective) depending on both the move's and target's types.
    • Burn is 0.5 (from Generation III onward) if the attacker is burned, its Ability is not Guts, and the used move is a physical move (other than Facade from Generation VI onward), and 1 otherwise.
    • other is 1 in most cases, and a different multiplier when specific interactions of moves, Abilities or items.

About

Using Java to replicate Pokemon's Battle System. (Currently Implementing Using Angular)

https://david2999999.github.io/PokeLegends/


Languages

Language:HTML 34.3%Language:CSS 26.6%Language:Java 20.9%Language:TypeScript 9.4%Language:JavaScript 8.7%