mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 13:19:18 -08:00
[M12] Manabarbs
This commit is contained in:
parent
885e713eec
commit
0829fa1ebf
5 changed files with 218 additions and 1 deletions
|
|
@ -31,7 +31,9 @@ package mage.abilities.costs.common;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
import mage.abilities.mana.ManaAbility;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
|
|
@ -53,6 +55,9 @@ public class TapSourceCost extends CostImpl<TapSourceCost> {
|
|||
Permanent permanent = game.getPermanent(sourceId);
|
||||
if (permanent != null) {
|
||||
paid = permanent.tap(game);
|
||||
if (paid && ability instanceof ManaAbility) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.TAPPED_FOR_MANA, sourceId, sourceId, controllerId));
|
||||
}
|
||||
}
|
||||
return paid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public class GameEvent {
|
|||
|
||||
//permanent events
|
||||
ENTERS_THE_BATTLEFIELD,
|
||||
TAP, TAPPED,
|
||||
TAP, TAPPED, TAPPED_FOR_MANA,
|
||||
UNTAP, UNTAPPED,
|
||||
FLIP, FLIPPED,
|
||||
UNFLIP, UNFLIPPED,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue