(WIP) [SNC] Implemented Ob Nixilis, the Adversary (#8838)

* [SNC] Implemented Ob Nixilis, the Adversary

* Allow starting loyalty to be changed on the stack

Co-authored-by: Evan Kranzler <theelk801@gmail.com>
This commit is contained in:
Daniel Bomar 2022-04-18 21:04:51 -05:00 committed by GitHub
parent bf70d0b675
commit d745141b7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 233 additions and 1 deletions

View file

@ -62,6 +62,7 @@ public class Spell extends StackObjectImpl implements Card {
private boolean countered;
private boolean resolving = false;
private UUID commandedBy = null; // for Word of Command
private int startingLoyalty;
private ActivationManaAbilityStep currentActivatingManaAbilitiesStep = ActivationManaAbilityStep.BEFORE;
@ -78,6 +79,7 @@ public class Spell extends StackObjectImpl implements Card {
this.color = affectedCard.getColor(null).copy();
this.frameColor = affectedCard.getFrameColor(null).copy();
this.frameStyle = affectedCard.getFrameStyle();
this.startingLoyalty = affectedCard.getStartingLoyalty();
this.id = ability.getId();
this.zoneChangeCounter = affectedCard.getZoneChangeCounter(game); // sync card's ZCC with spell (copy spell settings)
this.ability = ability;
@ -131,6 +133,7 @@ public class Spell extends StackObjectImpl implements Card {
this.currentActivatingManaAbilitiesStep = spell.currentActivatingManaAbilitiesStep;
this.targetChanged = spell.targetChanged;
this.startingLoyalty = spell.startingLoyalty;
}
public boolean activate(Game game, boolean noMana) {
@ -654,11 +657,12 @@ public class Spell extends StackObjectImpl implements Card {
@Override
public int getStartingLoyalty() {
return card.getStartingLoyalty();
return this.startingLoyalty;
}
@Override
public void setStartingLoyalty(int startingLoyalty) {
this.startingLoyalty = startingLoyalty;
}
@Override

View file

@ -109,6 +109,8 @@ public class CopyTokenFunction implements Function<Token, Card> {
if (spell != null) {
// copied spell puts to battlefield as token, so that token's ZCC must be synced with spell instead card (card can be moved before resolve)
target.setZoneChangeCounter(spell.getZoneChangeCounter(game), game);
// Copy starting loyalty from spell (Ob Nixilis, the Adversary)
target.setStartingLoyalty(spell.getStartingLoyalty());
} else {
target.setZoneChangeCounter(source.getZoneChangeCounter(game), game);
}