File tree 1 file changed +13
-6
lines changed
play.pokemonshowdown.com/js
1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 3374
3374
this . unChooseMove ( this . curSet . moves [ 0 ] ) ;
3375
3375
this . curSet . moves [ 0 ] = val ;
3376
3376
this . chooseMove ( val ) ;
3377
+ this . setPPUps ( val , 0 ) ;
3377
3378
if ( selectNext ) this . $ ( 'input[name=move2]' ) . select ( ) ;
3378
3379
break ;
3379
3380
case 'move2' :
3380
3381
if ( ! this . curSet . moves [ 0 ] ) this . curSet . moves [ 0 ] = '' ;
3381
3382
this . unChooseMove ( this . curSet . moves [ 1 ] ) ;
3382
3383
this . curSet . moves [ 1 ] = val ;
3383
3384
this . chooseMove ( val ) ;
3385
+ this . setPPUps ( val , 1 ) ;
3384
3386
if ( selectNext ) this . $ ( 'input[name=move3]' ) . select ( ) ;
3385
3387
break ;
3386
3388
case 'move3' :
3389
3391
this . unChooseMove ( this . curSet . moves [ 2 ] ) ;
3390
3392
this . curSet . moves [ 2 ] = val ;
3391
3393
this . chooseMove ( val ) ;
3394
+ this . setPPUps ( val , 2 ) ;
3392
3395
if ( selectNext ) this . $ ( 'input[name=move4]' ) . select ( ) ;
3393
3396
break ;
3394
3397
case 'move4' :
3398
3401
this . unChooseMove ( this . curSet . moves [ 3 ] ) ;
3399
3402
this . curSet . moves [ 3 ] = val ;
3400
3403
this . chooseMove ( val ) ;
3404
+ this . setPPUps ( val , 3 ) ;
3401
3405
if ( selectNext ) {
3402
3406
this . stats ( ) ;
3403
3407
this . $ ( 'button.setstats' ) . focus ( ) ;
3507
3511
if ( minSpe === false && moveName === 'Gyro Ball' ) {
3508
3512
minSpe = undefined ;
3509
3513
}
3510
- if ( ! set . movePPUps ) set . movePPUps = [ ] ;
3511
- if ( move . id === 'trumpcard' ) {
3512
- set . movePPUps [ i ] = 0 ;
3513
- } else {
3514
- set . movePPUps [ i ] = 3 ;
3515
- }
3516
3514
}
3517
3515
3518
3516
if ( ! set . ivs ) {
3597
3595
this . updateSetTop ( ) ;
3598
3596
if ( selectNext ) this . $ ( set . item || ! this . $ ( 'input[name=item]' ) . length ? ( this . $ ( 'input[name=ability]' ) . length ? 'input[name=ability]' : 'input[name=move1]' ) : 'input[name=item]' ) . select ( ) ;
3599
3597
} ,
3598
+ setPPUps : function ( move , slot ) {
3599
+ var set = this . curSet ;
3600
+ if ( ! set . movePPUps ) set . movePPUps = [ ] ;
3601
+ if ( toID ( move ) === 'trumpcard' ) {
3602
+ set . movePPUps [ slot ] = 0 ;
3603
+ } else {
3604
+ set . movePPUps [ slot ] = 3 ;
3605
+ }
3606
+ } ,
3600
3607
3601
3608
/*********************************************************
3602
3609
* Utility functions
You can’t perform that action at this time.
0 commit comments