Skip to content
Snippets Groups Projects
Commit 65f1d3f1 authored by Graham Solie's avatar Graham Solie
Browse files

enemy scaling and combat tweaks

parent d3a5a847
No related branches found
No related tags found
No related merge requests found
Showing
with 14 additions and 7 deletions
No preview for this file type
......@@ -37,6 +37,7 @@ public class ArenaCombatControl : MonoBehaviour {
public float dashTimerA;
public bool dashD = false;
public bool dashA = false;
public static int winCount;
// Use this for initialization
......@@ -50,7 +51,7 @@ public class ArenaCombatControl : MonoBehaviour {
blockCoolDown = 3;
dashCoolDownD = 0.2f;
dashCoolDownA = 0.2f;
knockBackTimer = 1;
knockBackTimer = 0.5f;
dashTimerD = 0.5f;
dashTimerA = 0.5f;
......@@ -114,7 +115,7 @@ public class ArenaCombatControl : MonoBehaviour {
Player.AddForce(new Vector2(-250, 10));
}
if (knockBackTimer <= 0) {
knockBackTimer = 1;
knockBackTimer = 0.5f;
myAnimator.SetBool("knockBack", false);
knockBack = false;
}
......@@ -136,6 +137,7 @@ public class ArenaCombatControl : MonoBehaviour {
private void EnemyDeadCheck() {
if (EnemyAI.isEnemyDead == true) {
winCount++;
myAnimator.SetBool("victory", true);
}
else {
......
......@@ -48,6 +48,8 @@ public class EnemyAI : MonoBehaviour {
private float randomAction; //holds the randomActionSpeed
private float randomAcioionSpeed; //random speed set for random actions
private int healthPotion;
public int enemyMax;
public int enemyMin;
void Start() {
......@@ -250,7 +252,10 @@ public class EnemyAI : MonoBehaviour {
* Damage dealt to the player from the enemy
*/
public int getDamageOutput() {
int final = Random.Range(10, 15);
enemyMax = 6 + (int)(ArenaCombatControl.winCount * 1.25f); //BALANCE THIS SHIT
enemyMin = 1 + (int)(ArenaCombatControl.winCount * 1.1f);
int final = Random.Range(enemyMin, enemyMax);
Debug.Log (final);
// calculate here! remember player defense is factored in later
return final;
......
......@@ -77,9 +77,9 @@ public class PlayerStats : MonoBehaviour {
* Send damage to player
*/
public void Damage(int amount) {
if (amount - defense > 0) {
curHealth -= amount - defense;
}
curHealth -= amount - (int)(defense * 0.25f);
if (curHealth <= 0) {
curHealth = 0;
isDead = true;
......
No preview for this file type
sceneSetups:
- path: Assets/Scenes/Start.unity
- path: Assets/Scenes/PreFight.unity
isLoaded: 1
isActive: 1
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment