use of pcgen.persistence.PersistenceLayerException in project pcgen by PCGen.
the class PreDamageReductionWriter method write.
/**
* @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer, pcgen.core.prereq.Prerequisite)
*/
@Override
public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException {
checkValidOperator(prereq, operatorsHandled());
try {
if (prereq.getOperator().equals(PrerequisiteOperator.LT)) {
writer.write('!');
}
writer.write("PREDR:" + (prereq.isOverrideQualify() ? "Q:" : "") + "1,");
writer.write(prereq.getKey() + '=' + prereq.getOperand());
} catch (IOException e) {
throw new PersistenceLayerException(e.getMessage());
}
}
use of pcgen.persistence.PersistenceLayerException in project pcgen by PCGen.
the class PreDeityAlignWriter method write.
/**
* @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer, pcgen.core.prereq.Prerequisite)
*/
@Override
public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException {
checkValidOperator(prereq, operatorsHandled());
try {
if (prereq.getOperator().equals(PrerequisiteOperator.NEQ)) {
writer.write('!');
}
writer.write("PREDEITYALIGN:" + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(prereq.getOperand());
} catch (IOException e) {
throw new PersistenceLayerException(e.getMessage());
}
}
use of pcgen.persistence.PersistenceLayerException in project pcgen by PCGen.
the class PreEquipTwoWeaponWriter method write.
/**
* @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer, pcgen.core.prereq.Prerequisite)
*/
@Override
public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException {
checkValidOperator(prereq, operatorsHandled());
try {
if (prereq.getOperator().equals(PrerequisiteOperator.LT)) {
writer.write('!');
}
writer.write("PREEQUIPTWOWEAPON:" + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(prereq.getOperand());
writer.write(',');
writer.write(prereq.getKey());
} catch (IOException e) {
throw new PersistenceLayerException(e.getMessage());
}
}
use of pcgen.persistence.PersistenceLayerException in project pcgen by PCGen.
the class PreEquipWriter method write.
/**
* @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer, pcgen.core.prereq.Prerequisite)
*/
@Override
public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException {
checkValidOperator(prereq, operatorsHandled());
try {
if (prereq.getOperator().equals(PrerequisiteOperator.LT)) {
writer.write('!');
}
writer.write("PREEQUIP:" + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(prereq.getOperand());
writer.write(',');
writer.write(prereq.getKey());
} catch (IOException e) {
throw new PersistenceLayerException(e.getMessage());
}
}
use of pcgen.persistence.PersistenceLayerException in project pcgen by PCGen.
the class PreFactSetWriter method write.
/**
* @see pcgen.persistence.lst.output.prereq.PrerequisiteWriterInterface#write(java.io.Writer, pcgen.core.prereq.Prerequisite)
*/
@Override
public void write(Writer writer, Prerequisite prereq) throws PersistenceLayerException {
checkValidOperator(prereq, operatorsHandled());
try {
if (prereq.getOperator().equals(PrerequisiteOperator.LT)) {
writer.write('!');
}
writer.write("PREFACTSET:" + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(prereq.getOperand());
writer.write(',');
writer.write(prereq.getCategoryName() + ',');
writer.write(prereq.getKey());
} catch (IOException e) {
throw new PersistenceLayerException(e.getMessage());
}
}
Aggregations