Files
Server/src/engine/parsers/objects/wpak/EffectTemplate.java
T

76 lines
2.9 KiB
Java
Raw Normal View History

// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2026
// https://www.magicbane.com
package engine.parsers.objects.wpak;
import engine.mbEnums;
import java.util.ArrayList;
import java.util.HashMap;
// One EFFECTBEGIN block of Effects.cfg (client ArcEffect_ParseBlock 0x555540).
// Header: <effect_id> <effect_name> <icon>. Keys are flags; SOURCE, MODS and
// CONDITION are nested blocks, kept in file order.
//
// Read only once loaded.
public class EffectTemplate {
public static HashMap<String, EffectTemplate> _effects = new HashMap<>();
public String effect_id;
public String effect_name;
public int icon;
public boolean isitemeffect;
public boolean dontsave;
public boolean ignorenomod;
public boolean isspireeffect;
public final ArrayList<String> sources = new ArrayList<>();
public final ArrayList<ModEntry> mods = new ArrayList<>();
public final ArrayList<ConditionEntry> conditions = new ArrayList<>();
// One MODS line. Which fields are set depends on the mod type's behavior in ModTypes.cfg;
// the layouts are from the client's ArcMod*_Parse functions. args keeps the line as written.
public static class ModEntry {
public mbEnums.ModType mod_type;
public String behavior;
public final ArrayList<String> args = new ArrayList<>();
public float min_mod;
public float max_mod;
// Standard and FPSubType*: the client reads this with String::ToInt, so 16.8 acts as 16 (0x55A6C0)
public float percent_mod;
public String curve;
// The behavior's subtype: attribute, skill, damage type, source type, power type, mod type or monster type
public String type;
// SubTypeSourceType/SubTypePowerType display text, or the two ItemName strings
public String string1;
public String string2;
public String proc_power_id;
public int map_key;
public final ArrayList<Integer> map_values = new ArrayList<>();
}
// One CONDITION line: <condition> <amount> [curve] [damage type ...] (0x588320)
public static class ConditionEntry {
public mbEnums.PowerFailCondition condition;
public float amount;
public String curve;
public final ArrayList<mbEnums.DamageType> damage_types = new ArrayList<>();
}
}