-
Notifications
You must be signed in to change notification settings - Fork 197
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
Albeleon's Battle Fixes 2 of N #1448
Conversation
619130e
to
87324b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one causes a regression. When you kill the last enemy in a battle they don't fade out.
nevermind this, looks like its related to the midi hang glitch.
87324b3
to
6711470
Compare
I've reviewed and did some basic testing of these. Other than the ones with comments on the commits, LGTM 👍 |
b8f9d95
to
97fd233
Compare
5d858bf
to
2c16b25
Compare
2c16b25
to
8424c49
Compare
Rebased onto master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done with reviewing
X = Actor|Enemy.critical_hit ? 100 / Actor|Enemy.critical_hit_chance : 0 Then, X is the chance in percent. If the target is a friend and not a foe (can happen with confusion for example), the crit chance is always zero. If the target has an equipped item with Item.prevent_critical, the chance is zero as well. Also, note that a critical hit does not stack with concentration. Concentration makes the attack x2, critical makes it x3, both together also make x3 and not x6. |
2be1a2d
to
8066e1c
Compare
…lly fails ignoring whether it has some conditions/states to cause." Solution: If a negative absorb skill fails, it skips the rest of the "Execute". We also delete that Absorb SP code at the end. That code, if it's an absorb skill that doesn't absorb SP, and the enemy has 0 SP, it makes the skill miss; which is not true.
…nd unless the "Dodge technique" message is the same as the "physical miss"." Solution: Override GetResultSe with Skill, so: if the attack fails and it's not the failure message 3 (the physical one), it returns NULL (no sound). Otherwise, it does AlgorithmBase::GetResultSe.
…BattleActionState doesn't advance, it keeps paused." Solution: After battle_action_wait has finished, we put an Input that returns false if CANCEL is pressed.
"2.6: RM2000 (issue EasyRPG#1102 ): When an enemy dies, a message should be displayed right after the attack inside the same message." "3.7: RM2000: If an enemy dies with an attack that takes away many stats HP included (or puts conditions), the enemy should die right after the HP damage is done, and the other messages are ignored. This also includes absorb attacks." Solution: We push that messages after the damage if the enemy is dead, and it skips the rest of result messages.
…hould be black." Solution: Override Scene::DrawBackground and CleanDisplay.
…reduce the item count or SP once. Check too if a weapon that decreases SP reduces when it hits double, everyone or misses." Solution: For reducing items or skill cost, all of them should be inside "if(FirstAttack())".
…, the armor state resistance should be also taken. If there are many armors with state protection of the same type, only the one with the most resistance will be taken, they don't stack." Solution: In Game_Actor::GetStateProbability, check all the armor, see if they resist the current state, and if they do, save the resistance percentage. It will only take the most resistent. After that, it is multiplied to the result and divided by 100.
…s Restriction NoMove and has a 0% chance of recovery (the physical recovery doesn't matter), it's a game over." Solution: In CheckLose, in case there is a member active, it checks for each active member whether they are in a state with Restriction NoMove and 0% recovery. If the number of members like that are the same as the active members, it's game over.
Solution: In GetResultMessages, only summon AlgorithmBase if the attack is a success.
…hrown if the character's weapons (one or two) have all the attributes." Solution: Check if it has at least one weapon, an that weapon has that particular physical attribute. If one is missing for that technique, it cannot use it.
…mber." Solution: Ceil the result of the Half Cost SP for the instances where it's divided.
…d increase the rate for 1 (at most). This can be combined with Shift attribute." Solution: Add in Game_Actor::GetAttributeModifier a check for all the protections. If it protects against that element, increase rate (only once).
…hat despite being "Persist after battle", still have more than 0% chance of recovery (turns and physical recovery don't matter)." Solution: Put that condition in RemoveBattleStates, which removes states when the battle is over.
…e waiting time fast-forwards." Solution: If DECISION is pressed in ProcessBattleAction, it goes twice as fast - it reduces "battle_wait_action" by another unity. To avoid that "if (battle_wait_action)" doesn't detect -1 if that's the case, we change it to "if (battle_wait_action > 0)".
Solution: Add an "If".
8066e1c
to
7006d47
Compare
Thanks Cherry, I'll review criticals in full in the other PR. What is the base crit chance for enemies? For enemy, crit is only possible for normal attack and double attack yes? |
For enemies and actors it's the same thing, it's stored in critical_hit/critical_hit_chance in the Actor/Enemy structure in the LDB. In general, crit is only possible for normal physical attacks (double attack is just two physical attacks one after another, which have their individual damage/crit/miss calculation) |
@@ -1127,6 +1127,10 @@ const RPG::Sound* Game_BattleAlgorithm::Skill::GetStartSe() const { | |||
} | |||
} | |||
|
|||
const RPG::Sound* Game_BattleAlgorithm::Skill::GetResultSe() const { | |||
return !success && skill.failure_message != 3 ? NULL : AlgorithmBase::GetResultSe(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This magic number should probably be resolved to some SkillFailureMessage_Physical
in the future.
Problem: Attack that hit all enemies also hits a hidden character. Solution: In IsTargetValid(), use Exists()
7006d47
to
d8445c4
Compare
More of the smaller commits from #1373.
Depends on #1447
Changes:
weapon
local variable toitem
.Dropped:
Fixes #1102.
Fixes #1392.