Commit Graph

959 Commits

Author SHA1 Message Date
Bryan Bishop
2ff3478bfd fix a typo in the switch prompt test 2013-11-11 21:57:08 -06:00
Bryan Bishop
d9bb01f2c0 rename the switch prompt detector 2013-11-11 21:56:34 -06:00
Bryan Bishop
9f72be1a0f handle the yes/no prompt in the battle run loop 2013-11-11 21:54:06 -06:00
Bryan Bishop
993eaa3451 fix the is_switch_prompt test 2013-11-11 21:52:33 -06:00
Bryan Bishop
cc4c248167 add is_switch_prompt to the input poll detector 2013-11-11 21:52:12 -06:00
Bryan Bishop
ba6eb203b4 a test for detecting the yes/no prompt 2013-11-11 21:48:29 -06:00
Bryan Bishop
2801a3545f update docstrings about the switch prompt 2013-11-11 21:48:01 -06:00
Bryan Bishop
e61643e681 use set_battle_mon_hp in a test 2013-11-11 21:33:14 -06:00
Bryan Bishop
18449eea21 function to check if it's the yes/no prompt
This is the prompt that appears during battles for whether or not to
switch pokemon when the other trainer is sending something else out.
2013-11-11 21:27:28 -06:00
Bryan Bishop
4c6a904db1 a quick function to set pokemon hp in battle 2013-11-11 21:22:15 -06:00
Bryan Bishop
7b1be358d8 Merge pull request #48 from kanzure/various-readme-updates
README: update introduction to pokemontools
2013-11-11 18:45:52 -08:00
Bryan Bishop
ab1a60ef46 README: update introduction to pokemontools
The previous version of the README was leftover from when all of the
source code was just files inside of extras/ in the pokecrystal repo.
2013-11-11 20:40:28 -06:00
Bryan Bishop
fd10868994 version bump to: v1.6.0 2013-11-11 12:39:50 -06:00
Bryan Bishop
e0991710ef Merge branch 'github/master' into master 2013-11-11 12:38:52 -06:00
Bryan Bishop
fcfde94ba8 version bump to: v1.5.0 2013-11-11 12:38:17 -06:00
Bryan Bishop
a11b084a28 Merge pull request #39 from kanzure/vba-automation
More VBA automation
2013-11-11 10:36:33 -08:00
Bryan Bishop
966985411f detect the "mandatory switch" menu
This requires a slightly slower text_wait function. There is probably a
way to refactor that function in a way that doesn't cause cancer.
2013-11-11 00:55:54 -06:00
Bryan Bishop
1d9ecfa00f switch tests to use new battle starter 2013-11-11 00:04:32 -06:00
Bryan Bishop
9249ffd2d0 bootstrap the battle tests with more mons
Use the givepoke function to add a few more pokemon to the team before
starting the battle-related tests. There are some features of the battle
handling code that require more than one pokemon to be present in the
party.
2013-11-10 23:14:42 -06:00
Bryan Bishop
b94aaa3882 remove more dead code 2013-11-10 23:05:31 -06:00
Bryan Bishop
44ef6852f4 remove old functions 2013-11-10 22:49:19 -06:00
Bryan Bishop
0729ed3554 remove a dead function 2013-11-10 22:45:12 -06:00
Bryan Bishop
409eab1716 start_trainer_battle spawns a battle 2013-11-10 22:43:48 -06:00
Bryan Bishop
9bf214f963 simplify givepoke by using inject_script_into_rom 2013-11-10 19:56:03 -06:00
Bryan Bishop
9310699565 write script to ROM and execute
This handles all of the usual tasks that will be required for injecting
and running custom scripts.
2013-11-10 19:49:39 -06:00
Bryan Bishop
d1da18652d make givepoke work (h/t padz) 2013-11-10 17:53:06 -06:00
Bryan Bishop
bc30cd1e9a an attempt at givepoke 2013-11-10 17:38:55 -06:00
Bryan Bishop
4fab1088d9 function to start a battle by rocksmash
01:04 < padz> u cunt
2013-11-10 16:32:35 -06:00
Bryan Bishop
c76156f3f0 method to lower enemy hp during battle 2013-11-10 16:29:55 -06:00
Bryan Bishop
6b0d8ee855 implement call_script to call CallScript
This is the entry point for calling in-game scripts.
2013-11-10 16:29:23 -06:00
Bryan Bishop
b71fbf3852 write inject_asm_into_rom
This method injects asm straight into the ROM loaded in the emulator. It
does not overwrite the ROM on the file system.

This method is much slower than the wram version because it involves
copying memory multiples and copying the entire ROM into python and then
sending it back to the emulator.
2013-11-10 15:53:12 -06:00
Bryan Bishop
e700c37844 a working inject_asm implementation 2013-11-10 15:19:15 -06:00
Bryan Bishop
cab54cc723 crude attempt at injecting asm into wram 2013-11-10 15:04:31 -06:00
Bryan Bishop
8b637503a5 allow bank=0 in call() 2013-11-10 14:19:26 -06:00
Bryan Bishop
699ed8c6c1 fix a few call() calls 2013-11-10 14:18:54 -06:00
Bryan Bishop
b36e42494d stop writing 0x4000 everywhere 2013-11-10 14:13:20 -06:00
Bryan Bishop
271cce5319 make call() calculate bank addresses 2013-11-10 13:56:29 -06:00
Bryan Bishop
a6118071a0 broken attempt at calling givepoke 2013-11-10 13:53:24 -06:00
Bryan Bishop
5495504228 make sure an attack works (new test) 2013-11-09 17:57:23 -06:00
Bryan Bishop
982cff40af draw the menu in skip_until_input_required
Step forward 10 frames so that the menu actually draws. Otherwise the
user will probably be confused about the actual state of the battle.
2013-11-09 17:55:30 -06:00
Bryan Bishop
d5989b755a write another quick battle test 2013-11-09 15:59:16 -06:00
Bryan Bishop
eb31936aa7 simplify the battle tests 2013-11-09 15:53:17 -06:00
Bryan Bishop
3868fb1e06 simplify the vba-related tests
The imports for the emulator-related tests are now simplified in the
tests/ folder. The bootstrapping.py file contains some shared functions
that multiple test files might choose to use. Those functions probably
belong in the actual module instead of in tests/.

The battle-related tests have been separated from the other emulator
tests.
2013-11-09 15:45:03 -06:00
Bryan Bishop
54e2b189b8 Merge branch 'master' into vba-automation
Conflicts:
	pokemontools/vba/vba.py
2013-11-09 15:25:34 -06:00
Bryan Bishop
ff55a23ece Merge pull request #47 from kanzure/testing-fixups
Testing fixups
2013-11-09 13:23:04 -08:00
Bryan Bishop
8f0b06f22e fix an import in tests.py 2013-11-09 15:21:59 -06:00
Bryan Bishop
efd71a5cd3 fix some configuration in vba/vba.py 2013-11-09 15:21:43 -06:00
Bryan Bishop
b363e6cca0 fix a syntax error in battle.py 2013-11-09 15:18:55 -06:00
Bryan Bishop
8c7e2bcae7 Merge branch 'master' into vba-automation 2013-11-09 15:16:48 -06:00
Bryan Bishop
cc40339298 import Battle for testing 2013-11-09 15:16:34 -06:00