Refactored Nano Powers

* All nano power functions have been merged into one goliath of a function.
* Nano powers consume the correct amount of stamina.
* Bugfixed gumball issues, gumballed nanos now perform better.
* Revive powers now work correctly.
* Recall powers both self and group are functional.
* Removed nanoBuff.
* Added a new applyBuff function, this allows for quick and easy application of nano skills.
* Numerous other bugfixes.
This commit is contained in:
2020-11-08 00:26:44 +00:00
committed by Gent S
parent 2acb90f2d2
commit 299fc1b461
8 changed files with 574 additions and 571 deletions

View File

@@ -505,7 +505,7 @@ void MobManager::combatStep(Mob *mob, time_t currTime) {
// drain
if ((mob->lastDrainTime == 0 || currTime - mob->lastDrainTime >= 1000) && mob->appearanceData.iConditionBitFlag & CSB_BIT_BOUNDINGBALL) {
drainMobHP(mob, mob->maxHealth / 15); // lose 6.67% every second
drainMobHP(mob, mob->maxHealth / 20); // lose 5% every second
mob->lastDrainTime = currTime;
}
@@ -934,10 +934,7 @@ void MobManager::playerTick(CNServer *serv, time_t currTime) {
for (int i = 0; i < 3; i++) {
if (plr->activeNano != 0 && plr->equippedNanos[i] == plr->activeNano) { // spend stamina
plr->Nanos[plr->activeNano].iStamina -= 1;
if (plr->passiveNanoOut)
plr->Nanos[plr->activeNano].iStamina -= 1;
plr->Nanos[plr->activeNano].iStamina -= 1 + plr->nanoDrainRate * 2 / 5;
if (plr->Nanos[plr->activeNano].iStamina <= 0) {
plr->Nanos[plr->activeNano].iStamina = 0;