forked from External/mage
[NEO] Implementing Compleated mechanic and hybrid phyrexian mana (ready for review) (#8677)
* [NEO] Implemented Tamiyo, Compleated Sage * replaced PhyrexianManaCost calls with ManaCostsImpl calls * updated phyrexian mana implementation * added phyrexian hybrid symbol support * updated starting loyalty implementation for planeswalkers * change compleated to singleton * implemented Compleated ability * added some missing loyalty setters * changed when loyalty is added to a walker to fix bugs * slight change to some tests to fix them from failing * fixed token issue
This commit is contained in:
parent
3709b5c098
commit
54203c16d3
293 changed files with 865 additions and 870 deletions
|
|
@ -1123,19 +1123,35 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
MorphAbility.setPermanentToFaceDownCreature(this, game);
|
||||
}
|
||||
|
||||
EntersTheBattlefieldEvent event = new EntersTheBattlefieldEvent(this, source, getControllerId(), fromZone, EnterEventType.SELF);
|
||||
if (game.replaceEvent(new EntersTheBattlefieldEvent(this, source, getControllerId(), fromZone, EnterEventType.SELF))) {
|
||||
return false;
|
||||
}
|
||||
EntersTheBattlefieldEvent event = new EntersTheBattlefieldEvent(this, source, getControllerId(), fromZone);
|
||||
if (game.replaceEvent(event)) {
|
||||
return false;
|
||||
}
|
||||
event = new EntersTheBattlefieldEvent(this, source, getControllerId(), fromZone);
|
||||
if (!game.replaceEvent(event)) {
|
||||
if (fireEvent) {
|
||||
game.addSimultaneousEvent(event);
|
||||
return true;
|
||||
if (this.isPlaneswalker(game)) {
|
||||
int loyalty;
|
||||
if (this.getStartingLoyalty() == -2) {
|
||||
loyalty = source.getManaCostsToPay().getX();
|
||||
} else {
|
||||
loyalty = this.getStartingLoyalty();
|
||||
}
|
||||
int countersToAdd;
|
||||
if (this.hasAbility(CompleatedAbility.getInstance(), game)) {
|
||||
countersToAdd = loyalty - 2 * source.getManaCostsToPay().getPhyrexianPaid();
|
||||
} else {
|
||||
countersToAdd = loyalty;
|
||||
}
|
||||
if (countersToAdd > 0) {
|
||||
this.addCounters(CounterType.LOYALTY.createInstance(countersToAdd), source, game);
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
if (!fireEvent) {
|
||||
return false;
|
||||
}
|
||||
game.addSimultaneousEvent(event);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue