alclient
Version:
A node client for interacting with Adventure Land - The Code MMORPG. This package extends the functionality of 'alclient' by managing a mongo database.
49 lines • 1.78 kB
JavaScript
import { PingCompensatedCharacter } from "./PingCompensatedCharacter.js";
export class Paladin extends PingCompensatedCharacter {
ctype = "paladin";
// NOTE: Untested
async manaShieldOff() {
if (!this.ready)
throw new Error("We aren't ready yet [manaShieldOff].");
if (!this.s.mshield)
return; // It's already off
const response = this.getResponsePromise("mshield");
this.socket.emit("skill", { name: "mshield" });
return response;
}
// NOTE: Untested
async manaShieldOn() {
if (!this.ready)
throw new Error("We aren't ready yet [manaShieldOn].");
if (this.s.mshield)
return; // It's already on
const response = this.getResponsePromise("mshield");
this.socket.emit("skill", { name: "mshield" });
return response;
}
// NOTE: Untested
async purify(target) {
if (!this.ready)
throw new Error("We aren't ready yet [purify].");
const response = this.getResponsePromise("purify");
this.socket.emit("skill", { id: target, name: "purify" });
return response;
}
// NOTE: Untested
async selfHeal() {
if (!this.ready)
throw new Error("We aren't ready yet [selfHeal].");
const response = this.getResponsePromise("selfheal");
this.socket.emit("skill", { name: "selfheal" });
return response;
}
// NOTE: Untested
async smash(target) {
if (!this.ready)
throw new Error("We aren't ready yet [smash].");
const response = this.getResponsePromise("smash");
this.socket.emit("skill", { id: target, name: "smash" });
return response;
}
}
//# sourceMappingURL=Paladin.js.map