mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Improved ControlGainAi.
This commit is contained in:
@@ -3,7 +3,7 @@ ManaCost:2 U U
|
|||||||
Types:Creature Human Rogue
|
Types:Creature Human Rogue
|
||||||
PT:2/2
|
PT:2/2
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, gain control of target artifact for as long as you control CARDNAME.
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, gain control of target artifact for as long as you control CARDNAME.
|
||||||
SVar:TrigChange:AB$GainControl | Cost$ 0 | TgtPrompt$ Choose target artifact | ValidTgts$ Artifact | LoseControl$ LeavesPlay, LoseControl | SpellDescription$ Gain control of target artifact for as long as you control CARDNAME.
|
SVar:TrigChange:AB$ GainControl | Cost$ 0 | TgtPrompt$ Choose target artifact | ValidTgts$ Artifact | LoseControl$ LeavesPlay, LoseControl | SpellDescription$ Gain control of target artifact for as long as you control CARDNAME.
|
||||||
SVar:PlayMain1:TRUE
|
SVar:PlayMain1:TRUE
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/master_thief.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/master_thief.jpg
|
||||||
Oracle:When Master Thief enters the battlefield, gain control of target artifact for as long as you control Master Thief.
|
Oracle:When Master Thief enters the battlefield, gain control of target artifact for as long as you control Master Thief.
|
||||||
@@ -96,7 +96,8 @@ public class ControlGainAi extends SpellAbilityAi {
|
|||||||
// Don't steal something if I can't Attack without, or prevent it from
|
// Don't steal something if I can't Attack without, or prevent it from
|
||||||
// blocking at least
|
// blocking at least
|
||||||
if (lose != null && lose.contains("EOT")
|
if (lose != null && lose.contains("EOT")
|
||||||
&& ai.getGame().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_DECLARE_ATTACKERS)) {
|
&& ai.getGame().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_DECLARE_ATTACKERS)
|
||||||
|
&& !sa.isTrigger()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,8 +109,16 @@ public class ControlGainAi extends SpellAbilityAi {
|
|||||||
@Override
|
@Override
|
||||||
public boolean apply(final Card c) {
|
public boolean apply(final Card c) {
|
||||||
final Map<String, String> vars = c.getSVars();
|
final Map<String, String> vars = c.getSVars();
|
||||||
return !vars.containsKey("RemAIDeck") && c.canBeTargetedBy(sa) && CombatUtil.canAttackNextTurn(c, ai.getOpponent())
|
if (!c.canBeTargetedBy(sa)) {
|
||||||
&& c.getNetCombatDamage() > 0;
|
return false;
|
||||||
|
}
|
||||||
|
if (sa.isTrigger()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (c.isCreature() && (!CombatUtil.canAttackNextTurn(c, ai.getOpponent()) || c.getNetCombatDamage() == 0)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return !vars.containsKey("RemAIDeck");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user