mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-19 19:10:35 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user