mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-14 23:07:51 -04:00
* Code compiles - execution NOT tested * updating gitignore * Removed intellij settings files * Removed more intellij files * Added exclusion for JDK classes. * Fixed purchasing script for vendors that have listed coin types. * Updated script to not kick off until the entire preload is complete. * adds static name entry for Solo movie poster and tcg9 vendor entry * clean up empty and orphaned object templates * adds placeholder black market (static) spawns * corrects entries for the video game table to correctly set it in tcg series 2 and remove series 1 console errors * Updated gitignore and removed intellij project files * Fixed appearance reference for thranta payroll and kashyyyk door, added skipLosCheck objvar due to cannit see issue. Requires updated src * Fixed appearance and template for terminal (#2) * Fixed appearance and template for terminal (#3) * Fixed appearance and template for terminal (#4) * Deleted another faulty/orphaned object template * Fixed gcw ranks option on frog. Only issue is that it doesn't award the officer commands or badges. * Fixed some unneeded java 11 changes
89 lines
3.0 KiB
Java
Executable File
89 lines
3.0 KiB
Java
Executable File
package script.player.skill;
|
|
|
|
import script.library.*;
|
|
import script.obj_id;
|
|
import script.prose_package;
|
|
|
|
public class teraskasi extends script.systems.combat.combat_base
|
|
{
|
|
public teraskasi()
|
|
{
|
|
}
|
|
public int cmdForceOfWill(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
|
|
{
|
|
int modval = meditation.getMeditationSkillMod(self);
|
|
if (modval < 1)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (getPosture(self) != POSTURE_INCAPACITATED)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
int stamp = getIntObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE);
|
|
if (stamp < 0)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
int now = getGameTime();
|
|
int delta = now - (stamp + 3600);
|
|
if (delta < 0)
|
|
{
|
|
String time_string = player_structure.assembleTimeRemaining(player_structure.convertSecondsTime(-delta));
|
|
prose_package ppUnavailable = prose.getPackage(meditation.SID_FORCEOFWILL_UNAVAILABLE, time_string);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
int roll = rand(0, 100);
|
|
if (roll < 5 || modval < roll)
|
|
{
|
|
setObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE, -1);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
else
|
|
{
|
|
meditation.forceOfWill(self, modval - roll);
|
|
setObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE, now);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int cmdForceOfWillFail(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int cmdPowerBoost(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
|
|
{
|
|
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 + ((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;
|
|
}
|
|
public int cmdPowerBoostFail(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
|
|
{
|
|
combat.sendCombatSpamMessage(self, meditation.SID_POWERBOOST_FAIL);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|