mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 23:12:10 -08:00
implement [LCI] Market Gnome
This commit is contained in:
parent
a5922457ad
commit
933d694b08
5 changed files with 191 additions and 8 deletions
|
|
@ -18,6 +18,7 @@ import mage.filter.common.FilterOwnedCard;
|
|||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInGraveyardBattlefieldOrStack;
|
||||
|
|
@ -131,6 +132,8 @@ class CraftCost extends CostImpl {
|
|||
.map(uuid -> {
|
||||
Permanent permanent = game.getPermanent(uuid);
|
||||
if (permanent != null) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.EXILED_WHILE_CRAFTING,
|
||||
permanent.getId(), source, player.getId()));
|
||||
return permanent;
|
||||
}
|
||||
return game.getCard(uuid);
|
||||
|
|
|
|||
|
|
@ -540,6 +540,12 @@ public class GameEvent implements Serializable {
|
|||
flag not used for this event
|
||||
*/
|
||||
DISCOVERED,
|
||||
/* Exiled while crafting (see Market Gnome)
|
||||
targetId the permanent exiled
|
||||
sourceId of the craft ability
|
||||
playerId the player crafting
|
||||
*/
|
||||
EXILED_WHILE_CRAFTING,
|
||||
//custom events
|
||||
CUSTOM_EVENT
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue