Нет описания

battle_abilities.c 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /****************************************************************************
  2. * Copyright (C) 2015-2016 by the SotS Team *
  3. * *
  4. * This file is part of Sovereign of the Skies. *
  5. * *
  6. * Sovereign of the Skies is free software: you can redistribute it *
  7. * and/or modify it *
  8. * under the terms of the GNU Lesser General Public License as published *
  9. * by the Free Software Foundation, either version 3 of the License, or *
  10. * (at your option) any later version provided you include a copy of the *
  11. * licence and this header. *
  12. * *
  13. * Sovereign of the Skies is distributed in the hope that it will be *
  14. * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of *
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  16. * GNU Lesser General Public License for more details. *
  17. * *
  18. * You should have received a copy of the GNU Lesser General Public *
  19. * License along with Sovereign of the Skies. *
  20. * If not, see <http://www.gnu.org/licenses/>. *
  21. ****************************************************************************/
  22. /**
  23. * @file battle_abilities.c
  24. * @author Sturmvogel
  25. * @date 15 dec 2016
  26. * @brief Some methods concerning in-battle abilities
  27. */
  28. /* === INCLUDE === */
  29. #include <battle_abilities.h>
  30. #include <battle_custom_structs.h>
  31. //#include <battle_structs.h>
  32. #include <pokeagb/pokeagb.h>
  33. /* === IMPLEMENTATIONS === */
  34. u8 ability_has_effect(u8 bank, u8 mold_breaker, u8 gastro) {
  35. (void)mold_breaker;
  36. if (gastro && custom_battle_elements.ptr->bank_affecting[bank].gastro_acided)
  37. return false;
  38. return true;
  39. // TODO: MOLD BREAKER
  40. }
  41. u8 ability_weather_effects() {
  42. // TODO: AIR LOCK AND CLOUD NINE
  43. return true;
  44. }
  45. u8 ability_has_ability(u8 bank, u8 ability) {
  46. return (ability_has_effect(bank, 0, 1) && battle_data[bank].ability_id == ability);
  47. }