Merge pull request #127 from DizzyEggg/make_it_compile

EMERGENCY PULL REQUEST
This commit is contained in:
Diegoisawesome 2017-11-27 15:08:26 -06:00 committed by GitHub
commit 877ad22711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 18 deletions

View file

@ -67,18 +67,18 @@
#define B_BUFF_STAT 5
#define B_BUFF_SPECIES 6
#define B_BUFF_MON_NICK 7
#define B_BUFF_NEGATIVE_FLAVOR 8
#define B_BUFF_NEGATIVE_FLAVOR 8
#define B_BUFF_ABILITY 9
#define B_BUFF_ITEM 10
#define B_BUFF_PLACEHOLDER_BEGIN 0xFD
#define B_BUFF_EOS 0xFF
#define PREPARE_FLAVOUR_BUFFER(textVar, flavourId) \
#define PREPARE_FLAVOR_BUFFER(textVar, flavorId) \
{ \
textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \
textVar[1] = B_BUFF_NEGATIVE_FLAVOUR; \
textVar[2] = flavourId; \
textVar[1] = B_BUFF_NEGATIVE_FLAVOR; \
textVar[2] = flavorId; \
textVar[3] = B_BUFF_EOS; \
}

View file

@ -20,6 +20,7 @@
#include "event_data.h"
#include "calculate_base_damage.h"
#include "link.h"
#include "berry.h"
extern const u8* gBattlescriptCurrInstr;
extern const u8* gSelectionBattleScripts[BATTLE_BANKS_COUNT];
@ -2537,15 +2538,6 @@ enum
ITEM_STATS_CHANGE, // 5
};
enum
{
FLAVOR_SPICY, // 0
FLAVOR_DRY, // 1
FLAVOR_SWEET, // 2
FLAVOR_BITTER, // 3
FLAVOR_SOUR, // 4
};
u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
{
int i = 0;
@ -2707,7 +2699,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
case HOLD_EFFECT_CONFUSE_SPICY:
if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn)
{
PREPARE_FLAVOUR_BUFFER(gBattleTextBuff1, FLAVOR_SPICY);
PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, FLAVOR_SPICY);
gBattleMoveDamage = gBattleMons[bank].maxHP / bankQuality;
if (gBattleMoveDamage == 0)
@ -2725,7 +2717,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
case HOLD_EFFECT_CONFUSE_DRY:
if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn)
{
PREPARE_FLAVOUR_BUFFER(gBattleTextBuff1, FLAVOR_DRY);
PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, FLAVOR_DRY);
gBattleMoveDamage = gBattleMons[bank].maxHP / bankQuality;
if (gBattleMoveDamage == 0)
@ -2743,7 +2735,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
case HOLD_EFFECT_CONFUSE_SWEET:
if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn)
{
PREPARE_FLAVOUR_BUFFER(gBattleTextBuff1, FLAVOR_SWEET);
PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, FLAVOR_SWEET);
gBattleMoveDamage = gBattleMons[bank].maxHP / bankQuality;
if (gBattleMoveDamage == 0)
@ -2761,7 +2753,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
case HOLD_EFFECT_CONFUSE_BITTER:
if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn)
{
PREPARE_FLAVOUR_BUFFER(gBattleTextBuff1, FLAVOR_BITTER);
PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, FLAVOR_BITTER);
gBattleMoveDamage = gBattleMons[bank].maxHP / bankQuality;
if (gBattleMoveDamage == 0)
@ -2779,7 +2771,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
case HOLD_EFFECT_CONFUSE_SOUR:
if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn)
{
PREPARE_FLAVOUR_BUFFER(gBattleTextBuff1, FLAVOR_SOUR);
PREPARE_FLAVOR_BUFFER(gBattleTextBuff1, FLAVOR_SOUR);
gBattleMoveDamage = gBattleMons[bank].maxHP / bankQuality;
if (gBattleMoveDamage == 0)