Cornwallis
Member
- Joined
- Jan 3, 2010
- Messages
- 480
- Reaction score
- 16
Hello, I'm trying to add a resist condition that can be applied by spells and such. All I want to do is reference the param of the condition, like whether the character is recieving 10% resistance, or 20% resistance, and so on. I'm trying to put something like this in game.cpp:
and I put this inside:
any help is accepted.
Code:
if (target->hasCondition(CONDITION_RESIST) {
damage.primary.value -= damage.primary.value * (resistPercent / 100.);
damage.secondary.value -= damage.secondary.value * (resistPercent / 100.);
}
Code:
bool Game::combatChangeHealth(Creature* attacker, Creature* target, CombatDamage& damage)