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

Battle action and states fixes - Previous Albeleon 2.21 / 2.41 from battle 7 #1538

Merged
merged 7 commits into from Dec 11, 2018

Conversation

Projects
None yet
4 participants
@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Dec 8, 2018

A simpler reimplementation of Albeleon 2.21.

To test these, create a 1x 1+ turn battle event which does:

Cure provoke, berserk, death, shock
Show Choice:
  Death: Add dead
  Provoke: Add provoke
  Confuse: Add confuse
  Shock: Add shock
  Else:

To test the effects of multiple states, do the show choice twice.

To test state recovery, you can use the above event. You can also inflict states, and the have a very fast actor use a recovery item.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:battle_action branch from faea63d to f7071f9 Dec 8, 2018

Simplify animation logic - Part of abeleon 2.21
* When ally attacks enemy, we play animation
* When ally attacks ally, we play sound animation clipped to 20 frames.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:battle_action branch 3 times, most recently from a405566 to 053d063 Dec 8, 2018

@fmatthew5876 fmatthew5876 changed the title Battle action fixes - Previous Albeleon 2.21 from battle 7 Battle action and states fixes - Previous Albeleon 2.21 from battle 7 Dec 8, 2018

@fmatthew5876 fmatthew5876 changed the title Battle action and states fixes - Previous Albeleon 2.21 from battle 7 Battle action and states fixes - Previous Albeleon 2.21 / 2.41 from battle 7 Dec 8, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 8, 2018

This one is tested and ready. I have nothing more to add here.

@fdelapena fdelapena added the Battle label Dec 8, 2018

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

Show resolved Hide resolved src/scene_battle_rpg2k.cpp Outdated
Show resolved Hide resolved src/game_battlealgorithm.h Outdated
@Ghabry
Copy link
Member

Ghabry left a comment

fmatthew5876 added some commits Dec 8, 2018

Implement live move restrictions - Prevously Albeleon 2.21
* Before each turn:
    * If dead, remove the action
    * If can't act, replace with NoMove (including death)
    * If confused, replace with Normal attack same party
    * If berserk, replace with Normal attack enemy
Fix Game_Battler::GetSignificantRestriction()
Order of precedence
* NoMove
* AttackEnemy
* AttackAlly
* Normal
Fix state recovery
* When recovered from state, actor has NoMove
  for this round.
Fix skill state inflict regression
States to_hit calculation was inverted.
Use NoMove action for dead actors
Dead actors in 2k battle still have their AGI calculated
and get a turn. To see this, perform the following test:

* Actor1 AGI: 300
* Enemy1 AGI: 200
* Actor2 AGI: 100

* Set Enemy1 to always use an attack that inflicts confuse
  on all.
* Make Actor2 easily succeptible to confuse
* Make Turn 0 battle event that inflicts death on Actor2

Start Battle Actions:
* Turn0 kills actor2
* Actor1 use a revive item on actor2

What happens:
* Actor1 goes first, revivies actor2,
* Enemy1 uses confuse skill, Actor2 is confused
* Actor2 now randomly attacks ally <- Doesn't happen before this PR
2.41: If battler has no more items or runs out of SP -> NoMove
Add ActionIsPossible() method to battle algorithm. If false,
replace with NoMove.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:battle_action branch from 75d50ed to 10a9cf2 Dec 11, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 11, 2018

Addressed review comments. I'm not in favor of adding extra nullptr checks. If you call ProcessBattleActions() with nullptr its a bug and a crash is the best way to get attention. Not logging (likely ignored), and then returning and continuing in some wierd broken state.

@Ghabry

Ghabry approved these changes Dec 11, 2018

@Ghabry Ghabry merged commit ffdee3b into EasyRPG:master Dec 11, 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:battle_action 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.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.