* Voracious Dragon - fixed that it doesn't deal damage after devour;

This commit is contained in:
Oleg Agafonov 2019-06-30 11:43:34 +04:00
parent 4c71b55457
commit 6ab76ce91d

View file

@ -1,4 +1,3 @@
package mage.cards.v;
import mage.MageInt;
@ -23,13 +22,12 @@ import java.util.List;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class VoraciousDragon extends CardImpl {
public VoraciousDragon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(4);
@ -65,16 +63,16 @@ class TwiceDevouredGoblins implements DynamicValue {
if (sourcePermanent != null) {
for (Ability ability : sourcePermanent.getAbilities()) {
if (ability instanceof DevourAbility) {
for (Effect abilityEffect: ability.getEffects()) {
for (Effect abilityEffect : ability.getEffects()) {
if (abilityEffect instanceof DevourEffect) {
DevourEffect devourEffect = (DevourEffect) abilityEffect;
int amountGoblins = 0;
for (List<String> subtypesItem :devourEffect.getSubtypes(game, sourcePermanent.getId())) {
if (subtypesItem.contains(SubType.GOBLIN.toString())) {
for (List<String> subtypesItem : devourEffect.getSubtypes(game, sourcePermanent.getId())) {
if (subtypesItem.contains(SubType.GOBLIN)) {
++amountGoblins;
}
}
return amountGoblins *2;
return amountGoblins * 2;
}
}
}