use crate::dynamic_data::models::damage_source::DamageSource; use crate::dynamic_data::models::pokemon::Pokemon; use crate::static_data::moves::secondary_effect::EffectParameter; use crate::StringKey; use std::fmt::{Debug, Formatter}; pub trait Script { fn name(&self) -> &StringKey; fn is_suppressed(&self) -> bool { self.get_suppressed_count() > 0 } fn get_suppressed_count(&self) -> usize; fn add_suppression(&self); fn remove_suppression(&self); // FIXME: add missing parameters fn stack(&self); fn on_remove(&self); fn on_initialize(&self, pars: &Vec); 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_attack_miss(&self); fn change_attack_type(&self); fn block_critical(&self); fn override_base_power(&self); fn change_damage_stats_user(&self); fn bypass_defensive_stat(&self); fn bypass_offensive_stat(&self); fn change_stat_modifier(&self); fn change_damage_modifier(&self); fn change_damage(&self); fn change_incoming_damage(&self); fn on_incoming_hit(&self); fn on_opponent_faints(&self); fn prevent_stat_boost_change(&self); fn change_stat_boost_change(&self); fn on_secondary_effect(&self); fn on_after_hits(&self); fn prevent_self_switch(&self); fn prevent_opponent_switch(&self); fn modify_effect_chance(&self); fn modify_incoming_effect_change(&self); fn on_fail(&self); fn on_opponent_fail(&self); fn prevent_self_run_away(&self); fn prevent_opponent_run_away(&self); fn on_end_turn(&self); fn on_damage(&self, pokemon: &Pokemon, source: DamageSource, old_health: u32, new_health: u32); fn on_faint(&self, pokemon: &Pokemon, source: DamageSource); fn on_switch_in(&self, pokemon: &Pokemon); fn on_after_held_item_consume(&self); } impl Debug for dyn Script { fn fmt(&self, _f: &mut Formatter<'_>) -> std::fmt::Result { Ok(()) } }