mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
[KHM] Implemented Egon, God of Death (#7377)
This commit is contained in:
parent
70bf8fe31b
commit
2bd682dcbf
3 changed files with 94 additions and 6 deletions
|
|
@ -63,6 +63,11 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
return this;
|
||||
}
|
||||
|
||||
public DoIfCostPaid addOtherwiseEffect (Effect effect) {
|
||||
otherwiseEffects.add(effect);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Effects getExecutingEffects() {
|
||||
return this.executingEffects;
|
||||
}
|
||||
|
|
@ -96,12 +101,14 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
int bookmark = game.bookmarkState();
|
||||
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);
|
||||
if (effect instanceof OneShotEffect) {
|
||||
result &= effect.apply(game, source);
|
||||
} else {
|
||||
game.addEffect((ContinuousEffect) effect, source);
|
||||
if (!executingEffects.isEmpty()) {
|
||||
for (Effect effect : executingEffects) {
|
||||
effect.setTargetPointer(this.targetPointer);
|
||||
if (effect instanceof OneShotEffect) {
|
||||
result &= effect.apply(game, source);
|
||||
} else {
|
||||
game.addEffect((ContinuousEffect) effect, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.resetStoredBookmark(game); // otherwise you can e.g. undo card drawn with Mentor of the Meek
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue