void DoDamage() { if (EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.debuffs.Count == 0) { EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.isDebuffed = false; } float calc_damage = hero.curATK + BSM.PerformList[0].chosenAttack.attackDamage; EnemyToAttack.GetComponent <EnemyStateMachine>().TakeDamage(calc_damage); //check if enemy is alive after initial ability hit before worrying about dots on the enemy if (EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.curHP > 0) { print(BSM.PerformList[0].chosenAttack.debuffRoundDuration); if (BSM.PerformList[0].chosenAttack.hasStatusEffect || EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.isDebuffed) { BaseStatusEffect newStatusEffect = new BaseStatusEffect(); newStatusEffect.effectName = BSM.PerformList[0].chosenAttack.debuffName; newStatusEffect.effectRoundDuration = BSM.PerformList[0].chosenAttack.debuffRoundDuration; newStatusEffect.effectTickAmount = BSM.PerformList[0].chosenAttack.debuffTickAmount; for (int j = 0; j < EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.debuffs.Count; j++) { if (string.Equals(EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.debuffs[j].effectName, newStatusEffect.effectName)) { //Remove so we can apply with new calc EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.debuffs.Remove(newStatusEffect); } } ApplyStatus(newStatusEffect); DoStatus(); } } BL.CreateText("1" + "," + "0" + "," + hero.charTurnNum + "," + "Player" + "," + hero.theName + "," + EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.theName + "," + BSM.PerformList[0].chosenAttack.attackName + "," + BSM.PerformList[0].chosenAttack.hitNumber + "," + BSM.PerformList[0].chosenAttack.attackDamage + "," + EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.curHP + "," + EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.baseHP + "," + hero.isHasted + "," + hero.hasteMod + "," + hero.isDamageBuffed + "," + hero.damageBuffMod + "," + hero.isDamageTakenIncreased + "," + hero.damageTakenMod + "\n"); hero.charTurnNum++; }
void DoDamage() { float calc_damage = hero.curATK + BSM.PerformList[0].chosenAttack.attackDamage; EnemyToAttack.GetComponent <EnemyStateMachine>().TakeDamage(calc_damage); BL.CreateText("1" + "," + "0" + "," + hero.charTurnNum + "," + "Player" + "," + hero.theName + "," + EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.theName + "," + BSM.PerformList[0].chosenAttack.attackName + "," + BSM.PerformList[0].chosenAttack.hitNumber + "," + BSM.PerformList[0].chosenAttack.attackDamage + "," + EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.curHP + "," + EnemyToAttack.GetComponent <EnemyStateMachine>().enemy.baseHP + "," + hero.isHasted + "," + hero.hasteMod + "," + hero.isDamageBuffed + "," + hero.damageBuffMod + "," + hero.isDamageTakenIncreased + "," + hero.damageTakenMod + "\n"); hero.charTurnNum++; }