mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Fixed Bronze Horse
- Fixed a crash when Precursor Golem is targeted with an Electrolyze
This commit is contained in:
@@ -101,7 +101,7 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
|
||||
mayChoseNewTargets = false;
|
||||
for (GameObject o : candidates) {
|
||||
SpellAbility copy = CardFactory.copySpellAbilityAndSrcCard(card, chosenSA.getHostCard(), chosenSA, true);
|
||||
copy.resetFirstTarget(o);
|
||||
copy.resetFirstTarget(o, chosenSA);
|
||||
copies.add(copy);
|
||||
}
|
||||
} else {// Precursor Golem, Ink-Treader Nephilim
|
||||
@@ -118,7 +118,7 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
|
||||
mayChoseNewTargets = false;
|
||||
for (Card c : valid) {
|
||||
SpellAbility copy = CardFactory.copySpellAbilityAndSrcCard(card, chosenSA.getHostCard(), chosenSA, true);
|
||||
copy.resetFirstTarget(c);
|
||||
copy.resetFirstTarget(c, chosenSA);
|
||||
copies.add(copy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1409,12 +1409,16 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
* Reset the first target.
|
||||
*
|
||||
*/
|
||||
public void resetFirstTarget(GameObject c) {
|
||||
public void resetFirstTarget(GameObject c, SpellAbility originalSA) {
|
||||
SpellAbility sa = this;
|
||||
while (sa != null) {
|
||||
if (sa.targetRestricions != null) {
|
||||
sa.targetChosen = new TargetChoices();
|
||||
sa.targetChosen.add(c);
|
||||
if (!originalSA.targetRestricions.getDividedMap().isEmpty()) {
|
||||
sa.targetRestricions.addDividedAllocation(c,
|
||||
Iterables.getFirst(originalSA.targetRestricions.getDividedMap().values(), null));
|
||||
}
|
||||
break;
|
||||
}
|
||||
sa = sa.subAbility;
|
||||
|
||||
@@ -709,4 +709,9 @@ public class TargetRestrictions {
|
||||
public int getDividedValue(Object tgt) {
|
||||
return this.dividedMap.get(tgt);
|
||||
}
|
||||
|
||||
public HashMap<Object, Integer> getDividedMap() {
|
||||
return this.dividedMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:7
|
||||
Types:Artifact Creature Horse
|
||||
PT:4/4
|
||||
K:Trample
|
||||
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ PreventAllDamageBy Spell.IsTargetingSource | CheckSVar$ X | SVarCompare$ GE1 | Description$ Prevent all damage that would be dealt to CARDNAME by spells that target it.
|
||||
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ PreventAllDamageBy Spell.IsTargetingSource | CheckSVar$ X | SVarCompare$ GE1 | Description$ As long as you control another creature, prevent all damage that would be dealt to CARDNAME by spells that target it.
|
||||
SVar:X:Count$Valid Creature.YouCtrl+Other
|
||||
SVar:BuffedBy:Creature
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/bronze_horse.jpg
|
||||
|
||||
Reference in New Issue
Block a user