mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Mistbind Clique - Fixed that the tap ability was wrongly triggered as Mistbind Clique left the battlefield.
This commit is contained in:
parent
a4e1c7aefd
commit
917d6500fa
3 changed files with 18 additions and 7 deletions
|
|
@ -49,6 +49,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
|
@ -87,7 +88,8 @@ public class ChampionAbility extends StaticAbility {
|
|||
* @param card
|
||||
* @param subtypes subtypes to champion with, if empty all creatures can be
|
||||
* used
|
||||
* @param requiresCreature for cards that specifically require championing another creature
|
||||
* @param requiresCreature for cards that specifically require championing
|
||||
* another creature
|
||||
*/
|
||||
public ChampionAbility(Card card, String[] subtypes, boolean requiresCreature) {
|
||||
super(Zone.BATTLEFIELD, null);
|
||||
|
|
@ -121,7 +123,7 @@ public class ChampionAbility extends StaticAbility {
|
|||
|
||||
// When this permanent enters the battlefield, sacrifice it unless you exile another [object] you control.
|
||||
Ability ability1 = new EntersBattlefieldTriggeredAbility(
|
||||
new SacrificeSourceUnlessPaysEffect(new ChampionExileCost(filter, new StringBuilder(card.getName()).append(" championed permanents").toString())), false);
|
||||
new SacrificeSourceUnlessPaysEffect(new ChampionExileCost(filter, card.getName() + " championed permanents")), false);
|
||||
ability1.setRuleVisible(false);
|
||||
addSubAbility(ability1);
|
||||
|
||||
|
|
@ -180,6 +182,9 @@ class ChampionExileCost extends CostImpl {
|
|||
return false;
|
||||
}
|
||||
paid |= controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getIdName() + " championed permanents", sourceId, game, Zone.BATTLEFIELD, true);
|
||||
if (paid) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREATURE_CHAMPIONED, permanent.getId(), sourceId, controllerId));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,6 +117,12 @@ public class GameEvent implements Serializable {
|
|||
flag true = from comabat damage - other from non combat damage
|
||||
*/
|
||||
PLAY_LAND, LAND_PLAYED,
|
||||
CREATURE_CHAMPIONED,
|
||||
/* CREATURE_CHAMPIONED
|
||||
targetId the id of the creature that was championed
|
||||
sourceId sourceId of the creature using the champion ability
|
||||
playerId the id of the controlling player
|
||||
*/
|
||||
CREW_VEHICLE,
|
||||
/* CREW_VEHICLE
|
||||
targetId the id of the creature that crewed a vehicle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue