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

Albeleon's Battle Fixes 7 of 7 #1452

Merged
merged 2 commits into from Dec 13, 2018

Conversation

Projects
None yet
6 participants
@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Oct 15, 2018

Changed:

  • 3.13 - Remove printing states logic. This is already done in earlier PR.
  • 2.21 - #1538
  • 2.41 - #1538

Dropped:

  • 3.18 - already implemented in #1487
@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Oct 15, 2018

For 2.42 part of the commit message says:

Solution: After doing several tests, aproximately the way it works is by varying the Agi for the
execution between (-10%, 10%), with 1 value more or less for each extreme (for example, if you
have two characters with Agility 10 and 8, the second one still has a few chances of going first).

@CherryDT

For the random agility modifier to determine who goes first. Do you agree with +- 10%?

@CherryDT

This comment has been minimized.

Copy link

CherryDT commented Oct 16, 2018

@fmatthew5876 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 reopened this Nov 5, 2018

@fmatthew5876 fmatthew5876 changed the title Albeleon's Battle Fixes 6 of N Albeleon's Battle Fixes 7 of N Nov 5, 2018

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:albeleon_battle_6 branch from 7e1351c to e6ed933 Nov 21, 2018

@fmatthew5876 fmatthew5876 changed the title Albeleon's Battle Fixes 7 of N Albeleon's Battle Fixes 6+7 of 7 Nov 21, 2018

@fmatthew5876 fmatthew5876 changed the title Albeleon's Battle Fixes 6+7 of 7 Albeleon's Battle Fixes 6+7 of 7 - Do Not Merge Nov 21, 2018

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:albeleon_battle_6 branch 4 times, most recently from dd56929 to 7a74b1d Nov 21, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Nov 21, 2018

I've rebased this onto #1450 and got it to compile.

@Ghabry Ghabry removed the Needs Rebase label Nov 21, 2018

@fmatthew5876 fmatthew5876 changed the title Albeleon's Battle Fixes 6+7 of 7 - Do Not Merge Albeleon's Battle Fixes 6+7 of 7 Nov 21, 2018

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:albeleon_battle_6 branch from 7a74b1d to 681d635 Nov 21, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Nov 26, 2018

FYI I have only rebased and gotten this to compile. Have not reviewed the changes yet.

@fmatthew5876 fmatthew5876 changed the title Albeleon's Battle Fixes 6+7 of 7 Albeleon's Battle Fixes 7+7 of 7 Nov 29, 2018

@fmatthew5876 fmatthew5876 changed the title Albeleon's Battle Fixes 7+7 of 7 Albeleon's Battle Fixes 7 of 7 Nov 29, 2018

@fmatthew5876 fmatthew5876 changed the title Albeleon's Battle Fixes 7 of 7 Albeleon's Battle Fixes 7 of 7 - DO NOT MERGE Nov 29, 2018

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:albeleon_battle_6 branch 2 times, most recently from a915ba5 to 093655b Dec 6, 2018

This was referenced Dec 7, 2018

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:albeleon_battle_6 branch 6 times, most recently from a7b5f6e to c4f7fbc Dec 8, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 8, 2018

I've hydra'd myself out again. These rest of these will need to wait for the other battle PRs before they can be reworked.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:albeleon_battle_6 branch from c4f7fbc to 64528f9 Dec 12, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 12, 2018

rebased to master

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:albeleon_battle_6 branch 2 times, most recently from 88cbdef to 2782e9d Dec 12, 2018

@fmatthew5876 fmatthew5876 changed the title Albeleon's Battle Fixes 7 of 7 - DO NOT MERGE Albeleon's Battle Fixes 7 of 7 Dec 13, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 13, 2018

I've reviewed and tested everything here.

I'm not convinced this animation state stuff belongs in Game_BattleAlgorithm. Animation states are very specific to 2k (almost non-existant) vs 2k3 (used a lot for actors, and not implemented yet).

I added a new commit to refactor the animation state stuff on the 2k side. Leaving 2k3 stuff alone.

I also tested and confirmed that when an enemy escapes or self destructs, you don't receive any EXP, GP, or items.

This is ready for review. With this and #1560 we're finally done with the Sormat battle PRs! 🥇

@@ -42,7 +43,8 @@ class Sprite_Battler : public Sprite {
AnimationState_WalkingLeft,
AnimationState_WalkingRight,
AnimationState_Victory,
AnimationState_Item
AnimationState_Item,
AnimationState_SelfDestruct

This comment has been minimized.

@Ghabry

Ghabry Dec 13, 2018

Member

Adding anything after Item feels misleading btw because this enum maps exactly to "Animation 2 -> Animation Type" in the RPG Maker 2003 editor and it is possible to have up to 32 different poses (for Items and Skills).

The 2k3 battle system will never read this SelfDestruct enum for actors but this shows that Sormat didn't notice where the enum values come from.

And yes, I know that I heavily abused this state stuff to inject "animations" for enemies 😜 (but at least they mapped to existing 2k3 anim stuff)

This comment has been minimized.

@fmatthew5876

fmatthew5876 Dec 13, 2018

Author Contributor

Shouldn't such an enum be in liblcf?

Custom patches could want to add more poses still...

Maybe this whole business on the 2k side needs to be a separate concept? In theory you could have an animating character also die or explode as they do in 2k.

This comment has been minimized.

@Ghabry

Ghabry Dec 13, 2018

Member

Shouldn't such an enum be in liblcf?

yes

That's not 2k business, this is monster business. For no reason they decided in 2k3 to keep the monsters static and only the party battlers can be animated. (there is "flying" but this only moves the static sprite up and down)

This comment has been minimized.

@fmatthew5876

fmatthew5876 Dec 13, 2018

Author Contributor

I moved SelfDestruct = 255, so it's out of the way of items.

Show resolved Hide resolved src/game_enemy.cpp

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:albeleon_battle_6 branch 2 times, most recently from 12eccf1 to f83917e Dec 13, 2018

Albeleon added some commits Jul 7, 2018

Refactor Monster animations in 2k battle (2.40)
* Adds self destruct animation (thanks to Sormat in 2.40)
* Moves self destruct and escape to happen after action is applied.
  Before they happened too early. You can see the bug by having the
  enemy state healed in the same round they escape/explode
Implement Enemy transparency; fix fadeout difference depending of ver…
…sion.

Problem: Enemy transparency isn't implemented. Death fadeout of an enemy in 2k is slower than in 2k3.

Solution:
 - Add GetTransparency in Game_Enemy so Sprite_Battler can check it. We replace the times 255 opacity is used (opaque) for the new function GetMaxOpacity, which gives 255 or 159 depending of the enemy's transparency.
 - For the fadeout increment, the enemy takes the same to disappear so the fadeout increment is adapted to the total opacity. So we create a variable for it that it's calculated "fade_out_incr".
 - We differentiate from each version and give in 2k a minor number percentage so it disappears slower.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:albeleon_battle_6 branch from f83917e to 6c7f195 Dec 13, 2018

@Ghabry

Ghabry approved these changes Dec 13, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 13, 2018

I've retested this after the rebase.

@carstene1ns carstene1ns merged commit 77b11d6 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:albeleon_battle_6 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.