Some work on script function parameters.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2022-06-12 19:04:22 +02:00
parent 00f66bbf59
commit 880ea55a67
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 26 additions and 18 deletions

View File

@ -180,9 +180,9 @@ mod tests {
0
}
fn add_suppression(&self) {}
fn add_suppression(&mut self) {}
fn remove_suppression(&self) {}
fn remove_suppression(&mut self) {}
fn on_initialize(&mut self, _pars: &[EffectParameter]) {
self.test_count += 1;

View File

@ -1,4 +1,6 @@
use crate::dynamic_data::choices::TurnChoice;
use crate::dynamic_data::models::damage_source::DamageSource;
use crate::dynamic_data::models::executing_move::ExecutingMove;
use crate::dynamic_data::models::pokemon::Pokemon;
use crate::static_data::moves::secondary_effect::EffectParameter;
use crate::StringKey;
@ -14,24 +16,30 @@ pub trait Script {
self.get_suppressed_count() > 0
}
fn get_suppressed_count(&self) -> usize;
fn add_suppression(&self);
fn remove_suppression(&self);
fn add_suppression(&mut self);
fn remove_suppression(&mut self);
// FIXME: add missing parameters
fn stack(&self) {}
fn on_remove(&self) {}
// FIXME: add missing parameters, and make all these mut
fn stack(&mut self) {}
fn on_remove(&mut self) {}
fn on_initialize(&mut self, _pars: &[EffectParameter]) {}
fn on_before_turn(&self) {}
fn change_speed(&self) {}
fn change_priority(&self) {}
fn change_attack(&self) {}
fn change_number_of_hits(&self) {}
fn prevent_attack(&self) {}
fn fail_attack(&self) {}
fn stop_before_attack(&self) {}
fn on_before_attack(&self) {}
fn fail_incoming_attack(&self) {}
fn is_invulnerable(&self) {}
fn on_before_turn(&mut self, _choice: &TurnChoice) {}
fn change_speed(&mut self, _choice: &TurnChoice, _speed: &mut u32) {}
fn change_priority(&mut self, _choice: &TurnChoice, _priority: &mut i8) {}
fn change_attack(&mut self, _choice: &TurnChoice, _moveName: &mut StringKey) {}
fn change_number_of_hits(&mut self, _choice: &TurnChoice, _numberOfHits: &mut u8) {}
fn prevent_attack(&mut self, _move: &ExecutingMove, _prevent: &mut bool) {}
fn fail_attack(&mut self, _move: &ExecutingMove, _fail: &mut bool) {}
fn stop_before_attack(&mut self, _move: &ExecutingMove, _stop: &mut bool) {}
fn on_before_attack(&mut self, _move: &ExecutingMove) {}
fn fail_incoming_attack(&mut self, _move: &ExecutingMove, target: &Pokemon, _fail: &mut bool) {}
fn is_invulnerable(
&mut self,
_move: &ExecutingMove,
target: &Pokemon,
_invulnerable: &mut bool,
) {
}
fn on_attack_miss(&self) {}
fn change_attack_type(&self) {}
fn block_critical(&self) {}