void UpdateRollAway( float elapsedTime, CSkill* skill, CParticleSystem* ps ) { CPlayer* pPlayer = CPlayer::GetInstance(); CBattleMap* pBattleMap = CBattleMap::GetInstance(); CBase* character = pBattleMap->GetCurrChar(); CBase* target = pBattleMap->GetCurrEnemyTarget(); // if the skill consists of more than one animation, this needs to happen when each one is finished if (skill->Trigger()) { ps[NINJA_BLOOD].Emit(target->GetPosX(), target->GetPosY()); ps[NINJA_BLOOD].m_bActive = true; ps[NINJA_BLOOD].m_bLoop = false; // FORMULA: str - def + dmg + accuracy * 1.5 + random(-5 to 5) + (QTE amt successful * 5) skill->DmgToRender( (int)((float)(character->GetStrength() - target->GetDefense() + skill->GetDmg() + character->GetAccuracy()) * 1.5f + rand() % (5 + 4) - 5) + (skill->GetCurrAmtSuccessful() * 5) ); target->SetHealth(target->GetHealth() - skill->DmgToRender()); ps[NINJA_BLOOD].m_bActive = false; skill->Trigger(false); } /*ps[BLOOD].UpdateParticle(elapsedTime); ps[BLOOD].DrawParticle(CAssets::GetInstance()->aBloodParticle);*/ }