[FRF] Added Silumgar, the Drifting Death and Ojutai, Soul of Winter.

This commit is contained in:
LevelX2 2015-01-16 22:42:25 +01:00
parent 35ca4f9d44
commit b4b2131bd6
4 changed files with 255 additions and 6 deletions

View file

@ -27,6 +27,7 @@
*/
package mage.abilities.common;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.constants.CardType;
@ -90,10 +91,21 @@ public class AttacksAllTriggeredAbility extends TriggeredAbilityImpl {
return false;
}
}
if (SetTargetPointer.PERMANENT.equals(setTargetPointer)) {
for (Effect effect: getEffects()) {
effect.setTargetPointer(new FixedTarget(permanent.getId()));
}
switch(setTargetPointer) {
case PERMANENT:
for (Effect effect: getEffects()) {
effect.setTargetPointer(new FixedTarget(permanent.getId()));
}
break;
case PLAYER:
UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(permanent.getId(), game);
if (defendingPlayerId != null) {
for (Effect effect: getEffects()) {
effect.setTargetPointer(new FixedTarget(defendingPlayerId));
}
}
break;
}
return true;
}

View file

@ -89,8 +89,8 @@ public class SacrificeEffect extends OneShotEffect{
Target target = new TargetControlledPermanent(amount, amount, filter, true);
//A spell or ability could have removed the only legal target this player
//had, if thats the case this ability should fizzle.
// A spell or ability could have removed the only legal target this player
// had, if thats the case this ability should fizzle.
if (amount > 0 && target.canChoose(source.getSourceId(), player.getId(), game)) {
boolean abilityApplied = false;
while (!target.isChosen() && target.canChoose(player.getId(), game) && player.isInGame()) {