forked from External/mage
Refactor: replaced sourceId by source and introduced source param in some methods;
This commit is contained in:
parent
2bb472607b
commit
db239a1055
3205 changed files with 7080 additions and 6795 deletions
|
|
@ -43,16 +43,16 @@ public class AttachEffect extends OneShotEffect {
|
|||
|| zcc == source.getSourceObjectZoneChangeCounter() + 2) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
return permanent.addAttachment(source.getSourceId(), game);
|
||||
return permanent.addAttachment(source.getSourceId(), source, game);
|
||||
} else {
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (player != null) {
|
||||
return player.addAttachment(source.getSourceId(), game);
|
||||
return player.addAttachment(source.getSourceId(), source, game);
|
||||
}
|
||||
if (!source.getTargets().isEmpty() && source.getTargets().get(0) instanceof TargetCard) { // e.g. Spellweaver Volute
|
||||
Card card = game.getCard(getTargetPointer().getFirst(game, source));
|
||||
if (card != null) {
|
||||
return card.addAttachment(source.getSourceId(), game);
|
||||
return card.addAttachment(source.getSourceId(), source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public class BalanceEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && cardsToDiscard.get(playerId) != null) {
|
||||
player.discard(cardsToDiscard.get(playerId), source, game);
|
||||
player.discard(cardsToDiscard.get(playerId), false, source, game);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ public class BalanceEffect extends OneShotEffect {
|
|||
|
||||
for (Permanent permanent : permanentsToSacrifice) {
|
||||
if (permanent != null) {
|
||||
permanent.sacrifice(source.getSourceId(), game);
|
||||
permanent.sacrifice(source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,17 +52,14 @@ public class BecomeBlockedTargetEffect extends OneShotEffect {
|
|||
if (alreadyBlocked) {
|
||||
continue;
|
||||
}
|
||||
game.fireEvent(GameEvent.getEvent(
|
||||
GameEvent.EventType.CREATURE_BLOCKED, permanent.getId(),
|
||||
source.getSourceId(), null
|
||||
));
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREATURE_BLOCKED, permanent.getId(), source, null));
|
||||
morSet.add(new MageObjectReference(permanent, game));
|
||||
}
|
||||
String key = UUID.randomUUID().toString();
|
||||
game.getState().setValue("becameBlocked_" + key, morSet);
|
||||
game.fireEvent(GameEvent.getEvent(
|
||||
GameEvent.EventType.BATCH_BLOCK_NONCOMBAT,
|
||||
source.getSourceId(), source.getSourceId(),
|
||||
source.getSourceId(), source,
|
||||
source.getControllerId(), key, 0)
|
||||
);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class BrainstormEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
player.drawCards(3, source.getSourceId(), game);
|
||||
player.drawCards(3, source, game);
|
||||
putOnLibrary(player, source, game);
|
||||
putOnLibrary(player, source, game);
|
||||
return true;
|
||||
|
|
@ -43,7 +43,7 @@ public class BrainstormEffect extends OneShotEffect {
|
|||
player.chooseTarget(Outcome.ReturnToHand, target, source, game);
|
||||
Card card = player.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
return player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false);
|
||||
return player.moveCardToLibraryWithInfo(card, source, game, Zone.HAND, true, false);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class CantBeCounteredControlledEffect extends ContinuousRuleModifyingEffe
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.COUNTER;
|
||||
return event.getType() == GameEvent.EventType.COUNTER;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class CantBeCounteredSourceEffect extends ContinuousRuleModifyingEffectIm
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.COUNTER;
|
||||
return event.getType() == GameEvent.EventType.COUNTER;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class CantBeRegeneratedSourceEffect extends ContinuousRuleModifyingEffect
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.REGENERATE;
|
||||
return event.getType() == GameEvent.EventType.REGENERATE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class CantBeRegeneratedTargetEffect extends ContinuousRuleModifyingEffect
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.REGENERATE;
|
||||
return event.getType() == GameEvent.EventType.REGENERATE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class CantBeTargetedAllEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.TARGET;
|
||||
return event.getType() == GameEvent.EventType.TARGET;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class CantBeTargetedAttachedEffect extends ContinuousRuleModifyingEffectI
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.TARGET;
|
||||
return event.getType() == GameEvent.EventType.TARGET;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class CantBeTargetedSourceEffect extends ContinuousRuleModifyingEffectImp
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.TARGET;
|
||||
return event.getType() == GameEvent.EventType.TARGET;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class CantBeTargetedTargetEffect extends ContinuousRuleModifyingEffectImp
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.TARGET;
|
||||
return event.getType() == GameEvent.EventType.TARGET;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class CipherEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent();
|
||||
target.setNotTarget(true);
|
||||
if (target.canChoose(source.getControllerId(), game)
|
||||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
|
||||
&& controller.chooseUse(outcome, "Cipher this spell to a creature?", source, game)) {
|
||||
controller.chooseTarget(outcome, target, source, game);
|
||||
Card sourceCard = game.getCard(source.getSourceId());
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public class ClashEffect extends OneShotEffect implements MageSingleton {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller != null && sourceObject != null
|
||||
&& !game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CLASH, controller.getId(), controller.getId()))) {
|
||||
&& !game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CLASH, controller.getId(), source, controller.getId()))) {
|
||||
// choose opponent
|
||||
Target target = new TargetOpponent(true);
|
||||
target.setTargetName("an opponent to clash with");
|
||||
|
|
@ -152,10 +152,10 @@ public class ClashEffect extends OneShotEffect implements MageSingleton {
|
|||
} while (nextPlayer != null && !nextPlayer.getId().equals(game.getActivePlayerId()));
|
||||
// put the cards back to library
|
||||
if (cardController != null) {
|
||||
controller.moveCardToLibraryWithInfo(cardController, source.getSourceId(), game, Zone.LIBRARY, topController, true);
|
||||
controller.moveCardToLibraryWithInfo(cardController, source, game, Zone.LIBRARY, topController, true);
|
||||
}
|
||||
if (cardOpponent != null) {
|
||||
opponent.moveCardToLibraryWithInfo(cardOpponent, source.getSourceId(), game, Zone.LIBRARY, topOpponent, true);
|
||||
opponent.moveCardToLibraryWithInfo(cardOpponent, source, game, Zone.LIBRARY, topOpponent, true);
|
||||
}
|
||||
// fire CLASHED event with info about who won
|
||||
String winner = "draw";
|
||||
|
|
@ -165,7 +165,7 @@ public class ClashEffect extends OneShotEffect implements MageSingleton {
|
|||
if (cmcOpponent > cmcController) {
|
||||
winner = "opponent";
|
||||
}
|
||||
GameEvent gameEvent = new GameEvent(EventType.CLASHED, opponent.getId(), source.getSourceId(), controller.getId());
|
||||
GameEvent gameEvent = new GameEvent(GameEvent.EventType.CLASHED, opponent.getId(), source, controller.getId());
|
||||
gameEvent.setData(winner);
|
||||
game.fireEvent(gameEvent);
|
||||
|
||||
|
|
|
|||
|
|
@ -156,9 +156,9 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
Permanent targetPermanent = game.getPermanent(targetId);
|
||||
Player targetPlayer = game.getPlayer(targetId);
|
||||
if (targetPermanent != null) {
|
||||
targetPermanent.addAttachment(sourcePermanent.getId(), game);
|
||||
targetPermanent.addAttachment(sourcePermanent.getId(), source, game);
|
||||
} else if (targetPlayer != null) {
|
||||
targetPlayer.addAttachment(sourcePermanent.getId(), game);
|
||||
targetPlayer.addAttachment(sourcePermanent.getId(), source, game);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import mage.filter.FilterImpl;
|
|||
import mage.filter.FilterInPlay;
|
||||
import mage.filter.predicate.mageobject.FromSetPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.CopiedStackObjectEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
|
@ -164,8 +165,7 @@ public abstract class CopySpellForEachItCouldTargetEffect<T extends MageItem> ex
|
|||
Spell chosenCopy = targetCopyMap.get(chosenId);
|
||||
if (chosenCopy != null) {
|
||||
game.getStack().push(chosenCopy);
|
||||
game.fireEvent(new GameEvent(GameEvent.EventType.COPIED_STACKOBJECT,
|
||||
chosenCopy.getId(), spell.getId(), source.getControllerId()));
|
||||
game.fireEvent(new CopiedStackObjectEvent(spell, chosenCopy, source.getControllerId()));
|
||||
toDelete.add(chosenId);
|
||||
madeACopy = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class CounterTargetAndSearchGraveyardHandLibraryEffect extends SearchTarg
|
|||
cardName = targetObject.getName();
|
||||
}
|
||||
searchPlayerId = stackObject.getControllerId();
|
||||
result = game.getStack().counter(objectId, source.getSourceId(), game);
|
||||
result = game.getStack().counter(objectId, source, game);
|
||||
}
|
||||
}
|
||||
// 5/1/2008: If the targeted spell can't be countered (it's Vexing Shusher, for example),
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class CounterTargetEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
boolean countered = false;
|
||||
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
|
||||
if (game.getStack().counter(targetId, source.getSourceId(), game)) {
|
||||
if (game.getStack().counter(targetId, source, game)) {
|
||||
countered = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class CounterTargetWithReplacementEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
return game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, targetZone, false, zoneDetail);
|
||||
return game.getStack().counter(targetPointer.getFirst(game, source), source, game, targetZone, false, zoneDetail);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,9 +68,10 @@ public class CounterUnlessPaysEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
costToPay.clearPaid();
|
||||
if (!(player.chooseUse(Outcome.Benefit, message, source, game) && costToPay.pay(source, game, spell.getSourceId(), spell.getControllerId(), false, null))) {
|
||||
if (!(player.chooseUse(Outcome.Benefit, message, source, game)
|
||||
&& costToPay.pay(source, game, source, spell.getControllerId(), false, null))) {
|
||||
game.informPlayers(player.getLogName() + " chooses not to pay " + costValueMessage + " to prevent the counter effect");
|
||||
return game.getStack().counter(spell.getId(), source.getSourceId(), game);
|
||||
return game.getStack().counter(spell.getId(), source, game);
|
||||
}
|
||||
game.informPlayers(player.getLogName() + " chooses to pay " + costValueMessage + " to prevent the counter effect");
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect {
|
|||
}
|
||||
additionalAbilities.stream().forEach(token::addAbility);
|
||||
|
||||
token.putOntoBattlefield(number, game, source.getSourceId(), playerId == null ? source.getControllerId() : playerId, tapped, attacking, attackedPlayer);
|
||||
token.putOntoBattlefield(number, game, source, playerId == null ? source.getControllerId() : playerId, tapped, attacking, attackedPlayer);
|
||||
for (UUID tokenId : token.getLastAddedTokenIds()) { // by cards like Doubling Season multiple tokens can be added to the battlefield
|
||||
Permanent tokenPermanent = game.getPermanent(tokenId);
|
||||
if (tokenPermanent != null) {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public class CreateTokenEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int value = amount.calculate(game, source, this);
|
||||
token.putOntoBattlefield(value, game, source.getSourceId(), source.getControllerId(), tapped, attacking);
|
||||
token.putOntoBattlefield(value, game, source, source.getControllerId(), tapped, attacking);
|
||||
this.lastAddedTokenId = token.getLastAddedToken();
|
||||
this.lastAddedTokenIds = token.getLastAddedTokenIds();
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class CreateTokenTargetEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
int value = amount.calculate(game, source, this);
|
||||
if (value > 0) {
|
||||
return token.putOntoBattlefield(value, game, source.getSourceId(), targetPointer.getFirst(game, source), tapped, attacking);
|
||||
return token.putOntoBattlefield(value, game, source, targetPointer.getFirst(game, source), tapped, attacking);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class DamageAllControlledTargetEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) {
|
||||
permanent.damage(amount, source.getSourceId(), game, false, true);
|
||||
permanent.damage(amount, source.getSourceId(), source, game, false, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class DamageAllEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
|
||||
for (Permanent permanent : permanents) {
|
||||
permanent.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, true);
|
||||
permanent.damage(amount.calculate(game, source, this), source.getSourceId(), source, game, false, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class DamageAttachedControllerEffect extends OneShotEffect {
|
|||
}
|
||||
Player player = game.getPlayer(enchanted.getControllerId());
|
||||
if (player != null) {
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), game);
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class DamageAttachedEffect extends OneShotEffect {
|
|||
if(enchanted == null) {
|
||||
return false;
|
||||
}
|
||||
enchanted.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, true);
|
||||
enchanted.damage(amount.calculate(game, source, this), source.getSourceId(), source, game, false, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class DamageControllerEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), source, game, false, preventable);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -41,9 +41,9 @@ public class DamageEachOtherEffect extends OneShotEffect {
|
|||
if (sourceCreature != null && targetCreature != null
|
||||
&& sourceCreature.isCreature()
|
||||
&& targetCreature.isCreature()) {
|
||||
targetCreature.damage(sourceCreature.getPower().getValue(), sourceCreature.getId(), game, false, true);
|
||||
targetCreature.damage(sourceCreature.getPower().getValue(), sourceCreature.getId(), source, game, false, true);
|
||||
if (sourceOnBattlefield) {
|
||||
sourceCreature.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, false, true);
|
||||
sourceCreature.damage(targetCreature.getPower().getValue(), targetCreature.getId(), source, game, false, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,12 +77,12 @@ public class DamageEverythingEffect extends OneShotEffect {
|
|||
int damage = amount.calculate(game, source, this);
|
||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game);
|
||||
for (Permanent permanent : permanents) {
|
||||
permanent.damage(damage, damageSource == null ? source.getSourceId() : damageSource, game, false, true);
|
||||
permanent.damage(damage, damageSource == null ? source.getSourceId() : damageSource, source, game, false, true);
|
||||
}
|
||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.damage(damage, damageSource == null ? source.getSourceId() : damageSource, game);
|
||||
player.damage(damage, damageSource == null ? source.getSourceId() : damageSource, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -61,13 +61,13 @@ public class DamageMultiEffect extends OneShotEffect {
|
|||
for (UUID target : multiTarget.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(target);
|
||||
if (permanent != null) {
|
||||
if (permanent.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game, false, true) > 0) {
|
||||
if (permanent.damage(multiTarget.getTargetAmount(target), source.getSourceId(), source, game, false, true) > 0) {
|
||||
damagedSet.add(new MageObjectReference(permanent, game));
|
||||
}
|
||||
} else {
|
||||
Player player = game.getPlayer(target);
|
||||
if (player != null) {
|
||||
player.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game);
|
||||
player.damage(multiTarget.getTargetAmount(target), source.getSourceId(), source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class DamagePlayersEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), game);
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), source, game);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -68,7 +68,7 @@ public class DamagePlayersEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), game);
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), source, game);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class DamageSelfEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
permanent.damage(amount, source.getSourceId(), game, false, true);
|
||||
permanent.damage(amount, source.getSourceId(), source, game, false, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class DamageTargetControllerEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
Player targetController = game.getPlayer(permanent.getControllerId());
|
||||
if (targetController != null) {
|
||||
targetController.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
|
||||
targetController.damage(amount.calculate(game, source, this), source.getSourceId(), source, game, false, preventable);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,11 +119,11 @@ public class DamageTargetEffect extends OneShotEffect {
|
|||
for (UUID targetId : target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
permanent.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
|
||||
permanent.damage(amount.calculate(game, source, this), source.getSourceId(), source, game, false, preventable);
|
||||
}
|
||||
Player player = game.getPlayer(targetId);
|
||||
if (player != null) {
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), source, game, false, preventable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -132,11 +132,11 @@ public class DamageTargetEffect extends OneShotEffect {
|
|||
for (UUID targetId : this.getTargetPointer().getTargets(game, source)) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
permanent.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
|
||||
permanent.damage(amount.calculate(game, source, this), source.getSourceId(), source, game, false, preventable);
|
||||
} else {
|
||||
Player player = game.getPlayer(targetId);
|
||||
if (player != null) {
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
|
||||
player.damage(amount.calculate(game, source, this), source.getSourceId(), source, game, false, preventable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ public class DamageWithPowerFromOneToAnotherTargetEffect extends OneShotEffect {
|
|||
Player anotherPlayer = game.getPlayer(source.getTargets().get(1).getFirstTarget());
|
||||
|
||||
if (myPermanent != null && anotherPermanent != null) {
|
||||
anotherPermanent.damage(myPermanent.getPower().getValue(), myPermanent.getId(), game, false, true);
|
||||
anotherPermanent.damage(myPermanent.getPower().getValue(), myPermanent.getId(), source, game, false, true);
|
||||
return true;
|
||||
} else if (myPermanent != null && anotherPlayer != null) {
|
||||
anotherPlayer.damage(myPermanent.getPower().getValue(), myPermanent.getId(), game);
|
||||
anotherPlayer.damage(myPermanent.getPower().getValue(), myPermanent.getId(), source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ public class DamageWithPowerFromSourceToAnotherTargetEffect extends OneShotEffec
|
|||
Player anotherPlayer = game.getPlayer(source.getTargets().get(0).getFirstTarget());
|
||||
|
||||
if (myPermanent != null && anotherPermanent != null) {
|
||||
anotherPermanent.damage(myPermanent.getPower().getValue(), myPermanent.getId(), game, false, true);
|
||||
anotherPermanent.damage(myPermanent.getPower().getValue(), myPermanent.getId(), source, game, false, true);
|
||||
return true;
|
||||
} else if (myPermanent != null && anotherPlayer != null) {
|
||||
anotherPlayer.damage(myPermanent.getPower().getValue(), myPermanent.getId(), game);
|
||||
anotherPlayer.damage(myPermanent.getPower().getValue(), myPermanent.getId(), source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class DestroyAllAttachedEquipmentEffect extends OneShotEffect {
|
|||
for (UUID attachmentId : attachments) {
|
||||
Permanent attachment = game.getPermanent(attachmentId);
|
||||
if (attachment != null && attachment.hasSubtype(SubType.EQUIPMENT, game)) {
|
||||
attachment.destroy(source.getSourceId(), game, false);
|
||||
attachment.destroy(source, game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class DestroyAllControlledTargetEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, source.getFirstTarget(), game)) {
|
||||
permanent.destroy(source.getSourceId(), game, false);
|
||||
permanent.destroy(source, game, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class DestroyAllEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||
permanent.destroy(source.getSourceId(), game, noRegen);
|
||||
permanent.destroy(source, game, noRegen);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class DestroyAllNamedPermanentsEffect extends OneShotEffect {
|
|||
filter.add(new NamePredicate(targetPermanent.getName()));
|
||||
}
|
||||
for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||
perm.destroy(source.getSourceId(), game, false);
|
||||
perm.destroy(source, game, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class DestroyAttachedToEffect extends OneShotEffect {
|
|||
if (attachment != null && attachment.getAttachedTo() != null) {
|
||||
Permanent attachedTo = game.getPermanent(attachment.getAttachedTo());
|
||||
if (attachedTo != null) {
|
||||
return attachedTo.destroy(source.getSourceId(), game, noRegen);
|
||||
return attachedTo.destroy(source, game, noRegen);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class DestroyEquippedEffect extends OneShotEffect {
|
|||
permanent = game.getPermanent(equipment.getAttachedTo());
|
||||
}
|
||||
if (permanent != null) {
|
||||
return permanent.destroy(source.getSourceId(), game, false);
|
||||
return permanent.destroy(source, game, false);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class DestroyMultiTargetEffect extends OneShotEffect {
|
|||
for (UUID permanentId: target.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(permanentId);
|
||||
if (permanent != null) {
|
||||
permanent.destroy(source.getSourceId(), game, noRegen);
|
||||
permanent.destroy(source, game, noRegen);
|
||||
affectedTargets++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class DestroySourceEffect extends OneShotEffect {
|
|||
if (permanent != null
|
||||
&& permanent.isPhasedIn()
|
||||
&& !permanent.isPhasedOutIndirectly()) {
|
||||
permanent.destroy(source.getSourceId(), game, noRegen);
|
||||
permanent.destroy(source, game, noRegen);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class DestroyTargetEffect extends OneShotEffect {
|
|||
if (permanent != null
|
||||
&& permanent.isPhasedIn()
|
||||
&& !permanent.isPhasedOutIndirectly()) {
|
||||
permanent.destroy(source.getSourceId(), game, noRegen);
|
||||
permanent.destroy(source, game, noRegen);
|
||||
affectedTargets++;
|
||||
}
|
||||
}
|
||||
|
|
@ -78,7 +78,7 @@ public class DestroyTargetEffect extends OneShotEffect {
|
|||
if (permanent != null
|
||||
&& permanent.isPhasedIn()
|
||||
&& !permanent.isPhasedOutIndirectly()) {
|
||||
permanent.destroy(source.getSourceId(), game, noRegen);
|
||||
permanent.destroy(source, game, noRegen);
|
||||
affectedTargets++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public class DevourEffect extends ReplacementEffectImpl {
|
|||
int devouredCreatures = 0;
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Permanent targetCreature = game.getPermanent(targetId);
|
||||
if (targetCreature != null && targetCreature.sacrifice(source.getSourceId(), game)) {
|
||||
if (targetCreature != null && targetCreature.sacrifice(source, game)) {
|
||||
cardSubtypes.add(targetCreature.getSubtype(game));
|
||||
devouredCreatures++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class DiscardOntoBattlefieldEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ZONE_CHANGE;
|
||||
return event.getType() == GameEvent.EventType.ZONE_CHANGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -90,11 +90,11 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
message = CardUtil.replaceSourceName(message, mageObject.getName());
|
||||
boolean result = true;
|
||||
Outcome payOutcome = executingEffects.getOutcome(source, this.outcome);
|
||||
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
|
||||
if (cost.canPay(source, source, player.getId(), game)
|
||||
&& (!optional || player.chooseUse(payOutcome, message, source, game))) {
|
||||
cost.clearPaid();
|
||||
int bookmark = game.bookmarkState();
|
||||
if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) {
|
||||
if (cost.pay(source, game, source, player.getId(), false)) {
|
||||
game.informPlayers(player.getLogName() + " paid for " + mageObject.getLogName() + " - " + message);
|
||||
for (Effect effect : executingEffects) {
|
||||
effect.setTargetPointer(this.targetPointer);
|
||||
|
|
|
|||
|
|
@ -89,10 +89,10 @@ public class DoUnlessAnyPlayerPaysEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && player.canRespond()
|
||||
&& costToPay.canPay(source, source.getSourceId(), player.getId(), game)
|
||||
&& costToPay.canPay(source, source, player.getId(), game)
|
||||
&& player.chooseUse(Outcome.Detriment, message, source, game)) {
|
||||
costToPay.clearPaid();
|
||||
if (costToPay.pay(source, game, source.getSourceId(), player.getId(), false, null)) {
|
||||
if (costToPay.pay(source, game, source, player.getId(), false, null)) {
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(player.getLogName() + " pays the cost to prevent the effect");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,9 +63,9 @@ public class DoUnlessControllerPaysEffect extends OneShotEffect {
|
|||
boolean doEffect = true;
|
||||
|
||||
// check if controller is willing to pay
|
||||
if (cost.canPay(source, source.getSourceId(), controller.getId(), game) && controller.chooseUse(Outcome.Detriment, message, source, game)) {
|
||||
if (cost.canPay(source, source, controller.getId(), game) && controller.chooseUse(Outcome.Detriment, message, source, game)) {
|
||||
cost.clearPaid();
|
||||
if (cost.pay(source, game, source.getSourceId(), controller.getId(), false, null)) {
|
||||
if (cost.pay(source, game, source, controller.getId(), false, null)) {
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(controller.getLogName() + " pays the cost to prevent the effect");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,10 +96,10 @@ public class DoUnlessTargetPlayerOrTargetsControllerPaysEffect extends OneShotEf
|
|||
boolean doEffect = true;
|
||||
|
||||
// check if targetController is willing to pay
|
||||
if (costToPay.canPay(source, source.getSourceId(), player.getId(), game)
|
||||
if (costToPay.canPay(source, source, player.getId(), game)
|
||||
&& player.chooseUse(Outcome.Detriment, message, source, game)) {
|
||||
costToPay.clearPaid();
|
||||
if (costToPay.pay(source, game, source.getSourceId(), player.getId(), false, null)) {
|
||||
if (costToPay.pay(source, game, source, player.getId(), false, null)) {
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(player.getLogName() + " pays the cost to prevent the effect");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,13 +49,13 @@ public class DoWhenCostPaid extends OneShotEffect {
|
|||
}
|
||||
String message = CardUtil.replaceSourceName(chooseUseText, mageObject.getLogName());
|
||||
Outcome payOutcome = ability.getEffects().getOutcome(source, this.outcome);
|
||||
if (!cost.canPay(source, source.getSourceId(), player.getId(), game)
|
||||
if (!cost.canPay(source, source, player.getId(), game)
|
||||
|| (optional && !player.chooseUse(payOutcome, message, source, game))) {
|
||||
return false;
|
||||
}
|
||||
cost.clearPaid();
|
||||
int bookmark = game.bookmarkState();
|
||||
if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) {
|
||||
if (cost.pay(source, game, source, player.getId(), false)) {
|
||||
ability.getEffects().setTargetPointer(getTargetPointer());
|
||||
game.fireReflexiveTriggeredAbility(ability, source);
|
||||
player.resetStoredBookmark(game);
|
||||
|
|
|
|||
|
|
@ -87,14 +87,14 @@ public class DontUntapInControllersNextUntapStepTargetEffect extends ContinuousR
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.UNTAP_STEP || event.getType() == EventType.UNTAP;
|
||||
return event.getType() == GameEvent.EventType.UNTAP_STEP || event.getType() == GameEvent.EventType.UNTAP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
// the check if a permanent untap phase is already handled is needed if multiple effects are added to prevent untap in next untap step of controller
|
||||
// if we don't check it for every untap step of a turn only one effect would be consumed instead of all be valid for the next untap step
|
||||
if (event.getType() == EventType.UNTAP_STEP) {
|
||||
if (event.getType() == GameEvent.EventType.UNTAP_STEP) {
|
||||
boolean allHandled = true;
|
||||
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
|
|
@ -120,7 +120,7 @@ public class DontUntapInControllersNextUntapStepTargetEffect extends ContinuousR
|
|||
}
|
||||
}
|
||||
|
||||
if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == EventType.UNTAP) {
|
||||
if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == GameEvent.EventType.UNTAP) {
|
||||
if (handledTargetsDuringTurn.containsKey(event.getTargetId())
|
||||
&& !handledTargetsDuringTurn.get(event.getTargetId())
|
||||
&& getTargetPointer().getTargets(game, source).contains(event.getTargetId())) {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public class DontUntapInControllersUntapStepAllEffect extends ContinuousRuleModi
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.UNTAP;
|
||||
return event.getType() == GameEvent.EventType.UNTAP;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class DontUntapInControllersUntapStepSourceEffect extends ContinuousRuleM
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.UNTAP;
|
||||
return event.getType() == GameEvent.EventType.UNTAP;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class DontUntapInPlayersNextUntapStepAllEffect extends ContinuousRuleModi
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.UNTAP_STEP || event.getType() == EventType.UNTAP;
|
||||
return event.getType() == GameEvent.EventType.UNTAP_STEP || event.getType() == GameEvent.EventType.UNTAP;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -80,7 +80,7 @@ public class DontUntapInPlayersNextUntapStepAllEffect extends ContinuousRuleModi
|
|||
return false;
|
||||
}
|
||||
// remember the turn of the untap step the effect has to be applied
|
||||
if (event.getType() == EventType.UNTAP_STEP) {
|
||||
if (event.getType() == GameEvent.EventType.UNTAP_STEP) {
|
||||
if (game.isActivePlayer(getTargetPointer().getFirst(game, source))) {
|
||||
if (validForTurnNum == game.getTurnNum()) { // the turn has a second untap step but the effect is already related to the first untap step
|
||||
discard();
|
||||
|
|
@ -90,7 +90,7 @@ public class DontUntapInPlayersNextUntapStepAllEffect extends ContinuousRuleModi
|
|||
}
|
||||
}
|
||||
|
||||
if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == EventType.UNTAP) {
|
||||
if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == GameEvent.EventType.UNTAP) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class DrawCardAllEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.drawCards(amount.calculate(game, source, this), source.getSourceId(), game);
|
||||
player.drawCards(amount.calculate(game, source, this), source, game);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -67,7 +67,7 @@ public class DrawCardAllEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getOpponents(controller.getId())) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.drawCards(amount.calculate(game, source, this), source.getSourceId(), game);
|
||||
player.drawCards(amount.calculate(game, source, this), source, game);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class DrawCardForEachColorAmongControlledPermanentsEffect extends OneShot
|
|||
colors.add(ObjectColor.WHITE);
|
||||
}
|
||||
}
|
||||
controller.drawCards(colors.size(), source.getSourceId(), game);
|
||||
controller.drawCards(colors.size(), source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class DrawCardSourceControllerEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null
|
||||
&& player.canRespond()) {
|
||||
player.drawCards(amount.calculate(game, source, this), source.getSourceId(), game);
|
||||
player.drawCards(amount.calculate(game, source, this), source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class DrawCardTargetEffect extends OneShotEffect {
|
|||
}
|
||||
if (!optional
|
||||
|| player.chooseUse(outcome, "Use draw effect?", source, game)) {
|
||||
player.drawCards(cardsToDraw, source.getSourceId(), game);
|
||||
player.drawCards(cardsToDraw, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ public class DrawDiscardControllerEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
if (!optional || player.chooseUse(outcome, "Use draw, then discard effect?", source, game)) {
|
||||
player.drawCards(cardsToDraw, source.getSourceId(), game);
|
||||
player.discard(cardsToDiscard, false, source, game);
|
||||
player.drawCards(cardsToDraw, source, game);
|
||||
player.discard(cardsToDiscard, false, false, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class DrawDiscardOneOfThemEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Cards initialHand = controller.getHand().copy();
|
||||
controller.drawCards(cardsToDraw, source.getSourceId(), game);
|
||||
controller.drawCards(cardsToDraw, source, game);
|
||||
Cards drawnCards = new CardsImpl(controller.getHand().copy());
|
||||
drawnCards.removeAll(initialHand);
|
||||
if (!drawnCards.isEmpty()) {
|
||||
|
|
@ -55,7 +55,7 @@ public class DrawDiscardOneOfThemEffect extends OneShotEffect {
|
|||
if (controller.choose(Outcome.Discard, drawnCards, cardToDiscard, game)) {
|
||||
Card card = controller.getHand().get(cardToDiscard.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
return controller.discard(card, source, game);
|
||||
return controller.discard(card, false, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ public class DrawDiscardTargetEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (player != null) {
|
||||
player.drawCards(cardsToDraw, source.getSourceId(), game);
|
||||
player.discard(cardsToDiscard, false, source, game);
|
||||
player.drawCards(cardsToDraw, source, game);
|
||||
player.discard(cardsToDiscard, false, false, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@ public class EnterBattlefieldPayCostOrPutGraveyardEffect extends ReplacementEffe
|
|||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (player != null && cost != null && sourceObject != null) {
|
||||
boolean replace = true;
|
||||
if (cost.canPay(source, source.getSourceId(), player.getId(), game)) {
|
||||
if (cost.canPay(source, source, player.getId(), game)) {
|
||||
if (player.chooseUse(outcome,
|
||||
cost.getText().substring(0, 1).toUpperCase(Locale.ENGLISH) + cost.getText().substring(1)
|
||||
+ "? (otherwise " + sourceObject.getLogName() + " is put into graveyard)", source, game)) {
|
||||
cost.clearPaid();
|
||||
replace = !cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null);
|
||||
replace = !cost.pay(source, game, source, source.getControllerId(), false, null);
|
||||
}
|
||||
}
|
||||
if (replace) {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class ExileAllEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
|
||||
for (Permanent permanent : permanents) {
|
||||
controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source.getSourceId(), game, Zone.BATTLEFIELD, true);
|
||||
controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source, game, Zone.BATTLEFIELD, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class ExileAndGainLifeEqualPowerTargetEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(permanent.getControllerId());
|
||||
if (player != null) {
|
||||
int creaturePower = permanent.getPower().getValue();
|
||||
permanent.moveToExile(null, null, source.getSourceId(), game);
|
||||
permanent.moveToExile(null, null, source, game);
|
||||
game.getState().processAction(game);
|
||||
player.gainLife(creaturePower, game, source);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class ExileCardFromOwnGraveyardControllerEffect extends OneShotEffect {
|
|||
for (UUID targetId : target.getTargets()) {
|
||||
Card card = player.getGraveyard().get(targetId, game);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.EXILED, source.getSourceId(), game, false);
|
||||
card.moveToZone(Zone.EXILED, source, game, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class ExileCardYouChooseTargetOpponentEffect extends OneShotEffect {
|
|||
if (controller.choose(Outcome.Exile, opponent.getHand(), target, game)) {
|
||||
Card card = opponent.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.HAND, true);
|
||||
controller.moveCardToExileWithInfo(card, null, "", source, game, Zone.HAND, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class ExileGraveyardAllTargetPlayerEffect extends OneShotEffect {
|
|||
if (targetPlayer != null) {
|
||||
List<UUID> graveyard = new ArrayList<>(targetPlayer.getGraveyard());
|
||||
for (UUID cardId : graveyard) {
|
||||
game.getCard(cardId).moveToZone(Zone.EXILED, cardId, game, false);
|
||||
game.getCard(cardId).moveToZone(Zone.EXILED, source, game, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class ExileReturnBattlefieldOwnerNextEndStepSourceEffect extends OneShotE
|
|||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
int zcc = game.getState().getZoneChangeCounter(permanent.getId());
|
||||
boolean exiled = controller.moveCardToExileWithInfo(permanent, source.getSourceId(), permanent.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true);
|
||||
boolean exiled = controller.moveCardToExileWithInfo(permanent, source.getSourceId(), permanent.getIdName(), source, game, Zone.BATTLEFIELD, true);
|
||||
if (exiled || (returnAlways && (zcc == game.getState().getZoneChangeCounter(permanent.getId()) - 1))) {
|
||||
//create delayed triggered ability and return it from every public zone it was next moved to
|
||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class ExileSourceUnlessPaysEffect extends OneShotEffect {
|
|||
message = Character.toUpperCase(message.charAt(0)) + message.substring(1);
|
||||
if (controller.chooseUse(Outcome.Benefit, message, source, game)) {
|
||||
cost.clearPaid();
|
||||
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) {
|
||||
if (cost.pay(source, game, source, source.getControllerId(), false, null)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class ExileTargetAndSearchGraveyardHandLibraryEffect extends SearchTarget
|
|||
Permanent permanentToExile = game.getPermanent(exileTarget.getFirstTarget());
|
||||
if (permanentToExile != null) {
|
||||
targetPlayerId = permanentToExile.getControllerId();
|
||||
result = permanentToExile.moveToExile(null, "", source.getSourceId(), game);
|
||||
result = permanentToExile.moveToExile(null, "", source, game);
|
||||
this.applySearchAndExile(game, source, permanentToExile.getName(), targetPlayerId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public class LivingDeathEffect extends OneShotEffect {
|
|||
|
||||
// Sacrifice all creatures
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game)) {
|
||||
permanent.sacrifice(source.getSourceId(), game);
|
||||
permanent.sacrifice(source, game);
|
||||
}
|
||||
|
||||
game.getState().processAction(game);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class LookLibraryMayPutToBottomEffect extends OneShotEffect {
|
|||
}
|
||||
controller.lookAtCards(sourceObject.getName(), new CardsImpl(card), game);
|
||||
boolean toBottom = controller.chooseUse(outcome, "Put card on the bottom of your library?", source, game);
|
||||
return controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, !toBottom, false);
|
||||
return controller.moveCardToLibraryWithInfo(card, source, game, Zone.LIBRARY, !toBottom, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect {
|
|||
if (putToGraveyard) {
|
||||
for (Card card : cards.getCards(game)) {
|
||||
if (player.chooseUse(outcome, "Do you wish to put card into the player's graveyard?", source, game)) {
|
||||
player.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
|
||||
player.moveCardToGraveyardWithInfo(card, source, game, Zone.LIBRARY);
|
||||
} else {
|
||||
game.informPlayers(player.getLogName() + " puts the card back on top of the library.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class LoseHalfLifeEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
int amount = (player.getLife() + 1) / 2;
|
||||
if (amount > 0) {
|
||||
player.loseLife(amount, game, false);
|
||||
player.loseLife(amount, game, source, false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class LoseHalfLifeTargetEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
Integer amount = (int) Math.ceil(player.getLife() / 2f);
|
||||
if (amount > 0) {
|
||||
player.loseLife(amount, game, false);
|
||||
player.loseLife(amount, game, source, false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class LoseLifeAllPlayersEffect extends OneShotEffect {
|
|||
for (UUID playerId: game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
player.loseLife(amount.calculate(game, source, this), game, false);
|
||||
player.loseLife(amount.calculate(game, source, this), game, source, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class LoseLifeControllerAttachedEffect extends OneShotEffect {
|
|||
if (creature != null) {
|
||||
Player player = game.getPlayer(creature.getControllerId());
|
||||
if (player != null) {
|
||||
player.loseLife(amount.calculate(game, source, this), game, false);
|
||||
player.loseLife(amount.calculate(game, source, this), game, source, false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class LoseLifeDefendingPlayerEffect extends OneShotEffect {
|
|||
defender = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
}
|
||||
if (defender != null) {
|
||||
defender.loseLife(amount.calculate(game, source, this), game, false);
|
||||
defender.loseLife(amount.calculate(game, source, this), game, source, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class LoseLifeOpponentsEffect extends OneShotEffect {
|
|||
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||
Player player = game.getPlayer(opponentId);
|
||||
if (player != null) {
|
||||
player.loseLife(amount.calculate(game, source, this), game, false);
|
||||
player.loseLife(amount.calculate(game, source, this), game, source, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class LoseLifePermanentControllerEffect extends OneShotEffect {
|
|||
player = game.getPlayer(permanent.getControllerId());
|
||||
}
|
||||
if (player != null) {
|
||||
player.loseLife(amount.calculate(game, source, this), game, false);
|
||||
player.loseLife(amount.calculate(game, source, this), game, source, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class LoseLifeSourceControllerEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
player.loseLife(amount.calculate(game, source, this), game, false);
|
||||
player.loseLife(amount.calculate(game, source, this), game, source, false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class LoseLifeTargetControllerEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
if ( controller != null ) {
|
||||
controller.loseLife(amount, game, false);
|
||||
controller.loseLife(amount, game, source, false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class LoseLifeTargetEffect extends OneShotEffect {
|
|||
for (UUID playerId : targetPointer.getTargets(game, source)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null
|
||||
&& player.loseLife(amount.calculate(game, source, this), game, false) > 0) {
|
||||
&& player.loseLife(amount.calculate(game, source, this), game, source, false) > 0) {
|
||||
applied = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class MayTapOrUntapTargetEffect extends OneShotEffect {
|
|||
target.untap(game);
|
||||
}
|
||||
} else if (player.chooseUse(Outcome.Tap, "Tap that permanent?", source, game)) {
|
||||
target.tap(game);
|
||||
target.tap(source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class MistmeadowWitchEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
if (permanent.moveToExile(source.getSourceId(), "Mistmeadow Witch Exile", source.getSourceId(), game)) {
|
||||
if (permanent.moveToExile(source.getSourceId(), "Mistmeadow Witch Exile", source, game)) {
|
||||
//create delayed triggered ability
|
||||
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
|
||||
game.addDelayedTriggeredAbility(delayedAbility, source);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class PermanentsEnterBattlefieldTappedEffect extends ReplacementEffectImp
|
|||
Permanent target = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
|
||||
if (target != null) {
|
||||
target.tap(game);
|
||||
target.tap(source, game);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class PopulateEffect extends OneShotEffect {
|
|||
}
|
||||
Target target = new TargetPermanent(filter);
|
||||
target.setNotTarget(true);
|
||||
if (!target.canChoose(source.getControllerId(), game)) {
|
||||
if (!target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
||||
return true;
|
||||
}
|
||||
player.choose(Outcome.Copy, target, source.getSourceId(), game);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import mage.game.Game;
|
|||
import mage.game.events.DamageEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.PreventDamageEvent;
|
||||
import mage.game.events.PreventedDamageEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
|
|
@ -79,18 +80,17 @@ public class PreventDamageToTargetMultiAmountEffect extends PreventionEffectImpl
|
|||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
int targetAmount = targetAmountMap.get(event.getTargetId());
|
||||
GameEvent preventEvent = new PreventDamageEvent(event.getTargetId(), source.getSourceId(), source.getControllerId(), event.getAmount(), ((DamageEvent) event).isCombatDamage());
|
||||
GameEvent preventEvent = new PreventDamageEvent(event.getTargetId(), source.getSourceId(), source, source.getControllerId(), event.getAmount(), ((DamageEvent) event).isCombatDamage());
|
||||
if (!game.replaceEvent(preventEvent)) {
|
||||
if (event.getAmount() >= targetAmount) {
|
||||
int damage = targetAmount;
|
||||
event.setAmount(event.getAmount() - targetAmount);
|
||||
targetAmountMap.remove(event.getTargetId());
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, event.getTargetId(), source.getSourceId(), source.getControllerId(), damage));
|
||||
game.fireEvent(new PreventedDamageEvent(event.getTargetId(), source.getSourceId(), source, source.getControllerId(), targetAmount));
|
||||
} else {
|
||||
int damage = event.getAmount();
|
||||
event.setAmount(0);
|
||||
targetAmountMap.put(event.getTargetId(), targetAmount -= damage);
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, event.getTargetId(), source.getSourceId(), source.getControllerId(), damage));
|
||||
targetAmountMap.put(event.getTargetId(), targetAmount - damage);
|
||||
game.fireEvent(new PreventedDamageEvent(event.getTargetId(), source.getSourceId(), source, source.getControllerId(), damage));
|
||||
}
|
||||
if (targetAmountMap.isEmpty()) {
|
||||
this.used = true;
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@ public class PutOnLibrarySourceEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
if (sourceObject instanceof Permanent) {
|
||||
((Permanent) sourceObject).moveToZone(Zone.LIBRARY, source.getSourceId(), game, onTop);
|
||||
((Permanent) sourceObject).moveToZone(Zone.LIBRARY, source, game, onTop);
|
||||
return true;
|
||||
} else if (sourceObject instanceof Card && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
|
||||
for (Player player : game.getPlayers().values()) {
|
||||
if (player.getGraveyard().contains(sourceObject.getId())) {
|
||||
((Card) sourceObject).moveToZone(Zone.LIBRARY, source.getSourceId(), game, onTop);
|
||||
((Card) sourceObject).moveToZone(Zone.LIBRARY, source, game, onTop);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class RemoveAllCountersSourceEffect extends OneShotEffect {
|
|||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
int count = sourcePermanent.getCounters(game).getCount(counterType);
|
||||
sourcePermanent.removeCounters(counterType.getName(), count, game);
|
||||
sourcePermanent.removeCounters(counterType.getName(), count, source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class ReturnToHandAttachedEffect extends OneShotEffect {
|
|||
Card card = game.getCard(((Permanent) object).getId());
|
||||
if (card != null
|
||||
&& getValue("zcc").equals(game.getState().getZoneChangeCounter(card.getId()))) { // Necrogenesis, etc.
|
||||
if (card.moveToZone(Zone.HAND, source.getSourceId(), game, false)) {
|
||||
if (card.moveToZone(Zone.HAND, source, game, false)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class ReturnToLibraryPermanentEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
Card card = game.getPermanent(source.getSourceId());
|
||||
if (card != null) {
|
||||
controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.STACK, toTop, true);
|
||||
controller.moveCardToLibraryWithInfo(card, source, game, Zone.STACK, toTop, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class ReturnToLibrarySpellEffect extends OneShotEffect {
|
|||
if (spell != null) {
|
||||
Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard();
|
||||
if (spellCard != null) {
|
||||
controller.moveCardToLibraryWithInfo(spellCard, source.getSourceId(), game, Zone.STACK, toTop, true);
|
||||
controller.moveCardToLibraryWithInfo(spellCard, source, game, Zone.STACK, toTop, true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@ public class RevealAndShuffleIntoLibrarySourceEffect extends OneShotEffect {
|
|||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
}
|
||||
if (permanent != null) {
|
||||
controller.moveCardToLibraryWithInfo(permanent, source.getSourceId(), game, fromZone, true, true);
|
||||
controller.moveCardToLibraryWithInfo(permanent, source, game, fromZone, true, true);
|
||||
} else {
|
||||
controller.moveCardToLibraryWithInfo((Card)sourceObject, source.getSourceId(), game, fromZone, true, true);
|
||||
controller.moveCardToLibraryWithInfo((Card) sourceObject, source, game, fromZone, true, true);
|
||||
}
|
||||
if (!cards.isEmpty()) {
|
||||
controller.shuffleLibrary(source, game);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class RollPlanarDieEffect extends OneShotEffect {
|
|||
}
|
||||
boolean done = false;
|
||||
while (controller.canRespond() && effect != null && !done) {
|
||||
if (target != null && !target.isChosen() && target.canChoose(controller.getId(), game)) {
|
||||
if (target != null && !target.isChosen() && target.canChoose(source.getSourceId(), controller.getId(), game)) {
|
||||
controller.chooseTarget(Outcome.Benefit, target, source, game);
|
||||
source.addTarget(target);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class SacrificeAllEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
int numTargets = Math.min(amount.calculate(game, source, this), game.getBattlefield().countAll(filter, player.getId(), game));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(numTargets, numTargets, filter, true);
|
||||
if (target.canChoose(player.getId(), game)) {
|
||||
if (target.canChoose(source.getSourceId(), player.getId(), game)) {
|
||||
while (!target.isChosen() && player.canRespond()) {
|
||||
player.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ public class SacrificeAllEffect extends OneShotEffect {
|
|||
for (UUID permID : perms) {
|
||||
Permanent permanent = game.getPermanent(permID);
|
||||
if (permanent != null) {
|
||||
permanent.sacrifice(source.getSourceId(), game);
|
||||
permanent.sacrifice(source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -58,14 +58,14 @@ public class SacrificeEffect extends OneShotEffect {
|
|||
Target target = new TargetPermanent(amount, amount, newFilter, true);
|
||||
if (amount > 0 && target.canChoose(source.getSourceId(), player.getId(), game)) {
|
||||
while (!target.isChosen()
|
||||
&& target.canChoose(player.getId(), game)
|
||||
&& target.canChoose(source.getSourceId(), player.getId(), game)
|
||||
&& player.canRespond()) {
|
||||
player.chooseTarget(Outcome.Sacrifice, target, source, game);
|
||||
}
|
||||
for (int idx = 0; idx < target.getTargets().size(); idx++) {
|
||||
Permanent permanent = game.getPermanent(target.getTargets().get(idx));
|
||||
if (permanent != null
|
||||
&& permanent.sacrifice(source.getSourceId(), game)) {
|
||||
&& permanent.sacrifice(source, game)) {
|
||||
applied = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue