mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fixed Issue#52
This commit is contained in:
parent
41304c4a58
commit
0758f4bb72
3 changed files with 9 additions and 4 deletions
|
@ -85,7 +85,7 @@ public class GameView implements Serializable {
|
|||
Card card = game.getCard(stackObject.getSourceId());
|
||||
if (card != null) {
|
||||
if (object != null) {
|
||||
stack.put(stackObject.getId(), new StackAbilityView((StackAbility)stackObject, object.getName(), new CardView(card)));
|
||||
stack.put(stackObject.getId(), new StackAbilityView((StackAbility)stackObject, card.getName(), new CardView(card)));
|
||||
} else {
|
||||
stack.put(stackObject.getId(), new StackAbilityView((StackAbility)stackObject, "", new CardView(card)));
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.sets.magic2013;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
@ -38,6 +37,8 @@ import mage.abilities.effects.common.GainLifeEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.BeastToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
|
@ -55,6 +56,7 @@ public class Thragtusk extends CardImpl<Thragtusk> {
|
|||
|
||||
// When Thragtusk enters the battlefield, you gain 5 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(5)));
|
||||
|
||||
// When Thragtusk leaves the battlefield, put a 3/3 green Beast creature token onto the battlefield.
|
||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new CreateTokenEffect(new BeastToken()), false));
|
||||
}
|
||||
|
|
|
@ -369,8 +369,11 @@ public abstract class AbilityImpl<T extends AbilityImpl<T>> implements Ability {
|
|||
}
|
||||
|
||||
protected String formatRule(String rule, String source) {
|
||||
String replace = rule.replace("{this}", source);
|
||||
replace = replace.replace("{source}", source);
|
||||
String replace = rule;
|
||||
if (source != null && !source.isEmpty()) {
|
||||
replace = rule.replace("{this}", source);
|
||||
replace = replace.replace("{source}", source);
|
||||
}
|
||||
return replace;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue