mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +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;
|
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(source.getKeyword().contains("Lifelink") && CardFactoryUtil.canDamage(source, this)) GameActionUtil.executeLifeLinkEffects(source, damageToAdd);
|
||||||
|
|
||||||
if(isEnchantedBy("Mortal Wound")) {
|
if(isEnchantedBy("Mortal Wound")) {
|
||||||
|
|||||||
@@ -324,9 +324,10 @@ public class CardFactory_Creatures {
|
|||||||
return newCard;
|
return newCard;
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Stuffy Doll")) {
|
else if(cardName.equals("Stuffy Doll")) {
|
||||||
|
/*
|
||||||
final Card newCard = new Card() {
|
final Card newCard = new Card() {
|
||||||
Card c = this;
|
Card c = this;
|
||||||
|
|
||||||
@@ -364,30 +365,36 @@ public class CardFactory_Creatures {
|
|||||||
newCard.setBaseDefense(1);
|
newCard.setBaseDefense(1);
|
||||||
|
|
||||||
newCard.addIntrinsicKeyword("Indestructible");
|
newCard.addIntrinsicKeyword("Indestructible");
|
||||||
|
*/
|
||||||
|
|
||||||
Ability_Cost abilCost = new Ability_Cost("T", cardName, true);
|
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;
|
private static final long serialVersionUID = 577739727089395613L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
newCard.addDamage(1, newCard);
|
card.addDamage(1, card);
|
||||||
}
|
}
|
||||||
};//SpellAbility
|
};//SpellAbility
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(abilCost.toString()).append("Stuffy Doll deals 1 damage to itself.");
|
sb.append(abilCost.toString()).append("Stuffy Doll deals 1 damage to itself.");
|
||||||
ability.setDescription(sb.toString());
|
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.");
|
ability.setStackDescription("Stuffy Doll - deals 1 damage to itself.");
|
||||||
|
|
||||||
newCard.addSpellAbility(new Spell_Permanent(newCard));
|
newCard.addSpellAbility(new Spell_Permanent(newCard));
|
||||||
newCard.addSpellAbility(ability);
|
newCard.addSpellAbility(ability);
|
||||||
|
|
||||||
|
newCard.addSpellAbility(ability);
|
||||||
|
|
||||||
newCard.setSVars(card.getSVars());
|
newCard.setSVars(card.getSVars());
|
||||||
|
|
||||||
return newCard;
|
return newCard;*/
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user