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

RM2K: Element Rate not working as intended for Ally-Targeting Heal Skills #2848

Open
KafroHudrep opened this issue Sep 23, 2022 · 3 comments

Comments

@KafroHudrep
Copy link

Name of the game: Ocean OI (https://tunditur-unda.itch.io/ocean-oi)

Player platform: Windows, tested on 0.7.0 and Continuous Build

Attach files: Ocean OI EasyRPG GitHub Issue.zip

Describe the issue in detail and how to reproduce it:

I was recently using EasyRPG Player to play the RPG Maker 2000 game Ocean OI, and the developer and I realized a discrepancy in the battle system between EasyRPG Player and the original RPG_RT.

Specifically, when using an ally-targeting healing skill with the Elemental Defense property for an Element checked (image 1) and the targeted party member with an Element Rate for said Element at 0% (image 2), the party member will be healed in EasyRPG Player (image 3) but will not be healed — as intended — using the RPG_RT (image 4).

issue

To reproduce this issue, start from the attached save file, choose "Journey onward..." to get into battle, and then use Ron's "Mandate" skill and let the result play out. (Pretty sure what the other party members do doesn't matter.)

@carstene1ns
Copy link
Member

Thank you for the detailed and good issue description! 👍

@Ghabry
Copy link
Member

Ghabry commented Oct 12, 2022

The problem is line 988 in Game_BattleAlgorithm:

const auto cur_sp = target->GetSp() - sp_cost;

The Sp are already removed from the battler when the action starts and this calculation substracts it again.

I guess the real intention is here to add the costs so the value is the one before the action started.

But the problem could be also something else. I have to compare it with the HP code which has a similiar logic.

@Tayruu
Copy link

Tayruu commented Oct 13, 2022

That doesn't appear to be quite the issue. What they're trying to create is a skill that restores SP to everyone but the user - hence the user is immune to the element of that restoration skill.

Is CalculateSkillCost combining the usage cost for SP with possible SP "damage" caused by the skill? Its naming format is different to CalculateSkillHpCost, which makes me wonder.

Or I'm misunderstanding your post, as "cost" in Game_BattleAlgorithm appears to be the damage result, rather than the "skill cost".

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

No branches or pull requests

4 participants