@@ -20,7 +20,7 @@ public void DoubleStrikeWithOneBully_Full()
2020 state . AbilityContextHolder . GetContext < ITurnAbilityContext > ( ) . NextTurn ( ) ;
2121
2222 Assert . AreEqual ( true , doubleStrikeAbility . CanExecute ( null ! , null ! , state ) ) ;
23- var result = state . ExecuteAbility ( new StringUnitId ( "A" ) , 0 , new StringUnitId ( "B" ) ) ;
23+ var result = state . ExecuteAbilityOnClone ( new StringUnitId ( "A" ) , 0 , new StringUnitId ( "B" ) ) ;
2424
2525 // Tests
2626 Assert . AreEqual ( 6 , result . Commands . Count ) ;
@@ -46,11 +46,12 @@ public void DoubleStrikeWithOneBully_OneShot()
4646 . WithUnit ( new TestUnit ( "C" , 5 , 1 , new Vector2 ( 0 , 0 ) ) . WithBullyStatusEffect ( ) )
4747 . Build ( ) ;
4848
49+ state . Connect ( ) ;
4950 state . GetUnit ( new StringUnitId ( "A" ) ) . GetUnitFeature < IDamageable > ( )
5051 . DealDamage ( state . GetUnit ( new StringUnitId ( "B" ) ) , 1 ) ;
5152 state . GetUnit ( new StringUnitId ( "A" ) ) . GetUnitFeature < IDamageable > ( )
5253 . DealDamage ( state . GetUnit ( new StringUnitId ( "B" ) ) , 1 ) ;
53-
54+ state . Disconnect ( ) ;
5455 var result = state . CommandQueue . CalculateCommandQueue ( ) ;
5556 Assert . AreEqual ( 2 , result . Count ) ;
5657 Assert . AreEqual ( new AttackCombatCommand ( new StringUnitId ( "A" ) , new StringUnitId ( "B" ) , 5 , 0 ) , result [ 0 ] ) ;
@@ -67,10 +68,12 @@ public void DoubleStrikeWithTwoBully_Full()
6768 . WithUnit ( new TestUnit ( "D" , 5 , 1 , new Vector2 ( 0 , 0 ) ) . WithBullyStatusEffect ( ) )
6869 . Build ( ) ;
6970
71+ state . Connect ( ) ;
7072 state . GetUnit ( new StringUnitId ( "A" ) ) . GetUnitFeature < IDamageable > ( )
7173 . DealDamage ( state . GetUnit ( new StringUnitId ( "B" ) ) , 1 ) ;
7274 state . GetUnit ( new StringUnitId ( "A" ) ) . GetUnitFeature < IDamageable > ( )
7375 . DealDamage ( state . GetUnit ( new StringUnitId ( "B" ) ) , 1 ) ;
76+ state . Disconnect ( ) ;
7477
7578 var result = state . CommandQueue . CalculateCommandQueue ( ) ;
7679 Assert . AreEqual ( 6 , result . Count ) ;
@@ -96,8 +99,10 @@ public void SingleStrikeWithOneDefender_Full()
9699 . WithUnit ( new TestUnit ( "E" , 5 , 1 , new Vector2 ( 0 , 0 ) ) . WithDefenderStatusEffect ( ) )
97100 . Build ( ) ;
98101
102+ state . Connect ( ) ;
99103 state . GetUnit ( new StringUnitId ( "A" ) ) . GetUnitFeature < IDamageable > ( )
100104 . DealDamage ( state . GetUnit ( new StringUnitId ( "B" ) ) , 1 ) ;
105+ state . Disconnect ( ) ;
101106
102107 var result = state . CommandQueue . CalculateCommandQueue ( ) ;
103108 Assert . AreEqual ( 3 , result . Count ) ;
@@ -116,8 +121,10 @@ public void SingleStrikeWithOneBullyAndOneDefender()
116121 . WithUnit ( new TestUnit ( "D" , 5 , 1 , new Vector2 ( 0 , 0 ) ) . WithDefenderStatusEffect ( ) )
117122 . Build ( ) ;
118123
124+ state . Connect ( ) ;
119125 state . GetUnit ( new StringUnitId ( "A" ) ) . GetUnitFeature < IDamageable > ( )
120126 . DealDamage ( state . GetUnit ( new StringUnitId ( "B" ) ) , 1 ) ;
127+ state . Disconnect ( ) ;
121128
122129 var result = state . CommandQueue . CalculateCommandQueue ( ) ;
123130 Assert . AreEqual ( 4 , result . Count ) ;
@@ -137,8 +144,8 @@ public void TwoAbilities()
137144 . WithUnit ( new TestUnit ( "B" , 5 , 0 , new Vector2 ( 0 , 2 ) ) )
138145 . Build ( ) ;
139146
140- state . ExecuteAbility ( new StringUnitId ( "A" ) , 0 , new StringUnitId ( "B" ) ) ;
141- state . ExecuteAbility ( new StringUnitId ( "A" ) , 0 , new StringUnitId ( "B" ) ) ;
147+ state . ExecuteAbilityOnClone ( new StringUnitId ( "A" ) , 0 , new StringUnitId ( "B" ) ) ;
148+ state . ExecuteAbilityOnClone ( new StringUnitId ( "A" ) , 0 , new StringUnitId ( "B" ) ) ;
142149 }
143150 }
144151}
0 commit comments