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

More battle states fixes + Defend #1560

Merged
merged 6 commits into from Dec 13, 2018

Conversation

Projects
None yet
5 participants
@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Dec 12, 2018

I've tested 2.36. It looks good with no changes:

  • State inflicted when you already have the state - success, already has msg
  • State inflicted when you aready have the state, even when your state rate is E (0%) - success, already has msg
  • State infliced when you don't have the state - sucess, state inflicted
  • State inflict attempt missed - failure
  • Heal state when you have state - success, was healed
  • Heal state failure when you have state - failure
  • Heal state you don't have - failure

@fdelapena fdelapena added the Battle label Dec 12, 2018

@fdelapena fdelapena added this to the 0.6.0 (likely) milestone Dec 12, 2018

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:states_fixes branch 2 times, most recently from e9a7a1f to 6243157 Dec 12, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 12, 2018

I tested 3.13

  • Target has state with p=59 and gets p=50 inflicted -> success, p=50 state added
  • Target has state with p=60 and gets p=50 inflicted -> failure

@fmatthew5876 fmatthew5876 changed the title More battle states fixes More battle states fixes + Defend Dec 12, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 12, 2018

I tested 3.15 with the following setup:

  • 2 fast enemies, with an attack which causes exactly 20 damage and inflicts a state
  • Round 1 choose Defend action
  • First enemy causes 10 damage and inflicts state
  • Second enemy causes 20 damage due to state infliction
  • Actor's turn (attack enemy, ally, or no move)

Tested with confuse, provoke, and stun.

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 12, 2018

Commit after 3.15 needed for a special case.

  • Actor1 chooses Defend
  • Enemy1 damages and inflicts sleep on Actor1 - half damage from defend
  • Enemy2 attacks Actor1 - normal damage, wake up from sleep
  • Enemy3 attacks Actor1 - normal damage
  • Actor1's turn, does nothing.
@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 12, 2018

This one is finished. Ready for review.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:states_fixes branch from d39153c to c616c01 Dec 12, 2018

@Ghabry Ghabry added the Needs Rebase label Dec 12, 2018

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:states_fixes branch from c616c01 to 4b7666b Dec 12, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 12, 2018

rebased to master

@Ghabry

Ghabry approved these changes Dec 12, 2018

Copy link
Member

Ghabry left a comment

Show resolved Hide resolved src/game_battler.h Outdated
Show resolved Hide resolved src/game_battlealgorithm.cpp
Show resolved Hide resolved src/game_battlealgorithm.cpp

@Ghabry Ghabry removed the Needs Rebase label Dec 12, 2018

"2.36: RM2000: If a skill causes a state that the target already has,…
… it doesn't try to do the to_hit condition chance, it always shows the "already" message. If a skill cures a state that the target doesn't have, it's not included in the "condition" list (the skill could miss)."

Solution: Before it checks randomly if the attack missed or not, it checks whether the character is already in that state. If it is, then push in conditions inmediately. The same way, if the skill is positive but the target doesn't have the skill, it misses the to_hit chance to skip to the next condition as if it failed.

We also remove the condition that a healing condition doesn't need to do the to_hit rate check. It needs to.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:states_fixes branch from 4b7666b to ac582f9 Dec 12, 2018

Show resolved Hide resolved src/game_battlealgorithm.cpp Outdated

fmatthew5876 added some commits Dec 12, 2018

"3.13: RM2000 + RM2003: Filter conditions to be infliced by priority
Filter conditions to be infliced by significant condition priority.
If no conditions remain, the skill fails.
3.15 - Fixes for Defend command
* Defend starts at the beginning of the battle round, regardless
  of when the actor gets a turn
* Defend status is canceled if a state restriction is applied.
Fix edge cases with state and SP recovery
* Defend is cleared when restriction is inflicted and it doesn't come
  back. We do this by checking for battle algorithm replacements
  for all battlers every turn.
* If SP is lost and then recovered before the actor has their turn,
  they will do their original action.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:states_fixes branch from ac582f9 to 2027903 Dec 13, 2018

@Ghabry Ghabry merged commit baef342 into EasyRPG:master Dec 13, 2018

7 checks passed

Android (armeabi-v7a) Build finished.
Details
GNU/Linux Build finished.
Details
OSX Build finished.
Details
Wii (SDL1) Build finished.
Details
Windows (x64) Build finished.
Details
Windows (x86) Build finished.
Details
web Build finished.
Details

@fmatthew5876 fmatthew5876 deleted the fmatthew5876:states_fixes branch Dec 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.