[Simulated AI] Fix copying tokens with abilities, like Eldrazi Scions.

Also fixes a bug in the main game code where if you have Clone try to copy a token with abilities, like an Eldrazi Scion, it would previously not get those abilities.

Adds a test for the game simulation/copy case.
This commit is contained in:
Myrd
2016-12-27 04:09:18 +00:00
parent 5f634730ff
commit 77a526b6d9
3 changed files with 42 additions and 1 deletions

View File

@@ -291,6 +291,8 @@ public class TokenEffect extends SpellAbilityEffect {
final String actualAbility = AbilityUtils.getSVar(root, s);
for (final Card c : tokens) {
final SpellAbility grantedAbility = AbilityFactory.getAbility(actualAbility, c);
// Set intrinsic, so that effects like Clone will copy these.
grantedAbility.setIntrinsic(true);
c.addSpellAbility(grantedAbility);
}
}