mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Improved AI using Detain abilities.
This commit is contained in:
@@ -4,7 +4,8 @@ Types:Creature Human Soldier
|
||||
Text:no text
|
||||
PT:2/1
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ Detain | TriggerDescription$ When CARDNAME enters the battlefield, detain target creature an opponent controls. (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
||||
SVar:Detain:DB$Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
||||
SVar:Detain:DB$ Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
||||
SVar:PlayMain1:TRUE
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/azorius_arrester.jpg
|
||||
SetInfo:RTR|Common|http://magiccards.info/scans/en/rtr/5.jpg
|
||||
|
||||
@@ -5,7 +5,8 @@ Text:no text
|
||||
PT:3/3
|
||||
K:Flying
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ Detain | TriggerDescription$ When CARDNAME enters the battlefield, detain target creature an opponent controls. (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
||||
SVar:Detain:DB$Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
||||
SVar:Detain:DB$ Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
||||
SVar:PlayMain1:TRUE
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/isperias_skywatch.jpg
|
||||
SetInfo:RTR|Common|http://magiccards.info/scans/en/rtr/43.jpg
|
||||
|
||||
@@ -5,7 +5,8 @@ Text:no text
|
||||
PT:2/1
|
||||
K:Unblockable
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ Detain | TriggerDescription$ When CARDNAME enters the battlefield, detain target creature an opponent controls. (Until your next turn, that creature can't attack or block and its activated abilities can't be activated.)
|
||||
SVar:Detain:DB$Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
||||
SVar:Detain:DB$ Pump | KW$ HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated. | IsCurse$ True | UntilYourNextTurn$ True | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature your opponent controls to detain.
|
||||
SVar:PlayMain1:TRUE
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/soulsworn_spirit.jpg
|
||||
SetInfo:RTR|Uncommon|http://magiccards.info/scans/en/rtr/51.jpg
|
||||
|
||||
@@ -328,6 +328,12 @@ public class AbilityFactoryPump {
|
||||
return false;
|
||||
}
|
||||
} else if (keyword.endsWith("CARDNAME can't attack or block.")) {
|
||||
if (sa.getAbilityFactory().getMapParams().containsKey("UntilYourNextTurn")) {
|
||||
if (CombatUtil.canAttack(card) || CombatUtil.canBlock(card, true)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (ph.isPlayerTurn(human)) {
|
||||
if (!CombatUtil.canAttack(card)
|
||||
|| (card.getNetCombatDamage() <= 0)
|
||||
@@ -776,7 +782,6 @@ public class AbilityFactoryPump {
|
||||
else if (!list.isEmpty()) {
|
||||
final ArrayList<String> keywords = this.keywords;
|
||||
final boolean addsKeywords = this.keywords.size() > 0;
|
||||
|
||||
if (addsKeywords) {
|
||||
list = CardLists.filter(list, new Predicate<Card>() {
|
||||
@Override
|
||||
@@ -966,7 +971,8 @@ public class AbilityFactoryPump {
|
||||
&& !sa.isTrigger()
|
||||
&& Singletons.getModel().getGameState().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY)
|
||||
&& !(this.abilityFactory.isCurse() && (defense < 0))
|
||||
&& !this.containsNonCombatKeyword(this.keywords)) {
|
||||
&& !this.containsNonCombatKeyword(this.keywords)
|
||||
&& !sa.getAbilityFactory().getMapParams().containsKey("UntilYourNextTurn")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user