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

View File

@@ -178,6 +178,7 @@ drift_of_the_dead.txt
dromad_purebred.txt
dross_harvester.txt
duskwalker.txt
dust_corona.txt
dwarven_warriors.txt
ebony_horse.txt
ekundu_cyclops1_i218.txt
@@ -219,6 +220,8 @@ giant_growth.txt
giant_growth2.txt
glimpse_the_unthinkable.txt
gnarled_effigy.txt
gnat_alley_creeper1.txt
gnat_alley_creeper2.txt
goblin_balloon_brigade.txt
goblin_balloon_brigade2.txt
goblin_king.txt
@@ -246,6 +249,7 @@ imaginary_pet.txt
immaculate_magistrate.txt
instill_energy_i166.txt
jodahs_avenger.txt
juggernaut.txt
jump.txt
karns_touch_i233.txt
keldon_warlord.txt

View File

@@ -0,0 +1,29 @@
#NAME: Dust Corona
#DESC: checks an aura which grants
#DESC: a "can't be blocked by" ability
[INIT]
firstmain
[PLAYER1]
inplay:Raging Goblin
hand:Dust Corona
manapool:{R}
[PLAYER2]
inplay:Suntail Hawk
[DO]
Dust Corona
Raging Goblin
next
next
Raging Goblin
next
Suntail Hawk
next
next
[ASSERT]
combatend
[PLAYER1]
inplay:Raging Goblin,Dust Corona
[PLAYER2]
inplay:Suntail Hawk
life:17
[END]

View File

@@ -0,0 +1,23 @@
#NAME: Gnat Alley Creeper
#DESC: checks the ability "can't be
#DESC: blocked by creatures with flying"
[INIT]
combatattackers
[PLAYER1]
inplay:Gnat Alley Creeper
[PLAYER2]
inplay:Suntail Hawk
[DO]
Gnat Alley Creeper
next
Suntail Hawk
next
next
[ASSERT]
combatend
[PLAYER1]
inplay:Gnat Alley Creeper
[PLAYER2]
inplay:Suntail Hawk
life:17
[END]

View File

@@ -0,0 +1,23 @@
#NAME: Gnat Alley Creeper 2
#DESC: checks the ability "can't be
#DESC: blocked by creatures with flying"
#DESC: Pass 2: Does normal blocking work?
[INIT]
combatattackers
[PLAYER1]
inplay:Gnat Alley Creeper
[PLAYER2]
inplay:Raging Goblin
[DO]
Gnat Alley Creeper
next
Raging Goblin
next
next
[ASSERT]
combatend
[PLAYER1]
graveyard:Gnat Alley Creeper
[PLAYER2]
graveyard:Raging Goblin
[END]

View File

@@ -0,0 +1,23 @@
#NAME: Juggernaut
#DESC: checks Juggernaut's ability
#DESC: "can't be blocked by walls"
[INIT]
combatattackers
[PLAYER1]
inplay:Juggernaut
[PLAYER2]
inplay:Wall of Stone
[DO]
Juggernaut
next
Wall of Stone
next
next
[ASSERT]
combatend
[PLAYER1]
inplay:Juggernaut
[PLAYER2]
inplay:Wall of Stone
life:15
[END]