Fixed bug that caused enemy robot attacks to only nullify the modification when a sheild was up instead of the whole attack caused by the implementation of colours strengths/weaknesses

This commit is contained in:
Gregory Campbell
2020-04-10 12:59:15 -04:00
parent 776ec9998e
commit 9d0cebf3cf
+3 -3
View File
@@ -475,19 +475,19 @@ public class GMScript : MonoBehaviour
} }
modifiedAttack = enemyAttack + modifier;
//HIT ONLY DAMAGES IF THERE IS NO SHEILD UP //HIT ONLY DAMAGES IF THERE IS NO SHEILD UP
if(sheild == true) if(sheild == true)
{ {
modifier = 0; modifiedAttack = 0;
print("Sheild Hit!"); print("Sheild Hit!");
Sheild.SetActive(false); Sheild.SetActive(false);
sheild = false; sheild = false;
} }
modifiedAttack = enemyAttack + modifier;
StartCoroutine(DisplayDamageText(modifiedAttack, PartyDamageText, enemyColour)); StartCoroutine(DisplayDamageText(modifiedAttack, PartyDamageText, enemyColour));
partyHealth -= modifiedAttack; partyHealth -= modifiedAttack;