ProjectSWGCore / Holocore

This is the Star Wars Galaxies server emulator for the Java Virtual Machine
https://www.projectswg.com
GNU Affero General Public License v3.0
30 stars 20 forks source link

Power Boost #868

Open Undercova opened 2 years ago

Undercova commented 2 years ago

Power Boost This meditative art allows the user to channel mental energies into their physical form for a temporary boost to physical performance. However, such extreme mental activities cause a significantly exhausting psychological cost.

Undercova commented 2 years ago

/* POWER BOOST ****/ commandHandler cmdPowerBoost() { if(!isIdValid(self)) { return SCRIPT_OVERRIDE; }

int modval = meditation.getMeditationSkillMod(self);
if((modval < 1))
{
    return SCRIPT_OVERRIDE;
}

if(!meditation.isMeditating(self))
{
    combat.sendCombatSpamMessage(self, meditation.SID_POWERBOOST_FAIL);
    return SCRIPT_OVERRIDE;
}

if(buff.hasBuff(self, "powerBuff"))
{
    combat.sendCombatSpamMessage(self, meditation.SID_POWERBOOST_ACTIVE);
    return SCRIPT_OVERRIDE;
}

float duration = 300.0f + ((float)(modval) * 3.0f);

if(!combatStandardAction("powerBoost", self, self, null, "", ""))
{
    return SCRIPT_OVERRIDE;
}

buff.applyBuff(self, "powerBoost", duration);

combat.sendCombatSpamMessage(self, meditation.SID_POWERBOOST_BEGIN);
return SCRIPT_CONTINUE;

}

commandHandler cmdPowerBoostFail() { combat.sendCombatSpamMessage(self, meditation.SID_POWERBOOST_FAIL); return SCRIPT_CONTINUE; }