Files
Server/src/engine/powers/PowerPrereq.java
T
MagicBotandClaude Opus 5.5 f44f1ca138 Remove the DB power, cast prereq and power fail condition loaders
getAllPowersBase, getFailConditions, PowerPrereq.getAllPowerPrereqs and
the PowersBase/PowerPrereq ResultSet constructors. Powers come from
Powers.cfg since ac72d2c8 (tested).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:09:31 -04:00

73 lines
2.2 KiB
Java

// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2026
// https://www.magicbane.com
package engine.powers;
import engine.mbEnums.EquipSlotType;
import engine.parsers.objects.wpak.PowerTemplate;
public class PowerPrereq {
private String effect;
private String message;
private boolean mainHand;
private boolean required;
/**
* No Table ID Constructor
*/
public PowerPrereq() {
}
// EFFECTPREREQ= on the caster
public PowerPrereq(PowerTemplate.EffectPrereq effectPrereq) {
this.effect = effectPrereq.effect_id;
this.message = effectPrereq.message;
this.mainHand = false;
this.required = false;
}
// TARGETEFFECTPREREQS_ANDED= / _ORED= on the target
public PowerPrereq(PowerTemplate.EffectPrereq targetPrereq, boolean anded) {
this.effect = targetPrereq.effect_id;
this.message = "";
this.mainHand = false;
this.required = anded;
}
// EQPREREQ=: the message holds the skill name
public PowerPrereq(PowerTemplate.EquipPrereq equipPrereq) {
this.effect = "";
this.message = equipPrereq.skill;
this.mainHand = equipPrereq.slot == EquipSlotType.RHELD;
this.required = equipPrereq.required;
}
public String getEffect() {
return this.effect;
}
public String getMessage() {
return this.message;
}
public boolean mainHand() {
return this.mainHand;
}
public boolean isRequired() {
return this.required;
}
}