25 Commits

Author SHA1 Message Date
techdragon.nguyen@gmail.com
e2a0fef600 * updated release version to 0.18.6
* updated build tools to have core files zip naming scheme be based on version information contained in build.number.properties
* added new python library to allow reading java property files, remember to add the library to your PYTHONPATH before executing the python script otherwise the script will fail.

`
2012-05-07 05:09:12 +00:00
omegablast2002@yahoo.com
baf4b3b8da correction for the removal of main types when building a CD for share!types! targetchooser. 2012-05-06 18:21:24 +00:00
omegablast2002@yahoo.com
71183d23b6 cosmetic bug fix issue854
adjusted the calculation of x for enstack attackers to avoid drawing cards on top of the phase wheel out outside of the red box. adjusted the red box length for uniformity.
the previous calculation only drew cards to the middle of the screen and after about 15 attackers it pushed cards out of the red box, over on top of the phase wheel making it impossible to click or touch requiring alternative methods to advance to damage phase or reduction of the amount of attackers.

the new calculation draws attackers at the start of the red box keeping the enstack a cardwidth and a half from the edge of the screen on both sides instead instacking massive amounts of attackers tighter inside the red box, much how we handle battlefield enstack...attacking with more then 40 creatures no longer pushes attackers off screen.
2012-05-06 09:14:45 +00:00
omegablast2002@yahoo.com
fcf3685800 removed boon reflection, a life gain trigger that resolves to gain life...is not equal to "gain twice as much" it much makes it infinite. 2012-05-05 21:24:17 +00:00
omegablast2002@yahoo.com
0503be97ba added a check for uppercase x in manacost, when i added specific cost comparing value == "x" instead of 'x' fudged up some of the x cards which had x in caps. thanks for catching kevlahnota! 2012-05-05 15:23:28 +00:00
omegablast2002@yahoo.com
7b140987cf more card code fixes from the forum reports now... 2012-05-05 11:39:54 +00:00
omegablast2002@yahoo.com
7169df14c8 several card code fixes from the issues reports. 2012-05-05 11:25:10 +00:00
omegablast2002@yahoo.com
0c9bf6938b Sensei Golden-Tail corrected, thanks kevlahnota 2012-05-02 13:06:43 +00:00
omegablast2002@yahoo.com
30b7133862 updated venser. 2012-05-02 13:01:10 +00:00
omegablast2002@yahoo.com
e67e2e669c fix for emblems not sticking, and phasealter not testDestroying. 2012-05-02 12:58:39 +00:00
omegablast2002@yahoo.com
ec7a8d219f updated test to match new card code. 2012-05-02 12:19:20 +00:00
omegablast2002@yahoo.com
b0ab33be82 fix for flip cards changing name after a transforms ability...
I remember adding that patchwork fix a long time ago, not sure if whatever it fixed was even really an issue or just a overprotective line i added. either way if it was an issue, addType is what should re-add the name, not transformer ability.
2012-05-01 15:52:16 +00:00
omegablast2002@yahoo.com
50059e0b89 fix for eachother dynamicability 2012-04-30 12:51:11 +00:00
punkeduard@gmail.com
76a2b94ace Added name and corrected lands rarity 2012-04-30 03:08:44 +00:00
punkeduard@gmail.com
592915eece Added metadata, corrected AVR lands rarity 2012-04-30 00:09:42 +00:00
punkeduard@gmail.com
ff336c431d Added two sets folders and their _cards.dat
AVR Avacyn Restored
VVK Venser vs Koth
2012-04-29 17:33:35 +00:00
omegablast2002@yahoo.com
0a7c21abef Bloodhusk Ritualist cost was wrong 2012-04-29 14:02:46 +00:00
omegablast2002@yahoo.com
6687c1408f akki underminer code change 2012-04-27 20:08:36 +00:00
omegablast2002@yahoo.com
5d73feaaf3 various card code optimizations based on kevlahnota versions, thanks kevlahnota! 2012-04-27 19:45:07 +00:00
omegablast2002@yahoo.com
5a85c9f330 a series of card code bugs fixed, thanks dopple 2012-04-27 13:20:07 +00:00
omegablast2002@yahoo.com
bd4baff4a5 updated Painful Quandary and corrected black cat 2012-04-26 19:39:00 +00:00
omegablast2002@yahoo.com
fcc55bee8c fixed "bad line" errors 2012-04-26 11:45:10 +00:00
omegablast2002@yahoo.com
8441870bed eternity vessal text= added 2012-04-26 10:59:48 +00:00
omegablast2002@yahoo.com
3485132449 many many card code fixes report on forum...no more "sleep coding" doc!!!! 2012-04-26 10:38:20 +00:00
techdragon.nguyen@gmail.com
28901491ac update to build.xml to allow incrementing of major, minor and point releases 2012-04-24 18:07:29 +00:00
29 changed files with 2590 additions and 134 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="0185" android:versionName="0.18.5" package="net.wagic.app">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="0186" android:versionName="0.18.6" package="net.wagic.app">
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>

View File

@@ -1,6 +1,7 @@
import sys
import os
import zipfile
from pyjavaproperties import Properties
from optparse import OptionParser
def createResZipFile(filename):
@@ -25,15 +26,27 @@ def createResZipFile(filename):
utilities.addFolderToZip(zip_file, 'ai')
zip_file.close()
def getFilename():
p = Properties();
p.load(open('../../build.number.properties'));
minor = p['build.minor'];
major = p['build.major'];
point = p['build.point'];
filename = 'core_' + major + minor + point
return filename
def createStandardResFile():
filename = 'core_0184.zip'
print "Creating Standard Resource File"
filename = getFilename() + '.zip'
createResZipFile( filename )
print >> sys.stderr, 'Created Resource Package for Standard Distribution: {0}'.format( filename)
def createIosResFile():
print 'Preparing Resource Package for iOS'
utilities = ZipUtilities()
filename = 'core_0184_iOS.zip'
filename = getFilename() + '_iOS.zip'
#createResZipFile( filename )
zip_file = zipfile.ZipFile(filename, 'a', zipfile.ZIP_STORED)
zip_file.write("../../iOS/Res/rules/modrules.xml", "rules/modrules.xml", zipfile.ZIP_STORED)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,391 @@
[meta]
author=Wagic Team
name=Venser vs Koth
block=Duel Decks
year=2012
[/meta]
[card]
primitive=Ćther Membrane
id=270856
rarity=U
[/card]
[card]
primitive=Angelic Shield
id=284487
rarity=U
[/card]
[card]
primitive=Anger
id=266061
rarity=U
[/card]
[card]
primitive=Armillary Sphere
id=270825
rarity=C
[/card]
[card]
primitive=Augury Owl
id=270841
rarity=C
[/card]
[card]
primitive=Azorius Chancery
id=270826
rarity=C
[/card]
[card]
primitive=Bloodfire Colossus
id=270805
rarity=R
[/card]
[card]
primitive=Bloodfire Kavu
id=270812
rarity=U
[/card]
[card]
primitive=Cache Raiders
id=282599
rarity=U
[/card]
[card]
primitive=Chartooth Cougar
id=270828
rarity=C
[/card]
[card]
primitive=Clone
id=270842
rarity=R
[/card]
[card]
primitive=Coral Fighters
id=282600
rarity=U
[/card]
[card]
primitive=Cosi's Ravager
id=270871
rarity=C
[/card]
[card]
primitive=Cryptic Annelid
id=270836
rarity=U
[/card]
[card]
primitive=Downhill Charge
id=270854
rarity=C
[/card]
[card]
primitive=Earth Servant
id=270843
rarity=U
[/card]
[card]
primitive=Fiery Hellhound
id=279855
rarity=C
[/card]
[card]
primitive=Flood Plain
id=270849
rarity=U
[/card]
[card]
primitive=Galepowder Mage
id=270839
rarity=R
[/card]
[card]
primitive=Geyser Glider
id=270874
rarity=U
[/card]
[card]
primitive=Greater Stone Spirit
id=279857
rarity=U
[/card]
[card]
primitive=Island
id=284491
rarity=C
[/card]
[card]
primitive=Jaws of Stone
id=270833
rarity=U
[/card]
[card]
primitive=Jedit's Dragoons
id=282601
rarity=C
[/card]
[card]
primitive=Journeyer's Kite
id=282591
rarity=R
[/card]
[card]
primitive=Kor Cartographer
id=270875
rarity=C
[/card]
[card]
primitive=Koth of the Hammer
id=266362
rarity=M
[/card]
[card]
primitive=Lithophage
id=270850
rarity=R
[/card]
[card]
primitive=Minamo Sightbender
id=282602
rarity=U
[/card]
[card]
primitive=Mistmeadow Witch
id=282603
rarity=U
[/card]
[card]
primitive=Mountain
id=284496
rarity=C
[/card]
[card]
primitive=Neurok Invisimancer
id=270868
rarity=C
[/card]
[card]
primitive=New Benalia
id=270837
rarity=U
[/card]
[card]
primitive=Oblivion Ring
id=270848
rarity=U
[/card]
[card]
primitive=Overrule
id=270834
rarity=C
[/card]
[card]
primitive=Path to Exile
id=266017
rarity=U
[/card]
[card]
primitive=Pilgrim's Eye
id=270872
rarity=C
[/card]
[card]
primitive=Plains
id=284497
rarity=C
[/card]
[card]
primitive=Plated Geopede
id=266210
rarity=C
[/card]
[card]
primitive=Preordain
id=265979
rarity=C
[/card]
[card]
primitive=Primal Plasma
id=270857
rarity=C
[/card]
[card]
primitive=Pygmy Pyrosaur
id=279859
rarity=C
[/card]
[card]
primitive=Revoke Existence
id=284488
rarity=C
[/card]
[card]
primitive=Safe Passage
id=270844
rarity=C
[/card]
[card]
primitive=Sawtooth Loon
id=270861
rarity=U
[/card]
[card]
primitive=Scroll Thief
id=270845
rarity=C
[/card]
[card]
primitive=Searing Blaze
id=270873
rarity=C
[/card]
[card]
primitive=Seismic Strike
id=270840
rarity=C
[/card]
[card]
primitive=Sejiri Refuge
id=270876
rarity=U
[/card]
[card]
primitive=Sigil of Sleep
id=270813
rarity=C
[/card]
[card]
primitive=Sky Spirit
id=284485
rarity=U
[/card]
[card]
primitive=Slith Strider
id=270851
rarity=U
[/card]
[card]
primitive=Soaring Seacliff
id=270877
rarity=C
[/card]
[card]
primitive=Sphinx of Uthuun
id=284486
rarity=R
[/card]
[card]
primitive=Spire Barrage
id=270878
rarity=C
[/card]
[card]
primitive=Steel of the Godhead
id=270866
rarity=C
[/card]
[card]
primitive=Stone Giant
id=279856
rarity=U
[/card]
[card]
primitive=Sunblast Angel
id=284489
rarity=R
[/card]
[card]
primitive=Torchling
id=270858
rarity=R
[/card]
[card]
primitive=Vanish into Memory
id=270831
rarity=U
[/card]
[card]
primitive=Venser, the Sojourner
id=266078
rarity=M
[/card]
[card]
primitive=Volley of Boulders
id=270855
rarity=R
[/card]
[card]
primitive=Vulshok Battlegear
id=270852
rarity=U
[/card]
[card]
primitive=Vulshok Berserker
id=270846
rarity=C
[/card]
[card]
primitive=Vulshok Morningstar
id=270810
rarity=U
[/card]
[card]
primitive=Vulshok Sorcerer
id=270806
rarity=C
[/card]
[card]
primitive=Wall of Denial
id=270829
rarity=U
[/card]
[card]
primitive=Wayfarer's Bauble
id=270807
rarity=C
[/card]
[card]
primitive=Whitemane Lion
id=270859
rarity=C
[/card]
[card]
primitive=Windreaver
id=270835
rarity=R
[/card]
[card]
primitive=Island
id=284490
rarity=L
[/card]
[card]
primitive=Island
id=284492
rarity=L
[/card]
[card]
primitive=Mountain
id=284495
rarity=L
[/card]
[card]
primitive=Mountain
id=284494
rarity=L
[/card]
[card]
primitive=Mountain
id=284493
rarity=L
[/card]
[card]
primitive=Plains
id=284498
rarity=L
[/card]
[card]
primitive=Plains
id=284499
rarity=L
[/card]

View File

@@ -22,7 +22,7 @@ toughness=2
[/card]
[card]
name=AEther Charge
auto=@movedTo(beast|myBattlefield):may damage:4 opponent
auto=@movedTo(beast|myBattlefield):all(trigger[to]) transforms((,newability[may damage:4 target(opponent)]))
text=Whenever a Beast enters the battlefield under your control, you may have it deal 4 damage to target opponent.
mana={4}{R}
type=Enchantment
@@ -110,19 +110,7 @@ type=Instant
[card]
name=AEther Vial
auto=@each my upkeep:may counter(0/0.1.Charge)
auto=this(counter{0/0.1.Charge}<1) {T}:moveTo(myBattlefield) target(creature[manacost=0]|myhand)
auto=this(counter{0/0.1.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=1]|myhand)
auto=this(counter{0/0.2.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=2]|myhand)
auto=this(counter{0/0.3.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=3]|myhand)
auto=this(counter{0/0.4.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=4]|myhand)
auto=this(counter{0/0.5.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=5]|myhand)
auto=this(counter{0/0.6.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=6]|myhand)
auto=this(counter{0/0.7.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=7]|myhand)
auto=this(counter{0/0.8.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=8]|myhand)
auto=this(counter{0/0.9.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=9]|myhand)
auto=this(counter{0/0.10.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=10]|myhand)
auto=this(counter{0/0.11.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=11]|myhand)
auto=this(counter{0/0.12.Charge}=) {T}:moveTo(myBattlefield) target(creature[manacost=12]|myhand)
auto={T}:moveTo(myBattlefield) notatarget(creature[manacost=counter{0%0.1.Charge}]|myhand)
text=At the beginning of your upkeep, you may put a charge counter on AEther Vial. -- {T}: You may put a creature card with converted mana cost equal to the number of charge counters on AEther Vial from your hand onto the battlefield.
mana={1}
type=Artifact
@@ -337,8 +325,8 @@ type=Sorcery
[/card]
[card]
name=Abuna Acolyte
auto={T}:prevent:1 target(creature,player)
auto={T}:prevent:2 target(creature[artifact])
auto={T}:name(prevent 1 damage) prevent:1 target(creature,player)
auto={T}:name(prevent 2 damage) prevent:2 target(creature[artifact])
text={T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. -- {T}: Prevent the next 2 damage that would be dealt to target artifact creature this turn.
mana={1}{W}
type=Creature
@@ -359,7 +347,7 @@ toughness=2
[/card]
[card]
name=Abyssal Hunter
auto={B}{T}:target(creature) dynamicability<!powerstrike!> tap
auto={B}{T}:name(tap target creature) target(creature) tap && dynamicability<!powerstrike!>
text={B}, {T}: Tap target creature. Abyssal Hunter deals damage equal to Abyssal Hunter's power to that creature.
mana={3}{B}
type=Creature
@@ -422,7 +410,7 @@ toughness=2
[/card]
[card]
name=Academy Researchers
auto=may target(aura|myhand) newtarget
auto=may name(attach an aura) target(aura|myhand) newtarget
text=When Academy Researchers enters the battlefield, you may put an Aura card from your hand onto the battlefield attached to Academy Researchers.
mana={1}{U}{U}
type=Creature
@@ -809,6 +797,7 @@ type=Instant
[card]
name=Afiya Grove
auto=counter(1/1,3)
auto=this(counter{1/1}<1)while sacrifice
auto=@each my upkeep:choice counter(1/1,1) target(creature) && counter(1/1,-1) all(this) && bury all(Afiya Grove[-counter{1/1.1}])
text=Afiya Grove enters the battlefield with three +1/+1 counters on it. -- At the beginning of your upkeep, move a +1/+1 counter from Afiya Grove onto target creature. -- When Afiya Grove has no +1/+1 counters on it, sacrifice it.
mana={1}{G}
@@ -923,7 +912,7 @@ type=Instant
[card]
name=Agonizing Memories
target=player
auto=target(<2>*|targetedpersonshand) moveTo(opponentlibrary)
auto=target(<2>*|targetedpersonshand) moveTo(targetedpersonslibrary)
text=Look at target player's hand and choose two cards from it. Put them on top of that player's library in any order.
mana={2}{B}{B}
type=Sorcery
@@ -1121,7 +1110,7 @@ toughness=1
[/card]
[card]
name=Akki Underminer
auto=@combatdamaged(player) from(this):ability$!name(sacrifice) notatarget(*|mybattefield) sacrifice!$ opponent
auto=@combatdamaged(player) from(this):choice name(player sacrifices) ability$!name(sacrifice) notatarget(*|mybattefield) sacrifice!$ opponent
text=Whenever Akki Underminer deals combat damage to a player, that player sacrifices a permanent.
mana={3}{R}
type=Creature
@@ -1529,11 +1518,12 @@ toughness=2
[/card]
[card]
name=Allied Strategies
auto=aslongas(plains|myBattlefield) draw:1
auto=aslongas(island|myBattlefield) draw:1
auto=aslongas(swamp|myBattlefield) draw:1
auto=aslongas(mountain|myBattlefield) draw:1
auto=aslongas(forest|myBattlefield) draw:1
target=player
auto=if type(plains[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer
auto=if type(island[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer
auto=if type(mountain[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer
auto=if type(swamp[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer
auto=if type(forest[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer
text=Domain - Target player draws a card for each basic land type among lands he or she controls.
mana={4}{U}
type=Sorcery
@@ -1740,7 +1730,7 @@ toughness=1
[card]
name=Amnesia
target=player
auto=target(*|targetedpersonshand) 0/0
auto=name(look) target(*|targetedpersonshand) 0/0
auto=reject all(*[-land]|targetedpersonshand)
text=Target player reveals his or her hand and discards all nonland cards.
mana={3}{U}{U}{U}
@@ -1834,7 +1824,7 @@ type=Artifact
[/card]
[card]
name=Amulet of Unmaking
auto={5}{T}:moveTo(exile) all(this) && moveTo(exile) target(artifact,creature,land) asSorcery
auto={5}{T}{E}:name(exile) ability$!name(exile target) moveTo(exile) target(artifact,creature,land)!$ controller asSorcery
text={5}, {T}, Exile Amulet of Unmaking: Exile target artifact, creature, or land. Activate this ability only any time you could cast a sorcery.
mana={5}
type=Artifact
@@ -1962,7 +1952,7 @@ type=Sorcery
[/card]
[card]
name=Anathemancer
auto=foreach(land[-basic]|opponentBattlefield) damage:1 opponent
auto=name(choose target player) target(player) damage:type:land[-basic]:targetedpersonsbattlefield
autograveyard={5}{B}{R}:moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever
text=When Anathemancer enters the battlefield, it deals damage to target player equal to the number of nonbasic lands that player controls. -- Unearth {5}{B}{R} ({5}{B}{R}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.)
mana={1}{B}{R}
@@ -2579,7 +2569,7 @@ toughness=5
[card]
name=Anthroplasm
auto=counter(1/1,2)
auto={X}{T}:removeallcounters(1/1) && thisforeach(X) all(this) counter(1/1,1)
auto={X}{T}:removeallcounters(1/1) && counter(1/1,x)
text=Anthroplasm enters the battlefield with two +1/+1 counters on it. -- {X}, {T}: Remove all +1/+1 counters from Anthroplasm and put X +1/+1 counters on it.
mana={2}{U}{U}
type=Creature
@@ -2707,7 +2697,7 @@ toughness=1
[/card]
[card]
name=Aphetto Grifter
auto={T(wizard|myBattlefield)}{T(wizard|myBattlefield)}:tap target(*)
auto={T(wizard|myBattlefield)}{T(wizard|myBattlefield)}:name(tap a perminent) tap target(*)
text=Tap two untapped Wizards you control: Tap target permanent.
mana={2}{U}
type=Creature
@@ -2731,7 +2721,7 @@ name=Aphotic Wisps
target=creature
auto=fear
auto=transforms((,black)) ueot
auto=draw:1 comtroller
auto=draw:1 controller
text=Target creature becomes black and gains fear until end of turn. (It can't be blocked except by artifact creatures and/or black creatures.) -- Draw a card.
mana={B}
type=Instant
@@ -3566,16 +3556,16 @@ type=Artifact
[/card]
[card]
name=Armament Master
auto=this(gear = 1) lord(other creature[kor]|myBattlefield) 2/2
auto=this(gear = 2) lord(other creature[kor]|myBattlefield) 4/4
auto=this(gear = 3) lord(other creature[kor]|myBattlefield) 6/6
auto=this(gear = 4) lord(other creature[kor]|myBattlefield) 8/8
auto=this(gear = 5) lord(other creature[kor]|myBattlefield) 10/10
auto=this(gear = 6) lord(other creature[kor]|myBattlefield) 12/12
auto=this(gear = 7) lord(other creature[kor]|myBattlefield) 14/14
auto=this(gear = 8) lord(other creature[kor]|myBattlefield) 16/16
auto=this(gear = 9) lord(other creature[kor]|myBattlefield) 18/18
auto=this(gear = 10) lord(other creature[kor]|myBattlefield) 20/20
auto=this(gear=1) lord(other creature[kor]|myBattlefield) 2/2
auto=this(gear=2) lord(other creature[kor]|myBattlefield) 4/4
auto=this(gear=3) lord(other creature[kor]|myBattlefield) 6/6
auto=this(gear=4) lord(other creature[kor]|myBattlefield) 8/8
auto=this(gear=5) lord(other creature[kor]|myBattlefield) 10/10
auto=this(gear=6) lord(other creature[kor]|myBattlefield) 12/12
auto=this(gear=7) lord(other creature[kor]|myBattlefield) 14/14
auto=this(gear=8) lord(other creature[kor]|myBattlefield) 16/16
auto=this(gear=9) lord(other creature[kor]|myBattlefield) 18/18
auto=this(gear=10) lord(other creature[kor]|myBattlefield) 20/20
text=Other Kor creatures you control get +2/+2 for each Equipment attached to Armament Master.
mana={W}{W}
type=Creature
@@ -7018,11 +7008,11 @@ toughness=4
[/card]
[card]
name=Black Cat
auto=@movedTo(this|mygraveyard) from(battlefield):discard.1 opponent
auto=@movedTo(this|mygraveyard) from(battlefield):discard:1 opponent
text=When Black Cat dies, target opponent discards a card at random.
mana={1}{B}
type=Creature
subtype=Cat
subtype=zombie Cat
power=1
toughness=1
[/card]
@@ -8155,7 +8145,7 @@ name=Bloodhusk Ritualist
auto=kicker target(opponent) ability$!name(discard) target(*|myhand) reject!$ targetedplayer
kicker=multi{B}
text=Multikicker {B} (You may pay an additional any number of times as you cast this spell.) -- When Bloodhusk Ritualist enters the battlefield, target opponent discards a card for each time it was kicked.
mana={4}{B}{B}
mana={2}{B}
type=Creature
subtype=Horror
power=2
@@ -8336,7 +8326,7 @@ type=Artifact
[card]
name=Bloodthirsty Ogre
auto={T}:counter(0/0,1,Devotion)
auto=aslongas(demon|myBattlefield) {T}:thisforeach(counter{0/0.1.Devotion}) -1/-1 target(creature)
auto=aslongas(demon|myBattlefield) {T}:target(creature) counter{0%0.1.Devotion}/counter{0%0.1.Devotion} ueot
text={T}: Put a devotion counter on Bloodthirsty Ogre. -- {T}: Target creature gets -X/-X until end of turn, where X is the number of devotion counters on Bloodthirsty Ogre. Activate this ability only if you control a Demon.
mana={2}{B}
type=Creature
@@ -9069,13 +9059,6 @@ mana={U}{U}
type=Instant
[/card]
[card]
name=Boon Reflection
auto=@lifed(controller):dynamicability<!myself thatmuchlifegain srccontroller!>
text=If you would gain life, you gain twice that much life instead.
mana={4}{W}
type=Enchantment
[/card]
[card]
name=Borborygmos
abilities=trample
auto=@combatdamaged(player) from(this):lord(creature|mybattlefield) counter(1/1,1)
@@ -11442,7 +11425,7 @@ type=Instant
[card]
name=Carrion Feeder
abilities=cantblock
auto={S(creature|myBattlefield)}:counter(1/1,1)
auto={S(creature|myBattlefield)}:all(this) counter(1/1,1)
text=Carrion Feeder can't block. -- Sacrifice a creature: Put a +1/+1 counter on Carrion Feeder.
mana={B}
type=Creature
@@ -12496,15 +12479,15 @@ name=Chandra Nalaar
auto=counter(0/0,6,loyalty)
auto={C(0/0,1,Loyalty)}:name(1 damage to player) damage:1 target(player)
auto={C(0/0,-1,Loyalty)}:name(1 damage to creature) damage:1 target(creature)
auto={C(0/0,-2,Loyalty)}:name(2 damage to creature) damage:1 target(creature)
auto={C(0/0,-3,Loyalty)}:name(3 damage to creature) damage:1 target(creature)
auto={C(0/0,-4,Loyalty)}:name(4 damage to creature) damage:1 target(creature)
auto={C(0/0,-5,Loyalty)}:name(5 damage to creature) damage:1 target(creature)
auto={C(0/0,-6,Loyalty)}:name(6 damage to creature) damage:1 target(creature)
auto={C(0/0,-7,Loyalty)}:name(7 damage to creature) damage:1 target(creature)
auto={C(0/0,-8,Loyalty)}:name(8 damage to creature) damage:1 target(creature)
auto={C(0/0,-9,Loyalty)}:name(9 damage to creature) damage:1 target(creature)
auto={C(0/0,-10,Loyalty)}:name(10 damage to creature) damage:1 target(creature)
auto={C(0/0,-2,Loyalty)}:name(2 damage to creature) damage:2 target(creature)
auto={C(0/0,-3,Loyalty)}:name(3 damage to creature) damage:3 target(creature)
auto={C(0/0,-4,Loyalty)}:name(4 damage to creature) damage:4 target(creature)
auto={C(0/0,-5,Loyalty)}:name(5 damage to creature) damage:5 target(creature)
auto={C(0/0,-6,Loyalty)}:name(6 damage to creature) damage:6 target(creature)
auto={C(0/0,-7,Loyalty)}:name(7 damage to creature) damage:7 target(creature)
auto={C(0/0,-8,Loyalty)}:name(8 damage to creature) damage:8 target(creature)
auto={C(0/0,-9,Loyalty)}:name(9 damage to creature) damage:9 target(creature)
auto={C(0/0,-10,Loyalty)}:name(10 damage to creature) damage:10 target(creature)
auto={C(0/0,-8,Loyalty)}:name(10 damage to player and all of his creatures) target(player) damage:10 && damage:10 all(creature|targetedpersonsbattlefield)
text=+1: Chandra Nalaar deals 1 damage to target player. -- -X: Chandra Nalaar deals X damage to target creature. -- -8: Chandra Nalaar deals 10 damage to target player and each creature he or she controls.
mana={3}{R}{R}
@@ -13117,7 +13100,7 @@ type=Sorcery
###The 2 cards below should stay together (Flip Card)###
[card]
name=Chosen of Markov
abilities={T}{T(vampire[-tapped]):flip(Markov's Servant)
abilities={T}{T(creature[vampire])}:flip(Markov's Servant)
text={T}, Tap an untapped Vampire you control: Transform Chosen of Markov.
mana={2}{B}
type=Creature
@@ -15759,7 +15742,7 @@ type=Land
[card]
name=Creepy Doll
abilities=indestructible
auto=@combatdamaged(creature) from(this):flipacoin winability all(trigger[to]) destroy winabilityend flipend
auto=@combatdamaged(creature) from(this): name(flip a coin) all(trigger[to]) flipacoin winability destroy winabilityend flipend
text=Creepy Doll is indestructible. -- Whenever Creepy Doll deals combat damage to a creature, flip a coin. If you win the flip, destroy that creature.
mana={5}
type=Artifact Creature
@@ -16261,8 +16244,8 @@ subtype=Arcane
[/card]
[card]
name=Crushing Vines
auto=choice destroy target(creature[flying])
auto=choice destroy target(artifact)
auto=choice name(Destroy flying creature) destroy target(creature[flying])
auto=choice name(Destroy artifact) destroy target(artifact)
text=Choose one - Destroy target creature with flying, or destroy target artifact.
mana={2}{G}
type=Instant
@@ -21292,7 +21275,7 @@ toughness=2
name=Drogskol Captain
abilities=flying
auto=lord(other spirit|mybattlefield) 1/1
auto=lord(other spirit|mybattlefield) hexproof
auto=lord(other spirit|mybattlefield) opponentshroud
text=Flying -- Other Spirit creatures you control get +1/+1 and have hexproof.
mana={1}{W}{U}
type=Creature
@@ -22935,7 +22918,7 @@ name=Elspeth Tirel
auto=counter(0/0,4,loyalty)
auto={C(0/0,2,Loyalty)}:foreach(creature|mybattlefield) life:1 controller
auto={C(0/0,-2,Loyalty)}:token(Soldier,Creature Soldier,1/1,white)*3
auto={C(0/0,-5,Loyalty)}:destroy all(other *[-land,-token])
auto={C(0/0,-5,Loyalty)}:destroy all(other *[-land;-token])
text=+2: You gain 1 life for each creature you control. -- -2: Put three 1/1 white Soldier creature tokens onto the battlefield. -- -5: Destroy all other permanents except for lands and tokens.
mana={3}{W}{W}
type=Planeswalker
@@ -24593,6 +24576,7 @@ subtype=Aura
[/card]
[card]
name=Eternity Vessel
text=Eternity Vessel enters the battlefield with X charge counters on it, where X is your life total. Landfall — Whenever a land enters the battlefield under your control, you may have your life total become the number of charge counters on Eternity Vessel.
auto=counter(0/0,lifetotal,Charge)
auto=@movedto(land|myBattlefield):may lifeset:0 controller && thisforeach(counter{0/0.1.Charge}) life:1
auto=Eternity Vessel enters the battlefield with X charge counters on it, where X is your life total. -- Landfall - Whenever a land enters the battlefield under your control, you may have your life total become the number of charge counters on Eternity Vessel.
@@ -26522,7 +26506,7 @@ type=Artifact
[/card]
[card]
name=Fiend Hunter
auto=(blink)forsrc target(other creature|battlefield)
auto=may (blink)forsrc target(other creature|battlefield)
text=When Fiend Hunter enters the battlefield, you may exile another target creature. -- When Fiend Hunter leaves the battlefield, return the exiled card to the battlefield under its owner's control.
mana={1}{W}{W}
type=Creature
@@ -28822,7 +28806,7 @@ toughness=1
[card]
name=Frontline Sage
abilities=exalted
auto={T}:draw:1 && transforms((,newability[target(*|myhand) reject])) forever
auto={u}{T}:draw:1 && transforms((,newability[target(*|myhand) reject])) forever
text=Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.) -- {U}, {T}: Draw a card, then discard a card.
mana={2}{U}
type=Creature
@@ -29051,7 +29035,7 @@ type=Instant
[card]
name=Funeral March
target=creature
transforms((,newability[@movedTo(this|graveyard) from(battlefield):all(trigger[to]) ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ controller]))
auto=transforms((,newability[@movedTo(this|graveyard) from(battlefield):all(trigger[to]) ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ controller]))
text=Enchant creature -- When enchanted creature leaves the battlefield, its controller sacrifices a creature.
mana={1}{B}{B}
type=Enchantment
@@ -41641,7 +41625,7 @@ toughness=1
[card]
name=Kessig Wolf Run
auto={T}:Add{1}
auto={X}{R}{G}{T}:target(creature) +x/0 ueot && trample ueot
auto={X}{R}{G}{T}:target(creature) ueot +x/0 && trample
text={T}: Add {1} to your mana pool. -- {X}{R}{G}, {T}: Target creature gets +X/+0 and gains trample until end of turn.
type=Land
[/card]
@@ -42437,9 +42421,7 @@ toughness=2
[card]
name=Knight of the White Orchid
abilities=first strike
auto=alternative moveTo(mybattlefield) notatarget(plains|mylibrary)
other={W}{W}
otherrestriction=type(land|mybattlefield)~lessthan~type(land|opponentbattlefield)
auto=if type(land|mybattlefield)~lessthan~type(land|opponentbattlefield) then choice name(fetch a plains) moveTo(mybattlefield) notatarget(plains|mylibrary)
text=First strike -- When Knight of the White Orchid enters the battlefield, if an opponent controls more lands than you, you may search your library for a Plains card, put it onto the battlefield, then shuffle your library.
mana={W}{W}
type=Creature
@@ -43304,7 +43286,6 @@ type=Legendary Enchantment
[/card]
###The 2 cards above should stay together (Flip Card)###
[card]
[card]
name=Kurgadon
auto=@movedTo(creature[manacost>=6]|mystack):counter(1/1,3)
text=Whenever you cast a creature spell with converted mana cost 6 or more, put three +1/+1 counters on Kurgadon.
@@ -44902,7 +44883,7 @@ toughness=4
name=Liliana Vess
auto=counter(0/0,5,loyalty)
auto={C(0/0,1,Loyalty)}:target(player) ability$!name(discard) target(*|myhand) reject!$ targetedplayer
auto={C(0/0,-2,Loyalty)}:target(instant,sorcery|mylibrary) moveTo(library)
auto={C(0/0,-2,Loyalty)}:target(*|mylibrary) moveTo(library)
auto={C(0/0,-8,Loyalty)}:moveTo(mybattlefield) all(creature|graveyard)
text=+1: Target player discards a card. -- -2: Search your library for a card, then shuffle your library and put that card on top of it. -- -8: Put all creature cards in all graveyards onto the battlefield under your control.
mana={3}{B}{B}
@@ -49653,8 +49634,8 @@ type=Artifact
[/card]
[card]
name=Misery Charm
auto=aslongas(cleric|battlefield) choice destroy target(cleric)
auto=aslongas(cleric|battlefield) choice moveTo(myHand) target(cleric|myGraveyard)
auto=if type(cleric|battlefield)~morethan~0 then choice destroy target(cleric)
auto=if type(cleric|mygraveyard)~morethan~0 then choice moveTo(myHand) target(cleric|myGraveyard)
auto=choice life:-2 target(player)
text=Choose one - Destroy target Cleric; or return target Cleric card from your graveyard to your hand; or target player loses 2 life.
mana={B}
@@ -49693,7 +49674,7 @@ type=Sorcery
[/card]
[card]
name=Mishra's Groundbreaker
auto={T}{S}:becomes(Artifact Creature,3/3) target(land|myBattlefield)
auto={T}{S}:target(land|myBattlefield) becomes(Artifact Creature,3/3) forever
text={T}, Sacrifice Mishra's Groundbreaker: Target land becomes a 3/3 artifact creature that's still a land. (This effect lasts indefinitely.)
mana={4}
type=Artifact
@@ -53036,7 +53017,6 @@ toughness=3
[/card]
###The 2 cards above should stay together (Flip Card)###
[card]
[card]
name=Niblis of the Breath
abilities=flying
auto={U}{T}:may tap target(creature)
@@ -53528,7 +53508,7 @@ name=Nissa Revane
auto=counter(0/0,2,loyalty)
auto={C(0/0,1,Loyalty)}:moveTo(mybattlefield) target(Nissa's Chosen|mylibrary)
auto={C(0/0,1,Loyalty)}:foreach(elf|myBattlefield) life:2 controller
auto={C(0/0,-7,Loyalty)}:moveTo(mybattlefield) target(<anynumber>creature[elf]|mylibrary)
auto={C(0/0,-7,Loyalty)}:moveTo(mybattlefield) target(<anyamount>creature[elf]|mylibrary)
text=+1: Search your library for a card named Nissa's Chosen and put it onto the battlefield. Then shuffle your library. -- +1: You gain 2 life for each Elf you control. -- -7: Search your library for any number of Elf creature cards and put them onto the battlefield. Then shuffle your library.
mana={2}{G}{G}
type=Planeswalker
@@ -53536,7 +53516,7 @@ subtype=Nissa
[/card]
[card]
name=Nissa's Chosen
auto=@movedTo(this|raveyard) from(battlefield):bottomoflibrary
auto=@movedTo(graveyard) from(this|battlefield):all(this) bottomoflibrary
text=If Nissa's Chosen would die, put it on the bottom of its owner's library instead.
mana={G}{G}
type=Creature
@@ -55886,7 +55866,7 @@ type=Sorcery
[/card]
[card]
name=Painful Quandary
auto=@movedTo(*|opponentstack):ability$!choice name(loose 5 life) life:-5 _ choice name(discard) target(*|myhand) reject!$ opponent
auto=@movedTo(*|opponentstack):choice name(make opponent choose) ability$!choice name(loose 5 life) life:-5 _ choice name(discard) target(*|myhand) reject!$ opponent
text=Whenever an opponent casts a spell, that player loses 5 life unless he or she discards a card.
mana={3}{B}{B}
type=Enchantment
@@ -56607,7 +56587,7 @@ type=Land
[card]
name=Peek
target=player
auto=target(*|targetedpersonshand) 0/0
auto=name(see target hand) target(*|targetedpersonshand) 0/0
auto=draw:1 controller
text=Look at target player's hand. -- Draw a card.
mana={U}
@@ -56740,7 +56720,7 @@ type=Artifact
[card]
name=Pentarch Paladin
abilities=flanking
auto=chooseacolor transforms((,newability[{W}{W}{T}:destroy target(*[chosencolor])])) forever chooseend
auto=chooseacolor {W}{W}{T}:destroy target(*[chosencolor]) chooseend
text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- As Pentarch Paladin enters the battlefield, choose a color. -- {W}{W}, {T}: Destroy target permanent of the chosen color.
mana={2}{W}{W}{W}
type=Creature
@@ -56866,7 +56846,7 @@ subtype=Equipment
[/card]
[card]
name=Perilous Forays
auto={1}{S(creature|mybattlefield)}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary)
auto={1}{S(creature|mybattlefield)}:target(*[swamp;island;mountain;forest;plains]|mylibrary) moveTo(myBattlefield) and!(tap)!
text={1}, Sacrifice a creature: Search your library for a land card with a basic land type and put it onto the battlefield tapped. Then shuffle your library.
mana={3}{G}{G}
type=Enchantment
@@ -56953,7 +56933,7 @@ type=Enchantment
[card]
name=Persecute
target=player
auto=target(*|targetedpersonshand) 0/0
auto=name(see target hand) target(*|targetedpersonshand) 0/0
auto=chooseacolor all(*[chosencolor]|targetedpersonshand) reject chooseend
text=Choose a color. Target player reveals his or her hand and discards all cards of that color.
mana={2}{B}{B}
@@ -59179,9 +59159,9 @@ type=Instant
[/card]
[card]
name=Primal Clay
auto=choice transforms((,setpower=3,settoughness=3)) forever
auto=choice transforms((,flying,setpower=2,settoughness=2)) forever
auto=choice transforms((Wall,defender,setpower=1,settoughness=6)) forever
auto=choice name(enter as 3/3) transforms((,setpower=3,settoughness=3)) forever
auto=choice name(enter as 2/2 fly) transforms((,flying,setpower=2,settoughness=2)) forever
auto=choice name(enter as a wall) transforms((Wall,defender,setpower=1,settoughness=6)) forever
text=As Primal Clay enters the battlefield, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Shapeshifter Wall artifact creature with defender.
mana={4}
type=Artifact Creature
@@ -67299,7 +67279,7 @@ toughness=1
name=Scythe Tiger
abilities=shroud
auto=aslongas(land|myBattlefield) moveTo(graveyard) notatarget(land|myBattlefield) oneshot
auto=moveTo(graveyard) notatarget(this|myBattlefield)
auto=name(sacrifice Scythe Tiger) moveTo(graveyard) notatarget(this|myBattlefield)
text=Shroud (This creature can't be the target of spells or abilities.) -- When Scythe Tiger enters the battlefield, sacrifice it unless you sacrifice a land.
mana={G}
type=Creature
@@ -68178,9 +68158,7 @@ toughness=4
[card]
name=Sensei Golden-Tail
auto=bushido(1/1)
auto={1}{W}{T}:counter(0/0,1,Training) target(creature) asSorcery
auto=lord(creature[counter{0/0.1.training}]) transforms((samurai))
auto=lord(creature[counter{0/0.1.training}]) bushido(1/1)
auto={1}{W}{T}:name(train samurai) target(creature) transforms((,newability[bushido(1/1)],newability[counter(0/0.1.Training)],newability[this(cantargetcard(creature) becomes(Samurai) )])) asSorcery forever
text=Bushido 1 (When this blocks or becomes blocked, it gets +1/+1 until end of turn.) -- {1}{W}, {T}: Put a training counter on target creature. That creature gains bushido 1 and becomes a Samurai in addition to its other creature types. Activate this ability only any time you could cast a sorcery.
mana={1}{W}
type=Legendary Creature
@@ -73098,7 +73076,7 @@ toughness=1
[card]
name=Sorcerous Sight
target=opponent
auto=target(*|targetedpersonshand) 0/0
auto=name(see target hand) target(*|targetedpersonshand) 0/0
auto=draw:1 controller
text=Look at target opponent's hand. -- Draw a card.
mana={U}
@@ -76070,7 +76048,8 @@ auto=nextphasealter(remove,combatdamage,opponent)
auto=nextphasealter(remove,combatends,opponent)
text=When Stonehorn Dignitary enters the battlefield, target opponent skips his or her next combat phase.
mana={3}{W}
type=Creature — Rhino Soldier
type=Creature
subtype=Rhino Soldier
power=1
toughness=4
[/card]
@@ -78686,6 +78665,7 @@ auto=aslongas(instant|graveyard) 1/1
auto=aslongas(land|graveyard) 1/1
auto=aslongas(sorcery|graveyard) 1/1
auto=aslongas(tribal|graveyard) 1/1
auto=aslongas(planeswalker|graveyard) 1/1
text=Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. (The card types are artifact, creature, enchantment, instant, land, planeswalker, sorcery, and tribal.)
mana={1}{G}
type=Creature
@@ -79452,7 +79432,7 @@ subtype=Arcane
###The token is needed here. A simple token in the first auto-line won't work. It seems that "," in a transforms((,newability...))-line causes problems.
[card]
name=Terastodon
auto=name(destroy) may target(<upto:3>*[-creature]) transforms((,newability[token(-19713711)],newability[destroy])) oneshot
auto=may name(destroy) target(<upto:3>*[-creature]|battlefield) transforms((,newability[token(-19713711)],newability[destroy])) forever
text=When Terastodon enters the battlefield, you may destroy up to three target noncreature permanents. For each permanent put into a graveyard this way, its controller puts a 3/3 green Elephant creature token onto the battlefield.
mana={6}{G}{G}
type=Creature
@@ -80207,7 +80187,7 @@ toughness=2
[/card]
[card]
name=Thornbite Staff
auto=teach(creature) {2}{T}:damage:1 target(creature,player)
auto=teach(creature) transforms((,newability[{2}{T}:damage:1 target(creature,player)]))
auto=@movedto(creature|graveyard) from(creature|battlefield):teach(creature) untap
auto=@movedto(creature[shaman]|battlefield):may all(trigger[to]) retarget
auto={4}:equip
@@ -82473,7 +82453,7 @@ toughness=3
[card]
name=Trapfinder's Trick
target=player
auto=target(*|targetedpersonshand) 0/0
auto= name(see target hand)target(*|targetedpersonshand) 0/0
auto=all(trap|targetedpersonshand) reject
text=Target player reveals his or her hand and discards all Trap cards.
mana={1}{U}
@@ -85481,7 +85461,7 @@ name=Venser, the Sojourner
auto=counter(0/0,4,loyalty)
auto={C(0/0,2,Loyalty)}:(blink)ueot target(*|mybattlefield)
auto={C(0/0,-1,Loyalty)}:all(creature) unblockable ueot
auto={C(0/0,-8,Loyalty)}:name(emblem) emblem all(this) transforms((,newability[@movedto(*|mystack):choice target(*|battlefield) moveto(exile)])) forever dontremove
auto={C(0/0,-8,Loyalty)}:name(emblem) emblem transforms((,newability[@movedto(*|mystack):choice target(*|battlefield) moveto(exile)])) forever dontremove
text=+2: Exile target permanent you own. Return it to the battlefield under your control at the beginning of the next end step. -- -1: Creatures are unblockable this turn. -- -8: You get an emblem with "Whenever you cast a spell, exile target permanent."
mana={3}{W}{U}
type=Planeswalker
@@ -86903,7 +86883,7 @@ toughness=2
[card]
name=Voice of All
abilities=flying
auto=chooseacolor transforms((,newability[protection from(*[chosencolor]) chooseend])) forever chooseend
auto=chooseacolor transforms((,newability[protection from(*[chosencolor])],newability[0/0])) forever chooseend
text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- As Voice of All enters the battlefield, choose a color. -- Voice of All has protection from the chosen color. (It can't be blocked, targeted, dealt damage, or enchanted by anything of the chosen color.)
mana={2}{W}{W}
type=Creature
@@ -88932,6 +88912,7 @@ type=Creature
subtype=Human Soldier Assassin
power=3
toughness=2
[/card]
[card]
name=Wei Elite Companions
abilities=horsemanship
@@ -92072,7 +92053,7 @@ toughness=2
[card]
name=Zombie Apocalypse
auto=destroy all(human)
auto=moveTo(mybattlefield) all(creature[zombie]|mygraveyard) and!(tap)!
auto=all(creature[zombie]|mygraveyard) moveTo(mybattlefield) and!(tap)!
text=Return all Zombie creature cards from your graveyard to the battlefield tapped, then destroy all Humans.
mana={3}{B}{B}{B}
type=Sorcery

View File

@@ -13,6 +13,7 @@ manapool:{1}{G}
[PLAYER2]
[DO]
Sylvan Scrying
choice 0
Plains
[ASSERT]
firstmain

View File

@@ -1,3 +1,5 @@
build.major = 0
build.minor = 18
build.point = 5
#build.number.properties (normally this file is maintained by build.xml)
#Sun, 06 May 2012 11:56:35 -0700
build.major=0
build.minor=18
build.point=6

View File

@@ -13,17 +13,32 @@
<format property="TODAY" pattern="EEE, dd-MMM-yyyy HH::mm:ss" />
</tstamp>
<target name="setup.major" >
<target name="update.major" >
<echo message="incrementing Major Version number by 1" />
<!-- update the build.number.properties file -->
<propertyfile file="build.number.properties"
comment="build.number.properties (normally this file is maintained by build.xml)">
<entry key="build.major" type="int" default="0" operation="+" pattern="0" />
</propertyfile>
</target>
<target name="setup.minor" >
<target name="update.minor" >
<echo message="incrementing minor Version number by 1" />
<!-- update the build.number.properties file -->
<propertyfile file="build.number.properties"
comment="build.number.properties (normally this file is maintained by build.xml)">
<entry key="build.minor" type="int" default="00" operation="+" pattern="00" />
</propertyfile>
</target>
<target name="setup.point" >
<target name="update.point" >
<echo message="incrementing point Version number by 1" />
<!-- update the build.number.properties file -->
<propertyfile file="build.number.properties"
comment="build.number.properties (normally this file is maintained by build.xml)">
<entry key="build.point" type="int" default="0" operation="+" pattern="0" />
</propertyfile>
</target>
@@ -46,6 +61,10 @@
<echo file="${basedir}/include/Wagic_Version.h" >
/*
This file was auto-generated by ant build script on ${TODAY}
To make changes please edit the ant build script, otherwise your changes will be lost
Author: Michael Nguyen
*/
#ifndef wagic_Wagic_Version_h

View File

@@ -2378,7 +2378,7 @@ public:
int removed(MTGCardInstance * card)
{
if (abilities.find(card) != abilities.end())
if (abilities.find(card) != abilities.end() && !(forceDestroy == -1 && forcedAlive == 1))//only embelms have forcedestroy = -1 and forcedalive = 1
{
game->removeObserver(abilities[card]);
abilities.erase(card);
@@ -5095,6 +5095,8 @@ public:
{
if(forceDestroy != -1)
return 1;
if(!(source->hasType(Subtypes::TYPE_INSTANT)||source->hasType(Subtypes::TYPE_INSTANT)) && !source->isInPlay(game))
return 1;
return 0;
}

View File

@@ -1,6 +1,10 @@
/*
This file was auto-generated by ant build script on Fri, 20-Apr-2012 00::54:16
This file was auto-generated by ant build script on Sun, 06-May-2012 11::58:10
To make changes please edit the ant build script, otherwise your changes will be lost
Author: Michael Nguyen
*/
#ifndef wagic_Wagic_Version_h
@@ -9,7 +13,7 @@ This file was auto-generated by ant build script on Fri, 20-Apr-2012 00::54:16
/* Wagic versions */
#define WAGIC_VERSION_MAJOR 0
#define WAGIC_VERSION_MEDIUM 18
#define WAGIC_VERSION_MINOR 5
#define WAGIC_VERSION_MINOR 6
#define VERSION_DOT(a, b, c) a ##.## b ##.## c
#define VERSION_WITHOUT_DOT(a, b, c) a ## b ## c

View File

@@ -1641,6 +1641,7 @@ int AAFlip::resolve()
if(!fcard) return 0;
MTGCardInstance * myFlip = NEW MTGCardInstance(fcard, _target->controller()->game);
_target->name = myFlip->name;
_target->setName(myFlip->name);
_target->colors = myFlip->colors;
_target->types = myFlip->types;
_target->text = myFlip->text;
@@ -1925,10 +1926,11 @@ int AADynamic::resolve()
if(targetamount < 0)
targetamount = 0;
std::stringstream out;
std::stringstream out2;
out << sourceamount;
string sourceamountstring = out.str();
out << targetamount;
string targetamountstring = out.str();
out2 << targetamount;
string targetamountstring = out2.str();
//set values less then 0 to 0, it was reported that negitive numbers such as a creature who get -3/-3 having the power become
//negitive, if then used as the amount, would cuase weird side effects on resolves.
switch(effect)
@@ -1939,8 +1941,8 @@ int AADynamic::resolve()
activateMainAbility(mainAbility,source,tosrc == true?OriginalSrc:(MTGCardInstance*)_target);
if(eachother)
{
mainAbility = NEW AADamager(game, this->GetId(), source,tosrc == true?(Targetable*)OriginalSrc:(Targetable*)_target,targetamountstring);
activateMainAbility(mainAbility,source,tosrc == true?OriginalSrc:(MTGCardInstance*)_target);
mainAbility = NEW AADamager(game, this->GetId(), source,(Targetable*)OriginalSrc,targetamountstring);
activateMainAbility(mainAbility,source,OriginalSrc);
}
return 1;
break;
@@ -3848,9 +3850,13 @@ int ATransformer::destroy()
_target->addType(*it);
}
}
//in the case that we removed or added types to a card, so that it retains its original name when the effect is removed.
if(_target->model->data->name.size())//tokens don't have a model name.
_target->setName(_target->model->data->name.c_str());
////in the case that we removed or added types to a card, so that it retains its original name when the effect is removed.
//if(_target->model->data->name.size())//tokens don't have a model name.
// _target->setName(_target->model->data->name.c_str());
//edit: this ability shouldn't have to reset the name on a card becuase removing a subtype changes the name of a land.
//that should be handled in addType...not here.
//im sure commenting this out will reintroduce a bug somewhere but it needs to be handled correctly. furthermore, why does adding and removing a type touch the name of a card?
}
return 1;
}

View File

@@ -122,7 +122,7 @@ void GuiPlay::BattleField::reset(float x, float y)
}
void GuiPlay::BattleField::EnstackAttacker(CardView* card)
{
card->x = currentAttacker * (HORZWIDTH - 20) / (attackers + 1);
card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1));
card->y = baseY + (card->card->getObserver()->players[0] == card->card->controller() ? 20 + y : -20 - y);
++currentAttacker;
// JRenderer::GetInstance()->RenderQuad(WResourceManager::Instance()->GetQuad("BattleIcon"), card->actX, card->actY, 0, 0.5 + 0.1 * sinf(JGE::GetInstance()->GetTime()), 0.5 + 0.1 * sinf(JGE::GetInstance()->GetTime()));
@@ -159,7 +159,7 @@ void GuiPlay::BattleField::Update(float dt)
void GuiPlay::BattleField::Render()
{
if (height > 3)
JRenderer::GetInstance()->FillRect(22, SCREEN_HEIGHT / 2 + 10 - height / 2, 250, height, ARGB(127, red, 0, 0));
JRenderer::GetInstance()->FillRect(44, SCREEN_HEIGHT / 2 + 10 - height / 2, 318, height, ARGB(127, red, 0, 0));
}
GuiPlay::GuiPlay(GameObserver* game) :

View File

@@ -1318,7 +1318,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
if (!a1)
return NULL;
return NEW GenericAbilityMod(observer, 1, card,spell?spell->getNextDamageableTarget():(Damageable *) target, a1);;
return NEW GenericAbilityMod(observer, 1, card->controller()->getObserver()->ExtraRules,card->controller()->getObserver()->ExtraRules, a1);
}
//choose a color

View File

@@ -91,8 +91,9 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
//switch on the first letter. If two costs share their first letter, add an "if" within the switch
switch (value[0])
{
case 'X':
case 'x':
if(value == "x")
if(value == "x" || value == "X")
manaCost->x();
else
{

View File

@@ -147,6 +147,7 @@ void Rules::addExtraRules(GameObserver* g)
//Trick so that the abilities don't die;
g->ExtraRules[i].currentZone = p->game->inPlay;
g->ExtraRules[i].lastController = p;
g->ExtraRules[i].owner = p;
for (size_t j = 0; j < initState.playerData[i].extraRules.size(); ++j)
{
AbilityFactory af(g);

View File

@@ -526,19 +526,21 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
if(card && card->target)
{
cd->types = card->target->types;
//remove main types because we only care about subtypes here.
cd->removeType("artifact");
cd->removeType("land");
cd->removeType("enchantment");
cd->removeType("instant");
cd->removeType("sorcery");
cd->removeType("legendary");
cd->removeType("creature");
}
else
{
cd->types = card->types;
}
//remove main types because we only care about subtypes here.
cd->removeType("artifact");
cd->removeType("land");
cd->removeType("enchantment");
cd->removeType("instant");
cd->removeType("sorcery");
cd->removeType("legendary");
cd->removeType("creature");
cd->removeType("planeswalker");
cd->removeType("tribal");
cd->mode = CD_OR;
}
}

View File

@@ -0,0 +1,3 @@
include TODO
include README
recursive-include testdata *.properties

View File

@@ -0,0 +1,109 @@
Metadata-Version: 1.0
Name: pyjavaproperties
Version: 0.6
Summary: Python replacement for java.util.Properties.
Home-page: http://pypi.python.org/pypi/pyjavaproperties
Author: Jesse Noller
Author-email: jnoller@gmail.com
License: PSF License
Description: ================
pyjavaproperties
================
* Project hosting: <http://bitbucket.org/jnoller/pyjavaproperties/>
.. contents::
About
------------------
This is a "fork" of the "python replacement for java.util.Properties" recipe
on ASPN: <http://code.activestate.com/recipes/496795/> and uploaded by
Anand Balachandran Pillai.
The project is maintained by Jesse Noller <jnoller@gmail.com>, Anand Pilla
<abpillai@gmail.com>.
License
------------------
As with all ASPN recipes not otherwise licensed prior to July 15, 2008 on
aspn.activestate.com, the original recipe is under PSF License. For more
information, see the ASPN terms of service here:
<http://code.activestate.com/help/terms/>
While the licensing under the PSF license is sub-optimal, it is what it is. See
<http://docs.python.org/license.html> for more information about the PSF
license.
What this is
------------------
This module is designed to be a python equivalent to the `java.util.Properties <http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html>`_ class.
Currently, the basic input/output methods are supported, and there are plans
to add the XML input/output methods found in J2SE 5.0.
Fundamentally, this module is designed so that users can easily parse and
manipulate Java Properties files - that's it. There's a fair number of us
pythonistas who work in multi-language shops, and constantly writing your own
parsing mechanism is just painful. Not to mention Java guys are notoriously
unwilling to use anything which is cross-language for configuration, unless
it's XML, which is a form of self-punishment. :)
Plans
------------------
Here is a rough plan of features:
- Keep/maintain blank lines and comments found in the original file
- Make the module compatible with the new methods in J2SE 5.0
- Switch to/add python property access rather than direct dictionary get/set
- Add unit tests
- Add unicode support
- When-Pigs-Fly: If running within Jython, switch to java.util.Properties
under the hood
- Coercion/conversion to python types for values
Usage
------------------
This is the easy part::
from pyjavaproperties import Properties
p = Properties()
p.load(open('test2.properties'))
p.list()
print p
print p.items()
print p['name3']
p['name3'] = 'changed = value'
print p['name3']
p['new key'] = 'new value'
p.store(open('test2.properties','w'))
See also the Properties.list() method, which will return an iterator over the
property keys
Changes & News
--------------
0.4:
- Patch from Pepper Lebeck-Jobe for handling ! style comments.
0.3:
- Keys that are added which were not part of the original file
are simply appended to the index. Shenanigans.
0.2:
- Added an internal list (self._keyorder) to keep an ordered index of keys
as they are encountered, so the file can we written-back out in the
same order.
0.1:
- Initial release/fork.
- Added setup/packaging and doc
- added in {foo} style references for previous properties, thanks to N B
on ASPN.
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules

View File

@@ -0,0 +1,96 @@
================
pyjavaproperties
================
* Project hosting: <http://bitbucket.org/jnoller/pyjavaproperties/>
.. contents::
About
------------------
This is a "fork" of the "python replacement for java.util.Properties" recipe
on ASPN: <http://code.activestate.com/recipes/496795/> and uploaded by
Anand Balachandran Pillai.
The project is maintained by Jesse Noller <jnoller@gmail.com>, Anand Pilla
<abpillai@gmail.com>.
License
------------------
As with all ASPN recipes not otherwise licensed prior to July 15, 2008 on
aspn.activestate.com, the original recipe is under PSF License. For more
information, see the ASPN terms of service here:
<http://code.activestate.com/help/terms/>
While the licensing under the PSF license is sub-optimal, it is what it is. See
<http://docs.python.org/license.html> for more information about the PSF
license.
What this is
------------------
This module is designed to be a python equivalent to the `java.util.Properties <http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html>`_ class.
Currently, the basic input/output methods are supported, and there are plans
to add the XML input/output methods found in J2SE 5.0.
Fundamentally, this module is designed so that users can easily parse and
manipulate Java Properties files - that's it. There's a fair number of us
pythonistas who work in multi-language shops, and constantly writing your own
parsing mechanism is just painful. Not to mention Java guys are notoriously
unwilling to use anything which is cross-language for configuration, unless
it's XML, which is a form of self-punishment. :)
Plans
------------------
Here is a rough plan of features:
- Keep/maintain blank lines and comments found in the original file
- Make the module compatible with the new methods in J2SE 5.0
- Switch to/add python property access rather than direct dictionary get/set
- Add unit tests
- Add unicode support
- When-Pigs-Fly: If running within Jython, switch to java.util.Properties
under the hood
- Coercion/conversion to python types for values
Usage
------------------
This is the easy part::
from pyjavaproperties import Properties
p = Properties()
p.load(open('test2.properties'))
p.list()
print p
print p.items()
print p['name3']
p['name3'] = 'changed = value'
print p['name3']
p['new key'] = 'new value'
p.store(open('test2.properties','w'))
See also the Properties.list() method, which will return an iterator over the
property keys
Changes & News
--------------
0.4:
- Patch from Pepper Lebeck-Jobe for handling ! style comments.
0.3:
- Keys that are added which were not part of the original file
are simply appended to the index. Shenanigans.
0.2:
- Added an internal list (self._keyorder) to keep an ordered index of keys
as they are encountered, so the file can we written-back out in the
same order.
0.1:
- Initial release/fork.
- Added setup/packaging and doc
- added in {foo} style references for previous properties, thanks to N B
on ASPN.

View File

@@ -0,0 +1,5 @@
* Add PEP 8 interface, python properties.
* Add in unit tests
- Have to find some really offensive .properties files
* Switch to returning Unicode values
* Possible coercion to python types (on ints/etc)

View File

@@ -0,0 +1,109 @@
Metadata-Version: 1.0
Name: pyjavaproperties
Version: 0.6
Summary: Python replacement for java.util.Properties.
Home-page: http://pypi.python.org/pypi/pyjavaproperties
Author: Jesse Noller
Author-email: jnoller@gmail.com
License: PSF License
Description: ================
pyjavaproperties
================
* Project hosting: <http://bitbucket.org/jnoller/pyjavaproperties/>
.. contents::
About
------------------
This is a "fork" of the "python replacement for java.util.Properties" recipe
on ASPN: <http://code.activestate.com/recipes/496795/> and uploaded by
Anand Balachandran Pillai.
The project is maintained by Jesse Noller <jnoller@gmail.com>, Anand Pilla
<abpillai@gmail.com>.
License
------------------
As with all ASPN recipes not otherwise licensed prior to July 15, 2008 on
aspn.activestate.com, the original recipe is under PSF License. For more
information, see the ASPN terms of service here:
<http://code.activestate.com/help/terms/>
While the licensing under the PSF license is sub-optimal, it is what it is. See
<http://docs.python.org/license.html> for more information about the PSF
license.
What this is
------------------
This module is designed to be a python equivalent to the `java.util.Properties <http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html>`_ class.
Currently, the basic input/output methods are supported, and there are plans
to add the XML input/output methods found in J2SE 5.0.
Fundamentally, this module is designed so that users can easily parse and
manipulate Java Properties files - that's it. There's a fair number of us
pythonistas who work in multi-language shops, and constantly writing your own
parsing mechanism is just painful. Not to mention Java guys are notoriously
unwilling to use anything which is cross-language for configuration, unless
it's XML, which is a form of self-punishment. :)
Plans
------------------
Here is a rough plan of features:
- Keep/maintain blank lines and comments found in the original file
- Make the module compatible with the new methods in J2SE 5.0
- Switch to/add python property access rather than direct dictionary get/set
- Add unit tests
- Add unicode support
- When-Pigs-Fly: If running within Jython, switch to java.util.Properties
under the hood
- Coercion/conversion to python types for values
Usage
------------------
This is the easy part::
from pyjavaproperties import Properties
p = Properties()
p.load(open('test2.properties'))
p.list()
print p
print p.items()
print p['name3']
p['name3'] = 'changed = value'
print p['name3']
p['new key'] = 'new value'
p.store(open('test2.properties','w'))
See also the Properties.list() method, which will return an iterator over the
property keys
Changes & News
--------------
0.4:
- Patch from Pepper Lebeck-Jobe for handling ! style comments.
0.3:
- Keys that are added which were not part of the original file
are simply appended to the index. Shenanigans.
0.2:
- Added an internal list (self._keyorder) to keep an ordered index of keys
as they are encountered, so the file can we written-back out in the
same order.
0.1:
- Initial release/fork.
- Added setup/packaging and doc
- added in {foo} style references for previous properties, thanks to N B
on ASPN.
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules

View File

@@ -0,0 +1,11 @@
MANIFEST.in
README
TODO
setup.py
./pyjavaproperties.py
./pyjavaproperties_test.py
pyjavaproperties.egg-info/PKG-INFO
pyjavaproperties.egg-info/SOURCES.txt
pyjavaproperties.egg-info/dependency_links.txt
pyjavaproperties.egg-info/top_level.txt
testdata/complex.properties

View File

@@ -0,0 +1,2 @@
pyjavaproperties

View File

@@ -0,0 +1,331 @@
#! /usr/bin/env python
"""
A Python replacement for java.util.Properties class
This is modelled as closely as possible to the Java original.
Created - Anand B Pillai <abpillai@gmail.com>
"""
import sys,os
import re
import time
class IllegalArgumentException(Exception):
def __init__(self, lineno, msg):
self.lineno = lineno
self.msg = msg
def __str__(self):
s='Exception at line number %d => %s' % (self.lineno, self.msg)
return s
class Properties(object):
""" A Python replacement for java.util.Properties """
def __init__(self, props=None):
# Note: We don't take a default properties object
# as argument yet
# Dictionary of properties.
self._props = {}
# Dictionary of properties with 'pristine' keys
# This is used for dumping the properties to a file
# using the 'store' method
self._origprops = {}
self._keyorder = []
# Dictionary mapping keys from property
# dictionary to pristine dictionary
self._keymap = {}
self.othercharre = re.compile(r'(?<!\\)(\s*\=)|(?<!\\)(\s*\:)')
self.othercharre2 = re.compile(r'(\s*\=)|(\s*\:)')
self.bspacere = re.compile(r'\\(?!\s$)')
def __str__(self):
s='{'
for key,value in self._props.items():
s = ''.join((s,key,'=',value,', '))
s=''.join((s[:-2],'}'))
return s
def __parse(self, lines):
""" Parse a list of lines and create
an internal property dictionary """
# Every line in the file must consist of either a comment
# or a key-value pair. A key-value pair is a line consisting
# of a key which is a combination of non-white space characters
# The separator character between key-value pairs is a '=',
# ':' or a whitespace character not including the newline.
# If the '=' or ':' characters are found, in the line, even
# keys containing whitespace chars are allowed.
# A line with only a key according to the rules above is also
# fine. In such case, the value is considered as the empty string.
# In order to include characters '=' or ':' in a key or value,
# they have to be properly escaped using the backslash character.
# Some examples of valid key-value pairs:
#
# key value
# key=value
# key:value
# key value1,value2,value3
# key value1,value2,value3 \
# value4, value5
# key
# This key= this value
# key = value1 value2 value3
# Any line that starts with a '#' or '!' is considerered a comment
# and skipped. Also any trailing or preceding whitespaces
# are removed from the key/value.
# This is a line parser. It parses the
# contents like by line.
lineno=0
i = iter(lines)
for line in i:
lineno += 1
line = line.strip()
# Skip null lines
if not line: continue
# Skip lines which are comments
if line[0] in ('#','!'): continue
# Some flags
escaped=False
# Position of first separation char
sepidx = -1
# A flag for performing wspace re check
flag = 0
# Check for valid space separation
# First obtain the max index to which we
# can search.
m = self.othercharre.search(line)
if m:
first, last = m.span()
start, end = 0, first
flag = 1
wspacere = re.compile(r'(?<![\\\=\:])(\s)')
else:
if self.othercharre2.search(line):
# Check if either '=' or ':' is present
# in the line. If they are then it means
# they are preceded by a backslash.
# This means, we need to modify the
# wspacere a bit, not to look for
# : or = characters.
wspacere = re.compile(r'(?<![\\])(\s)')
start, end = 0, len(line)
m2 = wspacere.search(line, start, end)
if m2:
# print 'Space match=>',line
# Means we need to split by space.
first, last = m2.span()
sepidx = first
elif m:
# print 'Other match=>',line
# No matching wspace char found, need
# to split by either '=' or ':'
first, last = m.span()
sepidx = last - 1
# print line[sepidx]
# If the last character is a backslash
# it has to be preceded by a space in which
# case the next line is read as part of the
# same property
while line[-1] == '\\':
# Read next line
nextline = i.next()
nextline = nextline.strip()
lineno += 1
# This line will become part of the value
line = line[:-1] + nextline
# Now split to key,value according to separation char
if sepidx != -1:
key, value = line[:sepidx], line[sepidx+1:]
else:
key,value = line,''
self._keyorder.append(key)
self.processPair(key, value)
def processPair(self, key, value):
""" Process a (key, value) pair """
oldkey = key
oldvalue = value
# Create key intelligently
keyparts = self.bspacere.split(key)
# print keyparts
strippable = False
lastpart = keyparts[-1]
if lastpart.find('\\ ') != -1:
keyparts[-1] = lastpart.replace('\\','')
# If no backspace is found at the end, but empty
# space is found, strip it
elif lastpart and lastpart[-1] == ' ':
strippable = True
key = ''.join(keyparts)
if strippable:
key = key.strip()
oldkey = oldkey.strip()
oldvalue = self.unescape(oldvalue)
value = self.unescape(value)
# Patch from N B @ ActiveState
curlies = re.compile("{.+?}")
found = curlies.findall(value)
for f in found:
srcKey = f[1:-1]
if self._props.has_key(srcKey):
value = value.replace(f, self._props[srcKey], 1)
self._props[key] = value.strip()
# Check if an entry exists in pristine keys
if self._keymap.has_key(key):
oldkey = self._keymap.get(key)
self._origprops[oldkey] = oldvalue.strip()
else:
self._origprops[oldkey] = oldvalue.strip()
# Store entry in keymap
self._keymap[key] = oldkey
if key not in self._keyorder:
self._keyorder.append(key)
def escape(self, value):
# Java escapes the '=' and ':' in the value
# string with backslashes in the store method.
# So let us do the same.
newvalue = value.replace(':','\:')
newvalue = newvalue.replace('=','\=')
return newvalue
def unescape(self, value):
# Reverse of escape
newvalue = value.replace('\:',':')
newvalue = newvalue.replace('\=','=')
return newvalue
def load(self, stream):
""" Load properties from an open file stream """
# For the time being only accept file input streams
if type(stream) is not file:
raise TypeError,'Argument should be a file object!'
# Check for the opened mode
if stream.mode != 'r':
raise ValueError,'Stream should be opened in read-only mode!'
try:
lines = stream.readlines()
self.__parse(lines)
except IOError, e:
raise
def getProperty(self, key):
""" Return a property for the given key """
return self._props.get(key,'')
def setProperty(self, key, value):
""" Set the property for the given key """
if type(key) is str and type(value) is str:
self.processPair(key, value)
else:
raise TypeError,'both key and value should be strings!'
def propertyNames(self):
""" Return an iterator over all the keys of the property
dictionary, i.e the names of the properties """
return self._props.keys()
def list(self, out=sys.stdout):
""" Prints a listing of the properties to the
stream 'out' which defaults to the standard output """
out.write('-- listing properties --\n')
for key,value in self._props.items():
out.write(''.join((key,'=',value,'\n')))
def store(self, out, header=""):
""" Write the properties list to the stream 'out' along
with the optional 'header' """
if out.mode[0] != 'w':
raise ValueError,'Steam should be opened in write mode!'
try:
out.write(''.join(('#',header,'\n')))
# Write timestamp
tstamp = time.strftime('%a %b %d %H:%M:%S %Z %Y', time.localtime())
out.write(''.join(('#',tstamp,'\n')))
# Write properties from the pristine dictionary
for prop in self._keyorder:
if prop in self._origprops:
val = self._origprops[prop]
out.write(''.join((prop,'=',self.escape(val),'\n')))
out.close()
except IOError, e:
raise
def getPropertyDict(self):
return self._props
def __getitem__(self, name):
""" To support direct dictionary like access """
return self.getProperty(name)
def __setitem__(self, name, value):
""" To support direct dictionary like access """
self.setProperty(name, value)
def __getattr__(self, name):
""" For attributes not found in self, redirect
to the properties dictionary """
try:
return self.__dict__[name]
except KeyError:
if hasattr(self._props,name):
return getattr(self._props, name)
if __name__=="__main__":
p = Properties()
p.load(open('test2.properties'))
p.list()
print p
print p.items()
print p['name3']
p['name3'] = 'changed = value'
print p['name3']
p['new key'] = 'new value'
p.store(open('test2.properties','w'))

View File

@@ -0,0 +1,54 @@
#! /usr/bin/env python
"""Basic tests to ensure pyjavaproperties behaves like java.util.Properties.
Created - Pepper Lebeck-Jobe (eljobe@gmail.com)
"""
import os
import unittest
from pyjavaproperties import Properties
class PyJavaPropertiesTest(unittest.TestCase):
"""Tests pyjavaproperties complies to java.util.Properties contract."""
def setUp(self):
test_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'testdata')
self.properties_file = os.path.join(test_dir, 'complex.properties')
def testParsePropertiesInput(self):
properties = Properties()
properties.load(open(self.properties_file))
self.assertEquals(23, len(properties.items()))
self.assertEquals('Value00', properties['Key00'])
self.assertEquals('Value01', properties['Key01'])
self.assertEquals('Value02', properties['Key02'])
self.assertEquals('Value03', properties['Key03'])
self.assertEquals('Value04', properties['Key04'])
self.assertEquals('Value05a, Value05b, Value05c', properties['Key05'])
self.assertEquals('Value06a, Value06b, Value06c', properties['Key06'])
self.assertEquals('Value07b', properties['Key07'])
self.assertEquals(
'Value08a, Value08b, Value08c, Value08d, Value08e, Value08f',
properties['Key08'])
self.assertEquals(
'Value09a, Value09b, Value09c, Value09d, Value09e, Value09f',
properties['Key09'])
self.assertEquals('Value10', properties['Key10'])
self.assertEquals('', properties['Key11'])
self.assertEquals('Value12a, Value12b, Value12c', properties['Key12'])
self.assertEquals('Value13 With Spaces', properties['Key13'])
self.assertEquals('Value14 With Spaces', properties['Key14'])
self.assertEquals('Value15 With Spaces', properties['Key15'])
self.assertEquals('Value16', properties['Key16 With Spaces'])
self.assertEquals('Value17', properties['Key17 With Spaces'])
self.assertEquals('Value18 # Not a comment.', properties['Key18'])
self.assertEquals('Value19 ! Not a comment.', properties['Key19'])
self.assertEquals('Value20', properties['Key20=WithEquals'])
self.assertEquals('Value21', properties['Key21:WithColon'])
self.assertEquals('Value22', properties['Key22'])
if __name__ == '__main__':
unittest.main()

View File

@@ -0,0 +1,5 @@
[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0

View File

@@ -0,0 +1,35 @@
import os
import sys
try:
import ez_setup
ez_setup.use_setuptools()
except ImportError:
pass
from setuptools import setup
# Use a cute trick to include the rest-style docs as the long_description
# therefore having it self-doc'ed and hosted on pypi
f = open(os.path.join(os.path.dirname(__file__), 'README'))
long_description = f.read().strip()
f.close()
setup(
name='pyjavaproperties',
version='0.6',
author='Jesse Noller',
author_email = 'jnoller@gmail.com',
description = 'Python replacement for java.util.Properties.',
long_description = long_description,
url='http://pypi.python.org/pypi/pyjavaproperties',
license = 'PSF License',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
],
py_modules=['pyjavaproperties'],
packages=[''],
package_dir={'': '.'},
)

View File

@@ -0,0 +1,46 @@
# notKey00:notValue00 This is a comment and ignored.
! notKey01:notValue01 This is a comment and ignored.
# notKey02=notValue02 This is a comment and ignored.
! notKey03=notValue03 This is a comment and ignored.
Key00:Value00
Key01=Value01
Key02:Value02
Key03 : Value03
Key04 = Value04
Key05: Value05a, Value05b, Value05c
Key06 = Value06a, Value06b, Value06c
Key07 = Value07a
Key07 = Value07b
Key08: Value08a, Value08b, \
Value08c, Value08d, \
Value08e, Value08f
Key09 = Value09a, Value09b, \
Value09c, Value09d, \
Value09e, Value09f
# notKey04=notValue04 This is a comment and ignored.
Key10 Value10
! notKey05=notValue05 This is a comment and ignored.
Key11
Key12 Value12a, Value12b, Value12c
Key13:Value13 With Spaces
Key14=Value14 With Spaces
Key15 Value15 With Spaces
Key16\ With\ Spaces:Value16
Key17\ With\ Spaces=Value17
Key18 = Value18 # Not a comment.
Key19 : Value19 ! Not a comment.
Key20\=WithEquals = Value20
Key21\:WithColon : Value21
Key22 Value22