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

Relic stats mod support #533

Closed
wants to merge 7 commits into from

Conversation

wang429
Copy link
Collaborator

@wang429 wang429 commented Oct 10, 2020

Supports Relic Stats Mod by ForgottenArbiter/Quincunx
Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2118491069
GitHub: https://github.com/ForgottenArbiter/StsRelicStats

Relics with stats:

  • Alchemist's Fire: Burning retained because falloff rate was reduced
  • Grimoire (relic): Amount healed
  • Metronome: Manifest reduced
  • Mind Glass: Damage dealt and number of times player gains ten clarities in a single combat

Feel free to comment on other useful stats from other existing relics.

Copy link
Collaborator

@acourrau acourrau left a comment

Choose a reason for hiding this comment

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

Great work! This is very cool, and we can definitely add more things to this going forward.

Left a few comments inline.

@@ -53,6 +55,9 @@ public void update() {
AbstractPower p = this.target.getPower(BurningPower.POWER_ID);
if (p != null) {
p.amount = BurningUtils.calculateNextBurningAmount(source, p.amount);
if(source != null && source.isPlayer && ((AbstractPlayer) source).hasRelic(AlchemistsFireRelic.ID)) {
((AlchemistsFireRelic) ((AbstractPlayer) source).getRelic(AlchemistsFireRelic.ID)).updateStats(p.amount);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is increasing the relics counter by the correct amount. This increases it by the amount of burning currently on enemies, rather than the difference in reduced burning.

10 burning without relic goes to 6
10 burning with relic goes to 9
This = a saving of 3 burning. Relic displays 9.

Should be simple enough to calculate the difference when increasing the counter amount.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch.

1,
true));
}
PreAoeDamageStatsAction preAoeDamageStatsAction = new PreAoeDamageStatsAction();
AbstractDungeon.actionManager.addToBottom(preAoeDamageStatsAction);
AbstractDungeon.actionManager.addToBottom(
new DamageAllEnemiesAction(
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this damage kills all the enemies and ends the fight, the relic stats don't get updated properly. I think this might just need one of the calls below to be made in a different order or in a different spot.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought I checked this scenario. It should be.... Guess I'll take a look at this again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, there's a bug with the console command clarify all that doesn't trigger the MindGlassPower. Makes for testing this harder than expected.

So far, I haven't seen the 3 damage to all update incorrectly. This should basically be the same as what the RelicMod does. Could you show a scenario where you got that?

I'll keep looking into the 100 damage

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

100 damage doesn't work quite right with Arcane Form and memory clarify all. filed #549

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

well, there's an issue where it's not adding the "times 100 clarities correctly"

Copy link
Collaborator

@acourrau acourrau Nov 1, 2020

Choose a reason for hiding this comment

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

It's a pain, but use the dev console to do:

memory clarify stsjorbsmod:.....
memory clarify stsjorbsmod:.....
memory clarify stsjorbsmod:.....

And if that damage kills all enemies it doesnt appear the count gets updated, for the 100 damage amount. The 3 damage one appears to work fine.

float amountHealed = (float) stats.get(STAT_AMOUNT_HEALED);
return new StringBuilder()
.append(getStatsDescription())
.append(String.format(STAT_PER_TURN, STATS_FORMAT.format(amountHealed / Math.max(totalTurns, 1))))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seeing some oddities with the totalTurns and totalCombats counts. They're far higher than I expected and I think they're skewing the stats.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure what I can do about totalTurns and totalCombats here. These are coming from the stats mod.

Copy link
Collaborator

Choose a reason for hiding this comment

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

No problem then, just worth mentioning.

@acourrau
Copy link
Collaborator

acourrau commented Nov 2, 2020

@wang429 should this be closed in favor of #558 ?

@wang429
Copy link
Collaborator Author

wang429 commented Nov 3, 2020

Closing in favor of #558

@wang429 wang429 closed this Nov 3, 2020
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