Commit Graph

848 Commits

Author SHA1 Message Date
Bryan Bishop
54579ad699 make skippable decorator not always save state
There are some runs where the "skippable" decorator should not save the
state of the game before and after, like if the function is given
different parameters and the after state should not be the canonical
after state.
2013-09-22 11:38:35 -05:00
Bryan Bishop
d0b0b9c5f2 only heal if HP is low or move1 PP is low 2013-09-22 11:12:38 -05:00
Bryan Bishop
6a1fc60771 better IsInBattle detection for level grinding 2013-09-22 10:55:44 -05:00
Bryan Bishop
a4c418bc7a fix some func calls in the auto level grinder 2013-09-22 10:50:21 -05:00
Bryan Bishop
c1fbb59696 a test for moving in circles
Well, it's more like a square.
2013-09-22 10:21:09 -05:00
Bryan Bishop
13a1da5e84 remove vba.shutdown() from another test 2013-09-22 10:14:17 -05:00
Bryan Bishop
1d92396ca9 reduce some duplicated code inside some tests
Those movement checks are now collapsed into a single function that each
test can individually call.
2013-09-22 10:10:46 -05:00
Bryan Bishop
3151acd42c remove unnecessary emulator shutdown 2013-09-22 02:58:25 -05:00
Bryan Bishop
840e447557 change the walk test after Elm's Lab
The walk test is useful to see if the player is able to move, but it
shouldn't walk down and out of the building because the test is
comparing against the MapNumber for Elm's Lab and not New Bark Town.
2013-09-22 02:55:08 -05:00
Bryan Bishop
742bdf8c2f test that the Elm's Lab sequence works 2013-09-22 02:48:41 -05:00
Bryan Bishop
50997c8b38 get rid of a text_wait when talking to Elm 2013-09-22 02:48:26 -05:00
Bryan Bishop
a04f6ceb4b fix cyndaquil selection in Elm's Lab 2013-09-22 02:46:40 -05:00
Bryan Bishop
7d3994ae75 test that the current map is correct 2013-09-22 02:33:02 -05:00
Bryan Bishop
57dc8c4fd0 add more defaults to setup_wram for testing
This is sorta absurd, it should just load these values by parsing
wram.asm on its own.
2013-09-22 02:27:57 -05:00
Bryan Bishop
3e0a674817 test the walk_into_new_bark_town vba method 2013-09-22 02:21:08 -05:00
Bryan Bishop
80cda61ec4 test autoplayer handle_mom 2013-09-22 02:17:02 -05:00
Bryan Bishop
912efe7fd0 make SpeedRunner.setup use the right config ref 2013-09-22 02:12:11 -05:00
Bryan Bishop
ffad17245b remove old jython comments from the vba tests 2013-09-22 02:07:43 -05:00
Bryan Bishop
f52f6148d7 combine some tests together 2013-09-22 02:06:38 -05:00
Bryan Bishop
5aa423ee62 make the vba tests pass 2013-09-22 01:55:26 -05:00
Bryan Bishop
a3bab14b26 weird, why was there no shutdown command? 2013-09-22 01:28:06 -05:00
Bryan Bishop
bf20b9982b save_state_path is only on self.config 2013-09-22 01:12:55 -05:00
Bryan Bishop
81504f3401 load_state was called on the wrong object 2013-09-22 01:11:53 -05:00
Bryan Bishop
7bfbadc568 implement a vba helper func for state loading
This re-implements the load_state method that previously existed. I
forget why it was removed, but basically a similar function is needed
again, and it doesn't entirely belong in the emulator or in the emulator
wrapper because these save states are game-specific.
2013-09-22 01:10:46 -05:00
Bryan Bishop
f83fc26b49 fix skippable decorator emulator state setter 2013-09-22 01:04:16 -05:00
Bryan Bishop
2614df2587 use the state property during test bootstrapping 2013-09-22 01:02:56 -05:00
Bryan Bishop
8e0a4f9229 use self.registers in text_wait 2013-09-22 01:01:03 -05:00
Bryan Bishop
6568c299fd fix how autoplayer calls hold/press on buttons 2013-09-22 00:59:19 -05:00
Bryan Bishop
dc63d8d51d re-implement save_state
This can be used to dump state to a file based on the current
configuration of the running instance.
2013-09-22 00:49:44 -05:00
Bryan Bishop
6b56969ccf make vba.crystal accept config 2013-09-22 00:44:35 -05:00
Bryan Bishop
c44ab9b556 make the skippable decorator use config
Use the pokemontools configuration to determine where to save the save
states.
2013-09-22 00:28:43 -05:00
Bryan Bishop
713c4ceb77 fix the autoplayer bootstrapper for test_vba.py 2013-09-22 00:10:07 -05:00
Bryan Bishop
d0c53213c4 make the vba autoplayer use the new methods 2013-09-21 23:54:55 -05:00
Bryan Bishop
f0e75972a1 move tests into test_vba.py
They didn't belong in pokemontools/vba/vba.py in the first place.
2013-09-21 23:14:58 -05:00
Bryan Bishop
2a439694d6 combine some vba tests 2013-09-21 23:12:38 -05:00
Bryan Bishop
e3a596e7d8 fix a vba.py test (test_PlaceString) 2013-09-21 22:12:37 -05:00
Bryan Bishop
8869210062 Merge branch 'master' into vba-automation 2013-09-21 21:59:44 -05:00
Bryan Bishop
82fb73edc3 version bump to: v1.4.1
The previous version was uploaded with .swp files and a large libvba.so
that was in my working directory. I regret everything.
v1.4.1
2013-09-21 21:45:51 -05:00
Bryan Bishop
480593e472 also exclude .*.swp files 2013-09-21 21:39:51 -05:00
Bryan Bishop
0da95fe05f version bump to: v1.4.0 v1.4.0 2013-09-21 21:37:07 -05:00
Bryan Bishop
4b69463fb2 Merge pull request #35 from kanzure/include-everything
Include all pokemontools/ files in installs
2013-09-21 19:33:23 -07:00
Bryan Bishop
8caeec66b9 include all pokemontools/ files in installs 2013-09-21 21:32:29 -05:00
Bryan Bishop
7fdf53f162 switch vba.crystal to have instance methods 2013-09-21 21:24:38 -05:00
Bryan Bishop
8ca4bcf37e remove get_memory_range 2013-09-21 19:45:35 -05:00
Bryan Bishop
b1c34e88d5 move call into vba.crystal 2013-09-21 19:41:41 -05:00
Bryan Bishop
2f9df7133f move get_stack into vba.crystal 2013-09-21 19:34:46 -05:00
Bryan Bishop
fc3b2ded89 pass vba and registers into get_stack 2013-09-21 19:32:15 -05:00
Bryan Bishop
975eb02175 pass vba and registers into call() 2013-09-21 19:31:44 -05:00
Bryan Bishop
7f5151989b pass vba into get_memory_range 2013-09-21 19:29:52 -05:00
Bryan Bishop
55a436a144 fix some memory manipulation to use vba_wrapper 2013-09-21 16:07:51 -05:00