Files
Server/src/engine/powers/PowerPrereq.java
T

72 lines
2.2 KiB
Java
Raw Normal View History

2026-07-26 19:08:44 -04:00
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2026
// https://www.magicbane.com
2022-04-30 09:41:17 -04:00
package engine.powers;
import engine.mbEnums.EquipSlotType;
import engine.parsers.objects.wpak.PowerTemplate;
2022-04-30 09:41:17 -04:00
public class PowerPrereq {
2023-07-15 09:23:48 -04:00
private String effect;
private String message;
private boolean mainHand;
private boolean required;
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
/**
* No Table ID Constructor
*/
public PowerPrereq() {
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
}
2022-04-30 09:41:17 -04:00
// 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;
}
2023-07-15 09:23:48 -04:00
public String getEffect() {
return this.effect;
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
public String getMessage() {
return this.message;
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
public boolean mainHand() {
return this.mainHand;
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
public boolean isRequired() {
return this.required;
}
2022-04-30 09:41:17 -04:00
}