Table of Contents

Artifact Buff - Code References

The Artifact Buff is a base class for all buffs that are applied by artifacts (rings, artifacts, and similar equipment). It extends the standard Buff system and provides special handling for artifact-sourced buffs.

Java Classes

Base Implementation:

Key Characteristics:

Key Methods:

// In ArtifactBuff.java
public class ArtifactBuff extends Buff {
    @Override
    public boolean act() {
        if(getSourceId()==EntityIdSource.INVALID_ID) { // non-artifact source
            detach();
        }
        return super.act();
    }
 
    public String getEntityKind() {
        return "artifactBuff" + super.getEntityKind();
    }
 
    @Override
    public boolean dontPack() {
        return getSourceId()!= EntityIdSource.INVALID_ID;
    }
}

Key Behaviors

Source Tracking:

Serialization:

Entity Kind:

JSON Configuration

Artifact buffs do not have separate JSON configuration files. They are:

String Resources

Artifact buffs inherit their display names and descriptions from their parent artifacts. Individual buff implementations may override these in string resource files.

Lua Scripts

Artifact buffs are implemented entirely in Java. No Lua scripts are used for the base ArtifactBuff class.

Base Classes:

Related Interfaces:

Example Artifact Buffs:

Code References