mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* BecomesCreatureTargetEffect - Fixed a bug that type changing effects (e.g. 1st ability of Nissan Worldwaker) did wrongly always overwrite all subtypes.
This commit is contained in:
parent
2e13255fd0
commit
0942e9140c
1 changed files with 11 additions and 4 deletions
|
@ -82,12 +82,19 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
|
||||||
switch (layer) {
|
switch (layer) {
|
||||||
case TypeChangingEffects_4:
|
case TypeChangingEffects_4:
|
||||||
if (sublayer == SubLayer.NA) {
|
if (sublayer == SubLayer.NA) {
|
||||||
permanent.getSubtype().clear();
|
|
||||||
if (token.getSubtype().size() > 0) {
|
|
||||||
permanent.getSubtype().addAll(token.getSubtype());
|
|
||||||
}
|
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
|
permanent.getSubtype().clear();
|
||||||
|
permanent.getSubtype().addAll(token.getSubtype());
|
||||||
permanent.getCardType().clear();
|
permanent.getCardType().clear();
|
||||||
|
} else {
|
||||||
|
if (token.getSubtype().size() > 0) {
|
||||||
|
for (String subtype :token.getSubtype()) {
|
||||||
|
if (!permanent.getSubtype().contains(subtype)) {
|
||||||
|
permanent.getSubtype().add(subtype);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (token.getCardType().size() > 0) {
|
if (token.getCardType().size() > 0) {
|
||||||
for (CardType t : token.getCardType()) {
|
for (CardType t : token.getCardType()) {
|
||||||
|
|
Loading…
Reference in a new issue