@@ -36,14 +36,20 @@ describe('Dragon Darts', function () {
36
36
37
37
it ( `should hit the other foe twice if it misses against one` , function ( ) {
38
38
battle = common . createBattle ( { gameType : 'doubles' } , [ [
39
- { species : "Ninjask" , moves : [ 'dragondarts' ] } ,
39
+ { species : "Ninjask" , item : 'blunderpolicy' , moves : [ 'dragondarts' ] } ,
40
40
{ species : "Mew" , ability : 'stamina' , moves : [ 'splash' ] } ,
41
41
] , [
42
42
{ species : "Mew" , ability : 'stamina' , moves : [ 'splash' ] } ,
43
43
{ species : "Shaymin" , ability : 'stamina' , moves : [ 'splash' ] } ,
44
44
] ] ) ;
45
+
46
+ // default seed will make Dragon Darts miss at +6 evasion
47
+ // remember to manually set the seed if an engine change means it doesn't
45
48
battle . p2 . active [ 0 ] . boostBy ( { evasion : 6 } ) ;
49
+
46
50
battle . makeChoices ( ) ;
51
+ assert ( ! battle . log . includes ( '|-miss|p1a: Ninjask|p2a: Mew' ) ) ;
52
+ assert . statStage ( battle . p1 . active [ 0 ] , 'spe' , 2 ) ;
47
53
assert . statStage ( battle . p1 . active [ 1 ] , 'def' , 0 ) ;
48
54
assert . statStage ( battle . p2 . active [ 0 ] , 'def' , 0 ) ;
49
55
assert . statStage ( battle . p2 . active [ 1 ] , 'def' , 2 ) ;
@@ -64,6 +70,20 @@ describe('Dragon Darts', function () {
64
70
assert . statStage ( battle . p2 . active [ 1 ] , 'def' , 0 ) ;
65
71
} ) ;
66
72
73
+ it ( `should hit both targets even if one faints` , function ( ) {
74
+ battle = common . createBattle ( { gameType : 'doubles' } , [ [
75
+ { species : "Ninjask" , moves : [ 'dragondarts' ] } ,
76
+ { species : "Mew" , moves : [ 'splash' ] } ,
77
+ ] , [
78
+ { species : "Shedinja" , moves : [ 'splash' ] } ,
79
+ { species : "Shedinja" , moves : [ 'splash' ] } ,
80
+ ] ] ) ;
81
+ battle . makeChoices ( ) ;
82
+ battle . getDebugLog ( ) ;
83
+ assert . equal ( battle . p2 . active [ 0 ] . hp , 0 ) ;
84
+ assert . equal ( battle . p2 . active [ 1 ] . hp , 0 ) ;
85
+ } ) ;
86
+
67
87
it ( `should hit the ally twice in doubles` , function ( ) {
68
88
battle = common . createBattle ( { gameType : 'doubles' } , [ [
69
89
{ species : "Ninjask" , moves : [ 'dragondarts' ] } ,
0 commit comments