[ONE] Implement Kaito, Dancing Shadow (#10009)

This commit is contained in:
Sean Walsh 2023-02-20 20:01:05 -06:00 committed by GitHub
parent 834ef4c2c6
commit 9ab63b73ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 354 additions and 4 deletions

View file

@ -216,6 +216,8 @@ public interface Permanent extends Card, Controllable {
void incrementLoyaltyActivationsAvailable(int max);
void setLoyaltyActivationsAvailable(int loyaltyActivationsAvailable);
void addLoyaltyUsed();
boolean canLoyaltyBeUsed(Game game);

View file

@ -480,6 +480,13 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
}
}
@Override
public void setLoyaltyActivationsAvailable(int setActivations) {
if(this.loyaltyActivationsAvailable < setActivations) {
this.loyaltyActivationsAvailable = setActivations;
}
}
@Override
public void addLoyaltyUsed() {
this.timesLoyaltyUsed++;

View file

@ -0,0 +1,40 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.constants.CardType;
import mage.constants.SubType;
/**
* @author @stwalsh4118
*/
public class DroneToken extends TokenImpl {
public DroneToken() {
super("Drone Token", "2/2 colorless Drone artifact creature token with deathtouch and \"When this creature leaves the battlefield, each opponent loses 2 life and you gain 2 life.\"");
cardType.add(CardType.CREATURE);
cardType.add(CardType.ARTIFACT);
subtype.add(SubType.DRONE);
power = new MageInt(2);
toughness = new MageInt(2);
addAbility(DeathtouchAbility.getInstance());
Ability ability = new LeavesBattlefieldTriggeredAbility(new LoseLifeOpponentsEffect(2), false).setTriggerPhrase("When this creature leaves the battlefield, ");
ability.addEffect(new GainLifeEffect(2).concatBy("and"));
addAbility(ability);
}
private DroneToken(final DroneToken token) {
super(token);
}
@Override
public DroneToken copy() {
return new DroneToken(this);
}
}