Page 21 of 28

Re: Adding new cards with Groovy

PostPosted: 22 Mar 2014, 05:18
by hong yie
can this ability cost implemented in groovy code yet?
- tap an untapped creature
- tap <n> untapped <creature type>

Re: Adding new cards with Groovy

PostPosted: 22 Mar 2014, 09:18
by melvin
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

Re: Adding new cards with Groovy

PostPosted: 22 Mar 2014, 13:38
by melvin
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

Re: Adding new cards with Groovy

PostPosted: 26 Mar 2014, 22:14
by jerichopumpkin
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...

Re: Adding new cards with Groovy

PostPosted: 27 Mar 2014, 16:13
by ShawnieBoy
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.

Re: Adding new cards with Groovy

PostPosted: 27 Mar 2014, 16:26
by ShawnieBoy
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 :)

Re: Adding new cards with Groovy

PostPosted: 28 Mar 2014, 18:25
by frank
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)

Re: Adding new cards with Groovy

PostPosted: 28 Mar 2014, 20:26
by ShawnieBoy
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 :)

Re: Adding new cards with Groovy

PostPosted: 29 Mar 2014, 11:33
by hong yie
"Whenever a player cycles a card.." trigger
is available yet?

Re: Adding new cards with Groovy

PostPosted: 29 Mar 2014, 15:21
by ShawnieBoy
Unfortunately no :( I've been wanting to get the gempalms in for a while.

Re: Adding new cards with Groovy

PostPosted: 10 Apr 2014, 19:01
by ShawnieBoy
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.

Re: Adding new cards with Groovy

PostPosted: 10 Apr 2014, 19:55
by frank
coincidence :P

Re: Adding new cards with Groovy

PostPosted: 10 Apr 2014, 22:42
by frank
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

Re: Adding new cards with Groovy

PostPosted: 11 Apr 2014, 09:28
by frank
What's the difference between NEG_Target... POS_TARGET... and TARGET... ?

Re: Adding new cards with Groovy

PostPosted: 11 Apr 2014, 11:15
by ShawnieBoy
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 :)