use of pcgen.core.prereq.Prerequisite in project pcgen by PCGen.
the class PreEquipPrimaryWriter method specialCase.
@Override
public boolean specialCase(Writer writer, Prerequisite prereq) throws IOException {
PrerequisiteOperator po = getConsolidateMethod(kindHandled(), prereq, false);
if (po == null) {
return false;
}
if (!po.equals(prereq.getOperator())) {
writer.write('!');
}
writer.write("PRE" + kindHandled().toUpperCase() + ':' + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(po.equals(PrerequisiteOperator.GTEQ) ? prereq.getOperand() : "1");
for (Prerequisite p : prereq.getPrerequisites()) {
writer.write(',');
writer.write(p.getKey());
}
return true;
}
use of pcgen.core.prereq.Prerequisite in project pcgen by PCGen.
the class PreEquipSecondaryWriter method specialCase.
@Override
public boolean specialCase(Writer writer, Prerequisite prereq) throws IOException {
PrerequisiteOperator po = getConsolidateMethod(kindHandled(), prereq, false);
if (po == null) {
return false;
}
if (!po.equals(prereq.getOperator())) {
writer.write('!');
}
writer.write("PRE" + kindHandled().toUpperCase() + ':' + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(po.equals(PrerequisiteOperator.GTEQ) ? prereq.getOperand() : "1");
for (Prerequisite p : prereq.getPrerequisites()) {
writer.write(',');
writer.write(p.getKey());
}
return true;
}
use of pcgen.core.prereq.Prerequisite in project pcgen by PCGen.
the class PreEquipTwoWeaponWriter method specialCase.
@Override
public boolean specialCase(Writer writer, Prerequisite prereq) throws IOException {
PrerequisiteOperator po = getConsolidateMethod(kindHandled(), prereq, false);
if (po == null) {
return false;
}
if (!po.equals(prereq.getOperator())) {
writer.write('!');
}
writer.write("PRE" + kindHandled().toUpperCase() + ':' + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(po.equals(PrerequisiteOperator.GTEQ) ? prereq.getOperand() : "1");
for (Prerequisite p : prereq.getPrerequisites()) {
writer.write(',');
writer.write(p.getKey());
}
return true;
}
use of pcgen.core.prereq.Prerequisite in project pcgen by PCGen.
the class PreCharactertypeWriter method specialCase.
@Override
public boolean specialCase(Writer writer, Prerequisite prereq) throws IOException {
PrerequisiteOperator po = getConsolidateMethod(kindHandled(), prereq, false);
if (po == null) {
return false;
}
if (!po.equals(prereq.getOperator())) {
writer.write('!');
}
writer.write("PRE" + kindHandled().toUpperCase() + ':' + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(po.equals(PrerequisiteOperator.GTEQ) ? prereq.getOperand() : "1");
for (Prerequisite p : prereq.getPrerequisites()) {
writer.write(',');
writer.write(p.getKey());
}
return true;
}
use of pcgen.core.prereq.Prerequisite in project pcgen by PCGen.
the class PreCheckBaseWriter method specialCase.
@Override
public boolean specialCase(Writer writer, Prerequisite prereq) throws IOException {
PrerequisiteOperator po = getConsolidateMethod(kindHandled(), prereq, true);
if (po == null) {
return false;
}
if (!po.equals(prereq.getOperator())) {
writer.write('!');
}
writer.write("PRE" + kindHandled().toUpperCase() + ':' + (prereq.isOverrideQualify() ? "Q:" : ""));
writer.write(po.equals(PrerequisiteOperator.GTEQ) ? prereq.getOperand() : "1");
for (Prerequisite p : prereq.getPrerequisites()) {
writer.write(',');
writer.write(p.getKey());
writer.write('=');
writer.write(p.getOperand());
}
return true;
}
Aggregations