Skip to content
Snippets Groups Projects
Commit 4a49ab08 authored by Jordan's avatar Jordan
Browse files

More minor tweaks

- Potions don't heal over now
- Town doors are better
- Readded name solution, not working 100% still
- Sped up enemy
parent 3e16b740
No related branches found
No related tags found
No related merge requests found
Showing
with 16 additions and 5 deletions
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
<Compile Include="Assets\Scripts\scriptableObjects\CreateWeapon.cs" /> <Compile Include="Assets\Scripts\scriptableObjects\CreateWeapon.cs" />
<Compile Include="Assets\Scripts\scriptableObjects\Money.cs" /> <Compile Include="Assets\Scripts\scriptableObjects\Money.cs" />
<Compile Include="Assets\Scripts\scriptableObjects\PotionObject.cs" /> <Compile Include="Assets\Scripts\scriptableObjects\PotionObject.cs" />
<Compile Include="Assets\Scripts\scriptableObjects\Pots.cs" />
<Compile Include="Assets\Scripts\scriptableObjects\WeaponStats.cs" /> <Compile Include="Assets\Scripts\scriptableObjects\WeaponStats.cs" />
<Compile Include="Assets\Scripts\setAppearance.cs" /> <Compile Include="Assets\Scripts\setAppearance.cs" />
<Compile Include="Assets\Scripts\setEnemyAppearance.cs" /> <Compile Include="Assets\Scripts\setEnemyAppearance.cs" />
......
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -364,7 +364,10 @@ public class ArenaCombatControl : MonoBehaviour { ...@@ -364,7 +364,10 @@ public class ArenaCombatControl : MonoBehaviour {
myAnimator.SetBool("drink", true); myAnimator.SetBool("drink", true);
} }
else if (Input.GetKeyDown(KeyCode.Alpha4) && PlayerStats.healthPotions >= 1) { else if (Input.GetKeyDown(KeyCode.Alpha4) && PlayerStats.healthPotions >= 1) {
PlayerStats.curHealth += 35; //heal as soon as you drink the pot PlayerStats.curHealth += (int)(PlayerStats.maxHealth*0.5); //heal as soon as you drink the pot
if (PlayerStats.curHealth > PlayerStats.maxHealth) {
PlayerStats.curHealth = PlayerStats.maxHealth;
}
PlayerStats.healthPotions--; PlayerStats.healthPotions--;
myAnimator.SetBool("drink", true); myAnimator.SetBool("drink", true);
} }
......
...@@ -19,7 +19,7 @@ public class EnemyAI : MonoBehaviour { ...@@ -19,7 +19,7 @@ public class EnemyAI : MonoBehaviour {
public float playerHealthOriginal; //players health they entered the arena with public float playerHealthOriginal; //players health they entered the arena with
public static bool LookRight = true; //check which way the enemy is facing public static bool LookRight = true; //check which way the enemy is facing
private bool set; private bool set;
private float speed = 1; //movement speed of enemy private float speed = 3; //movement speed of enemy
private float attackSpeed; //attack speed private float attackSpeed; //attack speed
private float randomSpeed; //random speed which the atttack speed takes private float randomSpeed; //random speed which the atttack speed takes
float spaceBarCounter = 0; //check for how aggresive the player is being float spaceBarCounter = 0; //check for how aggresive the player is being
...@@ -250,7 +250,8 @@ public class EnemyAI : MonoBehaviour { ...@@ -250,7 +250,8 @@ public class EnemyAI : MonoBehaviour {
* Damage dealt to the player from the enemy * Damage dealt to the player from the enemy
*/ */
public int getDamageOutput() { public int getDamageOutput() {
int final = Random.Range(0, 15); int final = Random.Range(10, 15);
Debug.Log (final);
// calculate here! remember player defense is factored in later // calculate here! remember player defense is factored in later
return final; return final;
} }
...@@ -366,7 +367,10 @@ public class EnemyAI : MonoBehaviour { ...@@ -366,7 +367,10 @@ public class EnemyAI : MonoBehaviour {
if ((original / 2) > enemyHealth) { if ((original / 2) > enemyHealth) {
if (healthPotion >=1) { if (healthPotion >=1) {
myAnimator.SetBool("drink", true); myAnimator.SetBool("drink", true);
enemyHealth += 35; enemyHealth += (int)(original*0.5);
if (enemyHealth > original) {
enemyHealth = original;
}
healthPotion--; healthPotion--;
} }
return true; return true;
......
...@@ -105,7 +105,10 @@ public class PlayerMovement : MonoBehaviour ...@@ -105,7 +105,10 @@ public class PlayerMovement : MonoBehaviour
myAnimator.SetBool("drink", true); myAnimator.SetBool("drink", true);
} }
else if (Input.GetKeyDown(KeyCode.Alpha4) && PlayerStats.healthPotions >= 1) { else if (Input.GetKeyDown(KeyCode.Alpha4) && PlayerStats.healthPotions >= 1) {
PlayerStats.curHealth += 35; //heal as soon as you drink the pot PlayerStats.curHealth += (int)(PlayerStats.maxHealth*0.5); //heal as soon as you drink the pot
if (PlayerStats.curHealth > PlayerStats.maxHealth) {
PlayerStats.curHealth = PlayerStats.maxHealth;
}
PlayerStats.healthPotions--; PlayerStats.healthPotions--;
myAnimator.SetBool("drink", true); myAnimator.SetBool("drink", true);
} }
......
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
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