Пример #1
0
  @Override
  protected void onPerform() {
    CostComponent<?> cost = card.getModel().getComponent(CostComponent.class);
    if (cost != null) cost.perform(card);

    EffectComponent effect = card.getModel().getComponent(EffectComponent.class);
    if (effect != null) effect.getEffect().performEffect(card);
  }
Пример #2
0
 @Override
 public boolean actionIsAllowed() {
   CostComponent<?> cost = card.getModel().getComponent(CostComponent.class);
   return cost != null ? cost.test(card) : true;
 }