mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added the missing code block for Take Possession to CardFactory_Sorceries.
This commit is contained in:
@@ -8359,6 +8359,50 @@ public class CardFactory_Sorceries {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Take Possession")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = -7359291736123492910L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return 0 < CardFactoryUtil.AI_getHumanCreature(card, true).size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void chooseTargetAI() {
|
||||
Card best = CardFactoryUtil.AI_getBestCreature(CardFactoryUtil.AI_getHumanCreature(card, true));
|
||||
setTargetCard(best);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
Card c = getTargetCard();
|
||||
c.setController(card.getController());
|
||||
|
||||
((PlayerZone_ComesIntoPlay) AllZone.Human_Play).setTriggers(false);
|
||||
((PlayerZone_ComesIntoPlay) AllZone.Computer_Play).setTriggers(false);
|
||||
|
||||
PlayerZone from = AllZone.getZone(c);
|
||||
PlayerZone to = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||
|
||||
from.remove(c);
|
||||
to.add(c);
|
||||
|
||||
((PlayerZone_ComesIntoPlay) AllZone.Human_Play).setTriggers(true);
|
||||
((PlayerZone_ComesIntoPlay) AllZone.Computer_Play).setTriggers(true);
|
||||
|
||||
}//resolve()
|
||||
};
|
||||
|
||||
card.clearSpellAbility();
|
||||
spell.setBeforePayMana(CardFactoryUtil.input_targetType(spell, "All"));
|
||||
card.addSpellAbility(spell);
|
||||
|
||||
card.setSVar("PlayMain1", "TRUE");
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
// -1 means keyword "Cycling" not found
|
||||
if(hasKeyword(card, "Cycling") != -1) {
|
||||
int n = hasKeyword(card, "Cycling");
|
||||
|
||||
Reference in New Issue
Block a user