Code:
int enemyNumber = 1;
char enemy[] = "Dragon";
int enemyHealth = 500;
int enemyMagic = 0;
int enemyAttackMin = 50;
int enemyAttackMax = 60;
char enemySpell[];
int costOfSpell = 1;
int enemyMagicMin;
int enemyMagicMax;
This is the initial enemy, Dragon. Once defeated, I change the enemy to Mad Golfer. Note that Dragon cannot use spells, hence his lack of a spell name. Here is the "changing code":
Code:
enemyNumber = 2;
char enemy[] = "Mad Golfer";
enemyHealth = 300;
enemyMagic = 14;
enemyAttackMin = 5;
enemyAttackMax = 20;
char enemySpell[] = " throws his club at you!";
costOfSpell = 1;
enemyMagicMin = 70;
enemyMagicMax = 100;
The thing is, the interger values adjust while the strings stay the same. I can't get them to change! The program displays Dragon as the name of the enemy instead of Mad Golfer. What am I doing wrong?