Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GH-327] Add Speed #588

Merged
merged 10 commits into from
May 21, 2024
Merged

[GH-327] Add Speed #588

merged 10 commits into from
May 21, 2024

Conversation

lotuuu
Copy link
Contributor

@lotuuu lotuuu commented May 8, 2024

Motivation

Add a new "Speed" stat that affects basic skill cooldowns. We're fine with only having it used on skill cast (instead of doint it retroactively). An issue for this scenario has been created already: https://github.com/lambdaclass/champions_of_mirra/issues/423
Closes https://github.com/lambdaclass/champions_of_mirra/issues/327

Characters don't have a base speed, since it doesn't make sense: it's easier and more balance-able to adjust their cooldowns instead!

Summary of changes

  • Add speed stat calculations in Units (for items)
  • Implement speed in skill cooldown calculation
  • Implement tests for speed buffs and debuffs
  • Gives some love to the Simulator module doc

How to test it?

Connect from the client, give a unit in your team some skill that messes with speed like:

  {
    "name": "D'Agna Basic",
    "energy_regen": 0,
    "animation_duration": 500,
    "mechanics": [
      {
        "trigger_delay": 250,
        "apply_effects_to": {
          "targeting_strategy": {
            "type": "random",
            "count": 6,
            "target_allies": true
          },
          "effects": [
            {
              "type": {
                "type": "permanent"
              },
              "initial_delay": 0,
              "components": [],
              "modifiers": [
                {
                  "attribute": "speed",
                  "modifier_operation": "Add",
                  "float_magnitude": 500
                }
              ],
              "executions": []
            }
          ]
        }
      }
    ],
    "cooldown": 200
  },

And see how all your units start going hypermode thanks to the speed buff after they cast their first basic skill!
note: they will be limited by their animation_duration and trigger_delay. You can set all of those to 0 to see real hypermode ;)

@lotuuu lotuuu marked this pull request as ready for review May 8, 2024 22:07
@lotuuu lotuuu added the autobattler AFK Gacha Autobattler game label May 13, 2024
Copy link
Contributor

@ncontinanza ncontinanza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lotuuu lotuuu self-assigned this May 21, 2024
Copy link
Contributor

@agustinesco agustinesco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! tested adding speed to muflus basic and runned the battle.md script and the battle is quite faster! nice

@agustinesco agustinesco merged commit f444a4e into main May 21, 2024
1 check passed
@agustinesco agustinesco deleted the gh-327-add-speed branch May 21, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autobattler AFK Gacha Autobattler game
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Stats] Speed
3 participants