mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-11 16:26:22 +00:00
Compare commits
3 Commits
52b21fa72f
...
695d1396ea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
695d1396ea | ||
|
|
0431ddaee9 | ||
|
|
9063717642 |
@@ -764,7 +764,7 @@ public class CardState implements GameObject, IHasSVars, ITranslatable {
|
||||
continue;
|
||||
}
|
||||
if (tr.isIntrinsic()) {
|
||||
triggers.add(tr.copy(card, lki));
|
||||
triggers.add(tr.copy(card, lki, false, this));
|
||||
}
|
||||
}
|
||||
ReplacementEffect runRE = null;
|
||||
@@ -961,6 +961,10 @@ public class CardState implements GameObject, IHasSVars, ITranslatable {
|
||||
return abilityForTrigger.computeIfAbsent(svar, s -> AbilityFactory.getAbility(getCard(), s, this));
|
||||
}
|
||||
|
||||
public boolean hasAbilityForTrigger(String svar) {
|
||||
return abilityForTrigger.containsKey(svar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTranslationKey() {
|
||||
String displayName = flavorName == null ? name : flavorName;
|
||||
|
||||
@@ -544,15 +544,22 @@ public abstract class Trigger extends TriggerReplacementBase {
|
||||
}
|
||||
|
||||
public final Trigger copy(Card newHost, boolean lki) {
|
||||
return copy(newHost, lki, false);
|
||||
return copy(newHost, lki, false, null);
|
||||
}
|
||||
public final Trigger copy(Card newHost, boolean lki, boolean keepTextChanges) {
|
||||
return copy(newHost, lki, keepTextChanges, null);
|
||||
}
|
||||
public final Trigger copy(Card newHost, boolean lki, boolean keepTextChanges, CardState newState) {
|
||||
final Trigger copy = (Trigger) clone();
|
||||
|
||||
copyHelper(copy, newHost, lki || keepTextChanges);
|
||||
|
||||
if (getOverridingAbility() != null) {
|
||||
copy.setOverridingAbility(getOverridingAbility().copy(newHost, lki));
|
||||
if (isIntrinsic() && hasParam("Execute") && newState != null && newState.hasAbilityForTrigger(getParam("Execute"))) {
|
||||
copy.setOverridingAbility(newState.getAbilityForTrigger(getParam("Execute")));
|
||||
} else {
|
||||
copy.setOverridingAbility(getOverridingAbility().copy(newHost, lki));
|
||||
}
|
||||
}
|
||||
|
||||
if (!lki) {
|
||||
|
||||
Reference in New Issue
Block a user