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

More Combat and Skill Tweaks

Pots boost only 3 now
Blessing boost a bit more
Defence has a bigger effect of hits
Shields do more damage reduction
Luck skill turned down a notch but also not poverty simulator 2016
parent da5dda28
No related branches found
No related tags found
No related merge requests found
Showing
with 35 additions and 22 deletions
No preview for this file type
No preview for this file type
......@@ -143,17 +143,17 @@ public class ArenaCombatControl : MonoBehaviour {
myAnimator.SetBool("victory", true);
if (PlayerStats.offenseBlessing == true) {
PlayerStats.agility -= 1;
PlayerStats.strength -= 1;
PlayerStats.agility -= 5;
PlayerStats.strength -= 5;
PlayerStats.offenseBlessing = false;
}
if (PlayerStats.defenseBlessing == true) {
PlayerStats.defense -= 1;
PlayerStats.vitality -= 1;
PlayerStats.defense -= 5;
PlayerStats.vitality -= 3;
PlayerStats.defenseBlessing = false;
}
if (PlayerStats.luckBlessing == true) {
PlayerStats.luck -= 2;
PlayerStats.luck -= 3;
PlayerStats.luckBlessing = false;
}
if (drinkStength == true) {
......@@ -413,33 +413,33 @@ public class ArenaCombatControl : MonoBehaviour {
//Apply the boost to the respected skill
private void boostStrength() {
PlayerStats.strength += 15;
PlayerStats.strength += 3;
Invoke("StrengthBoostCoolDown", 150); //boost lasts 2.5 mins
}
private void boostDefence() {
PlayerStats.defense += 15;
PlayerStats.defense += 3;
Invoke("DefenceBoostCoolDown", 150); //boost lasts 2.5 mins
}
private void boostAgility() {
PlayerStats.agility += 15;
PlayerStats.agility += 3;
Invoke("AgilityBoostCoolDown", 150); //boost lasts 2.5 mins
}
//take boost off the respected skills
private void StrengthBoostCoolDown() {
drinkStength = false;
PlayerStats.strength -= 15;
PlayerStats.strength -= 3;
}
private void DefenceBoostCoolDown() {
drinkDefence = false;
PlayerStats.defense -= 15;
PlayerStats.defense -= 3;
}
private void AgilityBoostCoolDown() {
drinkAgility = false;
PlayerStats.agility -= 15;
PlayerStats.agility -= 3;
}
......
......@@ -53,7 +53,7 @@ public class ArenaPortraits : MonoBehaviour {
playerHead.sprite = appearance.getHead();
playerHead.color = playerColor;
enemyPortrait();
reward = Random.Range (1*(PlayerStats.luck), 5*(PlayerStats.luck));
reward = Random.Range (1*((PlayerStats.luck)+5), 4*((PlayerStats.luck)));
}
// Update is called once per frame
......
......@@ -36,6 +36,10 @@ public class BananaMovement : MonoBehaviour {
Destroy(gameObject);
}
void OnCollisionEnter2D() {
Destroy(gameObject);
}
}
......@@ -51,7 +51,7 @@ public class EnemyAI : MonoBehaviour {
public int enemyMax;
public int enemyMin;
public bool dash = true;
public float dashCoolDown = 5;
public float dashCoolDown = 3;
void Start() {
......@@ -109,7 +109,7 @@ public class EnemyAI : MonoBehaviour {
if (dash == true) {
dashCoolDown -= Time.deltaTime;
if (dashCoolDown <= 0) {
dashCoolDown = 5;
dashCoolDown = 3;
dash = false;
}
}
......
......@@ -47,15 +47,15 @@ public class PlayerStats : MonoBehaviour {
if (SceneManager.GetActiveScene().name == "arena") { // apply blessings
//heal(); Remove comments to heal upon arena entry
if (getOffenseBlessing() == true) {
agility += 1;
strength += 1;
agility += 5;
strength += 5;
}
if (getDefenseBlessing() == true) {
defense += 1;
vitality += 1;
defense += 5;
vitality += 3;
}
if (getLuckBlessing() == true) {
luck += 2;
luck += 3;
}
}
......@@ -78,12 +78,15 @@ public class PlayerStats : MonoBehaviour {
* Send damage to player
*/
public void Damage(int amount) {
int damage = amount - (int)(defense * 0.25f) - (int)(currentShield.defenseBonus * 0.2f);
if (ArenaCombatControl.block == true) {
curHealth -= (int)(amount * 0.5f);
}
else if (damage < 0 ) {
curHealth -= 1;
}
else {
curHealth -= amount - (int)(defense * 0.25f);
curHealth -= damage;
}
if (curHealth <= 0) {
......
......@@ -45,7 +45,13 @@ public class setAppearance : MonoBehaviour {
head.sprite = curHead;
legR.sprite = curLegs; // two legs, do twice
legL.sprite = curLegs;
}
head.color = new Color(1, 1, 1, 1);
body.color = new Color(1, 1, 1, 1);
legR.color = new Color(1, 1, 1, 1);
legL.color = new Color(1, 1, 1, 1);
arm.color = new Color(1, 1, 1, 1);
forearm.color = new Color(1, 1, 1, 1);
}
}
public void addColor(float red, float green, float blue){
......
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