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

Implement damage reflection skill #479

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

bernatvadell
Copy link
Contributor

Implementation of the Damage Reflection skill.

As I've read, I should implement a reflection according to the following formula:

30+(Total Energy/42)

I've implemented the basics, but I think I'm not understanding the powerup formula system well, since when I check the reflectiondamage (from the stat), it has values ​​well below the minimum 0.3 expected.

Copy link
Member

@sven-n sven-n left a comment

Choose a reason for hiding this comment

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

Afaik, reflect options stack (they are just added together) and can reach over 100%

var boostPerEnergy = this.Context.CreateNew<AttributeRelationship>();
boostPerEnergy.InputAttribute = Stats.TotalEnergy.GetPersistent(this.GameConfiguration);
boostPerEnergy.InputOperator = InputOperator.ExponentiateByAttribute;
boostPerEnergy.InputOperand = 1 - (0.01f / 42f);
Copy link
Member

Choose a reason for hiding this comment

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

InputOperand = 0.01f / 40f

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Considering that it's 1% for every 42 energy points, is there a reason why it has to be divided by 40?
Or maybe the formula I put forward is not correct. I found it on a forum that claimed it was the "official" formula.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bernatvadell bernatvadell requested a review from sven-n September 3, 2024 12:33
Copy link
Member

@sven-n sven-n left a comment

Choose a reason for hiding this comment

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

It looks good now. A new config update plugin for existing configurations would be great 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants