No Description

power_trick.c 419B

1234567891011121314
  1. #include <battle_structs.h>
  2. #include <battle_locations.h>
  3. #include <battle_custom_structs.h>
  4. u8 power_trick_swap()
  5. {
  6. custom_battle_elements.ptr->bank_affecting[battle_active_bank].powertrick = 1;
  7. u16 *atk = &battle_participants[battle_active_bank].atk;
  8. u16 *def = &battle_participants[battle_active_bank].def;
  9. u16 switch_var = *atk;
  10. *atk = *def;
  11. *def = switch_var;
  12. return 0;
  13. }