It is currently 19 Apr 2024, 18:42
   
Text Size

Card Contributions

Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins

Re: Card Contributions

Postby 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
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Card Contributions

Postby 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!
downlink
 
Posts: 6
Joined: 12 Aug 2012, 00:39
Has thanked: 0 time
Been thanked: 1 time

Re: Card Contributions

Postby melvin » 12 Aug 2012, 02:42

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!
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.

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 :D
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Card Contributions

Postby 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?

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 319 times
downlink
 
Posts: 6
Joined: 12 Aug 2012, 00:39
Has thanked: 0 time
Been thanked: 1 time

Re: Card Contributions

Postby melvin » 13 Aug 2012, 07:10

downlink 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=<?>
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 as
Code: Select all
value=4.122
Note that the above does not work in the Magarena 1.28, but it will work for the daily build

"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
for casting during one of the main phases. Other values of timing are explained in https://code.google.com/p/magarena/wiki ... ntingCards. For example, creatures with haste having "time=fmain", which limits the AI to casting it on the first main. This helps to reduce the number of choices the AI needs to consider.

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
For the yet to be released 1.29, I would use the following. The difference is
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
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Card Contributions

Postby 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!
downlink
 
Posts: 6
Joined: 12 Aug 2012, 00:39
Has thanked: 0 time
Been thanked: 1 time

Re: Card Contributions

Postby 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 319 times
Edge_of_the_Divinity.txt
(206 Bytes) Downloaded 318 times
Geth_s_Verdict.txt
(197 Bytes) Downloaded 312 times
User avatar
spartan vi
 
Posts: 10
Joined: 06 Aug 2012, 20:03
Has thanked: 6 times
Been thanked: 1 time

Re: Card Contributions

Postby 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 355 times
Braullynn
 
Posts: 7
Joined: 14 Aug 2012, 11:26
Has thanked: 1 time
Been thanked: 0 time

Re: Card Contributions

Postby 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 :)
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Card Contributions

Postby Braullynn » 14 Aug 2012, 18:47

Thanks for your attention :P

a few more cards »» »






thanks melvin, and the mycoloth ability was edited
Attachments
Mycoloth.txt
(213 Bytes) Downloaded 322 times
Doubling_Season.txt
(185 Bytes) Downloaded 305 times
Sarpadian_Empires_Vol._VII.txt
(182 Bytes) Downloaded 318 times
Last edited by Braullynn on 15 Aug 2012, 12:33, edited 1 time in total.
Braullynn
 
Posts: 7
Joined: 14 Aug 2012, 11:26
Has thanked: 1 time
Been thanked: 0 time

Re: Card Contributions

Postby 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"
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Card Contributions

Postby 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 »»
Attachments
Psychotrope_Thallid.txt
(201 Bytes) Downloaded 317 times
Savage_Thallid.txt
(199 Bytes) Downloaded 294 times
Thallid.txt
(188 Bytes) Downloaded 301 times
Thallid_Germinator.txt
(200 Bytes) Downloaded 290 times
Thallid_Shell_Dweller.txt
(221 Bytes) Downloaded 268 times
Braullynn
 
Posts: 7
Joined: 14 Aug 2012, 11:26
Has thanked: 1 time
Been thanked: 0 time

Re: Card Contributions

Postby Braullynn » 15 Aug 2012, 21:00

continued...
Attachments
Deathspore_Thallid.txt
(207 Bytes) Downloaded 284 times
Pendelhaven.txt
(183 Bytes) Downloaded 282 times
Braullynn
 
Posts: 7
Joined: 14 Aug 2012, 11:26
Has thanked: 1 time
Been thanked: 0 time

Re: Card Contributions

Postby 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.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Card Contributions

Postby Braullynn » 18 Aug 2012, 01:37

New cards»»
Attachments
Verdant_Embrace.txt
(235 Bytes) Downloaded 273 times
Krenko_Mob Boss.txt
(221 Bytes) Downloaded 266 times
Grand_Abolisher.txt
(208 Bytes) Downloaded 267 times
Goblin_Matron.txt
(195 Bytes) Downloaded 273 times
Ambassador_Laquatus.txt
(222 Bytes) Downloaded 277 times
Braullynn
 
Posts: 7
Joined: 14 Aug 2012, 11:26
Has thanked: 1 time
Been thanked: 0 time

PreviousNext

Return to Magarena

Who is online

Users browsing this forum: No registered users and 34 guests


Who is online

In total there are 34 users online :: 0 registered, 0 hidden and 34 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 34 guests

Login Form