mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Merge remote-tracking branch 'core/master'
This commit is contained in:
@@ -216,7 +216,13 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
|
|||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
if (hasParam("Description") && !this.isSuppressed()) {
|
if (hasParam("Description") && !this.isSuppressed()) {
|
||||||
String desc = AbilityUtils.applyDescriptionTextChangeEffects(getParam("Description"), this);
|
String desc = AbilityUtils.applyDescriptionTextChangeEffects(getParam("Description"), this);
|
||||||
String currentName = getHostCard().getName();
|
String currentName;
|
||||||
|
if (this.isIntrinsic() && !this.getHostCard().isMutated() && cardState != null) {
|
||||||
|
currentName = cardState.getName();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
currentName = getHostCard().getName();
|
||||||
|
}
|
||||||
desc = CardTranslation.translateSingleDescriptionText(desc, currentName);
|
desc = CardTranslation.translateSingleDescriptionText(desc, currentName);
|
||||||
desc = TextUtil.fastReplace(desc, "CARDNAME", CardTranslation.getTranslatedName(currentName));
|
desc = TextUtil.fastReplace(desc, "CARDNAME", CardTranslation.getTranslatedName(currentName));
|
||||||
desc = TextUtil.fastReplace(desc, "NICKNAME", Lang.getInstance().getNickName(CardTranslation.getTranslatedName(currentName)));
|
desc = TextUtil.fastReplace(desc, "NICKNAME", Lang.getInstance().getNickName(CardTranslation.getTranslatedName(currentName)));
|
||||||
|
|||||||
@@ -842,7 +842,14 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
|||||||
}
|
}
|
||||||
String desc = node.getDescription();
|
String desc = node.getDescription();
|
||||||
if (node.getHostCard() != null) {
|
if (node.getHostCard() != null) {
|
||||||
String currentName = node.getHostCard().getName();
|
String currentName;
|
||||||
|
// if alternate state is viewed while card uses original
|
||||||
|
if (node.isIntrinsic() && !node.getHostCard().isMutated() && node.cardState != null) {
|
||||||
|
currentName = node.cardState.getName();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
currentName = node.getHostCard().getName();
|
||||||
|
}
|
||||||
desc = CardTranslation.translateMultipleDescriptionText(desc, currentName);
|
desc = CardTranslation.translateMultipleDescriptionText(desc, currentName);
|
||||||
desc = TextUtil.fastReplace(desc, "CARDNAME", CardTranslation.getTranslatedName(currentName));
|
desc = TextUtil.fastReplace(desc, "CARDNAME", CardTranslation.getTranslatedName(currentName));
|
||||||
desc = TextUtil.fastReplace(desc, "NICKNAME", Lang.getInstance().getNickName(CardTranslation.getTranslatedName(currentName)));
|
desc = TextUtil.fastReplace(desc, "NICKNAME", Lang.getInstance().getNickName(CardTranslation.getTranslatedName(currentName)));
|
||||||
|
|||||||
@@ -208,7 +208,13 @@ public class StaticAbility extends CardTraitBase implements IIdentifiable, Clone
|
|||||||
@Override
|
@Override
|
||||||
public final String toString() {
|
public final String toString() {
|
||||||
if (hasParam("Description") && !this.isSuppressed()) {
|
if (hasParam("Description") && !this.isSuppressed()) {
|
||||||
String currentName = this.hostCard.getName();
|
String currentName;
|
||||||
|
if (this.isIntrinsic() && !this.getHostCard().isMutated() && cardState != null) {
|
||||||
|
currentName = cardState.getName();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
currentName = getHostCard().getName();
|
||||||
|
}
|
||||||
String desc = CardTranslation.translateSingleDescriptionText(getParam("Description"), currentName);
|
String desc = CardTranslation.translateSingleDescriptionText(getParam("Description"), currentName);
|
||||||
desc = TextUtil.fastReplace(desc, "CARDNAME", CardTranslation.getTranslatedName(currentName));
|
desc = TextUtil.fastReplace(desc, "CARDNAME", CardTranslation.getTranslatedName(currentName));
|
||||||
desc = TextUtil.fastReplace(desc, "NICKNAME", Lang.getInstance().getNickName(CardTranslation.getTranslatedName(currentName)));
|
desc = TextUtil.fastReplace(desc, "NICKNAME", Lang.getInstance().getNickName(CardTranslation.getTranslatedName(currentName)));
|
||||||
|
|||||||
@@ -131,7 +131,13 @@ public abstract class Trigger extends TriggerReplacementBase {
|
|||||||
if (hasParam("TriggerDescription") && !this.isSuppressed()) {
|
if (hasParam("TriggerDescription") && !this.isSuppressed()) {
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
String currentName = getHostCard().getName();
|
String currentName;
|
||||||
|
if (this.isIntrinsic() && !this.getHostCard().isMutated() && cardState != null) {
|
||||||
|
currentName = cardState.getName();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
currentName = getHostCard().getName();
|
||||||
|
}
|
||||||
String desc = getParam("TriggerDescription");
|
String desc = getParam("TriggerDescription");
|
||||||
if (!desc.contains("ABILITY")) {
|
if (!desc.contains("ABILITY")) {
|
||||||
desc = CardTranslation.translateSingleDescriptionText(getParam("TriggerDescription"), currentName);
|
desc = CardTranslation.translateSingleDescriptionText(getParam("TriggerDescription"), currentName);
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ Name:Inzerva, Master of Insights
|
|||||||
ManaCost:1 2/U 2/R
|
ManaCost:1 2/U 2/R
|
||||||
Types:Legendary Planeswalker Inzerva
|
Types:Legendary Planeswalker Inzerva
|
||||||
Loyalty:4
|
Loyalty:4
|
||||||
A:AB$ Draw | Cost$ AddCounter<2/LOYALTY> | Planeswalker$ True | NumCards$ 2 | ValidTgts$ Player | TgtPrompt$ Choose a player | SpellDescription$ Draw two cards, then discard a card. | SubAbility$ DBDiscard
|
A:AB$ Draw | Cost$ AddCounter<2/LOYALTY> | Planeswalker$ True | NumCards$ 2 | SpellDescription$ Draw two cards, then discard a card. | SubAbility$ DBDiscard
|
||||||
SVar:DBDiscard:DB$ Discard | Defined$ Targeted | NumCards$ 1 | Mode$ TgtChoose
|
SVar:DBDiscard:DB$ Discard | Defined$ You | NumCards$ 1 | Mode$ TgtChoose
|
||||||
A:AB$ RepeatEach | Cost$ SubCounter<2/LOYALTY> | RepeatPlayers$ Opponent | RepeatSubAbility$ DBDig | SubAbility$ DBScry | Planeswalker$ True | SpellDescription$ Look at the top two cards of each other player's library, then put any number of them on the bottom of that library and the rest on top in any order.
|
A:AB$ RepeatEach | Cost$ SubCounter<2/LOYALTY> | RepeatPlayers$ Opponent | RepeatSubAbility$ DBDig | SubAbility$ DBScry | Planeswalker$ True | SpellDescription$ Look at the top two cards of each other player's library, then put any number of them on the bottom of that library and the rest on top in any order.
|
||||||
SVar:DBDig:DB$ Dig | Defined$ Remembered | DigNum$ 2 | AnyNumber$ True | DestinationZone$ Library | LibraryPosition2$ 0
|
SVar:DBDig:DB$ Dig | Defined$ Remembered | DigNum$ 2 | AnyNumber$ True | DestinationZone$ Library | LibraryPosition2$ 0
|
||||||
SVar:DBScry:DB$ Scry | ScryNum$ 2
|
SVar:DBScry:DB$ Scry | ScryNum$ 2
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Name:Adrix and Nev, Twincasters
|
Name:Adrix and Nev, Twincasters
|
||||||
ManaCost:2 G U
|
ManaCost:2 G U
|
||||||
Types:Creature Merfolk Wizard
|
Types:Legendary Creature Merfolk Wizard
|
||||||
PT:2/2
|
PT:2/2
|
||||||
K:Ward:2
|
K:Ward:2
|
||||||
R:Event$ CreateToken | ActiveZones$ Battlefield | ValidPlayer$ Player | ReplaceWith$ DoubleToken | Description$ If one or more tokens would be created, twice that many of those tokens are created instead.
|
R:Event$ CreateToken | ActiveZones$ Battlefield | ValidPlayer$ Player | ReplaceWith$ DoubleToken | Description$ If one or more tokens would be created, twice that many of those tokens are created instead.
|
||||||
|
|||||||
@@ -266,11 +266,11 @@ public class TargetSelection {
|
|||||||
}
|
}
|
||||||
if (((CardView) chosen).getZone().equals(ZoneType.Stack)) {
|
if (((CardView) chosen).getZone().equals(ZoneType.Stack)) {
|
||||||
for (final SpellAbilityStackInstance si : game.getStack()) {
|
for (final SpellAbilityStackInstance si : game.getStack()) {
|
||||||
// avoid peeking own SI so target is not changed
|
|
||||||
if (si.compareToSpellAbility(ability)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
SpellAbility abilityOnStack = si.getSpellAbility(true);
|
SpellAbility abilityOnStack = si.getSpellAbility(true);
|
||||||
|
if (si.compareToSpellAbility(ability)) {
|
||||||
|
// By peeking at stack item, target is set to its SI state. So set it back before adding targets
|
||||||
|
ability.resetTargets();
|
||||||
|
}
|
||||||
if (abilityOnStack.getHostCard().getView().equals(chosen)) {
|
if (abilityOnStack.getHostCard().getView().equals(chosen)) {
|
||||||
ability.getTargets().add(abilityOnStack);
|
ability.getTargets().add(abilityOnStack);
|
||||||
break;
|
break;
|
||||||
@@ -293,11 +293,11 @@ public class TargetSelection {
|
|||||||
|
|
||||||
final Game game = ability.getActivatingPlayer().getGame();
|
final Game game = ability.getActivatingPlayer().getGame();
|
||||||
for (final SpellAbilityStackInstance si : game.getStack()) {
|
for (final SpellAbilityStackInstance si : game.getStack()) {
|
||||||
// avoid peeking own SI so target is not changed
|
|
||||||
if (si.compareToSpellAbility(ability)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
SpellAbility abilityOnStack = si.getSpellAbility(true);
|
SpellAbility abilityOnStack = si.getSpellAbility(true);
|
||||||
|
if (si.compareToSpellAbility(ability)) {
|
||||||
|
// By peeking at stack item, target is set to its SI state. So set it back before adding targets
|
||||||
|
ability.resetTargets();
|
||||||
|
}
|
||||||
if (ability.canTargetSpellAbility(abilityOnStack)) {
|
if (ability.canTargetSpellAbility(abilityOnStack)) {
|
||||||
stackItemViewCache.put(si.getView(), si);
|
stackItemViewCache.put(si.getView(), si);
|
||||||
selectOptions.add(si.getView());
|
selectOptions.add(si.getView());
|
||||||
|
|||||||
Reference in New Issue
Block a user