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

Correct battle turn order in rpg2k battle - previously Albeleon 2.42 #1519

Merged
merged 2 commits into from Dec 5, 2018

Conversation

Projects
None yet
4 participants
@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Dec 2, 2018

From Cherry:

RPG_RT defines something like a "battle agility" for each turn which is AGI+X. X is a random number below (AGI/4 + 3). However, if the attack is a basic attack with a weapon that has the "Start with Initiative" checkbox, this puts it into a class of its own which follows the same rules but can rival only other attacks with such weapons (I think this is done by simply adding a huge number like 100000 to the value in such a case). The turn order is then decided by this "battle agility", high to low.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:turn_count branch from 0c67c81 to d19994f Dec 2, 2018

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:turn_count branch from d19994f to 6d022ed Dec 2, 2018

Add Game_BattleAlgorithm::Type
* Adds non-virtual type query.
* Used for many battle commits
* Idiom we use in other places
* Can allow de-virtualiation

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:turn_count branch from 6d022ed to 1c559f2 Dec 2, 2018

@fdelapena fdelapena added the Battle label Dec 2, 2018

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

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 2, 2018

I've tested this and confirmed the behavior matches RPG_RT

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Dec 3, 2018

This technique for "::Type" propagation through the base constructor is pretty neat btw.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:turn_count branch from 1c559f2 to da2b6f2 Dec 3, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 3, 2018

This technique for "::Type" propagation through the base constructor is pretty neat btw.

This commit is from battle 5. I like this approach because you can make GetType() non-virtual and optimize a lot of usage.

I've added the requested comment.

@Ghabry

Ghabry approved these changes Dec 3, 2018

Show resolved Hide resolved src/scene_battle_rpg2k.cpp Outdated
Correct battle turn order in rpg2k battle
* Previously albeleon 2.42 with fixes
* Correct random calculation
* Support weapons with pre-emptive (only for attacks)

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:turn_count branch from da2b6f2 to c9c0b9f Dec 4, 2018

@Ghabry Ghabry merged commit 3a9126c into EasyRPG:master Dec 5, 2018

6 checks passed

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

@fmatthew5876 fmatthew5876 deleted the fmatthew5876:turn_count branch Dec 6, 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.