Yeah I agree with Papaya Pete, you should probably add the increase in damage in fight.c.
edit: looking at the comments, ajust_damage() is called at hit()? That should be fine!
On the other hand, a little more specific about the variable errors:
For 'happydmg' I think you need to declare a string in show_happyhour() in act.other.c, right at the beginning, along with the other ones:
Code:
char happyexp[80], happygold[80], happyqp[80], happydmg[80];
Keep in mind that the 80 is the size of the string so declare it bigger if you need more space.
The other variable is a macro, but you might need more than just the one is in your warnings, in utils.h look for:
Code:
/* Happy-hour defines */
And you'll see that there's three macros defined for each happy hour.
I think you need to add the following:
- These macros check if it's currently on (you can use them instead of manually checking the value yourself):
Code:
#define IS_HAPPYQP (happy_data.qp_rate > 0)
#define IS_HAPPYEXP (happy_data.exp_rate > 0)
#define IS_HAPPYGOLD (happy_data.gold_rate > 0)
#define IS_HAPPYDMG (happy_data.dmg_rate > 0)
- These to get the current rate of the bonuses:
Code:
#define HAPPY_EXP happy_data.exp_rate
#define HAPPY_GOLD happy_data.gold_rate
#define HAPPY_QP happy_data.qp_rate
#define HAPPY_DMG happy_data.dmg_rate
- And this is a general one that checks if there's any happyhour bonus currently on:
Code:
#define IS_HAPPYHOUR ((IS_HAPPYEXP || IS_HAPPYGOLD || IS_HAPPYQP || IS_HAPPYDMG) && (HAPPY_TIME > 0))
You're also gonna need to add the "Damage" rate to the happy_data structure. For that you need two more changes.
In db.c look for:
Code:
struct happyhour happy_data = {0, 0, 0, 0};
and change it to add another 'happy' variable:
Code:
struct happyhour happy_data = {0, 0, 0, 0, 0};
And in structs.h look for:
Code:
/** Happy Hour Data */
struct happyhour {
int qp_rate;
int exp_rate;
int gold_rate;
int ticks_left;
};
And add the damage rate:
Code:
/** Happy Hour Data */
struct happyhour {
int qp_rate;
int exp_rate;
int gold_rate;
int dmg_rate; /* I don't the position here matters, but it makes more sense to come before ticks :) */
int ticks_left;
};
I **THINK** that should do it. Again, I'm kinda new here so sorry if I said some bs! heh.
Let me know if you need more help.