mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Fixed a bug of Primal Clay , not selection only the correct sublayer for setting P/T.
This commit is contained in:
parent
d35aeaecd6
commit
a841f33dba
1 changed files with 14 additions and 10 deletions
|
|
@ -32,6 +32,7 @@ import java.util.UUID;
|
||||||
import mage.Constants;
|
import mage.Constants;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.SubLayer;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
|
@ -87,8 +88,9 @@ class PrimalClayEffect extends ContinuousEffectImpl<PrimalClayEffect> {
|
||||||
public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) {
|
public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) {
|
||||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||||
PrimalClayChoice choice = (PrimalClayChoice) source.getChoices().get(0);
|
PrimalClayChoice choice = (PrimalClayChoice) source.getChoices().get(0);
|
||||||
if (permanent == null)
|
if (permanent == null) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (layer) {
|
switch (layer) {
|
||||||
case TypeChangingEffects_4:
|
case TypeChangingEffects_4:
|
||||||
|
|
@ -96,6 +98,7 @@ class PrimalClayEffect extends ContinuousEffectImpl<PrimalClayEffect> {
|
||||||
permanent.getCardType().add(CardType.CREATURE);
|
permanent.getCardType().add(CardType.CREATURE);
|
||||||
break;
|
break;
|
||||||
case PTChangingEffects_7:
|
case PTChangingEffects_7:
|
||||||
|
if (sublayer.equals(SubLayer.SetPT_7b)) {
|
||||||
if (choice.getChoice().equals("a 3/3 artifact creature")) {
|
if (choice.getChoice().equals("a 3/3 artifact creature")) {
|
||||||
permanent.getPower().setValue(3);
|
permanent.getPower().setValue(3);
|
||||||
permanent.getToughness().setValue(3);
|
permanent.getToughness().setValue(3);
|
||||||
|
|
@ -106,6 +109,7 @@ class PrimalClayEffect extends ContinuousEffectImpl<PrimalClayEffect> {
|
||||||
permanent.getPower().setValue(1);
|
permanent.getPower().setValue(1);
|
||||||
permanent.getToughness().setValue(6);
|
permanent.getToughness().setValue(6);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case AbilityAddingRemovingEffects_6:
|
case AbilityAddingRemovingEffects_6:
|
||||||
if (choice.getChoice().equals("a 2/2 artifact creature with flying")) {
|
if (choice.getChoice().equals("a 2/2 artifact creature with flying")) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue