public void HitWall(bool breakWall) { float dmg = 0; if (!breakWall) { PrintActionFeedback(null, "You hit the wall and got damaged!", null, false, true); dmg = player.maxHealth / 10; } else { PrintActionFeedback(null, "You found a room behind a false wall!", null, false, true); } player.Damage(dmg, player); }
public void SetTargets(InteractiveObject caster, InteractiveObject target) { //print(caster.name); float targetRandom = Random.Range(0f, 1f); if (target.defendAgainst != caster) { target.Damage(damageTarget + targetRandom, caster); } else { target.Damage((damageTarget + targetRandom) / 5, caster); } target.Recover(recoverTarget + targetRandom); float casterRandom = Random.Range(0f, 1f); caster.Damage(damageCaster + casterRandom, caster); caster.Recover(recoverCaster + casterRandom); // FRENZY DMG //if (target == GameManager.Instance.player || caster == GameManager.Instance.player) GameManager.Instance.FrenzyDamage(frenzy); if (target != caster && target.defendAgainst != caster && skillType != Type.none) // start battle bar { if (target.inParty) { GameManager.Instance.battleBar.StartDefence(targets); } else if (caster.inParty) { GameManager.Instance.battleBar.StartAttack(targets); } } }