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); }
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); } } }
@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(); }
public void affectPhyStats(Physical affected, PhyStats affectableStats) { super.affectPhyStats(affected, affectableStats); affectableStats.setSensesMask(affectableStats.sensesMask() | PhyStats.CAN_SEE_INFRARED); }