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

Implement dual attack and dual weapons + attack all fix #1540

Merged
merged 7 commits into from Dec 12, 2018

Conversation

Projects
None yet
5 participants
@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Dec 8, 2018

No description provided.

@fdelapena fdelapena added the Battle label Dec 8, 2018

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

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:battle_dual branch 4 times, most recently from 19fe4a5 to e62eb33 Dec 8, 2018

@fmatthew5876 fmatthew5876 changed the title Implement dual attack Implement dual attack and dual weapons Dec 8, 2018

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:battle_dual branch 2 times, most recently from 5e60129 to b2bb759 Dec 8, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 8, 2018

Things I need to verify:

  • Attack damage heals state (like confuse), weapon inflicts same state
    • State is inflicted
  • Weapon1 inflicts, Weapon2 heals
    • No state
  • Weapon1 heals, Weapon2 heals
    • State is inflicted

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:battle_dual branch from b2bb759 to 33b412e Dec 8, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 8, 2018

I've tested all the state behavior and it matches RPG_RT. Now this really is ready.

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:battle_dual branch from 33b412e to ef25922 Dec 9, 2018

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:battle_dual branch 2 times, most recently from 1151aa1 to 2ba03a8 Dec 10, 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:battle_dual branch from 2ba03a8 to e947da9 Dec 12, 2018

@fmatthew5876 fmatthew5876 changed the title Implement dual attack and dual weapons Implement dual attack and dual weapons + attack all fix Dec 12, 2018

random_target = Main_Data::game_enemyparty->GetRandomActiveBattler();
}

// ToDo: Auto battle logic is dumb

This comment has been minimized.

@Ghabry

Ghabry Dec 12, 2018

Member

What I meant with "logic is dumb" is that the RPG_RT auto battle can also invoke skills.
Though I'm not a fan of auto battle wasting magic.

This comment has been minimized.

@fmatthew5876

fmatthew5876 Dec 12, 2018

Author Contributor

For the auto battle command it's a matter of debate. For actors with auto battle set, they should use skills.

@Ghabry
Copy link
Member

Ghabry left a comment

looks good, just playing around now

const RPG::Animation* GetSecondAnimation() const;

/**
* Checks if the animation has already played once

This comment has been minimized.

@Ghabry

Ghabry Dec 12, 2018

Member

That's a typical Albeleon lack-of-space doc-comment

This comment has been minimized.

@Ghabry

Ghabry Dec 12, 2018

Member

With lack-of-space I meant that there is a single space missing before the * for all lines except the first, Albeleon did this the whole time.

Show resolved Hide resolved src/game_battlealgorithm.h Outdated

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:battle_dual branch from 26d538a to 43962c8 Dec 12, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 12, 2018

comments fixed

Albeleon and others added some commits Jul 6, 2018

"2.24: RM2000 + RM2003: Implement dual attack
* Add SetRepeat() to AlgorithmBase, to repeat action on target.
* Call SetRepeat(2) for cases where Normal is a dual attack
"3.19: RM2000: Implement Dual Wield damage animation
 - To print a second animation right after the first, we create four functions: GetSecondAnimation, PlaySecondAnimation, HasAnimationPlayed and HasSecondAnimationPlayed. The two first ones are a clone of the others for a second animation. HasAnimationPlayed returns true if PlayAnimation has been executed, and the same for the other one.
 - In Scene_Battle_Rpg2k, after the animation is over, we check whether the first animation has been played and there is a second animation loaded that hasn't been played, and execute in that case. This way, it detects whether there is second animation or not, and executes it or ignores it depending of the case.
Implement attributes for dual weapons
Uses union of all attributes on each weapon.
Implement state infliction for dual weapons
* Tries state probability for weapon1 and then
  if not inflicted try weapon2.
* If weapon1 inflicts and weapon2 heals -> heal
* If weapon1 heals and weapon2 inflicts -> inflict
* If target healed by physical damage and then weapon
  inflicts -> inflict

@fmatthew5876 fmatthew5876 force-pushed the fmatthew5876:battle_dual branch from 43962c8 to 3d0b153 Dec 12, 2018

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Dec 12, 2018

Well, the animations are not playing at the same time as in RPG_RT but after each other. Is that okay for now?

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Dec 12, 2018

Okay this is a bit obscure, in Unterwegs in Düsterburg I get two animations in RPG_RT but in other games I get both animations interleaved. Can be investigated later.

@Ghabry

Ghabry approved these changes Dec 12, 2018

@Ghabry Ghabry merged commit 89379d2 into EasyRPG:master Dec 12, 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_dual 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.