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

Add Pokeball animations #734

Closed

Conversation

Machinocheese
Copy link
Contributor

@Machinocheese Machinocheese commented May 2, 2018

Summary

It adds the animation to throw Pokeballs.

Note: My alignments aren't pixel perfect and my timing isn't necessarily down to the millisecond. I eyeballed them and left them when I felt they were good.

Fixes #733

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty close to completion?

/**
* Uses an item.
*/
export class Item<TGameStartr extends FullScreenPokemon> extends GeneralComponent<TGameStartr> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's confusing to me how this is called Item but refers to the animation (Move is also confusing, but I can fix that later). Let's rename it to ItemAnimation.

this.teamAndAction = teamAndAction;
this.item = item;

const battleInfo: IBattleInfo = gameStarter.battleMover.getBattleInfo() as IBattleInfo;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once this PR goes in, please file a followup issue to consolidate this class with the Move class. Not your responsibility, but it'll be good code cleanup.

IMO there should be one general class used for both.

*/
public makeBattleBall(): IBattleBall {
let probability = 0;
if (this.item === "Poke") { //should this be Poke?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip: use an object of type { [i: string]: number } so you don't have to have multiple if/elses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants