final Boolean firstblow, final Integer spellcaster,
final Integer limit, final Integer cost, final String faction,
final String alignment, final String diameter,
final String description, final String price)
throws GameEngineException {
Step step = MiniProfiler.step("API.createDisk(...)");
try {
// name, attack, defense, toughness, movement, wounds, flying,
// swashbuckler,cost,
// faction, alignment, diameter, description, price
final ScriptableObject disk = (ScriptableObject) ge.invoke("Disk",
new Object[] { name, type, attack, defense, toughness,
movement, wounds, flying, swashbuckler, archer,
arrows, bolts, fireballs, boulders,
missileImmunity, firstblow, spellcaster, limit,
cost, faction, alignment, diameter, description,
price, });
saveDisk(disk);
final StringBuilder sb = new StringBuilder(
"CREATE_DISK\nAPI.createDisk(");
sb.append("\"");
sb.append(name);
sb.append("\",\"");
sb.append(type);
sb.append("\",\"");
sb.append(attack);
sb.append("\",\"");
sb.append(defense);
sb.append("\",\"");
sb.append(toughness);
sb.append("\",\"");
sb.append(movement);
sb.append("\",\"");
sb.append(wounds);
sb.append("\",\"");
sb.append(flying);
sb.append("\",\"");
sb.append(swashbuckler);
sb.append("\",\"");
sb.append(archer);
sb.append("\",\"");
sb.append(arrows);
sb.append("\",\"");
sb.append(bolts);
sb.append("\",\"");
sb.append(fireballs);
sb.append("\",\"");
sb.append(boulders);
sb.append("\",\"");
sb.append(spellcaster);
sb.append("\",\"");
sb.append(cost);
sb.append("\",\"");
sb.append(faction);
sb.append("\",\"");
sb.append(alignment);
sb.append("\",\"");
sb.append(diameter);
sb.append("\",\"");
sb.append(description);
sb.append("\",\"");
sb.append(price);
sb.append("\"");
sb.append(");");
API.log.info(sb.toString());
return disk;
} finally {
step.close();
}
}