Added BoostAssault,BoostDefender components. Added their effects in HealthSystem,PlayerMovementSystem

This commit is contained in:
verysecrethero
2016-02-04 16:18:54 +01:00
parent b56824786c
commit 047e71a4e1
8 changed files with 322 additions and 3 deletions
+3
View File
@@ -49,6 +49,9 @@ bool HealthSystem::OnPlayerDamaged(Events::PlayerDamage& e)
{
ComponentWrapper cHealth = e.Player["Health"];
double& health = cHealth["Health"];
if (e.Player.HasComponent("BoostDefender")) {
e.Damage -= (double)e.Player["BoostDefender"]["StrengthOfEffect"];
}
health -= e.Damage;
if (health <= 0.0) {