A lot of work on mocking to set up unit testing
This commit is contained in:
@@ -45,11 +45,11 @@ impl Script for ChangeAllTargetStats {
|
||||
fn on_secondary_effect(&self, mv: ExecutingMove, target: Pokemon, _hit: u8) {
|
||||
let user = mv.user();
|
||||
let amount = self.amount.load(Ordering::SeqCst);
|
||||
target.change_stat_boost(Statistic::Attack, amount, user == target);
|
||||
target.change_stat_boost(Statistic::Defense, amount, user == target);
|
||||
target.change_stat_boost(Statistic::SpecialAttack, amount, user == target);
|
||||
target.change_stat_boost(Statistic::SpecialDefense, amount, user == target);
|
||||
target.change_stat_boost(Statistic::Speed, amount, user == target);
|
||||
target.change_stat_boost(Statistic::Attack, amount, user.equals(&target));
|
||||
target.change_stat_boost(Statistic::Defense, amount, user.equals(&target));
|
||||
target.change_stat_boost(Statistic::SpecialAttack, amount, user.equals(&target));
|
||||
target.change_stat_boost(Statistic::SpecialDefense, amount, user.equals(&target));
|
||||
target.change_stat_boost(Statistic::Speed, amount, user.equals(&target));
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn Any {
|
||||
|
||||
Reference in New Issue
Block a user