1.0.0 • Published 6 years ago

dokkansimulatormodule v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Dokkan logo

This library simulates the attack generated by card during each turn for the mobile game, Dragonball Z Dokkan Battle. It was created to help to quickly experiment with different combinations of teams, to see how the individual cards synergise.

There is also a single card simulator, designed to give a quick answer on the how well a particular card performs. This makes it easier to answer questions about hardest hitting card or whether a particular card is better than another.

It's important to note that, at this point, the simulator only gives answers to the Attack per Turn (APT) generated, not the actual damage that a card will do. The current version, version 1.0, does not take into account some special mechanics such as counter attacks, transformations, health-based mechanics, enemy type, enemy damage reduction, and surely many other variables that happen in the real game.

Some of these mechanics may be planned for implementation in future releases. Please see the Future Improvements section for more information.

If you believe that there is a feature that should be added which isn't listed in Future Improvements, then please log an issue on GitHub.

  • Documentation
  • Release Notes/History/Changes
  • Issues
  • Future Improvements

Documentation

Installation

To install, follow whatever I put here eventually once v1.0 is released :D

Usage

All of the methods available in the library are static and are invoked by calling:

DokkanSim.methodName() 

For example, to run the single simulator function:

DokkanSim.SingleSim(*Put arguments in here once v1.0 finalised*)

Which would return:

{[*JSON*]}

For most use cases, the only two methods that you would likely want to call directly are singleSim and teamSim. The run through the rest of the methods in the correct order of operations in a procedural fashion.

Most of the methods require at least 1 valid JSON object that represents the card. Each card requires a certain set of properties, as set out in the example below. The example lists only the bare minimum properties required with the minimum acceptable values for those properties.

{
    'name':'Jiren',
    'title': 'LR Bestest Warrior', 
    'kiLinks': [],
    'crit': 0, 
    'percentageTurnStartSkill': 1,
    'leaderPercentageAttack': 1, 
    'leaderFlatAttack': 0,
    'aa': 0, 
    'currentKi': 0, 
    'currentAttack':0,
    'baseKi':0,
    'SAMultiplier': 1.0,
    'minSAKi': 1,
    'maxKi': 1,
    'baseAttack': 1,
    '12KiMultiplier': 1,
    'neutralKiMultiplierValue': 1
}

Other properties are required to make use of certain mechanics such as buffs that apply on SA. The list below details all of the accepted properties with some example values.

{
    'name':'Jiren',
    'title': 'LR Bestest Warrior', 
    'kiLinks': [],
    'crit': 0, 
    'percentageTurnStartSkill': 1,
    'leaderPercentageAttack': 1, 
    'leaderFlatAttack': 0,
    'aa': 0, 
    'currentKi': 0, 
    'currentAttack':0,
    'baseKi':0,
    'SAMultiplier': 1.0,
    'minSAKi': 1,
    'maxKi': 1,
    'baseAttack': 1,
    '12KiMultiplier': 1,
    'neutralKiMultiplierValue': 1,
    **ADD else everything here
}

Here are two example of real cards and their corresponding JSON objects.

{
    ** REPLACE ME
    'name':'Jiren',
    'title': 'LR Bestest Warrior', 
    'kiLinks': [],
    'crit': 0, 
    'percentageTurnStartSkill': 1,
    'leaderPercentageAttack': 1, 
    'leaderFlatAttack': 0,
    'aa': 0, 
    'currentKi': 0, 
    'currentAttack':0,
    'baseKi':0,
    'SAMultiplier': 1.0,
    'minSAKi': 1,
    'maxKi': 1,
    'baseAttack': 1,
    '12KiMultiplier': 1,
    'neutralKiMultiplierValue': 1
}
{
    ** REPLACE ME
    'name':'Jiren',
    'title': 'LR Bestest Warrior', 
    'kiLinks': [],
    'crit': 0, 
    'percentageTurnStartSkill': 1,
    'leaderPercentageAttack': 1, 
    'leaderFlatAttack': 0,
    'aa': 0, 
    'currentKi': 0, 
    'currentAttack':0,
    'baseKi':0,
    'SAMultiplier': 1.0,
    'minSAKi': 1,
    'maxKi': 1,
    'baseAttack': 1,
    '12KiMultiplier': 1,
    'neutralKiMultiplierValue': 1
}

To handle creation of the JSON required, there will soon be an API available which returns valid JSON for this library.

Methods

1.0.0

6 years ago