Psyringe - introducing new ability: cantBeBlockedBy(T). T can be any targez specification, like "wall", "creature[flying]", etc. See added cards for examples. Note: This ability currently has the same restrictions as "protection from(T)", i.e. it can't be used in activated abilities or instants/sorceries. It *can* be used for creatures,auras, and other continuous abilities (e.g. an enchantment which grants "unblockable by walls" to all rats should be possible, although I didn't test that). There are 47 cards which use the phrase "can't be blocked by", so we should be able to get another fair mount of cards out of that.

Notes to programmers:
1. This feature uses an awful lot of copy-pasta, using "protetcion from()" as a base. While I'm learning the architecture, it's easier for me to have a dedicated single-purpose piece of code to work with, than trying to create multi-purpose code. I'm aware that this isn't a very elegant approach though, and I hope to be able to refactor additions like this into multi-purpose code once I have a better understanding of the architecture as a whole.

2. Please check the questions I'll add in my next code comments, specifically about AI integration and activated abilities / instants / sorceries.

3. I did have a crash (with the debugger complaining about stack corruption around the cd variable) during testing. I wasn't able to reproduce it though. I did have to clean the solution in-between when I updated to the primitives system, so perhaps there was this cleaning solved whatever corruption was in my files. I'm mentioning the issue in case someone has an idea on where my code might be risky (I'm still probne to making beginners mistakes).
This commit is contained in:
Psyyringe
2009-12-28 18:19:17 +00:00
parent 365c854e90
commit 49536fce44
20 changed files with 266 additions and 76 deletions
+13
View File
@@ -1216,6 +1216,19 @@ type=Artifact
mana={4}
[/card]
[card]
text=Juggernaut attacks each turn if able. Juggernaut can't be blocked by Walls.
auto=cantbeblockedby(wall)
abilities=mustattack
id=135240
name=Juggernaut
rarity=U
type=Artifact Creature
mana={4}
power=5
subtype=Juggernaut
toughness=3
[/card]
[card]
text=Haste (This creature can attack and {T} as soon as it comes under your control.) {T}: Kamahl, Pit Fighter deals 3 damage to target creature or player.
abilities=haste,legendary
auto={T}:Damage:3 target(creature,player)
-14
View File
@@ -486,20 +486,6 @@ type=Instant
mana={1}{R}
[/card]
[card]
text=Juggernaut attacks each turn if able. Juggernaut can't be blocked by Walls.
id=135240
name=Juggernaut
rarity=U
color=Artifact
type=Artifact Creature
mana={4}
power=5
abilities=mustattack
auto=cantbeblockedby(wall)
subtype=Juggernaut
toughness=3
[/card]
[card]
text=Karplusan Strider can't be the target of blue or black spells.
id=129911
name=Karplusan Strider
+12
View File
@@ -110,6 +110,18 @@ toughness=9
abilities=trample
[/card]
[card]
id=107526
name=Gnat Alley Creeper
mana={2}{R}
type=Creature
subtype=Human Rogue
power=3
toughness=1
text=Gnat Alley Creeper can't be blocked by creatures with flying.
auto=cantbeblockedby(creature[flying])
rarity=U
[/card]
[card]
text={T}, Sacrifice Haazda Exonerator: Destroy target Aura.
id=107467
name=Haazda Exonerator
+1 -12
View File
@@ -1,6 +1,6 @@
[card]
id=111192
name=ÁEhermage's Touch
name=AEthermage's Touch
mana={2}{W}{U}
type=Instant
text=Reveal the top four cards of your library. You may put a creature card from among them onto the battlefield. It has "At the beginning of your end step, return this creature to its owner's hand." Then put the rest of the cards revealed this way on the bottom of your library in any order.
@@ -468,17 +468,6 @@ text={T}: Add {1} to your mana pool. {T}, Sacrifice Ghost Quarter: Destroy targe
rarity=U
[/card]
[card]
id=107526
name=Gnat Alley Creeper
mana={2}{R}
type=Creature
subtype=Human Rogue
power=3
toughness=1
text=Gnat Alley Creeper can't be blocked by creatures with flying.
rarity=U
[/card]
[card]
id=107542
name=Gobhobbler Rats
mana={B}{R}
+9
View File
@@ -522,6 +522,15 @@ mana={0}
type=Artifact
[/card]
[card]
id=1725
name=Tower of Coireall
mana={2}
type=Artifact
text={T}: Target creature can't be blocked by Walls this turn.
auto={T}:cantbeblockedby(wall) target(creature)
rarity=U
[/card]
[card]
text=Water Wurm gets +0/+1 as long as an opponent controls an Island.
id=1764
name=Water Wurm
-8
View File
@@ -553,14 +553,6 @@ text=At the beginning of your upkeep, The Fallen deals 1 damage to each opponent
rarity=U
[/card]
[card]
id=1725
name=Tower of Coireall
mana={2}
type=Artifact
text={T}: Target creature can't be blocked by Walls this turn.
rarity=U
[/card]
[card]
id=1779
name=Tracker
mana={2}{G}
+1 -4
View File
@@ -231,10 +231,7 @@ subtype=Juggernaut
power=5
toughness=3
text=Juggernaut attacks each turn if able. Juggernaut can't be blocked by Walls.
# Following line is not entirely correct: Walls cannot target
# Juggernaut although they should be able to. But it's hard to
# find a case where this difference actually matters.
auto=protection from(wall)
auto=cantbeblockedby(wall)
abilities=mustattack
rarity=U
[/card]
+12
View File
@@ -133,6 +133,18 @@ power=2
toughness=2
[/card]
[card]
id=110501
name=Dust Corona
mana={R}
type=Enchantment
subtype=Aura
text=Enchant creature -- Enchanted creature gets +2/+0 and can't be blocked by creatures with flying.
target=creature
auto=2/0
auto=cantbeblockedby(creatures[flying])
rarity=C
[/card]
[card]
text=Enchant creature You control enchanted creature. At the beginning of your upkeep, enchanted creature deals 1 damage to its owner.
target=creature
auto=@each my upkeep:life:-1 opponent
+1 -10
View File
@@ -11,7 +11,7 @@ rarity=R
[/card]
[card]
id=124504
name=ÁEher Membrane
name=AEther Membrane
mana={1}{R}{R}
type=Creature
subtype=Wall
@@ -278,15 +278,6 @@ text=Protection from green At the beginning of the end step, if Dunerider Outlaw
rarity=U
[/card]
[card]
id=110501
name=Dust Corona
mana={R}
type=Enchantment
subtype=Aura
text=Enchant creature Enchanted creature gets +2/+0 and can't be blocked by creatures with flying.
rarity=C
[/card]
[card]
id=124343
name=Dust Elemental
mana={2}{W}{W}
+13
View File
@@ -1189,6 +1189,19 @@ mana={4}
type=Artifact
[/card]
[card]
text=Juggernaut attacks each turn if able. Juggernaut can't be blocked by Walls.
auto=cantbeblockedby(wall)
abilities=mustattack
id=1120
name=Juggernaut
rarity=U
type=Artifact Creature
mana={4}
power=5
subtype=Juggernaut
toughness=3
[/card]
[card]
text=Target creature gains flying until end of turn.
target=creature
auto=flying
-12
View File
@@ -195,18 +195,6 @@ type=Artifact
mana={4}
[/card]
[card]
text=Juggernaut attacks each turn if able. Juggernaut can't be blocked by Walls.
id=1120
name=Juggernaut
rarity=U
color=Artifact
type=Artifact Creature
mana={4}
power=5
subtype=Juggernaut
toughness=3
[/card]
[card]
text=You have no maximum hand size. If an effect causes you to discard a card, discard it, but you may put it on top of your library instead of into your graveyard.
id=1122
name=Library of Leng