Card Contributions
by ubeefx
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
Re: Card Contributions
by melvin » 11 Aug 2012, 03:00
Note that the following cards will be in 1.29. Submitted by a. benedict balbuena via email to magarena@googlegroups.com
Order of the White Shield
Order of the Ebon Hand
Order of Leitbur
Knight of Stromgald
Boreal Druid
Savannah Lions
Order of the White Shield
Order of the Ebon Hand
Order of Leitbur
Knight of Stromgald
Boreal Druid
Savannah Lions
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Card Contributions
by downlink » 12 Aug 2012, 00:44
I started to make M13 Intrepid Hero, and discovered that "Tap: Destroy target creature with power 4 or greater" isn't a documented option for the card script. Could someone help me understand how to do this?
Thanks!
Thanks!
Re: Card Contributions
by melvin » 12 Aug 2012, 02:42
Hi downlink, welcome to the froum Unfortunately, Intrepid Hero's ability is not scriptable. However, it can be implemented in Java. I just put together the code and added it to the repo.downlink wrote:I started to make M13 Intrepid Hero, and discovered that "Tap: Destroy target creature with power 4 or greater" isn't a documented option for the card script. Could someone help me understand how to do this?
Thanks!
You can see what the code for that ability looks like at https://code.google.com/p/magarena/sour ... _Hero.java
What I did was to start from Visara the Dreadful's ability from and modify it based on the effect from Reprisal (remove "cannot be regenerated", replace MagicTargetChoice.NEG_TARGET_CREATURE with MagicTargetChoice.NEG_TARGET_CREATURE_POWER_4_OR_MORE).
What's missing is the Intrepid_Hero.txt card script containing the description of the card. If you have that file ready, I can add it to the repository and Intrepid Hero will be appearing in 1.29
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Card Contributions
by downlink » 12 Aug 2012, 16:56
Wow, amazing response time!
Thanks so much for programming this ability. This is my first attempt with a card (only started Magarena yesterday); could you please help me to understand what to put in the following locations where I've put "<?>" as a placeholder?
Thanks so much for programming this ability. This is my first attempt with a card (only started Magarena yesterday); could you please help me to understand what to put in the following locations where I've put "<?>" as a placeholder?
- Code: Select all
name=Intrepid Hero
url=http<>:<>//magiccards<>.<>info/m13/en/20.html
image=http<>:<>//magiccards<>.<>info/scans/en/m13/20.jpg
value=<?>
rarity=R
type=Creature
subtype=Human Soldier
cost={2}{W}
pt=1/1
ability=<?>
timing=<?>
- Attachments
-
- Intrepid_Hero_m13.txt
- (216 Bytes) Downloaded 316 times
Re: Card Contributions
by melvin » 13 Aug 2012, 07:10
In 1.28, "value" can be one of {1,2,3,4,5}. It represents how valuable is a particular card, most cards have a "value" of 3. In 1.29, "value" should be taken from Gatherer's community rating. As Intrepid Hero will be in 1.29, "value" should be set asdownlink wrote:Wow, amazing response time!
Thanks so much for programming this ability. This is my first attempt with a card (only started Magarena yesterday); could you please help me to understand what to put in the following locations where I've put "<?>" as a placeholder?
- Code: Select all
name=Intrepid Hero
url=http<>:<>//magiccards<>.<>info/m13/en/20.html
image=http<>:<>//magiccards<>.<>info/scans/en/m13/20.jpg
value=<?>
rarity=R
type=Creature
subtype=Human Soldier
cost={2}{W}
pt=1/1
ability=<?>
timing=<?>
- Code: Select all
value=4.122
"ability" is for keyword/scripted abilities, since Intrepid Hero's ability is not scripted, we can just leave this out.
"timing" is a hint for the AI to limit when it can cast this card. Typically it is
- Code: Select all
timing=main
Below is the completed code that can be loaded by 1.28 is as follows. Note that there should be a comma between the two subtypes, eg "Human,Soldier" instead of "Human Soldier".
- Code: Select all
name=Intrepid Hero
url=http://magiccards.info/m13/en/20.html
image=http://magiccards.info/scans/en/m13/20.jpg
value=3
rarity=R
type=Creature
subtype=Human,Soldier
cost={2}{W}
pt=1/1
timing=main
1) how value is set
2) added "requires_card_code" to the end of the script to trigger loading of the the Java code
- Code: Select all
name=Intrepid Hero
url=http://magiccards.info/m13/en/20.html
image=http://magiccards.info/scans/en/m13/20.jpg
value=4.122
rarity=R
type=Creature
subtype=Human,Soldier
cost={2}{W}
pt=1/1
timing=main
requires_card_code
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Card Contributions
by downlink » 13 Aug 2012, 12:18
Amazing work Melvin; I can't wait to contribute more M13 cards in the evenings. I really appreciate your help and explanations.
Top notch project!
Top notch project!
Re: Card Contributions
by spartan vi » 13 Aug 2012, 19:12
Here are the scriptable portions of Nefarox, Edge of the Divinity, and Geth's Verdict.
- Attachments
-
- Nefarox_Overlord_of_Grixis.txt
- (247 Bytes) Downloaded 317 times
-
- Edge_of_the_Divinity.txt
- (206 Bytes) Downloaded 314 times
-
- Geth_s_Verdict.txt
- (197 Bytes) Downloaded 309 times
-
spartan vi - Posts: 10
- Joined: 06 Aug 2012, 20:03
- Has thanked: 6 times
- Been thanked: 1 time
Re: Card Contributions
by Braullynn » 14 Aug 2012, 12:53
well... i don't know if was made right, more is a good card
- Attachments
-
- Arbor_Elf.txt
- (232 Bytes) Downloaded 352 times
Re: Card Contributions
by melvin » 14 Aug 2012, 13:45
Welcome to the forum, Braullynn Your script is spot on and functionally correct. I changed the "url" so that it is more consistent with other scripts and updated the "value" to use the new 1.29 card script format, which is just Gatherer's community rating. You can see the version I added to the game here https://code.google.com/p/magarena/sour ... or_Elf.txt
Thanks to spartan vi for contributing card scripts as well. Getting these contributions gives us additional motivation to put out the necessary code to get the card working.
All contributed scripts are currently placed in a separate folder in the repository. Once the card code is ready, the corresponding card script will be moved into the scripts folder.
Manage to spend some time during lunch today to put together the code for Angelic Benediction
Thanks to spartan vi for contributing card scripts as well. Getting these contributions gives us additional motivation to put out the necessary code to get the card working.
All contributed scripts are currently placed in a separate folder in the repository. Once the card code is ready, the corresponding card script will be moved into the scripts folder.
Manage to spend some time during lunch today to put together the code for Angelic Benediction
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Card Contributions
by Braullynn » 14 Aug 2012, 18:47
Thanks for your attention
a few more cards »» »
thanks melvin, and the mycoloth ability was edited
a few more cards »» »
thanks melvin, and the mycoloth ability was edited
- Attachments
-
- Mycoloth.txt
- (213 Bytes) Downloaded 318 times
-
- Doubling_Season.txt
- (185 Bytes) Downloaded 302 times
-
- Sarpadian_Empires_Vol._VII.txt
- (182 Bytes) Downloaded 314 times
Last edited by Braullynn on 15 Aug 2012, 12:33, edited 1 time in total.
Re: Card Contributions
by melvin » 15 Aug 2012, 02:03
Thanks, Braullynn. Some quick comments:
Mycoloth can be easily coded.
Doubling Season will need some extra hooks in the engine but should be possible and it will be fun to see tons of tokens/counters.
Sarpadian Empires, Vol. VII cannot be easily implemented as we don't have a good mechanism to associate arbitrary information with a card.
update 15/08/12: Mycoloth's first ability can be scripted as "ability=devour 2"
Mycoloth can be easily coded.
Doubling Season will need some extra hooks in the engine but should be possible and it will be fun to see tons of tokens/counters.
Sarpadian Empires, Vol. VII cannot be easily implemented as we don't have a good mechanism to associate arbitrary information with a card.
update 15/08/12: Mycoloth's first ability can be scripted as "ability=devour 2"
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Card Contributions
by Braullynn » 15 Aug 2012, 20:58
I'm happy to help in the contribution of this program version 1.29, even with so little.
new cards »»
new cards »»
- Attachments
-
- Psychotrope_Thallid.txt
- (201 Bytes) Downloaded 313 times
-
- Savage_Thallid.txt
- (199 Bytes) Downloaded 292 times
-
- Thallid.txt
- (188 Bytes) Downloaded 298 times
-
- Thallid_Germinator.txt
- (200 Bytes) Downloaded 287 times
-
- Thallid_Shell_Dweller.txt
- (221 Bytes) Downloaded 267 times
Re: Card Contributions
by Braullynn » 15 Aug 2012, 21:00
continued...
- Attachments
-
- Deathspore_Thallid.txt
- (207 Bytes) Downloaded 282 times
-
- Pendelhaven.txt
- (183 Bytes) Downloaded 280 times
Re: Card Contributions
by melvin » 16 Aug 2012, 06:29
Thanks, Braullynn, just added them to our repository. See https://code.google.com/p/magarena/source/list
Pendelhaven should be "type=Legendary,Land" instead of "type=Land". I've fixed it in the version I added to the repository.
One nice thing about the thallids is that the first two abilities are all the same, so it allow us to reuse the same piece of code.
Pendelhaven should be "type=Legendary,Land" instead of "type=Land". I've fixed it in the version I added to the repository.
One nice thing about the thallids is that the first two abilities are all the same, so it allow us to reuse the same piece of code.
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Card Contributions
by Braullynn » 18 Aug 2012, 01:37
New cards»»
- Attachments
-
- Verdant_Embrace.txt
- (235 Bytes) Downloaded 271 times
-
- Krenko_Mob Boss.txt
- (221 Bytes) Downloaded 264 times
-
- Grand_Abolisher.txt
- (208 Bytes) Downloaded 266 times
-
- Goblin_Matron.txt
- (195 Bytes) Downloaded 271 times
-
- Ambassador_Laquatus.txt
- (222 Bytes) Downloaded 275 times
Who is online
Users browsing this forum: No registered users and 9 guests