@echo off

title openpoke

@echo WScript.Echo Eval(WScript.Arguments(0))> eval.vbs

setlocal enabledelayedexpansion enableextensions

:mainmenu

echo Welcome to openpoke^^! Create team or battle? If you haven't created any pokemon or teams, you can still battle with the default teams.

set /p choice=(team build, battle, quit)...

if "%choice%"=="battle" goto getteams

if "%choice%"=="team build" goto teambuildint

if "%choice%"=="quit" goto eol

if "%choice%"=="help" call :helpmovedictionary

echo Invalid choice.

goto mainmenu

:teambuildint

set skiptoedit=0

echo Welcome to teambuilder^^! Pokemon and teams can be created and saved here. You can only make teams using pokemon that you have already created. Pokemon and teams are saved to an external .bat, pokelist.bat. Removing this file from the same folder as openpoke.bat will result in not being able to access your previously saved pokemon or teams.

:teambuild

set "choice=edit team"

if not %skiptoedit%==1 set /p choice=(add poke, add team, edit team, return)...

if "%choice%"=="return" goto mainmenu

if not %skiptoedit%==1 if "%choice%"=="edit team" set /p n=Team name?

if "%choice%"=="edit team" (

call pokelist.bat

for %%x in (1 2 3 4 5 6) do (

if "!%n%poke%%x!"=="" (

echo Team %n% does not exist.

goto teambuild

)

echo %n% pokemon %%x: !%n%poke%%x!

)

set /p s="Switch which pokemon? (return)... "

if !s!==return (

set skiptoedit=0

goto teambuild

)

for %%x in (1 2 3 4 5 6) do (

if "!s!"=="!%n%poke%%x!" (

set /p w=Switch !s! for which pokemon?

@echo set %n%poke%%x=!w!>> pokelist.bat

echo !s! has been switched with !w! on team %n%.

set skiptoedit=1

goto teambuild

)

)

echo !s! is not on team %n%.

goto teambuild

)

set skiptoedit=0

if "%choice%"=="add team" (

echo Neither team name nor trainer name should have spaces.

set /p name=Team name?

set /p trainer=Team trainer?

@echo set !name!trainer=!trainer!>> pokelist.bat

set /p num=Number of pokemon on the team?

@echo set !name!pokes=!num!>> pokelist.bat

if !name!==return goto teambuild

for %%x in (1 2 3 4 5 6) do (

if not %%x GTR !num! set /p p%%x=Pokemon %%x ID?

)

for %%x in (1 2 3 4 5 6) do (

if not %%x GTR !num! @echo set !name!poke%%x=!p%%x!>> pokelist.bat

if %%x GTR !num! @echo set !name!poke%%x=blank_%%x>> pokelist.bat

)

echo Team !name! has been added to the pokelist and can now be battled with. Teams are saved by openpoke in pokelist.bat.

goto teambuild

)

if "%choice%"=="add poke" (

set /p id=Pokemon ID? This is a unique that will be used to call this specific pokemon from pokelist.bat. No two saved pokemon should have the same ID. The ID should not have spaces.

if !id!==return goto teambuild

set /p spe=Species?

if !spe!==return goto teambuild

@echo set !id!species=!spe!>> pokelist.bat

set /p lvl=Level?

if !lvl!==return goto teambuild

@echo set !id!lvl=!lvl!>> pokelist.bat

for %%x in (1 2 3 4) do (

set /p m%%x=Move %%x?

)

for %%x in (1 2 3 4) do (

@echo set !id!m%%x=!m%%x!>> pokelist.bat

)

echo !id! has been added to the pokelist^^! Add it to a team to battle with it. Pokemon are saved by openpoke in pokelist.bat.

goto teambuild

)

echo Invalid choice.

goto teambuild

:getteams

set /p teamname=Player team name? Enter "d" for the default teams.

if %teamname%==d goto defaultteams

if %teamname%==t set teamname=team_red

set /p eteamname=Enemy team name?

if %eteamname%==t set eteamname=team_blue

call pokelist.bat

for %%y in (player enemy) do (

for %%x in (1 2 3 4 5 6) do (

if %%y==player set %%ypoke%%xid=!%teamname%poke%%x!

if %%y==enemy set %%ypoke%%xid=!%eteamname%poke%%x!

)

)

set playername=!%teamname%trainer!

set playerpokes=!%teamname%pokes!

set playerpoke1=!%playerpoke1id%species!

set playerpoke1lvl=!%playerpoke1id%lvl!

set playerpoke1m1=!%playerpoke1id%m1!

set playerpoke1m2=!%playerpoke1id%m2!

set playerpoke1m3=!%playerpoke1id%m3!

set playerpoke1m4=!%playerpoke1id%m4!

set playerpoke2=!%playerpoke2id%species!

set playerpoke2lvl=!%playerpoke2id%lvl!

set playerpoke2m1=!%playerpoke2id%m1!

set playerpoke2m2=!%playerpoke2id%m2!

set playerpoke2m3=!%playerpoke2id%m3!

set playerpoke2m4=!%playerpoke2id%m4!

set playerpoke3=!%playerpoke3id%species!

set playerpoke3lvl=!%playerpoke3id%lvl!

set playerpoke3m1=!%playerpoke3id%m1!

set playerpoke3m2=!%playerpoke3id%m2!

set playerpoke3m3=!%playerpoke3id%m3!

set playerpoke3m4=!%playerpoke3id%m4!

set playerpoke4=!%playerpoke4id%species!

set playerpoke4lvl=!%playerpoke4id%lvl!

set playerpoke4m1=!%playerpoke4id%m1!

set playerpoke4m2=!%playerpoke4id%m2!

set playerpoke4m3=!%playerpoke4id%m3!

set playerpoke4m4=!%playerpoke4id%m4!

set playerpoke5=!%playerpoke5id%species!

set playerpoke5lvl=!%playerpoke5id%lvl!

set playerpoke5m1=!%playerpoke5id%m1!

set playerpoke5m2=!%playerpoke5id%m2!

set playerpoke5m3=!%playerpoke5id%m3!

set playerpoke5m4=!%playerpoke5id%m4!

set playerpoke6=!%playerpoke6id%species!

set playerpoke6lvl=!%playerpoke6id%lvl!

set playerpoke6m1=!%playerpoke6id%m1!

set playerpoke6m2=!%playerpoke6id%m2!

set playerpoke6m3=!%playerpoke6id%m3!

set playerpoke6m4=!%playerpoke6id%m4!

set enemyname=!%eteamname%trainer!

set enemypokes=!%eteamname%pokes!

set enemypoke1=!%enemypoke1id%species!

set enemypoke1lvl=!%enemypoke1id%lvl!

set enemypoke1m1=!%enemypoke1id%m1!

set enemypoke1m2=!%enemypoke1id%m2!

set enemypoke1m3=!%enemypoke1id%m3!

set enemypoke1m4=!%enemypoke1id%m4!

set enemypoke2=!%enemypoke2id%species!

set enemypoke2lvl=!%enemypoke2id%lvl!

set enemypoke2m1=!%enemypoke2id%m1!

set enemypoke2m2=!%enemypoke2id%m2!

set enemypoke2m3=!%enemypoke2id%m3!

set enemypoke2m4=!%enemypoke2id%m4!

set enemypoke3=!%enemypoke3id%species!

set enemypoke3lvl=!%enemypoke3id%lvl!

set enemypoke3m1=!%enemypoke3id%m1!

set enemypoke3m2=!%enemypoke3id%m2!

set enemypoke3m3=!%enemypoke3id%m3!

set enemypoke3m4=!%enemypoke3id%m4!

set enemypoke4=!%enemypoke4id%species!

set enemypoke4lvl=!%enemypoke4id%lvl!

set enemypoke4m1=!%enemypoke4id%m1!

set enemypoke4m2=!%enemypoke4id%m2!

set enemypoke4m3=!%enemypoke4id%m3!

set enemypoke4m4=!%enemypoke4id%m4!

set enemypoke5=!%enemypoke5id%species!

set enemypoke5lvl=!%enemypoke5id%lvl!

set enemypoke5m1=!%enemypoke5id%m1!

set enemypoke5m2=!%enemypoke5id%m2!

set enemypoke5m3=!%enemypoke5id%m3!

set enemypoke5m4=!%enemypoke5id%m4!

set enemypoke6=!%enemypoke6id%species!

set enemypoke6lvl=!%enemypoke6id%lvl!

set enemypoke6m1=!%enemypoke6id%m1!

set enemypoke6m2=!%enemypoke6id%m2!

set enemypoke6m3=!%enemypoke6id%m3!

set enemypoke6m4=!%enemypoke6id%m4!

goto pokedictionary

:defaultteams

set playername=RED

set playerpokes=6

set playerpoke3=CHARIZARD

set playerpoke3lvl=67

set playerpoke3m1=FIRE_BLAST

set playerpoke3m2=RAGE

set playerpoke3m3=SLASH

set playerpoke3m4=FIRE_SPIN

set playerpoke4=VENUSAUR

set playerpoke4lvl=67

set playerpoke4m1=GROWTH

set playerpoke4m2=MEGA_DRAIN

set playerpoke4m3=EARTHQUAKE

set playerpoke4m4=SOLAR_BEAM

set playerpoke5=BLASTOISE

set playerpoke5lvl=67

set playerpoke5m1=HYDRO_PUMP

set playerpoke5m2=REST

set playerpoke5m3=DOUBLE_EDGE

set playerpoke5m4=WITHDRAW

set playerpoke6=SNORLAX

set playerpoke6lvl=67

set playerpoke6m1=AMNESIA

set playerpoke6m2=REST

set playerpoke6m3=BODY_SLAM

set playerpoke6m4=EARTHQUAKE

set playerpoke1=PIKACHU

set playerpoke1lvl=67

set playerpoke1m1=THUNDER

set playerpoke1m2=QUICK_ATTACK

set playerpoke1m3=TAIL_WHIP

set playerpoke1m4=THUNDER_WAVE

set playerpoke2=LAPRAS

set playerpoke2lvl=67

set playerpoke2m1=BLIZZARD

set playerpoke2m2=PSYCHIC

set playerpoke2m3=BODY_SLAM

set playerpoke2m4=SURF

set enemyname=BLUE

set enemypokes=6

set enemypoke2=PIDGEOT

set enemypoke2lvl=67

set enemypoke2m1=WING_ATTACK

set enemypoke2m2=MIRROR_MOVE

set enemypoke2m3=SKY_ATTACK

set enemypoke2m4=WHIRLWIND

set enemypoke1=ALAKAZAM

set enemypoke1lvl=67

set enemypoke1m1=LIGHT_SCREEN

set enemypoke1m2=PSYCHIC

set enemypoke1m3=REFLECT

set enemypoke1m4=RECOVER

set enemypoke3=RHYDON

set enemypoke3lvl=67

set enemypoke3m1=SEISMIC_TOSS

set enemypoke3m2=EARTHQUAKE

set enemypoke3m3=ROCK_SLIDE

set enemypoke3m4=HORN_DRILL

set enemypoke4=GYARADOS

set enemypoke4lvl=67

set enemypoke4m1=DRAGON_RAGE

set enemypoke4m2=HYDRO_PUMP

set enemypoke4m3=HYPER_BEAM

set enemypoke4m4=BLIZZARD

set enemypoke5=ARCANINE

set enemypoke5lvl=67

set enemypoke5m1=ROAR

set enemypoke5m2=FIRE_BLAST

set enemypoke5m3=GLARE

set enemypoke5m4=TAKE_DOWN

set enemypoke6=EXEGGUTOR

set enemypoke6lvl=67

set enemypoke6m1=HYPNOSIS

set enemypoke6m2=BARRAGE

set enemypoke6m3=STOMP

set enemypoke6m4=EGG_BOMB

goto pokedictionary

:battlestart

echo RIVAL %enemyname% is challenging %playername%^^! %enemyname% sent out %enemypoke1%^^! Go^^! %playerpoke1%^^!

set haveswitched=0

set needtoupdatestats=0

set self=ayylmao

set multihitmovecount=0

set conversioncheck=0

set counterdamage=0

set counterphysicalcheck=0

set countercheck=0

set movecategory=0

set tempcritboost=0

set phase=1

set autogotomove=0

set move=0

set damage=1

set AS=0

set DS=0

set ragereturn=0

set draggedout=0

set emove=1

set pmove=0

set bot=0

set chance=0

set recoildivisor=0

set attackeffect=0

set aisecreturn=0

set aimdreturn=0

set ai=idiotic

set switchto=0

set ehaveswitched=0

set jumpphase=0

SET debug=0

set jumptoplayer=0

set jumptoenemy=0

for %%x in (player enemy) do (

set %%xreset=1

set %%xliscmod=1

set %%xrefmod=1

set %%xlisccounter=0

set %%xrefcounter=0

set %%xremainingpokes=!%%xpokes!

set %%xactivepoke=1

)

:varreset

for %%x in (player enemy) do (

if !%%xreset!==1 (

for %%y in (hp atk def satk sdef spd) do (

set %%x%%ystatlevel=0

)

set %%xacclevel=0

set %%xevalevel=0

set %%xisbiding=0

set %%xbidedamage=0

set %%xmultiturndamage=0

set %%xpokestatus=none

set %%xpokeisconfused=0

set %%xparacheck=0

set %%xprioritycheck=0

set %%xcritlevel=0

set %%xpokeisunderground=0

set %%xdisabledmove=0

set %%xisdisabled=0

set %%xmiscdamagemod=0

set %%xpokeisflying=0

set %%xpokeisasleep=0

set %%xreset=0

set %%xtwineedletrip=0

set %%xischargingsky=0

set %%xischargingsolar=0

set %%xisrecharging=0

set %%xisseeded=0

set %%xpreviousmove=0

)

)

:determinestats

set iv=16

set ev=0

for %%y in (player enemy) do (

for %%x in (hp atk def satk sdef spd) do (

if !%%y%%xstatlevel!==-6 set %%y%%xstatmod=0.25

if !%%y%%xstatlevel!==-5 set %%y%%xstatmod=0.285

if !%%y%%xstatlevel!==-4 set %%y%%xstatmod=0.333

if !%%y%%xstatlevel!==-3 set %%y%%xstatmod=0.4

if !%%y%%xstatlevel!==-2 set %%y%%xstatmod=0.5

if !%%y%%xstatlevel!==-1 set %%y%%xstatmod=0.666

if !%%y%%xstatlevel!==0 set %%y%%xstatmod=1

if !%%y%%xstatlevel!==1 set %%y%%xstatmod=1.5

if !%%y%%xstatlevel!==2 set %%y%%xstatmod=2

if !%%y%%xstatlevel!==3 set %%y%%xstatmod=2.5

if !%%y%%xstatlevel!==4 set %%y%%xstatmod=3

if !%%y%%xstatlevel!==5 set %%y%%xstatmod=2.5

if !%%y%%xstatlevel!==6 set %%y%%xstatmod=4

)

if !%%yacclevel!==-6 set %%yaccmod=0.33

if !%%yacclevel!==-5 set %%yaccmod=0.375

if !%%yacclevel!==-4 set %%yaccmod=0.428

if !%%yacclevel!==-3 set %%yaccmod=0.5

if !%%yacclevel!==-2 set %%yaccmod=0.6

if !%%yacclevel!==-1 set %%yaccmod=0.75

if !%%yacclevel!==0 set %%yaccmod=1

if !%%yacclevel!==1 set %%yaccmod=1.33

if !%%yacclevel!==2 set %%yaccmod=1.66

if !%%yacclevel!==3 set %%yaccmod=2

if !%%yacclevel!==4 set %%yaccmod=2.33

if !%%yacclevel!==5 set %%yaccmod=2.66

if !%%yacclevel!==6 set %%yaccmod=3

if !%%yevalevel!==-6 set %%yevamod=3

if !%%yevalevel!==-5 set %%yevamod=2.66

if !%%yevalevel!==-4 set %%yevamod=2.33

if !%%yevalevel!==-3 set %%yevamod=2

if !%%yevalevel!==-2 set %%yevamod=1.66

if !%%yevalevel!==-1 set %%yevamod=1.33

if !%%yevalevel!==0 set %%yevamod=1

if !%%yevalevel!==1 set %%yevamod=0.75

if !%%yevalevel!==2 set %%yevamod=0.6

if !%%yevalevel!==3 set %%yevamod=0.5

if !%%yevalevel!==4 set %%yevamod=0.428

if !%%yevalevel!==5 set %%yevamod=0.375

if !%%yevalevel!==6 set %%yevamod=0.33

if !%%ypokestatus!==paralyzed (

set %%yparamod=0.25

) else (

set %%yparamod=1

)

if !%%ypokestatus!==burned (

set %%yburnmod=0.5

) else (

set %%yburnmod=1

)

)

set lvl=!playerpoke%playeractivepoke%lvl!

for /f %%n in ('cscript //nologo eval.vbs "(((2*!playerpoke%playeractivepoke%hp!+%iv%+(%ev%/4))*%lvl%)/100+%lvl%+10)*%playerhpstatmod%"') do set playerpokestathp=%%n

for /f "tokens=1 delims=." %%a in ('echo %playerpokestathp%') do set playerpokestathp=%%a

for /f %%n in ('cscript //nologo eval.vbs "(((2*!playerpoke%playeractivepoke%atk!+%iv%+(%ev%/4))*%lvl%)/100+5)*%playeratkstatmod%*%playerburnmod%"') do set playerpokestatatk=%%n

for /f "tokens=1 delims=." %%a in ('echo %playerpokestatatk%') do set playerpokestatatk=%%a

for /f %%n in ('cscript //nologo eval.vbs "(((2*!playerpoke%playeractivepoke%def!+%iv%+(%ev%/4))*%lvl%)/100+5)*%playerdefstatmod%"') do set playerpokestatdef=%%n

for /f "tokens=1 delims=." %%a in ('echo %playerpokestatdef%') do set playerpokestatdef=%%a

for /f %%n in ('cscript //nologo eval.vbs "(((2*!playerpoke%playeractivepoke%satk!+%iv%+(%ev%/4))*%lvl%)/100+5)*%playersatkstatmod%"') do set playerpokestatsatk=%%n

for /f "tokens=1 delims=." %%a in ('echo %playerpokestatsatk%') do set playerpokestatsatk=%%a

for /f %%n in ('cscript //nologo eval.vbs "(((2*!playerpoke%playeractivepoke%sdef!+%iv%+(%ev%/4))*%lvl%)/100+5)*%playersdefstatmod%"') do set playerpokestatsdef=%%n

for /f "tokens=1 delims=." %%a in ('echo %playerpokestatsdef%') do set playerpokestatsdef=%%a

for /f %%n in ('cscript //nologo eval.vbs "(((2*!playerpoke%playeractivepoke%spd!+%iv%+(%ev%/4))*%lvl%)/100+5)*%playerspdstatmod%*%playerparamod%"') do set playerpokestatspd=%%n

for /f "tokens=1 delims=." %%a in ('echo %playerpokestatspd%') do set playerpokestatspd=%%a

if !playerpoke%playeractivepoke%curhp!==999 set playerpoke%playeractivepoke%curhp=%playerpokestathp%

set lvl=!enemypoke%enemyactivepoke%lvl!

for /f %%n in ('cscript //nologo eval.vbs "(((2*!enemypoke%enemyactivepoke%hp!+%iv%+(%ev%/4))*%lvl%)/100+%lvl%+10)*%enemyhpstatmod%"') do set enemypokestathp=%%n

for /f "tokens=1 delims=." %%a in ('echo %enemypokestathp%') do set enemypokestathp=%%a

for /f %%n in ('cscript //nologo eval.vbs "(((2*!enemypoke%enemyactivepoke%atk!+%iv%+(%ev%/4))*%lvl%)/100+5)*%enemyatkstatmod%*%enemyburnmod%"') do set enemypokestatatk=%%n

for /f "tokens=1 delims=." %%a in ('echo %enemypokestatatk%') do set enemypokestatatk=%%a

for /f %%n in ('cscript //nologo eval.vbs "(((2*!enemypoke%enemyactivepoke%def!+%iv%+(%ev%/4))*%lvl%)/100+5)*%enemydefstatmod%"') do set enemypokestatdef=%%n

for /f "tokens=1 delims=." %%a in ('echo %enemypokestatdef%') do set enemypokestatdef=%%a

for /f %%n in ('cscript //nologo eval.vbs "(((2*!enemypoke%enemyactivepoke%satk!+%iv%+(%ev%/4))*%lvl%)/100+5)*%enemysatkstatmod%"') do set enemypokestatsatk=%%n

for /f "tokens=1 delims=." %%a in ('echo %enemypokestatsatk%') do set enemypokestatsatk=%%a

for /f %%n in ('cscript //nologo eval.vbs "(((2*!enemypoke%enemyactivepoke%sdef!+%iv%+(%ev%/4))*%lvl%)/100+5)*%enemysdefstatmod%"') do set enemypokestatsdef=%%n

for /f "tokens=1 delims=." %%a in ('echo %enemypokestatsdef%') do set enemypokestatsdef=%%a

for /f %%n in ('cscript //nologo eval.vbs "(((2*!enemypoke%enemyactivepoke%spd!+%iv%+(%ev%/4))*%lvl%)/100+5)*%enemyspdstatmod%*%enemyparamod%"') do set enemypokestatspd=%%n

for /f "tokens=1 delims=." %%a in ('echo %enemypokestatspd%') do set enemypokestatspd=%%a

if !enemypoke%enemyactivepoke%curhp!==999 set enemypoke%enemyactivepoke%curhp=%enemypokestathp%

if %debug%==1 echo Finished determining stats.

if %debug%==1 pause

if %ragereturn%==1 goto rageresume

if %ehaveswitched%==1 (

if not %switchto%==0 (

echo %enemyname% withdrew !enemypoke%enemyactivepoke%!^^! %enemyname% sent out !enemypoke%switchto%!^^!

set enemyactivepoke=%switchto%

if %debug%==1 echo Switching to Epoke %switchto%, !enemypoke%switchto%!

set enemyreset=1

set ehaveswitched=0

set switchto=0

set jumptoplayer=1

goto varreset

)

)

if %haveswitched%==1 (

echo !playerpoke%playeractivepoke%!, come back^^! Go^^! !playerpoke%pswitchto%!^^!

set playeractivepoke=%pswitchto%

set jumptoenemy=1

set playereset=1

set haveswitched=0

goto varreset

if not %switchto%==0 (

goto varreset

)

)

if %jumptoplayer%==1 if %jumptoenemy%==1 (

set jumptoenemy=0

set jumptoplayer=0

goto mainloop

)

if %jumptoenemy%==1 (

set jumptoenemy=0

set phase=2

set self=enemy

goto pokemonmove

)

if %jumptoplayer%==1 (

set jumptoplayer=0

set self=player

set phase=2

goto pokemonmove

)

)

if %needtoupdatestats%==1 (

set needtoupdatestats=0

goto attackeffectsresume

)

if %draggedout%==1 (

set draggedout=0

goto turnend

)

if %attackeffect%==selfdestroy if %self%==enemy if not %damage%==-1 if not %damage%==0 if !playerpoke%playeractivepoke%curhp! LEQ 0 set playeractivepoke=-1

goto mainloop

:turnend

if %playerisseeded%==1 (

set /a damage=%playerpokestathp%/8

echo !playerpoke%playeractivepoke%! is seeded^^! !enemypoke%enemyactivepoke%! gains !damage! health^^!

set /a playerpoke%playeractivepoke%curhp-=damage

set /a enemypoke%enemyactivepoke%curhp+=damage

if !enemypoke%enemyactivepoke%curhp! GTR %enemypokestathp% set enemypoke%enemyactivepoke%curhp=%enemypokestathp%

)

if %enemyisseeded%==1 (

set /a damage=%enemypokestathp%/8

echo !enemypoke%enemyactivepoke%! is seeded^^! !playerpoke%playeractivepoke%! gains !damage! health^^!

set /a enemypoke%enemyactivepoke%curhp-=damage

set /a playerpoke%playeractivepoke%curhp+=damage

if !playerpoke%playeractivepoke%curhp! GTR %playerpokestathp% set playerpoke%playeractivepoke%curhp=%playerpokestathp%

)

if %playermultiturndamage% GEQ 1 (

set /a playermultiturndamage-=1

set /a damage=%playerpokestathp%/16

echo !playerpoke%playeractivepoke%! takes !damage! damage from the %playerMTDtype%^^!

set /a playerpoke%playeractivepoke%curhp-=damage

)

if %enemymultiturndamage% GEQ 1 (

set /a enemymultiturndamage-=1

set /a damage=%enemypokestathp%/16

echo !enemypoke%enemyactivepoke%! takes !damage! damage from the %enemyMTDtype%^^!

set /a enemypoke%enemyactivepoke%curhp-=damage

)

if %playerpokestatus%==burned (

set /a damage=%playerpokestathp%/8

echo !playerpoke%playeractivepoke%! is hurt by it's burn^^! !damage! damage^^!

set /a playerpoke%playeractivepoke%curhp-=damage

)

if %enemypokestatus%==burned (

set /a damage=%enemypokestathp%/8

echo !enemypoke%enemyactivepoke%! is hurt by it's burn^^! !damage! damage^^!

set /a enemypoke%enemyactivepoke%curhp-=damage

)

if %playerpokestatus%==poisoned (

set /a damage=%playerpokestathp%/8

echo !playerpoke%playeractivepoke%! is poisoned^^! !damage! damage^^!

set /a playerpoke%playeractivepoke%curhp-=damage

)

if %enemypokestatus%==poisoned (

set /a damage=%enemypokestathp%/8

echo !enemypoke%enemyactivepoke%! is poisoned^^! !damage! damage^^!

set /a enemypoke%enemyactivepoke%curhp-=damage

)

if %playerpokestatus%==burned goto determinestats

if %enemypokestatus%==burned goto determinestats

for %%y in (player enemy) do (

for %%x in (ref lisc) do (

if !%%y%%xcounter! GEQ 1 (

if !%%y%%xcounter!==1 (

if %%y==player (

if %%x==lisc echo Your team's LIGHT SCREEN wore off^^!

if %%x==ref echo Your team's REFLECT wore off^^!

)

if %%y==enemy (

if %%x==lisc echo The enemy team's LIGHT SCREEN wore off^^!

if %%x==ref echo The enemy team's REFLECT wore off^^!

)

set %%y%%xmod=1

)

set /a %%y%%xcounter-=1

)

)

)

if %bot%==1 if %debug%==1 pause

goto mainloop

:mainloop

set playerwillflinch=0

set enemywillflinch=0

if !enemypoke%enemyactivepoke%curhp! LEQ 0 (

set /a enemyremainingpokes-=1

if !enemyremainingpokes! LEQ 0 goto victory

goto enemychoose

)

if !playerpoke%playeractivepoke%curhp! LEQ 0 (

set /a playerremainingpokes-=1

if !playerremainingpokes! LEQ 0 goto defeat

goto switchchoose

)

if %playerisbiding% GEQ 1 goto movechoose

if %playerpokeisunderground%==1 goto movechoose

if %playerpokeisflying%==1 goto movechoose

if %playerischargingsky%==2 goto movechoose

if %playerischargingsolar%==2 goto movechoose

if %playerisrecharging%==1 goto movechoose

if %autogotomove%==1 (

echo Your !playerpoke%playeractivepoke%! [!playerpoke%playeractivepoke%curhp!/%playerpokestathp%] faces !enemypoke%enemyactivepoke%! [!enemypoke%enemyactivepoke%curhp!/%enemypokestathp%]^^! Going to moves...

goto movechoose

)

set /p choice=Your !playerpoke%playeractivepoke%! [!playerpoke%playeractivepoke%curhp!/%playerpokestathp%] faces !enemypoke%enemyactivepoke%! [!enemypoke%enemyactivepoke%curhp!/%enemypokestathp%]^^! (moves,pokemon)...

if "%choice%"=="print" (

echo PLAYER POKE: %playeractivepoke% !playerpoke%playeractivepoke%! !playerpoke%playeractivepoke%lvl! !playerpoke%playeractivepoke%type1! !playerpoke%playeractivepoke%type2! %playerpokestatus% %playerhpstatlevel% %playeratkstatlevel% %playerdefstatlevel% %playersatkstatlevel% %playersdefstatlevel% %playerspdstatlevel% %playerpokestathp% %playerpokestatatk% %playerpokestatdef% %playerpokestatsatk% %playerpokestatsdef% %playerpokestatspd% %playerlisccounter% %playerliscmod% %playerrefcounter% %playerrefmod%

echo ENEMY POKE: %enemyactivepoke% !enemypoke%enemyactivepoke%! !enemypoke%enemyactivepoke%lvl! !enemypoke%enemyactivepoke%type1! !enemypoke%enemyactivepoke%type2! %enemypokestatus% %enemyhpstatlevel% %enemyatkstatlevel% %enemydefstatlevel% %enemysatkstatlevel% %enemysdefstatlevel% %enemyspdstatlevel% %enemypokestathp% %enemypokestatatk% %enemypokestatdef% %enemypokestatsatk% %enemypokestatsdef% %enemypokestatspd% %enemylisccounter% %enemyliscmod% %enemyrefcounter% %enemyrefmod%

goto mainloop

)

if "%choice%"=="bot" (

set bot=1

set autogotomove=1

goto movechoose

)

if not "%choice%"=="moves" (

if not "%choice%"=="pokemon" (

echo Invalid choice.

goto mainloop

) else (

goto switchchoose

)

) else (

goto movechoose

)

:speeddeterminer

if %debug%==1 echo at Speed determiner.

if %debug%==1 pause

if %ehaveswitched%==1 goto varreset

if %haveswitched%==1 goto varreset

if %debug%==1 echo Checked for switch outs.

if %debug%==1 pause

set self=blank

set move=blank

set counterphysicalcheck=0

set countercheck=0

set counterdamage=0

if %pmove%==COUNTER (

set move=!enemypoke%enemyactivepoke%m%emove%!

set countercheck=1

goto movedictionary

)

if !enemypoke%enemyactivepoke%m%emove%!==COUNTER (

set move=%pmove%

set countercheck=1

goto movedictionary

)

:countercheckreturn

if %movecategory%==physical if %countercheck%==1 set counterphysicalcheck=1

set countercheck=0

set enemyprioritycheck=1

set move=%emove%

@rem !enemypoke%enemyactivepoke%m%emove%!

if %debug%==1 echo Going to movedictionary...

if %debug%==1 pause

goto movedictionary

:enemyprioritycheckreturn

set enemypriority=%PRIORITY%

set playerprioritycheck=1

set move=%pmove%

goto movedictionary

:playerprioritycheckreturn

set playerpriority=%PRIORITY%

set phase=1

if %debug%==1 echo Returned from movedictionary.

if %debug%==1 pause

@REM if %jumpphase%==1 (

@REM set jumpphase=0

@REM set phase=2

@REM )

if %playerpriority% GTR %enemypriority% (

set self=player

goto pokemonmove

)

if %enemypriority% GTR %playerpriority% (

set self=enemy

goto pokemonmove

)

if %debug%==1 ECHO %playerpriority% %enemypriority% %playerpokestatspd% %enemypokestatspd%

if %debug%==1 pause

if %playerpokestatspd% GTR %enemypokestatspd% (

set self=player

goto pokemonmove

) else (

set self=enemy

goto pokemonmove

)

set /a ran=%random% %% 2 + 1

if %playerpokestatspd%==%enemypokestatspd% (

echo (tie^^!)

if %ran%==1 set self=player

if %ran%==0 set self=enemy

goto pokemonmove

)

:movechoose

if %playerisbiding% GEQ 1 goto enemymovechoose

if %playerpokeisunderground%==1 goto enemymovechoose

if %playerpokeisflying%==1 goto enemymovechoose

if %playerischargingsky%==2 goto enemymovechoose

if %playerischargingsolar%==2 goto enemymovechoose

if %playerisrecharging%==1 goto enemymovechoose

set /a pmove=%random% %% 4 + 1

if %bot%==1 (

set pmove=!playerpoke%playeractivepoke%m%pmove%!

if %pmove%==NONE (

goto movechoose

)

set autogotomove=1

goto enemymovechoose

)

set /p pmove=!playerpoke%playeractivepoke%! knows !playerpoke%playeractivepoke%m1!, !playerpoke%playeractivepoke%m2!, !playerpoke%playeractivepoke%m3! and !playerpoke%playeractivepoke%m4!...

if "%pmove%"=="return" (

set autogotomove=0

goto mainloop

)

if "%pmove%"=="NONE" (

echo Invalid choice.

goto movechoose

)

for %%y in (1 2 3 4) do (

if "%pmove%"=="!playerpoke%playeractivepoke%m%%y!" (

if "%pmove%"=="%playerdisabledmove%" if %playerisdisabled% GEQ 1 (

echo %playerdisabledmove% is disabled for %playerisdisabled% more turns^^!

goto movechoose

)

set autogotomove=1

goto enemymovechoose

)

)

echo Invalid choice.

goto movechoose

:enemymovechoose

set self=enemy

set target=player

set calledadvcheck=0

set /a emove=%random% %% 4 + 1

if %ai%==idiotic (

set emove=!enemypoke%enemyactivepoke%m%emove%!

if !emove!==%enemydisabledmove% if %enemyisdisabled% GEQ 1 (

goto enemymovechoose

)

if !emove!==NONE (

goto enemymovechoose

)

goto speeddeterminer

)

if %ai%==dumb (

set highestdamagemove=0

set highestmovedamage=0

if %debug%==1 echo AI start

if %debug%==1 pause

if %self%==player (

set deftype1=!enemypoke%enemyactivepoke%type1!

set deftype2=!enemypoke%enemyactivepoke%type2!

set pokelvl=!playerpoke%playeractivepoke%lvl!

)

if %self%==enemy (

set deftype1=!playerpoke%playeractivepoke%type1!

set deftype2=!playerpoke%playeractivepoke%type2!

set pokelvl=!enemypoke%enemyactivepoke%lvl!

)

for %%y in (1 2 3 4) do (

if %self%==player set move=!playerpoke%playeractivepoke%m%%y!

if %self%==enemy set move=!enemypoke%enemyactivepoke%m%%y!

set aimdreturn=1

call :movedictionary

if not !movecategory!==status (

if !movecategory!==physical (

set AS=!%self%pokestatatk!

set /a DS=!%target%pokestatdef!*!%target%refmod!

)

if !movecategory!==special (

set AS=!%self%pokestatsatk!

set /a DS=!%target%pokestatsdef!*!%target%liscmod!

)

set aisecreturn=1

call :supereffectivechecker

set stab=1

if %self%==player (

if !atktype!==!playerpoke%playeractivepoke%type1! set stab=1.5

if !atktype!==!playerpoke%playeractivepoke%type2! set stab=1.5

)

if %self%==enemy (

if !atktype!==!enemypoke%enemyactivepoke%type1! set stab=1.5

if !atktype!==!enemypoke%enemyactivepoke%type2! set stab=1.5

)

set dmgreturn=1

call :damagecheck

set move%%ydamage=!damage!

if %debug%==1 if %self%==enemy echo !enemypoke%enemyactivepoke%m%%y!

if !move%%ydamage! GTR !highestmovedamage! (

set highestmovedamage=!move%%ydamage!

if %self%==enemy set highestdamagemove=!enemypoke%enemyactivepoke%m%%y!

if %self%==player set highestdamagemove=!playerpoke%playeractivepoke%m%%y!

)

)

)

if %debug%==1 echo Highest damage move found... !highestdamagemove! !highestmovedamage! %deftype1% %deftype2% %atktype%

if %self%==player set enemycurhp=!enemypoke%enemyactivepoke%curhp!

if %self%==enemy set enemycurhp=!playerpoke%playeractivepoke%curhp!

if !highestmovedamage! GTR !enemycurhp! if !%self%pokestatspd! GTR !%target%pokestatspd! (

set emove=!highestdamagemove!

if %debug%==1 echo Can quickly OHKO! AI end.

goto speeddeterminer

)

if !highestmovedamage! GTR !enemycurhp! if %PRIORITY% GTR 0 (

set emove=!highestdamagemove!

if %debug%==1 echo Can priority OHKO! AI end.

goto speeddeterminer

)

if %debug%==1 echo Cannot OHKO with faster move... !highestdamagemove! !highestmovedamage! !enemycurhp! !%self%pokestatspd! !%target%pokestatspd!

if %debug%==1 pause

if %self%==enemy (

set selfpoke=%enemyactivepoke%

set enemypoke=%playeractivepoke%

)

if %self%==player (

set selfpoke=%playeractivepoke%

set enemypoke=%enemyactivepoke%

)

:checkforadvantage

if %debug%==1 echo %selfpoke% !selfpoke!

set enemytype1advantage=1

set enemytype2advantage=1

if %self%==enemy (

set deftype1=!enemypoke%selfpoke%type1!

set deftype2=!enemypoke%selfpoke%type2!

)

if %self%==player (

set deftype1=!playerpoke%selfpoke%type1!

set deftype2=!playerpoke%selfpoke%type2!

)

if %self%==player (

set atktype=!enemypoke%enemypoke%type1!

)

if %self%==enemy (

set atktype=!playerpoke%enemypoke%type1!

)

set aisecreturn=2

call :supereffectivechecker

if !supereffective!==200 set enemytype1advantage=2

if !supereffective!==400 set enemytype1advantage=3

if !supereffective! LSS 100 set enemytype1advantage=!supereffective!

if %self%==player (

set atktype=!enemypoke%enemypoke%type2!

)

if %self%==enemy (

set atktype=!playerpoke%enemypoke%type2!

)

set aisecreturn=3

call :supereffectivechecker

if !supereffective!==200 set enemytype2advantage=2

if !supereffective!==400 set enemytype2advantage=3

if !supereffective! LSS 100 set enemytype2advantage=!supereffective!

set selftype1advantage=1

set selftype2advantage=1

if %self%==player (

set deftype1=!enemypoke%enemypoke%type1!

set deftype2=!enemypoke%enemypoke%type2!

)

if %self%==enemy (

set deftype1=!playerpoke%enemypoke%type1!

set deftype2=!playerpoke%enemypoke%type2!

)

if %self%==enemy (

set atktype=!enemypoke%selfpoke%type1!

)

if %self%==player (

set atktype=!playerpoke%selfpoke%type1!

)

set aisecreturn=4

call :supereffectivechecker

if !supereffective!==200 set selftype1advantage=2

if !supereffective!==400 set selftype1advantage=3

if !supereffective! LSS 100 set selftype1advantage=!supereffective!

if %self%==enemy (

set atktype=!enemypoke%selfpoke%type2!

)

if %self%==player (

set atktype=!playerpoke%selfpoke%type2!

)

set aisecreturn=5

call :supereffectivechecker

if !supereffective!==200 set selftype2advantage=2

if !supereffective!==400 set selftype2advantage=3

if !supereffective! LSS 100 set selftype2advantage=!supereffective!

set selfhaveadvantage=0

if !selftype1advantage! GEQ 2 set selfhaveadvantage=1

if !selftype2advantage! GEQ 2 set selfhaveadvantage=1

set enemyhaveadvantage=0

if !enemytype1advantage! GEQ 2 set enemyhaveadvantage=1

if !enemytype2advantage! GEQ 2 set enemyhaveadvantage=1

echo !enemyhaveadvantage!

if %debug%==1 echo !enemypoke%selfpoke%! !playerpoke%enemypoke%! Checked for type advantages... !selftype1advantage! !selftype2advantage! !selfhaveadvantage! !enemytype1advantage! !enemytype2advantage! !enemyhaveadvantage!

if %calledadvcheck%==1 (

set calledadvcheck=0

goto :eol

)

if %debug%==1 PAUSE

if !selfhaveadvantage!==1 if !enemyhaveadvantage!==1 if !%self%pokestatspd! GTR !%target%pokestatspd! (

set move=!highestdamagemove!

if %debug%==1 echo Can probably OHKO! AI end.

goto speeddeterminer

)

if !selfhaveadvantage!==1 if !enemyhaveadvantage!==1 if %PRIORITY% GTR 0 (

set move=!highestdamagemove!

if %debug%==1 echo Can probably priority OHKO! AI end.

goto speeddeterminer

)

set needtoswitch=0

rem IF CAN SURVIVE BP100 STAB FROM ENEMY AND CAN OHKO, USE OHKO MOVE

if !enemyhaveadvantage!==1 (

set needtoswitch=1

if %debug%==1 echo Enemy has type advantage. Switching...

)

if not !selftype1advantage!==2 if not !selftype2advantage!==2 if not !selftype1advantage!==1 if not !selftype2advantage!==1 (

if !selftype1advantage! LSS 100 if !selftype2advantage! LSS 100 (

set needtoswitch=1

if %debug%==1 echo Have type disadvantage. Switching...

)

)

if %debug%==1 pause

if !needtoswitch!==1 (

if %self%==player (

set deftype1=!enemypoke%enemyactivepoke%type1!

set deftype2=!enemypoke%enemyactivepoke%type2!

set activepoke=!playerpoke%playeractivepoke%!

)

if %self%==enemy (

set deftype1=!playerpoke%playeractivepoke%type1!

set deftype2=!playerpoke%playeractivepoke%type2!

set activepoke=!enemypoke%enemyactivepoke%!

)

if %debug%==1 echo Need to switch. Checking for poke with type advantage over !deftype1!/!deftype2! ...

set numswitchablepoke=0

set highestscore=10

set highestscorer=0

for %%y in (1 2 3 4 5 6) do (

if not !%self%poke%%ycurhp! LEQ 0 if not !%%yscore!==!activepoke! (

set %%yscore=10

set calledadvcheck=1

set selfpoke=%%y

set enemypoke=%enemyactivepoke%

call :checkforadvantage

if !selftype1advantage!==2 set /a %%yscore=!%%yscore!+1

if !selftype1advantage!==3 set /a %%yscore=!%%yscore!+2

if !selftype2advantage!==2 set /a %%yscore=!%%yscore!+1

if !selftype2advantage!==3 set /a %%yscore=!%%yscore!+2

if !enemytype1advantage!==2 set /a %%yscore=!%%yscore!-1

if !enemytype1advantage!==3 set /a %%yscore=!%%yscore!-2

if !enemytype2advantage!==2 set /a %%yscore=!%%yscore!-1

if !enemytype2advantage!==3 set /a %%yscore=!%%yscore!-2

if %debug%==1 echo score: !%%yscore! !selftype1advantage! !selftype2advantage! !selfhaveadvantage! !enemytype1advantage! !enemytype2advantage! !enemyhaveadvantage!

if !%%yscore! GTR !highestscore! (

set highestscore=!%%yscore!

set highestscorer=%%y

)

)

)

if %debug%==1 echo Switchbles: !numswitchablepoke! hscore: !highestscore!

if %debug%==1 pause

echo off

if !highestscore! GTR 0 (

if %self%==player (

set deftype1=!enemypoke%enemyactivepoke%type1!

set deftype2=!enemypoke%enemyactivepoke%type2!

set activepoke=!playerpoke%playeractivepoke%!

)

if %self%==enemy (

set deftype1=!playerpoke%playeractivepoke%type1!

set deftype2=!playerpoke%playeractivepoke%type2!

set activepoke=!enemypoke%enemyactivepoke%!

)

:switchredo1

rem set /a ran=%random% %% 5 + 1

for %%y in (1 2 3 4 5 6) do (

rem if !ran!==%%y (

if %%y==!highestscorer! (

set switchto=%%y

if %debug%==1 echo Can switch to poke with type advantage! AI end.

set ehaveswitched=1

goto varreset

)

rem )

)

goto switchredo1

)

set numswitchablepoke=0

set neutral=0

if %debug%==1 echo None found. Looking for poke with SE move...

if %debug%==1 pause

for %%y in (1 2 3 4 5 6) do (

if %self%==enemy (

set deftype1=!enemypoke%enemyactivepoke%type1!

set deftype2=!enemypoke%enemyactivepoke%type2!

)

if %self%==player (

set deftype1=!playerpoke%playeractivepoke%type1!

set deftype2=!playerpoke%playeractivepoke%type2!

)

if %self%==player (

set atktype=!enemypoke%enemyactivepoke%type1!

)

if %self%==enemy (

set atktype=!playerpoke%playeractivepoke%type1!

)

set aisecreturn=10

call :supereffectivechecker

if !supereffective! LEQ 100 set /a neutral+=1

if %self%==player (

set atktype=!enemypoke%enemyactivepoke%type2!

)

if %self%==enemy (

set atktype=!playerpoke%playeractivepoke%type2!

)

set aisecreturn=11

call :supereffectivechecker

if !supereffective! LEQ 100 set /a neutral+=1

if !neutral!==2 (

for %%x in (1 2 3 4) do (

set yup=0

if %self%==player set move=!playerpoke%playeractivepoke%m%%x!

if %self%==enemy set move=!enemypoke%enemyactivepoke%m%%x!

set aimdreturn=2

call :movedictionary

if %self%==player (

set deftype1=!enemypoke%enemyactivepoke%type1!

set deftype2=!enemypoke%enemyactivepoke%type2!

)

if %self%==enemy (

set deftype1=!playerpoke%playeractivepoke%type1!

set deftype2=!playerpoke%playeractivepoke%type2!

)

set aisecreturn=12

call :supereffectivechecker

if !supereffective!==200 set yup=1

if !yup!==1 set /a numswitchablepoke+=1

)

)

)

if !numswitchablepoke! GTR 0 (

:switchredo2

set /a ran=%random% %% 5 + 1

for %%y in (1 2 3 4 5 6) do (

if !ran!==%%y (

if %self%==enemy (

set deftype1=!enemypoke%enemyactivepoke%type1!

set deftype2=!enemypoke%enemyactivepoke%type2!

)

if %self%==player (

set deftype1=!playerpoke%playeractivepoke%type1!

set deftype2=!playerpoke%playeractivepoke%type2!

)

if %self%==player (

set atktype=!enemypoke%enemyactivepoke%type1!

)

if %self%==enemy (

set atktype=!playerpoke%playeractivepoke%type1!

)

set aisecreturn=13

call :supereffectivechecker

if !supereffective! LEQ 100 set /a neutral+=1

if %self%==player (

set atktype=!enemypoke%enemyactivepoke%type2!

)

if %self%==enemy (

set atktype=!playerpoke%playeractivepoke%type2!

)

set aisecreturn=14

call :supereffectivechecker

if !supereffective! LEQ 100 set /a neutral+=1

if !neutral!==2 (

for %%x in (1 2 3 4) do (

if %self%==player set move=!playerpoke%playeractivepoke%m%%x!

if %self%==enemy set move=!enemypoke%enemyactivepoke%m%%x!

set aimdreturn=3

call :movedictionary

if %self%==player (

set deftype1=!enemypoke%enemyactivepoke%type1!

set deftype2=!enemypoke%enemyactivepoke%type2!

)

if %self%==enemy (

set deftype1=!playerpoke%playeractivepoke%type1!

set deftype2=!playerpoke%playeractivepoke%type2!

)

set aisecreturn=15

call :supereffectivechecker

if !supereffective! GEQ 200 (

set switchto=%%y

if %debug%==1 echo Can switch to poke with move type advantage! AI end.

set ehaveswitched=1

goto varreset

)

)

)

)

)

goto switchredo2

)

if %debug%==1 echo none Found. Looking for random type neutral...

set numswitchablepoke=0

for %%y in (1 2 3 4 5 6) do (

if %self%==enemy (

set deftype1=!enemypoke%enemyactivepoke%type1!

set deftype2=!enemypoke%enemyactivepoke%type2!

)

if %self%==player (

set deftype1=!playerpoke%playeractivepoke%type1!

set deftype2=!playerpoke%playeractivepoke%type2!

)

if %self%==player (

set atktype=!enemypoke%enemyactivepoke%type1!

)

if %self%==enemy (

set atktype=!playerpoke%playeractivepoke%type1!

)

set aisecreturn=16

call :supereffectivechecker

if !supereffective! LEQ 100 set /a neutral+=1

if %self%==player (

set atktype=!enemypoke%enemyactivepoke%type2!

)

if %self%==enemy (

set atktype=!playerpoke%playeractivepoke%type2!

)

set aisecreturn=17

call :supereffectivechecker

if !supereffective! LEQ 100 set /a neutral+=1

if !neutral!==2 set /a numswitchablepoke+=1

)

if !numswitchablepoke! GTR 0 (

:switchredo3

set /a ran=%random% %% 5 + 1

set neutral=0

for %%y in (1 2 3 4 5 6) do (

if !ran!==%%y (

if %self%==enemy (

set deftype1=!enemypoke%enemyactivepoke%type1!

set deftype2=!enemypoke%enemyactivepoke%type2!

)

if %self%==player (

set deftype1=!playerpoke%playeractivepoke%type1!

set deftype2=!playerpoke%playeractivepoke%type2!

)

if %self%==player (

set atktype=!enemypoke%enemyactivepoke%type1!

)

if %self%==enemy (

set atktype=!playerpoke%playeractivepoke%type1!

)

set aisecreturn=18

call :supereffectivechecker

if !supereffective! LEQ 100 set /a neutral+=1

if %self%==player (

set atktype=!enemypoke%enemyactivepoke%type2!

)

if %self%==enemy (

set atktype=!playerpoke%playeractivepoke%type2!

)

set aisecreturn=19

call :supereffectivechecker

if !supereffective! LEQ 100 set /a neutral+=1

if !neutral!==2 (

set switchto=%%y

set ehaveswitched=1

goto varreset

)

)

)

goto switchredo3

)

if %debug%==1 if !numswitchablepoke!==0 echo None found...

goto airesume

)

if %debug%==1 echo Did not see neccessary to switch, checking previous used move...

set move=!%target%previousmove!

set aimdreturn=4

call :movedictionary

set deftype1=!%self%poke%activepoke%type1!

set deftype2=!%self%poke%activepoke%type2!

set prattype=%atktype%

set aisecreturn=20

call :supereffectivechecker

if !supereffective!==2 (

if not %movecategory%==status (

if %movecategory%==physical (

set AS=!%target%pokestatatk!

set /a DS=!%self%pokestatdef!*!%self%refmod!

)

if %movecategory%==special (

set AS=!%target%pokestatsatk!

set /a DS=!%self%pokestatsdef!*!%self%liscmod!

)

set aisecreturn=21

goto supereffectivechecker

:aisecreturn21

set dmgreturn=2

goto damagecheck

:dmgreturn2

if %debug%==1 echo %damage% !damage! damage

if %self%==enemy set selfcurhp=!enemypoke%enemyactivepoke%curhp!

if %self%==player set selfcurhp=!playerpoke%playeractivepoke%curhp!

set /a target=!selfcurhp!-%damage%

set numswitchablepoke=0

set highestscore=0

set highestscorer=0

if !target! LSS 0 (

for %%y in (1 2 3 4 5 6) do (

set /a %%yscore=0

set deftype1=!%self%poke%activepoke%type1!

set deftype2=!%self%poke%activepoke%type2!

set atktype=!prattype!

set aisecreturn=22

goto supereffectivechecker

:aisecreturn22

if %supereffective% LEQ 1 (

if %supereffective%==0 set /a %%yscore+=1

set atktype=!%target%poke%activepoke%type1!

set aisecreturn=23

goto supereffectivechecker

:aisecreturn23

if %supereffective% LEQ 1 set /a %%yscore+=1

if %supereffective%==0 set /a %%yscore+=1

set atktype=!%target%poke%activepoke%type2!

set aisecreturn=24

goto supereffectivechecker

:aisecreturn24

if %supereffective% LEQ 1 set /a %%yscore+=1

if %supereffective%==0 set /a %%yscore+=1

if !neutral!==2 set /a numswitchablepoke+=1

)

)

if !%%yscore! GTR !highestscore! set highestscorer=%%y

)

if !highestscore!==0 goto airesume

set switchto=!highestscorer!

if %debug%==1 echo Can switch to poke that resists or is immune to enemy types! AI end.

goto enemychoose

)

)

if %debug%==1 echo Checked for switchto's due to previous move type advantage...

:airesume

set emove=!highestdamagemove!

if %debug%==1 echo Using highest damage move...

goto speeddeterminer

@rem )

:damagecheck

set /a supereffective/=100

for /f %%n in ('cscript //nologo eval.vbs "((((2*%pokelvl%/5+2)*%AS%*%BP%/%DS%)/50))*%supereffective%*%stab%"') do set damage=%%n

for /f "tokens=1 delims=." %%a in ('echo %damage%') do set damage=%%a

if %move%==SKY_ATTACK set /a damage/=2

if %move%==SOLAR_BEAM set /a damage/=2

if %move%==HYPER_BEAM set /a damage/=2

goto :eof

:pokemonmove

if %debug%==1 echo at Pokemonmove.

if %debug%==1 pause

if !playerpoke%playeractivepoke%curhp! LEQ 0 (

if not !playerremainingpokes! LEQ 1 echo !playerpoke%playeractivepoke%! fainted^^!

set /a playerremainingpokes-=1

if !playerremainingpokes! LEQ 0 goto defeat

set playeractivepoke=-1

goto switchchoose

)

set damage=0

if %self%==player (

set target=enemy

set move=%pmove%

set pokename=!playerpoke%playeractivepoke%!

set opokename=!enemypoke%enemyactivepoke%!

set pokelvl=!playerpoke%playeractivepoke%lvl!

set opokelvl=!enemypoke%enemyactivepoke%lvl!

set deftype1=!enemypoke%enemyactivepoke%type1!

set deftype2=!enemypoke%enemyactivepoke%type2!

)

if %self%==enemy (

set target=player

set move=%emove%

set pokename=!enemypoke%enemyactivepoke%!

set opokename=!playerpoke%playeractivepoke%!

set pokelvl=!enemypoke%enemyactivepoke%lvl!

set opokelvl=!playerpoke%playeractivepoke%lvl!

set deftype1=!playerpoke%playeractivepoke%type1!

set deftype2=!playerpoke%playeractivepoke%type2!

)

set aimdreturn=0

set aisecreturn=0

set multihitmovecount=0

set missed=0

set cancrash=0

set %self%previousmove=%move%

if !%self%isbiding! GEQ 1 set move=BIDE

if !%self%isrecharging!==1 (

echo %pokename% has to rest^^!

set %self%isrecharging=0

goto moveresume

)

if !%self%isdisabled! GEQ 1 (

set /a %self%isdisabled-=1

if %move%==!%self%disabledmove! (

echo %pokename% used %move%^^! But it failed^^!

goto moveresume

)

)

if !%self%pokeisunderground!==1 set move=DIG

if !%self%pokeisflying!==1 set move=FLY

if !%self%ischargingsky!==2 set move=SKY_ATTACK

if !%self%ischargingsolar!==2 set move=SOLAR_BEAM

if %move%==DIG if !%self%pokeisunderground!==0 goto attackeffects

if %move%==FLY if !%self%pokeisflying!==0 goto attackeffects

if %move%==BIDE goto skipto

if !%self%pokestatus!==frozen (

set /a ran=%random% %% 99 + 1

if !ran! LEQ 20 (

echo %pokename% thawed out^^!

set %self%pokestatus=none

) else (

echo %pokename% is frozen solid^^!

goto moveresume

)

)

if !%self%pokestatus!==paralyzed (

set /a ran=%random% %% 99 + 1

if !ran! LEQ 25 (

if !%self%pokeisunderground!==1 set %self%pokeisunderground=0

if !%self%playerpokeisflying!==1 set %self%pokeisflying=0

echo %pokename% is paralyzed^^! It can't move^^!

goto moveresume

)

)

if !%self%pokestatus!==asleep (

if !%self%pokeisasleep!==0 (

set %self%pokestatus=none

echo %pokename% woke up^^!

) else (

echo %pokename% is fast asleep^^!

set /a %self%pokeisasleep-=1

goto moveresume

)

)

set AS=!%self%pokestatatk!

set DS=!%self%pokestatdef!

set BP=40

for /f %%n in ('cscript //nologo eval.vbs "((((2*%pokelvl%/5+2)*%AS%*%BP%/%DS%)/50))"') do set damage=%%n

for /f "tokens=1 delims=." %%a in ('echo %damage%') do set damage=%%a

@REM echo %pokename% !%self%pokeisconfused! !%self%pokeisunderground! !%self%pokeisflying! %damage% !playerpoke%playeractivepoke%curhp! !enemypoke%enemyactivepoke%curhp! hurr

if !%self%pokeisconfused! GEQ 1 (

if not !%self%pokeisconfused!==1 (

set /a %self%pokeisconfused-=1

echo %pokename% is confused^^!

set /a ran=%random% %% 99 + 1

if !ran! LEQ 50 (

rem if !%self%pokeisunderground!==1 set %self%pokeisunderground=0

rem if !%self%pokeisflying!==1 set %self%pokeisflying=0

echo It hurt itself in it's confusion^^! %damage% damage^^!

if %self%==enemy set /a enemypoke%enemyactivepoke%curhp-=damage

if %self%==player set /a playerpoke%playeractivepoke%curhp-=damage

goto moveresume

)

goto movedictionary

) else (

echo %pokename% snapped out of it's confusion^^!

set %self%pokeisconfused=0

)

)

if %move%==MIRROR_MOVE (

if !%target%previousmove!==0 (

echo %pokename% used %move%^^! But it failed^^!

goto moveresume

)

echo %pokename% used %move%^^!

set move=!%target%previousmove!

)

if %debug%==1 echo %move% %self% %phase% %pmove% %emove%

if %debug%==1 pause

goto movedictionary

:MDreturn

if %debug%==1 echo Returned from movedictionary.

if %debug%==1 pause

if !%self%ischargingsky!==1 (

echo %pokename% became cloaked in a harsh light^^!

set damage=0

set %self%ischargingsky=2

goto moveresume

)

if !%self%ischargingsolar!==1 (

echo %pokename% is soaking up light^^!

set damage=0

set %self%ischargingsolar=2

goto moveresume

)

if %move%==HYPER_BEAM set %self%isrecharging=1

if %move%==DISABLE set BP=1

if %moveisohko%==1 set BP=1

if !%target%pokeisunderground!==1 if not %move%==EARTHQUAKE if not %BP%==0 (

echo %pokename% used %move%^^! %opokename% avoided the attack^^!

set missed=1

set %self%pokeisunderground=0

set %self%pokeisflying=0

if %attackeffect%==selfdestroy (

set damage=-1

goto attackeffects

)

goto moveresume

)

if !%target%pokeisflying!==1 if not %move%==GUST if not %BP%==0 (

echo %pokename% used %move%^^! %opokename% avoided the attack^^!

set missed=1

set %self%pokeisflying=0

set %self%pokeisunderground=0

if %attackeffect%==selfdestroy (

set damage=-1

goto attackeffects

)

goto moveresume

)

if %move%==DISABLE set BP=0

if %moveisohko%==1 set BP=0

if %tempcritboost%==1 (

set tempcritboost=0

set /a %self%critlevel+=1

)

set /a P=%random% %% 99 + 1

for /f %%n in ('cscript //nologo eval.vbs "%ACC%*(!%self%accmod!/!%self%evamod!)"') do set Q=%%n

if %moveisohko%==1 (

set /a Q=%pokelvl%-%opokelvl%+30

)

@rem echo %P% %Q%

if %moveisohko%==1 set BP=1

for /f "tokens=1 delims=." %%a in ('echo %Q%') do set Q=%%a

if %P% GEQ %Q% if not %BP%==0 if not %move%==SWIFT (

echo %pokename% used %move%^^! %opokename% avoided the attack^^!

set missed=1

goto moveresume

)

if %moveisohko%==1 set BP=0

if %playerwillflinch%==1 (

echo %pokename% flinched^^!

goto moveresume

)

if %movecategory%==physical (

set AS=!%self%pokestatatk!

set /a DS=!%target%pokestatdef!*!%target%refmod!

)

if %movecategory%==special (

set AS=!%self%pokestatsatk!

set /a DS=!%target%pokestatsdef!*!%target%liscmod!

)

set /a ran=%random% %% 15 + 1 + 85

goto supereffectivechecker

:SECresume

set %self%miscdamagemod=1

if !%target%pokeisunderground!==1 if %move%==EARTHQUAKE set %self%miscdamagemod=2

if !%target%pokeisunderground!==1 if %move%==GUST set %self%miscdamagemod=2

for /f %%n in ('cscript //nologo eval.vbs "(%supereffective%/100)"') do set supereffective=%%n

:multihitmovereturn

@rem FIX CRITS TO IGNORE ENEMY DEFENSE BOOSTS

if !%self%critlevel!==0 set %self%critmod=16

if !%self%critlevel!==1 set %self%critmod=8

if !%self%critlevel!==2 set %self%critmod=2

set /a ran=%random% %% !%self%critmod! + 1

set crit=1

if %ran%==1 set crit=1.5

if !%self%critlevel!==3 set crit=1.5

set stab=1

if %self%==player (

if %atktype%==!playerpoke%playeractivepoke%type1! set stab=1.5

if %atktype%==!playerpoke%playeractivepoke%type2! set stab=1.5

)

if %self%==enemy (

if %atktype%==!enemypoke%enemyactivepoke%type1! set stab=1.5

if %atktype%==!enemypoke%enemyactivepoke%type2! set stab=1.5

)

@rem echo crit value: %crit% crit level: !%self%critlevel! SE: %supereffective% bide:!%target%isbiding!

for /f %%n in ('cscript //nologo eval.vbs "((((2*%pokelvl%/5+2)*%AS%*%BP%/%DS%)/50))*%supereffective%*%crit%*!%self%miscdamagemod!*%stab%"') do set damage=%%n

for /f "tokens=1 delims=." %%a in ('echo %damage%') do set damage=%%a

if not %BP%==0 (

if %supereffective% GTR 1 echo %pokename% used %move%^^! %damage% damage^^! It's super effective^^!

if %supereffective% LSS 1 if %damage% GTR 0 echo %pokename% used %move%^^! %damage% damage^^! It's not very effective...

if %supereffective%==0 (

echo %pokename% used %move%^^! It doesn't effect foe %opokename%...

goto moveresume

)

if %supereffective%==1 echo %pokename% used %move%^^! %damage% damage^^!

if %crit%==1.5 echo A critical hit^^!

if !%target%isbiding! GEQ 1 set /a %target%bidedamage+=damage

if %self%==player if !enemypoke%enemyactivepoke%m%emove%!==COUNTER set /a counterdamage+=damage

if %self%==enemy if %pmove%==COUNTER set /a counterdamage+=damage

if %self%==enemy set /a playerpoke%playeractivepoke%curhp-=damage

if %self%==player set /a enemypoke%enemyactivepoke%curhp-=damage

) else (

set damage=0

)

if %multihitmovecount% GTR 0 (

set /a multihitmovecount-=1

goto multihitmovereturn

)

if %self%==player if !enemypoke%enemyactivepoke%m%emove%!==COUNTER set /a counterdamage*=2

if %self%==enemy if %pmove%==COUNTER set /a counterdamage*=2

if %move%==DIG (

set %self%pokeisunderground=0

goto moveresume

)

if %move%==FLY (

set %self%pokeisflying=0

goto moveresume

)

if !%target%previousmove!==RAGE if not %damage%==0 (

echo %opokename%'s rage is building^^!

set /a %target%atkstatlevel+=1

set ragereturn=1

goto determinestats

)

:rageresume

set ragereturn=0

:skipto

goto attackeffects

:moveresume

if %move%==TWINEEDLE if !%self%twineedletrip!==1 (

set %self%twineedletrip=0

goto multihitmovereturn

)

if %cancrash%==1 if %missed%==1 (

@REM if %self%==player set /a damage=!playerpoke%playeractivepoke%curhp!/2

@REM if %self%==enemy set /a damage=!enemypoke%enemyactivepoke%curhp!/2

if %self%==player set /a damage=%playerpokestathp%/2

if %self%==enemy set /a damage=%enemypokestathp%/2

echo %pokename% kept going and crashed^^! !damage! damage^^!

if %self%==player set /a playerpoke%playeractivepoke%curhp-=!damage!

if %self%==enemy set /a enemypoke%enemyactivepoke%curhp-=!damage!

)

if !enemypoke%enemyactivepoke%curhp! LEQ 0 if %self%==player (

set /a enemyremainingpokes-=1

if !enemyremainingpokes! LEQ 0 goto victory

goto enemychoose

)

if !playerpoke%playeractivepoke%curhp! LEQ 0 if %self%==enemy (

if not !playerremainingpokes! LEQ 1 echo !playerpoke%playeractivepoke%! fainted^^!

set /a playerremainingpokes-=1

if !playerremainingpokes! LEQ 0 goto defeat

set playeractivepoke=-1

goto switchchoose

)

if %phase%==1 (

set phase=2

if %self%==player set self=enemy

if %self%==enemy set self=player

goto pokemonmove

) else (

goto turnend

)

:enemychoose

if !enemypoke%enemyactivepoke%curhp! LEQ 0 if !enemyremainingpokes! LEQ 0 goto victory

set /a ran=%random% %% %enemypokes% + 1

for %%x in (1 2 3 4 5 6) do (

@rem echo %ran% %%x %enemyactivepoke%

if %ran%==%%x (

if !enemypoke%%xcurhp! GEQ 0 if not !enemypoke%%x!==none (

if not %enemyactivepoke%==%%x (

if not %draggedout%==1 echo !enemypoke%enemyactivepoke%! fainted^^! %enemyname% sent out !enemypoke%%x!^^! [%enemyremainingpokes%/%enemypokes%]

if %draggedout%==1 echo !enemypoke%%x! was dragged out^^! [%enemyremainingpokes%/%enemypokes%]

set enemyactivepoke=%%x

set enemyreset=1

set needtoupdatestats=0

set haveswitched=0

goto varreset

)

)

)

)

goto enemychoose

:switchchoose

if !playerpoke%playeractivepoke%curhp! LEQ 0 if !playerremainingpokes! LEQ 0 goto defeat

if %draggedout%==1 (

set /a ran=%random% %% %playerpokes% + 1

for %%x in (1 2 3 4 5 6) do (

if !ran!==%%x (

if !playerpoke%%xcurhp! GEQ 0 if not !playerpoke%%x!==none (

if not %playeractivepoke%==%%x (

echo !playerpoke%%x! was dragged out^^! [%playerremainingpokes%/%playerpokes%]

set playeractivepoke=%%x

set playerreset=1

set needtoupdatestats=0

set haveswitched=0

goto varreset

)

)

)

)

goto switchchoose

)

if %bot%==1 (

set /a ran=%random% %% %playerpokes% + 1

for %%x in (1 2 3 4 5 6) do (

@rem echo %ran% %%x %playeractivepoke%

if !ran!==%%x (

if !playerpoke%%xcurhp! GEQ 0 if not !playerpoke%%x!==none (

if not %playeractivepoke%==%%x (

if not %draggedout%==1 echo Go^^! !playerpoke%%x!^^! [%playerremainingpokes%/%playerpokes%]

if %draggedout%==1 echo !playerpoke%%x! was dragged out^^! [%playerremainingpokes%/%playerpokes%]

set playeractivepoke=%%x

set playerreset=1

set needtoupdatestats=0

set haveswitched=0

goto varreset

)

)

)

)

goto switchchoose

)

set /p switch=Pokemon in party: %playerpoke1%, %playerpoke2%, %playerpoke3%, %playerpoke4%, %playerpoke5%, %playerpoke6%...

if not %switch%==none if %switch%==!playerpoke%playeractivepoke%! (

if !playerpoke%playeractivepoke%curhp! LEQ 0 (

echo %switch% has fainted^^!

goto switchchoose

)

echo !playerpoke%playeractivepoke%! is already out^^!

goto switchchoose

)

if not %switch%==none if not %switch%==!playerpoke%playeractivepoke%! (

if %switch%==return goto mainloop

if not %switch%==%playerpoke1% if not %switch%==%playerpoke2% if not %switch%==%playerpoke2% if not %switch%==%playerpoke3% if not %switch%==%playerpoke4% if not %switch%==%playerpoke5% if not %switch%==%playerpoke6% (

echo Invalid choice.

goto switchchoose

)

for %%x in (1 2 3 4 5 6) do (

if %switch%==!playerpoke%%x! (

if !playerpoke%%xcurhp! LEQ 0 (

echo %switch% has fainted^^!

goto switchchoose

)

if not %playeractivepoke%==-1 (

set /a jumpphase+=1

set haveswitched=1

set pswitchto=%%x

goto enemymovechoose

) else (

echo Go^^! %switch%^^! [%playerremainingpokes%/%playerpokes%]

set playeractivepoke=%%x

set playerreset=1

goto varreset

)

)

)

)

echo Invalid choice.

goto switchchoose

:victory

echo !enemypoke%enemyactivepoke%! fainted^^! %playername% defeated %enemyname%^^!

pause

goto mainmenu

:defeat

echo !playerpoke%playeractivepoke%! fainted^^! %enemyname% defeated %playername%^^!

pause

goto mainmenu

:attackeffects

if %attackeffect%==buff (

set /a %self%%buffstatshort%level+=1

set needtoupdatestats=1

echo %pokename% used %move%^^! %pokename%'s %buffstatlong% rose^^!

goto determinestats

)

if %attackeffect%==sharpbuff (

set /a %self%%buffstatshort%level+=2

set needtoupdatestats=1

echo %pokename% used %move%^^! %pokename%'s %buffstatlong% rose sharply^^!

)

if %attackeffect%==debuff (

set /a %target%%buffstatshort%level-=1

set needtoupdatestats=1

echo %pokename% used %move%^^! %opokename%'s %buffstatlong% fell^^!

goto determinestats

)

if %attackeffect%==sharpdebuff (

set /a %target%%buffstatshort%level-=2

set needtoupdatestats=1

echo %pokename% used %move%^^! %opokename%'s %buffstatlong% fell harshly^^!

goto determinestats

)

if %attackeffect%==chancedebuff (

set /a ran=%random% %% 99 + 1

set needtoupdatestats=1

if !ran! LEQ %chance% (

set /a %target%%buffstatshort%level-=1

echo %opokename%'s %buffstatlong% fell^^!

)

goto determinestats

)

if %attackeffect%==chancefreeze (

set canbefrozen=0

set /a ran=%random% %% 99 + 1

if %self%==player if not !enemypoke%enemyactivepoke%type1!==ice if not !enemypoke%enemyactivepoke%type2!==ice set canbefrozen=1

if %self%==enemy if not !playerpoke%playeractivepoke%type1!==ice if not !playerpoke%playeractivepoke%type2!==ice set canbefrozen=1

if !%target%pokestatus!==none if !canbefrozen!==1 (

if !ran! LEQ 10 (

set %target%pokestatus=frozen

echo %opokename% is frozen solid^^!

)

)

goto moveresume

)

if %attackeffect%==paralyze (

set needtoupdatestats=1

set canbeparalyzed=0

if %self%==player if not !enemypoke%enemyactivepoke%type1!==electric if not !enemypoke%enemyactivepoke%type2!==electric set canbeparalyzed=1

if %self%==enemy if not !playerpoke%playeractivepoke%type1!==electric if not !playerpoke%playeractivepoke%type2!==electric set canbeparalyzed=1

if !%target%pokestatus!==none if !canbeparalyzed!==1 (

set %target%pokestatus=paralyzed

if %target%==player echo !enemypoke%enemyactivepoke%! used %move%^^! !playerpoke%playeractivepoke%! is paralyed^^! It may be unable to move^^!

if %target%==enemy echo !playerpoke%playeractivepoke%! used %move%^^! !enemypoke%enemyactivepoke%! is paralyed^^! It may be unable to move^^!

goto determinestats

)

if not !%target%pokestatus!==none (

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^! But it failed^^!

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^! But it failed^^!

set needtoupdatestats=0

goto moveresume

)

)

if %attackeffect%==chanceparalyze (

set needtoupdatestats=1

set canbeparalyzed=0

set /a ran=%random% %% 99 + 1

if %self%==player if not !enemypoke%enemyactivepoke%type1!==electric if not !enemypoke%enemyactivepoke%type2!==electric set canbeparalyzed=1

if %self%==enemy if not !playerpoke%playeractivepoke%type1!==electric if not !playerpoke%playeractivepoke%type2!==electric set canbeparalyzed=1

if !%target%pokestatus!==none if !canbeparalyzed!==1 (

if !ran! LEQ %chance% (

set %target%pokestatus=paralyzed

echo %opokename% is paralyed^^! It may be unable to move^^!

)

)

goto determinestats

)

if %attackeffect%==chanceburn (

set needtoupdatestats=1

set canbeburned=0

set /a ran=%random% %% 99 + 1

if %self%==player if not !enemypoke%enemyactivepoke%type1!==fire if not !enemypoke%enemyactivepoke%type2!==fire set canbeburned=1

if %self%==enemy if not !playerpoke%playeractivepoke%type1!==fire if not !playerpoke%playeractivepoke%type2!==fire set canbeburned=1

if !%target%pokestatus!==none if !canbeburned!==1 (

if !ran! LEQ 10 (

set %target%pokestatus=burned

echo %opokename% is burned^^!

)

)

goto determinestats

)

if %attackeffect%==sleep (

if !%target%pokeisasleep! GEQ 1 (

if %target%==player echo !enemypoke%enemyactivepoke%! used %move%^^! But it failed^^!

if %target%==enemy echo !playerpoke%playeractivepoke%! used %move%^^! But it failed^^!

goto moveresume

)

set /a turns=%random% %% 4 + 1

set /a ran=%random% %% 99 + 1

if !%target%pokestatus!==none (

if !ran! LEQ 99 (

set %target%pokestatus=asleep

set %target%pokeisasleep=!turns!

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^! !enemypoke%enemyactivepoke%! is fast asleep^^!

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^! !playerpoke%playeractivepoke%! is fast asleep^^!

)

)

goto moveresume

)

if %attackeffect%==poison (

set canbepoisoned=0

if %self%==player if not !enemypoke%enemyactivepoke%type1!==steel if not !enemypoke%enemyactivepoke%type2!==steel if not !enemypoke%enemyactivepoke%type1!==poison if not !enemypoke%enemyactivepoke%type2!==poison set canbepoisoned=1

if %self%==enemy if not !playerpoke%playeractivepoke%type1!==steel if not !playerpoke%playeractivepoke%type2!==steel if not !playerpoke%playeractivepoke%type1!==poison if not !playerpoke%playeractivepoke%type2!==poison set canbepoisoned=1

if !%target%pokestatus!==none if !canbepoisoned!==1 (

set %target%pokestatus=poisoned

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^! !enemypoke%enemyactivepoke%! is poisoned^^!

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^! !playerpoke%playeractivepoke%! is poisoned^^!

)

goto moveresume

)

if %attackeffect%==chancepoison (

set canbepoisoned=0

set /a ran=%random% %% 99 + 1

if %self%==player if not !enemypoke%enemyactivepoke%type1!==steel if not !enemypoke%enemyactivepoke%type2!==steel if not !enemypoke%enemyactivepoke%type1!==poison if not !enemypoke%enemyactivepoke%type2!==poison set canbepoisoned=1

if %self%==enemy if not !playerpoke%playeractivepoke%type1!==steel if not !playerpoke%playeractivepoke%type2!==steel if not !playerpoke%playeractivepoke%type1!==poison if not !playerpoke%playeractivepoke%type2!==poison set canbepoisoned=1

if !%target%pokestatus!==none if !canbepoisoned!==1 if !ran! LEQ %chance% (

set %target%pokestatus=poisoned

if %self%==player echo !enemypoke%enemyactivepoke%! is poisoned^^!

if %self%==enemy echo !playerpoke%playeractivepoke%! is poisoned^^!

)

goto moveresume

)

if %attackeffect%==multiturndamage (

set /a %target%multiturndamage=%random% %% 1 + 4

set %target%MTDtype=%mtdtype%

goto moveresume

)

if %attackeffect%==chanceflinch (

set /a ran=%random% %% 99 + 1

if !ran! LEQ %chance% (

set %target%willflinch=1

)

goto moveresume

)

if %attackeffect%==lowercrit (

set /a %self%critlevel-=1

goto moveresume

)

if %attackeffect%==leech (

set /a damage=%damage%/2

if %self%==player set /a playerpoke%playeractivepoke%curhp+=!damage!

if %self%==enemy set /a enemypoke%enemyactivepoke%curhp+=!damage!

if !playerpoke%playeractivepoke%curhp! GTR %playerpokestathp% set playerpoke%playeractivepoke%curhp=%playerpokestathp%

if !enemypoke%enemyactivepoke%curhp! GTR %enemypokestathp% set enemypoke%enemyactivepoke%curhp=%enemypokestathp%

if %self%==enemy echo !playerpoke%playeractivepoke%! was drained of health^^! !enemypoke%enemyactivepoke%! regained !damage! health^^!

if %self%==player echo !enemypoke%enemyactivepoke%! was drained of health^^! !playerpoke%playeractivepoke%! regained !damage! health^^!

goto moveresume

)

if %attackeffect%==recoil (

set /a recoil=%damage%/%recoildivisor%

if %self%==enemy (

echo !enemypoke%enemyactivepoke%! took !recoil! damage^^!

set /a enemypoke%enemyactivepoke%curhp-=!recoil!

)

if %self%==player (

echo !playerpoke%playeractivepoke%! took !recoil! damage^^!

set /a playerpoke%playeractivepoke%curhp-=!recoil!

)

goto moveresume

@REM FIX RECOIL/FIXED DAMAGE CHECK FOR LOWER THAN 0 HP ON SELF POKEMON

)

if %attackeffect%==selfdestroy (

if %target%==player (

set enemypoke%enemyactivepoke%curhp=0

set /a enemyremainingpokes-=1

if %damage%==0 echo !enemypoke%enemyactivepoke%! used %move%^^! !enemypoke%enemyactivepoke%! fainted^^!

goto enemychoose

)

if %target%==enemy (

set playerpoke%playeractivepoke%curhp=0

if %damage%==0 echo !playerpoke%playeractivepoke%! used %move%^^! !playerpoke%playeractivepoke%! fainted^^!

set /a playerremainingpokes-=1

if !playerremainingpokes! LEQ 0 goto defeat

if not %damage%==0 echo !playerpoke%playeractivepoke%! fainted^^!

set playeractivepoke=-1

goto switchchoose

)

)

if %attackeffect%==ohko (

if %target%==enemy (

set /a enemypoke%enemyactivepoke%curhp=0

@rem echo !playerpoke%playeractivepoke%! used %move%^^! !enemypoke%enemyactivepoke%! fainted^^!

goto enemychoose

)

if %target%==player (

set /a playerpoke%playeractivepoke%curhp=0

echo !enemypoke%enemyactivepoke%! used %move%^^! !playerpoke%playeractivepoke%! fainted^^!

set playeractivepoke=-1

goto switchchoose

)

)

if %attackeffect%==autofail (

echo %pokename% used %move%^^! But it failed^^!

goto moveresume

)

if %attackeffect%==dragout (

set draggedout=1

if %target%==enemy (

if %enemyremainingpokes%==1 (

echo echo %pokename% used %move%^^! But it failed^^!

goto moveresume

)

echo %pokename% used %move%^^!

goto enemychoose

)

if %target%==player (

if %playerremainingpokes%==1 (

echo echo %pokename% used %move%^^! But it failed^^!

goto moveresume

)

echo %pokename% used %move%^^!

goto switchchoose

)

)

if %attackeffect%==recover (

echo %pokename% used %move%^^! It regained health^^!

if %self%==player set /a playerpoke%playeractivepoke%curhp+=%playerpokestathp%/2

if %self%==enemy set /a enemypoke%enemyactivepoke%curhp+=%enemypokestathp%/2

if !playerpoke%playeractivepoke%curhp! GTR %playerpokestathp% set playerpoke%playeractivepoke%curhp=%playerpokestathp%/2

if !enemypoke%enemyactivepoke%curhp! GTR %enemypokestathp% set enemypoke%enemyactivepoke%curhp=%enemypokestathp%/2

goto moveresume

)

if %attackeffect%==confuse (

if !%target%pokeisconfused! GEQ 1 (

echo %pokename% used %move%^^! But it failed^^!

goto moveresume

)

set /a %target%pokeisconfused=%random% %% 5 + 1

echo %pokename% used %move%^^! %opokename% became confused^^!

goto moveresume

)

if %attackeffect%==chanceconfuse (

set /a ran=%random% %% 10 + 1

if !ran! LEQ %chance% (

if %target%pokeisconfused==0 (

set /a %target%pokeisconfused=%random% %% 5 + 1

echo %opokename% became confused^^!

)

)

goto moveresume

)

if %move%==BIDE (

set /a %self%isbiding+=1

if !%self%isbiding!==3 (

set %self%isbiding=0

set /a %self%bidedamage*=2

if %target%==player (

set /a playerpoke%playeractivepoke%curhp-=!enemybidedamage!

echo !enemypoke%enemyactivepoke%! used %move%^^! !enemybidedamage! damage^^!

)

if %target%==enemy (

set /a enemypoke%enemyactivepoke%curhp-=!playerbidedamage!

echo !playerpoke%playeractivepoke%! used %move%^^! !playerbidedamage! damage^^!

)

goto moveresume

)

if not !%self%isbiding!==1 if not !%self%isbiding!==0 (

if %self%==enemy echo !enemypoke%enemyactivepoke%! is biding it's time^^!

if %self%==player echo !playerpoke%playeractivepoke%! is biding it's time^^!

goto moveresume

)

if !%self%isbiding!==1 (

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^!

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^!

goto moveresume

)

)

if %move%==CONVERSION (

set conversioncheck=1

if %self%==player set move=!playerpoke%playeractivepoke%m1!

if %self%==enemy set move=!enemypoke%enemyactivepoke%m1!

goto movedictionary

)

if %move%==COUNTER (

if %pmove%==COUNTER if !enemypoke%enemyactivepoke%m%emove%!==COUNTER (

if %target%==player echo !enemypoke%enemyactivepoke%! used %move%^^! But it failed^^!

if %target%==enemy echo !playerpoke%playeractivepoke%! used %move%^^! But it failed^^!

goto moveresume

)

if %counterphysicalcheck%==1 (

if %target%==player (

set /a playerpoke%playeractivepoke%curhp-=%counterdamage%

echo !enemypoke%enemyactivepoke%! used %move%^^! %counterdamage% damage^^!

)

if %target%==enemy (

set /a enemypoke%enemyactivepoke%curhp-=%counterdamage%

echo !playerpoke%playeractivepoke%! used %move%^^! %counterdamage% damage^^!

)

) else (

if %target%==player echo !enemypoke%enemyactivepoke%! used %move%^^! But it failed^^!

if %target%==enemy echo !playerpoke%playeractivepoke%! used %move%^^! But it failed^^!

)

set counterdamage=0

goto moveresume

)

if %move%==DIG (

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^! !enemypoke%enemyactivepoke%! burrowed it's way underground^^!

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^! !playerpoke%enemyactivepoke%! burrowed it's way underground^^!

set %self%pokeisunderground=1

goto moveresume

)

if %move%==DISABLE (

if %self%==player if %enemyisdisabled% GEQ 1 if %enemypreviousmove%==%enemydisabledmove% (

!playerpoke%playeractivepoke%! used %move%^^! But it failed^^!

)

if %self%==enemy if %playerisdisabled% GEQ 1 if %playerpreviousmove%==%playerdisabledmove% (

!enemypoke%enemyactivepoke%! used %move%^^! But it failed^^!

)

if %self%==player if %enemypreviousmove%==0 (

echo !playerpoke%playeractivepoke%! used %move%^^! But it failed^^!

goto moveresume

)

if %self%==enemy if %playerpreviousmove%==0 (

!enemypoke%enemyactivepoke%! used %move%^^! But it failed^^!

goto moveresume

)

set /a ran=%random% %% 8 + 1

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^! !enemypoke%enemyactivepoke%! disabled !playerpoke%enemyactivepoke%!'s %playerpreviousmove%^^!

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^! !playerpoke%enemyactivepoke%! disabled !enemypoke%enemyactivepoke%!'s %enemypreviousmove%^^!

set %target%isdisabled=!ran!

set %target%disabledmove=!%target%previousmove!

goto moveresume

)

if %move%==DRAGON_RAGE (

if %target%==player (

set /a playerpoke%playeractivepoke%curhp-=40

echo !enemypoke%enemyactivepoke%! used %move%^^! 40 damage^^!

)

if %target%==enemy (

set /a enemypoke%enemyactivepoke%curhp-40

echo !playerpoke%playeractivepoke%! used %move%^^! 40 damage^^!

)

)

if %move%==FLY (

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^! !enemypoke%enemyactivepoke%! flew up high^^!

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^! !playerpoke%playeractivepoke%! flew up high^^!

set %self%pokeisflying=1

goto moveresume

)

if %move%==FOCUS_ENERGY (

set /a %self%critlevel+=1

set needtoupdatestats=1

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^! !enemypoke%enemyactivepoke%! is storing energy^^!

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^! !playerpoke%playeractivepoke%! is storing energy^^!

goto moveresume

)

if %move%==GROWTH (

set /a %self%atkstatlevel+=1

set /a %self%satkstatlevel+=1

set needtoupdatestats=1

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^! !enemypoke%enemyactivepoke%!'s attack rose^^!

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^! !enemypoke%enemyactivepoke%!'s sp. attack rose^^!

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^! !playerpoke%playeractivepoke%!'s attack rose^^!

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^! !playerpoke%playeractivepoke%!'s sp. attack rose^^!

goto determinestats

)

if %move%==HAZE (

set needtoupdatestats=1

set playerreset=1

set enemyreset=1

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^! All stat changes were eliminated^^!

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^! All stat changes were eliminated^^!

goto varreset

)

if %move%==LEECH_SEED (

if %self%==enemy echo !enemypoke%enemyactivepoke%! used %move%^^!

if %self%==player echo !playerpoke%playeractivepoke%! used %move%^^!

set %target%isseeded=1

goto moveresume

)

if %move%==LIGHT_SCREEN (

set %self%liscmod=2

set %self%lisccounter=5

if %self%==player echo %pokename% used %move%^^! %move% raised your team's special defense^^!

if %self%==enemy echo %pokename% used %move%^^! %move% raised the enemy team's special defense^^!

goto moveresume

)

if %move%==NIGHT_SHADE (

if %target%==player (

set /a playerpoke%playeractivepoke%curhp-=!enemypoke%enemyactivepoke%lvl!

echo !enemypoke%enemyactivepoke%! used %move%^^! !enemypoke%enemyactivepoke%lvl! damage^^!

)

if %target%==enemy (

set /a enemypoke%enemyactivepoke%curhp-!playerpoke%playeractivepoke%lvl!

echo !playerpoke%playeractivepoke%! used %move%^^! !playerpoke%playeractivepoke%lvl! damage^^!

)

goto moveresume

)

if %move%==PSYWAVE (

set /a ran=%random% %% 99 + 51

if %target%==enemy for /f %%n in ('cscript //nologo eval.vbs "(!ran!/100)*!playerpoke%playeractivepoke%lvl!"') do set damage=%%n

if %target%==player for /f %%n in ('cscript //nologo eval.vbs "(!ran!/100)*!enemypoke%enemyactivepoke%lvl!"') do set damage=%%n

for /f "tokens=1 delims=." %%a in ('echo !damage!') do set damage=%%a

if %target%==player (

set /a playerpoke%playeractivepoke%curhp-=!damage!

echo !enemypoke%enemyactivepoke%! used %move%^^! !damage! damage^^!

)

if %target%==enemy (

set /a enemypoke%enemyactivepoke%curhp-=!damage!

echo !playerpoke%playeractivepoke%! used %move%^^! !damage! damage^^!

)

goto moveresume

)

if %move%==REFLECT (

set %self%refmod=2

set %self%refcounter=5

if %self%==player echo %pokename% used %move%^^! %move% raised your team's defense^^!

if %self%==enemy echo %pokename% used %move%^^! %move% raised the enemy team's defense^^!

goto moveresume

)

if %move%==REST (

set %self%pokestatus=asleep

set %self%pokeisasleep=2

echo %pokename% used %move%^^! %pokename% went to sleep^^!

echo %pokename% regained health^^!

if %self%==player set playerpoke%playeractivepoke%curhp=%playerpokestathp%

if %self%==enemy set enemypoke%enemyactivepoke%curhp=%enemypokestathp%

goto moveresume

)

if %move%==SEISMIC_TOSS (

if %target%==player (

set /a playerpoke%playeractivepoke%curhp-=!enemypoke%enemyactivepoke%lvl!

echo !enemypoke%enemyactivepoke%! used %move%^^! !enemypoke%enemyactivepoke%lvl! damage^^!

)

if %target%==enemy (

set /a enemypoke%enemyactivepoke%curhp-!playerpoke%playeractivepoke%lvl!

echo !playerpoke%playeractivepoke%! used %move%^^! !playerpoke%playeractivepoke%lvl! damage^^!

)

goto moveresume

)

if %move%==SKY_ATTACK (

set /a ran=%random% %% 99 + 1

set %self%ischargingsky=0

if !ran! LEQ 30 (

set %target%willflinch=1

)

goto moveresume

)

if %move%==SOLAR_BEAM (

set %self%ischargingsolar=0

goto moveresume

)

if %move%==SONIC_BOOM (

if %target%==player (

set /a playerpoke%playeractivepoke%curhp-=20

echo !enemypoke%enemyactivepoke%! used %move%^^! 20 damage^^!

)

if %target%==enemy (

set /a enemypoke%enemyactivepoke%curhp-20

echo !playerpoke%playeractivepoke%! used %move%^^! 20 damage^^!

)

goto moveresume

)

if %move%==SPLASH (

echo %pokename% used splash^^! But nothing happened^^!

goto moveresume

)

if %move%==SUPER_FANG (

if %target%==enemy set damage=!playerpoke%playeractivepoke%curhp!/2

if %target%==player set damage=!enemypoke%enemyactivepoke%curhp!/2

for /f "tokens=1 delims=." %%a in ('echo !damage!') do set damage=%%a

if %target%==player (

set /a playerpoke%playeractivepoke%curhp-=!damage!

echo !enemypoke%enemyactivepoke%! used %move%^^! !damage! damage^^!

)

if %target%==enemy (

set /a enemypoke%enemyactivepoke%curhp-=!damage!

echo !playerpoke%playeractivepoke%! used %move%^^! !damage! damage^^!

)

goto moveresume

)

:attackeffectsresume

goto moveresume

:helpmovedictionary

echo Currently-Coded Move List

@echo

echo Generation One:

echo Present:

echo Absorb

echo Acid

echo Acid Armor

echo Agility

echo Amnesia

echo Aurora Beam

echo Barrage

echo Barrier

echo Bide

echo Bind

echo Bite

echo Blizzard

echo Body Slam

echo Bone Club

echo Bonermerang

echo Bubble

echo Bubble Beam

echo Clamp

echo Comet Punch

echo Confuse Ray

echo Confusion

echo Constrict

echo Conversion

echo Counter

echo Crabhammer

echo Cut

echo Defense Curl

echo Dig

echo Disable

echo Dizzy Punch

echo Double Kick

echo Double Slap

echo Double Team

echo Double-Edge

echo Dragon Rage

echo Drill Peck

echo Earthquake

echo Egg Bomb

echo Ember

echo Explosion

echo Fire_Blast

echo Fire Punch

echo Fire Spin

echo Fissure

echo Flamethrower

echo Flash

echo Fly

echo Focus Energyy

echo Fury Attack

echo Fury Swipes

echo Glare

echo Growl

echo Growth

echo Guillotine

echo Gust

echo Harden

echo Haze

echo Headbutt

echo High Jump Kick

echo Horn Attack

echo Horn Drill

echo Hydro Pump

echo Hyper Beam

echo Hyper Fang

echo Hypnosis

echo Ice Beam

echo Ice Punch

echo Jump Kick

echo Karate Chop

echo Kinesis

echo Leech Life

echo Leech Seed

echo Leer

echo Lick

echo Light Screen

echo Lovely Kiss

echo Meditate

echo Mega Drain

echo Mega Kick

echo Mega Punch

echo Minimize

echo Mirrow Move

echo Night Shade

echo Pay Day

echo Peck

echo Pin Missile

echo Poison Gas

echo Poison Powder

echo Poison Sting

echo Pound

echo Psybeam

echo Psychic

echo Psywave

echo Quick Attack

echo Rage

echo Razor Leaf

echo Recover

echo Reflect

echo Rest

echo Roar

echo Rock Slide

echo Rock Throw

echo Rolling Kick

echo Sand Attack

echo Scratch

echo Screech

echo Seismic Toss

echo Self Destrcut

echo Sharpen

echo Sing

echo Sky Attack

echo Slam

echo Slash

echo Sleep Powder

echo Sludge

echo Smog

echo Smokescreen

echo Soft Boiled

echo Solar Beam

echo Sonic Boom

echo Spike Cannon

echo Splash

echo Spore

echo Stomp

echo Strength

echo String Shot

echo Struggle

echo Stun Spore

echo Submission

echo Super Fang

echo Supersonic

echo Surf

echo Swift

echo Swords Dance

echo Tackle

echo Tail Whip

echo Take Down

echo Teleport

echo Thrash

echo Thunder

echo Thunder Punch

echo Thunder Shock

echo Thunder Wqave

echo Thunderbolt

echo Toxic

echo Twineedle

echo Vice Grip

echo Vine Whip

echo Water Gun

echo Waterfall

echo Whirlwind

echo Wing Attack

echo Withdraw

echo Wrap

@echo

echo Absent:

echo Dream Eater

echo Low Kick

echo Metronome

echo Mimic

echo Petal Dance

echo Razor Wind

echo Skull Bash

echo Substitute

echo Transform

@echo

goto :eof

:movedictionary

if %self%==player set target=enemy

if %self%==enemy set target=player

set PRIORITY=0

set moveisohko=0

set attackeffect=none

if %move%==ABSORB (

set atktype=grass

set BP=20

set ACC=100

set movecategory=special

set attackeffect=leech

)

if %move%==ACID (

set atktype=poison

set BP=40

set ACC=100

set movecategory=special

set attackeffect=chancedebuff

set chance=10

set buffstatshort=sdefstat

set buffstatlong=special_defense

)

if %move%==ACID_ARMOR (

set atktype=poison

set BP=0

set ACC=100

set movecategory=status

set attackeffect=sharpbuff

set buffstatshort=defstat

set buffstatlong=defense

)

if %move%==AGILITY (

set atktype=psychic

set BP=0

set ACC=100

set movecategory=status

set attackeffect=sharpbuff

set buffstatshort=spdstat

set buffstatlong=speed

)

if %move%==AMNESIA (

set atktype=psychic

set BP=0

set ACC=100

set movecategory=status

set attackeffect=sharpbuff

set buffstatshort=statsdef

set buffstatlong=special_defense

)

if %move%==AURORA_BEAM (

set atktype=ice

set BP=65

set ACC=100

set movecategory=special

set attackeffect=chancefreeze

)

if %move%==BARRAGE (

set atktype=normal

set BP=15

set ACC=85

set movecategory=physical

set /a multihitmovecount=%random% %% 4 + 1

)

if %move%==BARRIER (

set atktype=psychic

set BP=0

set ACC=100

set movecategory=status

set attackeffect=sharpbuff

set buffstatshort=defstat

set buffstatlong=defense

)

if %move%==BIDE (

set atktype=normal

set BP=0

set ACC=100

set movecategory=physical

set PRIORITY=1

)

if %move%==BIND (

set atktype=normal

set BP=15

set ACC=85

set movecategory=physical

set attackeffect=multiturndamage

set mtdtype=bind

)

if %move%==BITE (

set atktype=dark

set BP=60

set ACC=100

set movecategory=physical

set attackeffect=chanceflinch

set chance=30

)

if %move%==BLIZZARD (

set atktype=ice

set BP=110

set ACC=70

set movecategory=special

set attackeffect=chancefreeze

)

if %move%==BODY_SLAM (

set atktype=normal

set BP=85

set ACC=100

set movecategory=physical

set attackeffect=chanceparalyze

)

if %move%==BONE_CLUB (

set atktype=ground

set BP=65

set ACC=85

set movecategory=physical

set attackeffect=chanceflinch

set chance=10

)

if %move%==BONEMERANG (

set atktype=ground

set BP=50

set ACC=90

set movecategory=physical

set multihitmovecount=1

)

if %move%==BUBBLE (

set atktype=water

set BP=40

set ACC=100

set movecategory=physical

set attackeffect=chancedebuff

set chance=10

set buffstatshort=spdstat

set buffstatlong=speed

)

if %move%==BUBBLE_BEAM (

set atktype=water

set BP=65

set ACC=100

set movecategory=special

set attackeffect=chancedebuff

set chance=10

set buffstatshort=spdstat

set buffstatlong=speed

)

if %move%==CLAMP (

set atktype=water

set BP=35

set ACC=85

set movecategory=physical

set attackeffect=multiturndamage

set mtdtype=clamp

)

if %move%==COMET_PUNCH (

set atktype=normal

set BP=18

set ACC=85

set movecategory=physical

set /a multihitmovecount=%random% %% 4 + 1

)

if %move%==CONFUSE_RAY (

set atktype=ghost

set BP=0

set ACC=100

set movecategory=status

set attackeffect=confuse

)

if %move%==CONFUSION (

set atktype=psychic

set BP=50

set ACC=100

set movecategory=special

set attackeffect=chanceconfuse

set chance=10

)

if %move%==CONSTRICT (

set atktype=normal

set BP=10

set ACC=100

set movecategory=physical

set movecategory=special

set attackeffect=chancedebuff

set chance=10

set buffstatshort=spdstat

set buffstatlong=speed

)

if %move%==CONVERSION (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

)

if %move%==COUNTER (

set atktype=fighting

set BP=80

set ACC=100

set movecategory=physical

set PRIORITY=-5

)

if %move%==CRABHAMMER (

set atktype=water

set BP=100

set ACC=90

set movecategory=physical

set tempcritboost=1

set attackeffect=lowercrit

)

if %move%==CUT (

set atktype=normal

set BP=50

set ACC=95

set movecategory=physical

)

if %move%==DEFENSE_CURL (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=buff

set buffstatshort=defstat

set buffstatlong=defense

)

if %move%==DIG (

set atktype=ground

set BP=80

set ACC=100

set movecategory=physical

)

if %move%==DISABLE (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

)

if %move%==DIZZY_PUNCH (

set atktype=normal

set BP=70

set ACC=100

set movecategory=physical

set attackeffect=chanceconfuse

set chance=10

)

if %move%==DOUBLE_KICK (

set atktype=fighting

set BP=30

set ACC=100

set movecategory=physical

set multihitmovecount=1

)

if %move%==DOUBLE_SLAP (

set atktype=normal

set BP=15

set ACC=85

set movecategory=physical

set /a multihitmovecount=1

)

if %move%==DOUBLE_TEAM (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=buff

set buffstatshort=eva

set buffstatlong=evasion

)

if %move%==DOUBLE_EDGE (

set atktype=normal

set BP=120

set ACC=100

set movecategory=physical

set attackeffect=recoil

set recoildivisor=3

)

if %move%==DRAGON_RAGE (

set atktype=dragon

set BP=0

set ACC=100

set movecategory=physical

)

if %move%==DRILL_PECK (

set atktype=flying

set BP=80

set ACC=100

set movecategory=physical

)

if %move%==EARTHQUAKE (

set atktype=ground

set BP=100

set ACC=100

set movecategory=physical

)

if %move%==EGG_BOMB (

set atktype=normal

set BP=100

set ACC=75

set movecategory=physical

)

if %move%==EMBER (

set atktype=fire

set BP=40

set ACC=100

set movecategory=special

set attackeffect=chanceburn

)

if %move%==EXPLOSION (

set atktype=normal

set BP=250

set ACC=100

set movecategory=physical

set attackeffect=selfdestroy

)

if %move%==FIRE_BLAST (

set atktype=fire

set BP=110

set ACC=85

set movecategory=special

set attackeffect=chanceburn

)

if %move%==FIRE_PUNCH (

set atktype=fire

set BP=75

set ACC=100

set movecategory=physical

set attackeffect=chanceburn

)

if %move%==FIRE_SPIN (

set atktype=fire

set BP=35

set ACC=85

set movecategory=physical

)

if %move%==FISSURE (

set atktype=ground

set BP=0

set ACC=100

set movecategory=physical

set moveisohko=1

set attackeffect=ohko

)

if %move%==FLAMETHROWER (

set atktype=fire

set BP=90

set ACC=100

set movecategory=special

set attackeffect=chanceburn

)

if %move%==FLASH (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=debuff

set buffstatshort=acc

set buffstatlong=accuracy

)

if %move%==FLY (

set atktype=flying

set BP=90

set ACC=95

set movecategory=physical

)

if %move%==FOCUS_ENERGY (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

)

if %move%==FURY_ATTACK (

set atktype=normal

set BP=15

set ACC=85

set movecategory=physical

set /a multihitmovecount=%random% %% 4 + 1

)

if %move%==FURY_SWIPES (

set atktype=normal

set BP=18

set ACC=80

set movecategory=physical

set /a multihitmovecount=%random% %% 4 + 1

)

if %move%==GLARE (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=paralyze

)

if %move%==GROWL (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=debuff

set buffstatshort=atkstat

set buffstatlong=attack

)

if %move%==GROWTH (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

)

if %move%==GUILLOTINE (

set atktype=normal

set BP=0

set ACC=100

set movecategory=physical

set moveisohko=1

set attackeffect=ohko

)

if %move%==GUST (

set atktype=flying

set BP=40

set ACC=100

set movecategory=special

)

if %move%==HARDEN (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=buff

set buffstatshort=defstat

set buffstatlong=defense

)

if %move%==HAZE (

set atktype=ice

set BP=0

set ACC=100

set movecategory=status

)

if %move%==HEADBUTT (

set atktype=normal

set BP=70

set ACC=100

set movecategory=physical

set attackeffect=chanceflinch

set chance=30

)

if %move%==HIGH_JUMP_KICK (

set atktype=fighting

set BP=130

set ACC=90

set movecategory=physical

set cancrash=1

)

if %move%==HORN_ATTACK (

set atktype=normal

set BP=65

set ACC=100

set movecategory=physical

)

if %move%==HORN_DRILL (

set atktype=normal

set BP=0

set ACC=100

set movecategory=physical

set moveisohko=1

set attackeffect=ohko

)

if %move%==HYDRO_PUMP (

set atktype=water

set BP=120

set ACC=80

set movecategory=special

)

if %move%==HYPER_BEAM (

set atktype=normal

set BP=150

set ACC=90

set movecategory=special

)

if %move%==HYPER_FANG (

set atktype=normal

set BP=0

set ACC=100

set movecategory=physical

set moveisohko=1

)

if %move%==HYPNOSIS (

set atktype=psychic

set BP=0

set ACC=100

set movecategory=status

set attackeffect=sleep

)

if %move%==ICE_BEAM (

set atktype=ice

set BP=90

set ACC=100

set movecategory=special

set attackeffect=chancefreeze

)

if %move%==ICE_PUNCH (

set atktype=ice

set BP=75

set ACC=100

set movecategory=physical

set attackeffect=chancefreeze

)

if %move%==JUMP_KICK (

set atktype=fighting

set BP=100

set ACC=95

set movecategory=physical

set cancrash=1

)

if %move%==KARATE_CHOP (

set atktype=fighting

set BP=50

set ACC=100

set movecategory=physical

set tempcritboost=1

set attackeffect=lowercrit

)

if %move%==KINESIS (

set atktype=psychic

set BP=0

set ACC=80

set movecategory=status

set attackeffect=debuff

set buffstatshort=acc

set buffstatlong=accuracy

)

if %move%==LEECH_LIFE (

set atktype=bug

set BP=20

set ACC=100

set movecategory=physical

set attackeffect=leech

)

if %move%==LEECH_SEED (

set atktype=grass

set BP=0

set ACC=90

set movecategory=status

)

if %move%==LEER (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=debuff

set buffstatshort=defstat

set buffstatlong=defense

)

if %move%==LICK (

set atktype=ghost

set BP=0

set ACC=100

set movecategory=physical

set attackeffect=chanceparalyze

)

if %move%==LIGHT_SCREEN (

set atktype=psychic

set BP=0

set ACC=100

set movecategory=status

)

if %move%==LOVELY_KISS (

set atktype=normal

set BP=0

set ACC=75

set movecategory=status

)

@rem LOW_KICK

if %move%==MEDITATE (

set atktype=psychic

set BP=0

set ACC=100

set movecategory=status

set attackeffect=buff

set buffstatshort=statatk

set buffstatlong=attack

)

if %move%==MEGA_DRAIN (

set atktype=grass

set BP=40

set ACC=100

set movecategory=special

set attackeffect=leech

)

if %move%==MEGA_KICK (

set atktype=normal

set BP=120

set ACC=75

set movecategory=physical

)

if %move%==MEGA_PUNCH (

set atktype=normal

set BP=80

set ACC=85

set movecategory=physical

)

@REM METRONOME

@REM MIMIC

if %move%==MINIMIZE (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=sharpbuff

set buffstatshort=eva

set buffstatlong=evasion

)

if %move%==MIRROR_MOVE (

set atktype=flying

set BP=0

set ACC=100

set movecategory=physical

)

@REM MIST

if %move%==NIGHT_SHADE (

set atktype=ghost

set BP=0

set ACC=100

set movecategory=special

)

if %move%==PAY_DAY (

set atktype=normal

set BP=40

set ACC=100

set movecategory=physical

)

if %move%==PECK (

set atktype=flying

set BP=35

set ACC=100

set movecategory=special

)

@REM PETAL_DANCE

if %move%==PIN_MISSILE (

set atktype=bug

set BP=25

set ACC=95

set movecategory=special

set /a multihitmovecount=%random% %% 4 + 1

)

if %move%==POISON_GAS (

set atktype=poison

set BP=0

set ACC=90

set movecategory=status

set attackeffect=poison

)

if %move%==POISON_POWDER (

set atktype=poison

set BP=0

set ACC=90

set movecategory=status

set attackeffect=poison

)

if %move%==POISON_STING (

set atktype=poison

set BP=15

set ACC=100

set movecategory=physical

set attackeffect=chancepoison

set chance=30

)

if %move%==POUND (

set atktype=normal

set BP=40

set ACC=100

set movecategory=physical

)

if %move%==PSYBEAM (

set atktype=psychic

set BP=65

set ACC=100

set movecategory=special

set attackeffect=chanceconfuse

set chance=10

)

if %move%==PSYCHIC (

set atktype=psychic

set BP=90

set ACC=100

set movecategory=special

set attackeffect=chancedebuff

set buffstatshort=statsdef

set buffstatlong=special_defense

)

if %move%==PSYWAVE (

set atktype=psychic

set BP=0

set ACC=100

set movecategory=special

)

if %move%==QUICK_ATTACK (

set atktype=normal

set BP=65

set ACC=100

set movecategory=physical

set PRIORITY=1

)

if %move%==RAGE (

set atktype=normal

set BP=20

set ACC=100

set movecategory=physical

)

if %move%==RAZOR_LEAF (

set atktype=grass

set BP=55

set ACC=95

set movecategory=physical

set tempcritboost=1

set attackeffect=lowercrit

)

@REM RAZOR_WIND

if %move%==RECOVER (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=recover

)

if %move%==REFLECT (

set atktype=psychic

set BP=0

set ACC=100

set movecategory=status

)

if %move%==REST (

set atktype=psychic

set BP=0

set ACC=100

set movecategory=status

)

if %move%==ROAR (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set PRIORITY=-6

set attackeffect=dragout

)

if %move%==ROCK_SLIDE (

set atktype=rock

set BP=75

set ACC=90

set movecategory=physical

set attackeffect=chanceflinch

set chance=30

)

if %move%==ROCK_THROW (

set atktype=rock

set BP=50

set ACC=90

set movecategory=physical

)

if %move%==ROLLING_KICK (

set atktype=fighting

set BP=60

set ACC=85

set movecategory=physical

set attackeffect=chanceflinch

set chance=30

)

if %move%==SAND_ATTACK (

set atktype=ground

set BP=0

set ACC=100

set movecategory=status

set attackeffect=debuff

set buffstatshort=acc

set buffstatlong=accuracy

)

if %move%==SCRATCH (

set atktype=normal

set BP=40

set ACC=100

set movecategory=physical

)

if %move%==SCREECH (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=sharpdebuff

set buffstatshort=defstat

set buffstatlong=defense

)

if %move%==SEISMIC_TOSS (

set atktype=fighting

set BP=0

set ACC=100

set movecategory=physical

)

if %move%==SELF_DESTRUCT (

set atktype=normal

set BP=200

set ACC=100

set movecategory=physical

set attackeffect=selfdestroy

)

if %move%==SHARPEN (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=buff

set buffstatshort=atkstat

set buffstatlong=attack

)

if %move%==SING (

set atktype=normal

set BP=0

set ACC=55

set movecategory=status

set attackeffect=sleep

)

@rem SKULL_BASH

if %move%==SKY_ATTACK (

set atktype=flying

set BP=140

set ACC=90

set movecategory=physical

if !%self%ischargingsky!==0 set %self%ischargingsky=1

)

if %move%==SLAM (

set atktype=normal

set BP=80

set ACC=75

set movecategory=physical

)

if %move%==SLASH (

set atktype=normal

set BP=70

set ACC=100

set movecategory=physical

set tempcritboost=1

set attackeffect=lowercrit

)

if %move%==SLEEP_POWDER (

set atktype=grass

set BP=0

set ACC=75

set movecategory=status

set attackeffect=sleep

)

if %move%==SLUDGE (

set atktype=poison

set BP=65

set ACC=100

set movecategory=special

set attackeffect=chancepoison

set chance=40

)

if %move%==SMOG (

set atktype=poison

set BP=30

set ACC=70

set movecategory=special

set attackeffect=chancepoison

set chance=40

)

if %move%==SMOKESCREEN (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=debuff

set buffstatshort=acc

set buffstatlong=accuracy

)

if %move%==SOFT_BOILED (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

)

if %move%==SOLAR_BEAM (

set atktype=grass

set BP=120

set ACC=100

set movecategory=special

if !%self%ischargingsolar!==0 set %self%ischargingsolar=1

)

if %move%==SONIC_BOOM (

set atktype=normal

set BP=0

set ACC=100

set movecategory=special

)

if %move%==SPIKE_CANNON (

set atktype=normal

set BP=20

set ACC=100

set movecategory=physical

set /a multihitmovecount=%random% %% 4 + 1

)

if %move%==SPLASH (

set atktype=water

set BP=0

set ACC=100

set movecategory=status

)

if %move%==SPORE (

set atktype=grass

set BP=0

set ACC=100

set movecategory=status

set attackeffect=sleep

)

if %move%==STOMP (

set atktype=normal

set BP=65

set ACC=100

set movecategory=physical

set attackeffect=chanceflinch

set chance=30

)

if %move%==STRENGTH (

set atktype=normal

set BP=80

set ACC=100

set movecategory=physical

)

if %move%==STRING_SHOT (

set atktype=bug

set BP=0

set ACC=100

set movecategory=status

set attackeffect=sharpdebuff

set buffstatshort=spdstat

set buffstatlong=speed

)

if %move%==STRUGGLE (

set atktype=normal

set BP=50

set ACC=100

set movecategory=physical

)

if %move%==STUN_SPORE (

set atktype=grass

set BP=0

set ACC=75

set movecategory=status

set attackeffect=paralyze

)

if %move%==SUBMISSION (

set atktype=fighting

set BP=80

set ACC=80

set movecategory=physical

set attackeffect=recoil

set recoildivisor=4

)

@rem SUBSTITUTE

if %move%==SUPER_FANG (

set atktype=normal

set BP=0

set ACC=90

set movecategory=physical

)

if %move%==SUPERSONIC (

set atktype=normal

set BP=0

set ACC=55

set movecategory=status

set attackeffect=confuse

)

if %move%==SURF (

set atktype=water

set BP=90

set ACC=100

set movecategory=special

)

if %move%==SWIFT (

set atktype=normal

set BP=60

set ACC=100

set movecategory=special

)

if %move%==SWORDS_DANCE (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=sharpbuff

set buffstatshort=atkstat

set buffstatlong=attack

)

if %move%==TACKLE (

set atktype=normal

set BP=50

set ACC=100

set movecategory=physical

)

if %move%==TAIL_WHIP (

set atktype=normal

set BP=0

set ACC=100

set movecategory=status

set attackeffect=debuff

set buffstatshort=atkstat

set buffstatlong=attack

)

if %move%==TAKE_DOWN (

set atktype=normal

set BP=90

set ACC=85

set movecategory=physical

set attackeffect=recoil

set recoildivisor=4

)

if %move%==TELEPORT (

set atktype=psychic

set BP=0

set ACC=100

set movecategory=status

set attackeffect=autofail

)

if %move%==THRASH (

set atktype=normal

set BP=90

set ACC=85

set movecategory=physical

)

if %move%==THUNDER (

set atktype=electric

set BP=110

set ACC=70

set movecategory=special

set attackeffect=chanceparalyze

set chance=10

)

if %move%==THUNDER_PUNCH (

set atktype=electric

set BP=75

set ACC=100

set movecategory=physical

set attackeffect=chanceparalyze

set chance=10

)

if %move%==THUNDER_SHOCK (

set atktype=electric

set BP=40

set ACC=100

set movecategory=special

set attackeffect=chanceparalyze

set chance=10

)

if %move%==THUNDER_WAVE (

set atktype=electric

set BP=0

set ACC=100

set movecategory=status

set attackeffect=paralyze

)

if %move%==THUNDERBOLT (

set atktype=electric

set BP=90

set ACC=100

set movecategory=special

set attackeffect=chanceparalyze

set chance=10

)

if %move%==TOXIC (

set atktype=poison

set BP=0

set ACC=90

set movecategory=status

)

@rem TRANSFORM

@rem TRI_ATTACK

if %move%==TWINEEDLE (

set atktype=bug

set BP=25

set ACC=100

set movecategory=physical

set %self%twineedletrip=1

set attackeffect=chancepoison

set chance=20

)

if %move%==VICE_GRIP (

set atktype=normal

set BP=55

set ACC=100

set movecategory=physical

)

if %move%==VINE_WHIP (

set atktype=grass

set BP=45

set ACC=100

set movecategory=physical

)

if %move%==WATER_GUN (

set atktype=water

set BP=40

set ACC=100

set movecategory=special

)

if %move%==WATERFALL (

set atktype=water

set BP=80

set ACC=100

set movecategory=physical

set attackeffect=lowercrit

)

if %move%==WHIRLWIND (

set atktype=flying

set BP=0

set ACC=100

set movecategory=status

set PRIORITY=-6

set attackeffect=dragout

)

if %move%==WING_ATTACK (

set atktype=flying

set BP=60

set ACC=100

set movecategory=physical

)

if %move%==WITHDRAW (

set atktype=water

set BP=0

set ACC=100

set movecategory=status

set attackeffect=buff

set buffstatshort=defstat

set buffstatlong=defense

)

if %move%==WRAP (

set atktype=normal

set BP=15

set ACC=90

set movecategory=physical

)

if %countercheck%==1 goto countercheckreturn

if %conversioncheck%==1 (

if %self%==player (

echo !playerpoke%playeractivepoke%! used CONVERSION^^! It became %atktype% type^^!

set playerpoke%playeractivepoke%type1=%atktype%

set playerpoke%playeractivepoke%type2=none

)

if %self%==enemy (

echo !enemypoke%enemyactivepoke%! used CONVERSION^^! It became %atktype% type^^!

set enemypoke%enemyactivepoke%type1=%atktype%

set enemypoke%enemyactivepoke%type2=none

)

set conversioncheck=0

goto moveresume

)

if %playerprioritycheck%==1 (

set playerprioritycheck=0

goto playerprioritycheckreturn

)

if %enemyprioritycheck%==1 (

set enemyprioritycheck=0

goto enemyprioritycheckreturn

)

if not %aimdreturn%==0 goto :eof

goto :MDreturn

:pokedictionary

for %%y in (player enemy) do (

for %%x in (1 2 3 4 5 6) do (

set %%ypoke%%xcurhp=999

if !%%ypoke%%x!==BULBASAUR (

set %%ypoke%%xtype1=grass

set %%ypoke%%xtype2=poison

set %%ypoke%%xhp=45

set %%ypoke%%xatk=49

set %%ypoke%%xdef=49

set %%ypoke%%xsatk=65

set %%ypoke%%xsdef=65

set %%ypoke%%xspd=45

set %%ypoke%%xstattotal=318

)

if !%%ypoke%%x!==IVYSAUR (

set %%ypoke%%xtype1=grass

set %%ypoke%%xtype2=poison

set %%ypoke%%xhp=60

set %%ypoke%%xatk=62

set %%ypoke%%xdef=63

set %%ypoke%%xsatk=80

set %%ypoke%%xsdef=80

set %%ypoke%%xspd=60

set %%ypoke%%xstattotal=405

)

if !%%ypoke%%x!==VENUSAUR (

set %%ypoke%%xtype1=grass

set %%ypoke%%xtype2=poison

set %%ypoke%%xhp=80

set %%ypoke%%xatk=82

set %%ypoke%%xdef=83

set %%ypoke%%xsatk=100

set %%ypoke%%xsdef=100

set %%ypoke%%xspd=80

set %%ypoke%%xstattotal=525

)

if !%%ypoke%%x!==CHARMANDER (

set %%ypoke%%xtype1=fire

set %%ypoke%%xtype2=none

set %%ypoke%%xhp=39

set %%ypoke%%xatk=52

set %%ypoke%%xdef=43

set %%ypoke%%xsatk=60

set %%ypoke%%xsdef=50

set %%ypoke%%xspd=65

set %%ypoke%%xstattotal=309

)

if !%%ypoke%%x!==CHARMELEON (

set %%ypoke%%xtype1=fire

set %%ypoke%%xtype2=none

set %%ypoke%%xhp=58

set %%ypoke%%xatk=64

set %%ypoke%%xdef=58

set %%ypoke%%xsatk=80

set %%ypoke%%xsdef=65

set %%ypoke%%xspd=80

set %%ypoke%%xstattotal=405

)

if !%%ypoke%%x!==CHARIZARD (

set %%ypoke%%xtype1=fire

set %%ypoke%%xtype2=flying

set %%ypoke%%xhp=78

set %%ypoke%%xatk=84

set %%ypoke%%xdef=78

set %%ypoke%%xsatk=109

set %%ypoke%%xsdef=85

set %%ypoke%%xspd=100

set %%ypoke%%xstattotal=534

)

if !%%ypoke%%x!==SQUIRTLE (

set %%ypoke%%xtype1=water

set %%ypoke%%xtype2=none

set %%ypoke%%xhp=44

set %%ypoke%%xatk=48

set %%ypoke%%xdef=65

set %%ypoke%%xsatk=50

set %%ypoke%%xsdef=64

set %%ypoke%%xspd=43

set %%ypoke%%xstattotal=314

)

if !%%ypoke%%x!==WARTORTLE (

set %%ypoke%%xtype1=water

set %%ypoke%%xtype2=none

set %%ypoke%%xhp=59

set %%ypoke%%xatk=63

set %%ypoke%%xdef=80

set %%ypoke%%xsatk=65

set %%ypoke%%xsdef=80

set %%ypoke%%xspd=58

set %%ypoke%%xstattotal=405

)

if !%%ypoke%%x!==BLASTOISE (

set %%ypoke%%xtype1=water

set %%ypoke%%xtype2=none

set %%ypoke%%xhp=79

set %%ypoke%%xatk=83

set %%ypoke%%xdef=100

set %%ypoke%%xsatk=85

set %%ypoke%%xsdef=105

set %%ypoke%%xspd=78

set %%ypoke%%xstattotal=530

)

if !%%ypoke%%x!==CATERPIE (

set %%ypoke%%xtype1=bug

set %%ypoke%%xtype2=none

set %%ypoke%%xhp=45

set %%ypoke%%xatk=30

set %%ypoke%%xdef=35

set %%ypoke%%xsatk=20

set %%ypoke%%xsdef=20

set %%ypoke%%xspd=45

set %%ypoke%%xstattotal=195

)

if !%%ypoke%%x!==METAPOD (

set %%ypoke%%xtype1=bug

set %%ypoke%%xtype2=none

set %%ypoke%%xhp=50

set %%ypoke%%xatk=20

set %%ypoke%%xdef=55

set %%ypoke%%xsatk=25

set %%ypoke%%xsdef=25

set %%ypoke%%xspd=30

set %%ypoke%%xstattotal=205

)

if !%%ypoke%%x!==BUTTERFREE (

set %%ypoke%%xtype1=bug

set %%ypoke%%xtype2=flying

set %%ypoke%%xhp=60

set %%ypoke%%xatk=45

set %%ypoke%%xdef=50

set %%ypoke%%xsatk=90

set %%ypoke%%xsdef=80

set %%ypoke%%xspd=70

set %%ypoke%%xstattotal=395

)

if !%%ypoke%%x!==WEEDLE (

set %%ypoke%%xtype1=bug

set %%ypoke%%xtype2=poison

set %%ypoke%%xhp=40

set %%ypoke%%xatk=35

set %%ypoke%%xdef=30

set %%ypoke%%xsatk=20

set %%ypoke%%xsdef=20

set %%ypoke%%xspd=50

set %%ypoke%%xstattotal=195

)

if !%%ypoke%%x!==KAKUNA (

set %%ypoke%%xtype1=bug

set %%ypoke%%xtype2=poison

set %%ypoke%%xhp=45

set 