mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
fix Stuffy Doll not dealing damage to opponent when it receives damage from blocking a creature.
This commit is contained in:
@@ -2841,6 +2841,22 @@ public class Card extends MyObservable {
|
||||
damage += damageToAdd;
|
||||
}
|
||||
|
||||
if(this.getName().equals("Stuffy Doll")) {
|
||||
final Player opponent = this.getOwner().getOpponent();
|
||||
final int stuffyDamage = damageToAdd;
|
||||
SpellAbility ability = new Ability(this, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
opponent.addDamage(stuffyDamage, Card.this);
|
||||
}
|
||||
};
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Stuffy Doll - causes ").append(stuffyDamage).append(" damage to ").append(opponent);
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
|
||||
if(source.getKeyword().contains("Lifelink") && CardFactoryUtil.canDamage(source, this)) GameActionUtil.executeLifeLinkEffects(source, damageToAdd);
|
||||
|
||||
if(isEnchantedBy("Mortal Wound")) {
|
||||
|
||||
@@ -327,6 +327,7 @@ public class CardFactory_Creatures {
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Stuffy Doll")) {
|
||||
/*
|
||||
final Card newCard = new Card() {
|
||||
Card c = this;
|
||||
|
||||
@@ -364,30 +365,36 @@ public class CardFactory_Creatures {
|
||||
newCard.setBaseDefense(1);
|
||||
|
||||
newCard.addIntrinsicKeyword("Indestructible");
|
||||
*/
|
||||
|
||||
Ability_Cost abilCost = new Ability_Cost("T", cardName, true);
|
||||
|
||||
final Ability_Activated ability = new Ability_Activated(newCard, abilCost, null){
|
||||
final Ability_Activated ability = new Ability_Activated(card, abilCost, null){
|
||||
private static final long serialVersionUID = 577739727089395613L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
newCard.addDamage(1, newCard);
|
||||
card.addDamage(1, card);
|
||||
}
|
||||
};//SpellAbility
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(abilCost.toString()).append("Stuffy Doll deals 1 damage to itself.");
|
||||
ability.setDescription(sb.toString());
|
||||
ability.setStackDescription("Stuffy Doll - deals 1 damage to itself.");
|
||||
|
||||
card.addSpellAbility(ability);
|
||||
/*
|
||||
ability.setStackDescription("Stuffy Doll - deals 1 damage to itself.");
|
||||
|
||||
newCard.addSpellAbility(new Spell_Permanent(newCard));
|
||||
newCard.addSpellAbility(ability);
|
||||
|
||||
newCard.addSpellAbility(ability);
|
||||
|
||||
newCard.setSVars(card.getSVars());
|
||||
|
||||
return newCard;
|
||||
return newCard;*/
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user