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;
}
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;
}
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;
}
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);
}
}
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));
}
Aggregations