It is currently 19 Jul 2025, 22:35
   
Text Size

Adding new cards with Groovy

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

Re: Adding new cards with Groovy

Postby hong yie » 22 Mar 2014, 05:18

can this ability cost implemented in groovy code yet?
- tap an untapped creature
- tap <n> untapped <creature type>
User avatar
hong yie
Programmer
 
Posts: 216
Joined: 10 Mar 2013, 06:44
Location: Jakarta
Has thanked: 75 times
Been thanked: 9 times

Re: Adding new cards with Groovy

Postby melvin » 22 Mar 2014, 09:18

hong yie wrote:can this ability cost implemented in groovy code yet?
- tap an untapped creature
- tap <n> untapped <creature type>
"Tap an untapped creature you control" has been implemented for next release. The later will have to wait till we integrate cost parsing with effect parsing.

Image

Magarena/scripts/Bramblesnap.txt
Code: Select all
name=Bramblesnap
url=http://magiccards.info/query?q=%21bramblesnap
image=http://mtgimage.com/card/bramblesnap.jpg
value=3.723
rarity=U
type=Creature
subtype=Elemental
cost={1}{G}
pt=1/1
ability=trample;\
        cost Tap an untapped creature you control: SN gets +1/+1 until end of turn.
timing=main
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Adding new cards with Groovy

Postby melvin » 22 Mar 2014, 13:38

Uses 'Sacrifice another creature' cost that is supported in the next release.

Image

Magarena/scripts/Corpse_Blockade.txt
Code: Select all
name=Corpse Blockade
url=http://magiccards.info/query?q=%21corpse%20blockade
image=http://mtgimage.com/card/corpse%20blockade.jpg
value=3.723
rarity=C
type=Creature
subtype=Zombie
cost={2}{B}
pt=1/4
ability=defender;\
        cost Sacrifice another creature: SN gains deathtouch until end of turn.
timing=main
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Adding new cards with Groovy

Postby jerichopumpkin » 26 Mar 2014, 22:14

I was wondering, which enchantment subtypes are missing right now?
I think World Enchantment is not supported, but what about Auras targeting a player? Because I would like to script Curses and World Enchantments if possible...
jerichopumpkin
 
Posts: 212
Joined: 12 Sep 2013, 11:21
Has thanked: 19 times
Been thanked: 13 times

Re: Adding new cards with Groovy

Postby ShawnieBoy » 27 Mar 2014, 16:13

Both of them are missing right now, but I could see World Enchantments being implemented. Slight variation on the Legendary rule. I'll have a look.
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Adding new cards with Groovy

Postby ShawnieBoy » 27 Mar 2014, 16:26

Oh, ok then - The World rule is already in there. Go for it :)

The main part of Enchant Player is there, just needs to actually hit the battlefield instead of being literally attached to the player :)
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Adding new cards with Groovy

Postby frank » 28 Mar 2014, 18:25

and here I thought, Enchant Player was a post-it like attachement to player's forehead... glad you made that one clear :P

oh, I loved unglued... Bureaucracy - best card ever! (which isn't an Enchant Player... but Volrath's Motion Sensor is. But less fun)
frank
 
Posts: 46
Joined: 24 Mar 2014, 00:59
Has thanked: 8 times
Been thanked: 2 times

Re: Adding new cards with Groovy

Postby ShawnieBoy » 28 Mar 2014, 20:26

frank wrote:and here I thought, Enchant Player was a post-it like attachement to player's forehead... glad you made that one clear :P

oh, I loved unglued... Bureaucracy - best card ever! (which isn't an Enchant Player... but Volrath's Motion Sensor is. But less fun)
I'm a big fan of unglued too Volrath's Motion Sensor, Handcuffs and Deadhead was my favourite :)
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Adding new cards with Groovy

Postby hong yie » 29 Mar 2014, 11:33

"Whenever a player cycles a card.." trigger
is available yet?
User avatar
hong yie
Programmer
 
Posts: 216
Joined: 10 Mar 2013, 06:44
Location: Jakarta
Has thanked: 75 times
Been thanked: 9 times

Re: Adding new cards with Groovy

Postby ShawnieBoy » 29 Mar 2014, 15:21

Unfortunately no :( I've been wanting to get the gempalms in for a while.
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Adding new cards with Groovy

Postby ShawnieBoy » 10 Apr 2014, 19:01

The next release will allow you to do such wonders as this :)

Image

Magarena/scripts/Paleoloth.txt
Code: Select all
name=Paleoloth
url=http://www.magiccards.info/query?q=%21paleoloth
image=http://mtgimage.com/card/paleoloth.jpg
value=3.046
rarity=R
type=Creature
subtype=Beast
cost={4}{G}{G}
pt=5/5
ability=Whenever another creature with power 5 or greater enters the battlefield under your control, you may return target creature card from your graveyard to your hand.
timing=main
Yes, you're reading that right.
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Adding new cards with Groovy

Postby frank » 10 Apr 2014, 19:55

coincidence :P
frank
 
Posts: 46
Joined: 24 Mar 2014, 00:59
Has thanked: 8 times
Been thanked: 2 times

Re: Adding new cards with Groovy

Postby frank » 10 Apr 2014, 22:42

I'd say quite impressive. Congratulations.

say, is there a way to remove a type from a permanent? Like, taking the artifact away from an artifact creature?

edit: ah nevermind.

return flags^MagicType.Artifact.getMask();

did the trick
frank
 
Posts: 46
Joined: 24 Mar 2014, 00:59
Has thanked: 8 times
Been thanked: 2 times

Re: Adding new cards with Groovy

Postby frank » 11 Apr 2014, 09:28

What's the difference between NEG_Target... POS_TARGET... and TARGET... ?
frank
 
Posts: 46
Joined: 24 Mar 2014, 00:59
Has thanked: 8 times
Been thanked: 2 times

Re: Adding new cards with Groovy

Postby ShawnieBoy » 11 Apr 2014, 11:15

frank wrote:What's the difference between NEG_Target... POS_TARGET... and TARGET... ?
They are hints for the AI. Some spells/effects can target any permanent but have an effect that can be viewed as Positive or Negative.

So for example 'Destroy target Elf' would be NEG_TARGET_ELF
But 'Destroy target Elf you don't control' would be TARGET_ELF_OPPONENT_CONTROLS
(Don't use these, they're just for example)

These are mainly seen on enchantments, so "You gain enchanted <whatever>" would need a Neg_Target hint, otherwise the AI might target it's own permanents.

Essentially NEG_TARGET will only target opponents permanents, POS_TARGET will only target players permanents, and TARGET will target either.

Normally these have no effect for the Player, they are only for the AI, unless the 'Remove unusual target choices.' option is selected in the Settings (which I think may be default, but I always remove it). Then the targeting hints are enforced on the player as well.

Hope that makes sense :)
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

PreviousNext

Return to Magarena

Who is online

Users browsing this forum: No registered users and 0 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 0 guests

Login Form