private int ComputeHealValue(GenericCharacter aAttacker, Action aAction) { int value = 0; value = aAction.GetHealAmount() + aAttacker.GetCharacterTotalStats()[(int)GenericCharacter.STAT_INDEX.SPELL_POWER]; return(value); }
private int ComputeAttackValue(GenericCharacter aAttacker, Action aAction) { int value = 0; value = aAction.GetDamageAmount() + aAttacker.GetCharacterTotalStats()[(int)GenericCharacter.STAT_INDEX.STRENGTH]; return(value); }
//TODO: Change this to actually work properly. Need to add a current health, and a max health type of variable in generic character private void ProcessDamageTaken(GenericCharacter aGenericCharacter, int aDamageValue) { int currentDamage = aDamageValue; aDamageValue -= aGenericCharacter.GetCharacterTotalStats()[(int)GenericCharacter.STAT_INDEX.SHIELD]; if (aDamageValue < 0) { aDamageValue = 0; } int currentHP = aGenericCharacter.GetCharacterTotalStats()[(int)GenericCharacter.STAT_INDEX.HEALTH] -= aDamageValue; if (currentHP < 0) { currentHP = 0; } aGenericCharacter.SetCurrentHealth(currentHP); }