Search in sources :

Example 16 with Sticker

use of cardgame1.Sticker in project cardgame1 by joey101937.

the class FireSpearCard method cast.

/**
 * deals damage to target minion.
 *
 * @param target
 * @return 1 if success, 0 if too expensive, -1 if null param
 */
@Override
public int cast(Minion target) {
    if (target == null || target.attack < 5) {
        return -1;
    }
    if (!canAfford()) {
        // reutrn 0 if unaffordable
        return 0;
    }
    Sticker impactEffect = new Sticker(SpriteHandler.blastEffectSmall, target, AI.AI.speed / 2);
    Main.wait(AI.AI.speed / 2);
    target.destroy();
    owner.resource -= cost;
    owner.hand.remove(this);
    TrapListener.onPlay(this);
    return 1;
}
Also used : Sticker(cardgame1.Sticker)

Example 17 with Sticker

use of cardgame1.Sticker in project cardgame1 by joey101937.

the class ZombieBiteSpell method cast.

@Override
public int cast(Minion target) {
    if (target == null)
        return -1;
    // reutrn 0 if unaffordable
    if (!canAfford())
        return 0;
    Sticker impactEffect = new Sticker(SpriteHandler.bloodMedium, target, AI.speed / 3);
    Main.wait(AI.speed / 3);
    target.name = "Zombie";
    target.tribe = Tribe.Undead;
    target.attack = attack;
    target.health = health;
    target.maxHealth = health;
    target.refresh();
    target.sprite = SpriteHandler.swampZombieMinion;
    owner.resource -= cost;
    owner.hand.remove(this);
    TrapListener.onPlay(this);
    return 1;
}
Also used : Sticker(cardgame1.Sticker)

Example 18 with Sticker

use of cardgame1.Sticker in project cardgame1 by joey101937.

the class PredationCard method castOnHero.

@Override
public int castOnHero(Hero target) {
    if (target == null || spellDamage < 1)
        return -1;
    // reutrn 0 if unaffordable
    if (!canAfford())
        return 0;
    target.takeDamage(spellDamage);
    Sticker impactEffect = new Sticker(SpriteHandler.bloodMedium, target, 300);
    owner.resource -= cost;
    owner.hand.remove(this);
    TrapListener.onPlay(this);
    return 1;
}
Also used : Sticker(cardgame1.Sticker)

Example 19 with Sticker

use of cardgame1.Sticker in project cardgame1 by joey101937.

the class SeaSerpentTrap method onSummon.

@Override
public void onSummon(Minion m) {
    if (m.owner == this.owner && m.tribe == Tribe.Fish && m.parent.cost > 1) {
        numSummoned += 1;
    }
    if (numSummoned >= 3 && !activated && owner.hand.size() < Hero.maxHandSize && owner.turn) {
        activated = true;
        Sticker reveal = new Sticker(parent, 1700, 200, AI.AI.speed * 6);
        Sticker blood = new Sticker(SpriteHandler.bloodMedium, m, AI.AI.speed * 6);
        Main.wait(AI.AI.speed * 6);
        // owner.minions.add(new SeaSerpentMinion(this.parent));
        owner.draw(new SeaSerpentCard());
        owner.traps.remove(this);
    }
}
Also used : Sticker(cardgame1.Sticker) SeaSerpentCard(Cards.Fish.SeaSerpentCard)

Example 20 with Sticker

use of cardgame1.Sticker in project cardgame1 by joey101937.

the class SkelemancerMinion method onTurnEnd.

@Override
public void onTurnEnd() {
    this.isFrozen = false;
    if (isSilenced)
        return;
    Sticker s = new Sticker(SpriteHandler.skullEffect, this, AI.AI.speed / 2);
    Main.wait(AI.AI.speed / 2);
    owner.minions.add(new SkeletonMinion(this.parent));
}
Also used : Sticker(cardgame1.Sticker)

Aggregations

Sticker (cardgame1.Sticker)20 Minion (Minions.Minion)7 ArrayList (java.util.ArrayList)2 Card (Cards.Card)1 BaitfishCard (Cards.Fish.BaitfishCard)1 SeaSerpentCard (Cards.Fish.SeaSerpentCard)1 ZombieMinion (Minions.Undead.ZombieMinion)1