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

Detect trapping abilities #16

Closed
taylorhansen opened this issue Mar 8, 2019 · 1 comment
Closed

Detect trapping abilities #16

taylorhansen opened this issue Mar 8, 2019 · 1 comment
Assignees
Labels
enhancement Something should be changed

Comments

@taylorhansen
Copy link
Owner

taylorhansen commented Mar 8, 2019

Adding onto #5, which should be implemented first before this is considered.

When a |callback|trapped|0 message is encountered, this usually means that the opponent's pokemon has a trapping ability (there are only three so this can be hardcoded for now). The Battle instance should call a method in its EventProcessor field to store that data in the BattleState.

@taylorhansen taylorhansen self-assigned this Mar 12, 2019
@taylorhansen taylorhansen moved this from To do to In progress in State Tracker (gen4) Mar 22, 2019
@taylorhansen taylorhansen added the enhancement Something should be changed label Mar 22, 2019
@taylorhansen
Copy link
Owner Author

taylorhansen commented Mar 23, 2019

Some other things to consider:

If the client's pokemon has a conditional trapping ability, and the opponent still switches out, then that means the opponent doesn't satisfy the ability's condition.

Trapping conditions can also be bypassed by holding a Shed Shell item, self-switching, or being phased, so these should be possibilities as well.

(Above is too complicated to track currently. May be revisited later).

In order to properly track grounded for the Arena Trap ability, #18 also has to be implemented first.

State Tracker (gen4) automation moved this from In progress to Done Apr 7, 2019
taylorhansen added a commit that referenced this issue Apr 7, 2019
Close #16.

Narrow possible abilities if a |callback|trapped message was received.

Re-decide if new info is found after a rejected choice.

Move postAction() call to body of acceptChoice(). This should prevent
possible state changes from inappropriately affecting the state before
the AI's choice has been accepted (can be rejected from things like
Arena Trap).

Close #25 due to above.

Add and modify tests.
taylorhansen added a commit that referenced this issue Apr 7, 2019
Close #16.

Narrow possible abilities if a |callback|trapped message was received.

Re-decide if new info is found after a rejected choice.

Move postAction() call to body of acceptChoice(). This should prevent
possible state changes from inappropriately affecting the state before
the AI's choice has been accepted (can be rejected from things like
Arena Trap).

Add and modify tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something should be changed
Projects
No open projects
Development

No branches or pull requests

1 participant