Example #1
0
 /**
  * The value is piped to the 'modifyregister' action.
  *
  * @param idAnswer the answer value.
  */
 protected void setAnswer(int idAnswer) {
   if (idAnswer > 0) {
     triggeredAbility = either.get(idAnswer - 1);
     context = contexts.get(idAnswer - 1);
   }
   if (StackManager.newSpell(this)) {
     StackManager.resolveStack();
   }
 }
Example #2
0
 @Override
 public boolean play(ContextEventListener context, Ability ability) {
   final int listIndex = getlistIndex(ability, context);
   if (listIndex < 0) {
     StackManager.getInstance().getTargetedList().removeLast();
   } else {
     StackManager.SAVED_TARGET_LISTS
         .get(listIndex)
         .remove(StackManager.SAVED_TARGET_LISTS.get(listIndex).size() - 1);
   }
   return true;
 }