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

AbilityPartSwap #42

Open
FredericDesgreniers opened this issue Jul 28, 2017 · 1 comment
Open

AbilityPartSwap #42

FredericDesgreniers opened this issue Jul 28, 2017 · 1 comment

Comments

@FredericDesgreniers
Copy link
Collaborator

swap:[target:source]:[target:destination]
• swap one pokemon from source with one pokemon from target. swapping
an active pokemon to the bench removes all status effects.

Get targets using owner.getTarget(targetBoard, target) (here target is either source or destination)

@laihaotao
Copy link
Owner

 public boolean use(GameBoard targetBoard, Player owner) {
        PokemonCard p1 = (PokemonCard) owner.getTarget(targetBoard, source);
        PokemonCard p2 = (PokemonCard) owner.getTarget(targetBoard, destination);
        // remove all status effects
        p1.setEffect(p1.getEffect().remove());
        SpecialAbility.swapCardPos(p1, p2);
        return true;
    }

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

No branches or pull requests

2 participants