Exemplo n.º 1
0
 public void affectCharStats(MOB affectedMOB, CharStats affectableStats) {
   super.affectCharStats(affectedMOB, affectableStats);
   affectableStats.setStat(
       CharStats.STAT_STRENGTH, affectableStats.getStat(CharStats.STAT_STRENGTH) + 5);
   affectableStats.setStat(
       CharStats.STAT_SAVE_FIRE, affectableStats.getStat(CharStats.STAT_SAVE_FIRE) + 50);
 }
Exemplo n.º 2
0
  private static void getColumn(
      final Field field, final StringBuilder builder, final ConcatMap uniqueMap) throws Exception {
    final Column columnType = field.getAnnotation(Column.class);
    if (columnType != null) {

      final String columnName = (String) field.get(null);

      final ColumnOptions columnOptions = field.getAnnotation(ColumnOptions.class);
      if (columnOptions != null) {
        builder.append(
            String.format(
                "%s %s %s,", columnName, columnType.value().name(), columnOptions.value()));
      } else {
        builder.append(String.format("%s %s,", columnName, columnType.value().name()));
      }

      final Unique unique = field.getAnnotation(Unique.class);
      if (unique != null) {
        uniqueMap.put(unique.value().name(), columnName);
      }
    }
  }
Exemplo n.º 3
0
 @Override
 public void configure(Unique constraintAnnotation) {
   uniqueKeyContext = constraintAnnotation.value();
   setMessage(constraintAnnotation.message());
 }
 @Override
 public void initialize(Unique annotation) {
   this.entity = annotation.entity();
   this.idField = annotation.idField();
   this.uniqueFields = annotation.uniqueFields();
 }
Exemplo n.º 5
0
 public void affectPhyStats(Physical affected, PhyStats affectableStats) {
   super.affectPhyStats(affected, affectableStats);
   affectableStats.setSensesMask(affectableStats.sensesMask() | PhyStats.CAN_SEE_INFRARED);
 }