Added armorDefense

This commit is contained in:
Fierelier 2018-05-15 10:00:30 +02:00
parent 34355502ec
commit 5eb9b4dbb5

View File

@ -71,6 +71,11 @@ namespace pdHealth
} }
} }
if (pl.Armor < armorVal) {
if (armorDefense < 1.0F) {
pl.Health = (int)Math.Round(pl.Health - ((armorVal - pl.Armor)*1.0f-armorDefense));
}
}
if (timeUntilRegen > 0) { if (timeUntilRegen > 0) {
timeUntilRegen = timeUntilRegen - tickTime; timeUntilRegen = timeUntilRegen - tickTime;
if (timeUntilRegen < 0) { timeUntilRegen = 0; } if (timeUntilRegen < 0) { timeUntilRegen = 0; }