@ -7,4 +7,10 @@
int spellFireball(Character *character) {
int damage = 10 + (getCharacterIntelligence(character) / 2);
return damage;
}
int spellHeal(Character *character) {
int heal = 10 + (getCharacterIntelligence(character) / 3);
return heal;
@ -1,6 +1,9 @@
#ifndef SPELL_H
#define SPELL_H
#include "character.h"
int spellFireball(Character *character);
int spellHeal(Character *character);
#endif
@ -35,4 +35,10 @@ void test_spellFireball(void)
TEST_ASSERT_EQUAL_INT(10,spellFireball(&testCharacter));
TEST_ASSERT_EQUAL_INT(13,spellFireball(&testCharacter2));
void test_spellHeal(void)
{
TEST_ASSERT_EQUAL_INT(10,spellHeal(&testCharacter));
TEST_ASSERT_EQUAL_INT(12,spellHeal(&testCharacter2));
#endif // TEST