It is currently 23 May 2024, 19:34
   
Text Size

Magic Trick : Working out mana producing abilities

Moderator: CCGHQ Admins

Magic Trick : Working out mana producing abilities

Postby Yanna » 20 Jul 2010, 23:01

EDIT : 07-21-2010
- Updated the DLC with new mana-producing cards. Now the 'Crash-Test Deck' is playable by the AI.
- Mana count is no longer incorrect when casting spells.


Hi all !

I kept this until it would be significant to realease a test-DLC, and i hope you'll find it interesting.

If you want to skip the talking, here's the link to DLC_7778 : Updated ! http://www.mediafire.com/?a4d41d7qv9q1hu6

A little warning thought, it's still under dev and needs some fixing, so every idea is welcome to improve it.
I've tried for a long time to use tokens as 'mana lands', but the game can't understand that a token is not a creature :roll:
But then, loosing hope there was one last crazy test to be done, via a misleading named function.

PutTokensIntoPlay

Yeah right, you can put tokens into play good thing... But how about you try to create a non-token card instead ? As shocking as it is, you can 'spawn' any card you want, not just tokens :shock:
From this on, it was a matter of code-fixing and after many crashes here's the result :

Image

Image

How does it works :
- 5 new 'basic lands' are created as cards. They represents mana tokens.
- These lands have very special abilities :
=> can't be the target of spells or effects
=> removed from the game if they ever get tapped
=> removed from the game at the end of every step
=> cool pictures 8)
- You can spawn those lands via the allmighty PutTokensIntoPlay function, as a spell ability (thinking dark ritual ? or an activated ability, surely via triggers but i didn't test it).
- They act as lands, thought don't count towards your one land limit. You can also 'produce mana' at instant speed (see coded cards).

So if you find it interesting and want to give me a hand on fixing this, you're welcome ! Mana producing cards would completely change the options available and certainly add a nice bunch of good cards to the sets.

Until then, have fun and see ya later,

YannA a.k.a NOVA
Last edited by Yanna on 21 Jul 2010, 20:05, edited 5 times in total.
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: Magic Trick : Working out mana producing abilities

Postby Epiphany » 20 Jul 2010, 23:29

Wow. Amazing stuff.

I'm just heading off to bed, but will gladly test this tomorrow. Excellent thinking outside the box here! I love it.

I had an idea of using those sorts of effects to search your library for a land card, put it into play untapped, then return it to your library, but this beats that idea hands down! Well done!

:D
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Trick : Working out mana producing abilities

Postby Yanna » 20 Jul 2010, 23:58

Epiphany wrote:Wow. Amazing stuff.

I'm just heading off to bed, but will gladly test this tomorrow. Excellent thinking outside the box here! I love it.

I had an idea of using those sorts of effects to search your library for a land card, put it into play untapped, then return it to your library, but this beats that idea hands down! Well done!

:D
Thanks and glad you liked it ^^

The function could be used for other purpose than mana generating, since you can 'spwan' anything.
Cunning wish ? well if you could name a card yeah [-X

Btw, i found out what seems to be the cause of the wrong mana spent :
It's related to the trigger that removes the 'mana' when it is tapped. Maybe a bad layer number or something else... but definetely it pays the cost correctly when this ability is removed.
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: Magic Trick : Working out mana producing abilities

Postby Uresti » 21 Jul 2010, 02:23

excellent work! mana tokens was the first idea that came from SA forums but your surely its the best implemented! jow what if we could use MC_COLOUR to choose what color of mana we need..or if theres a way to use MC_MANA that its on the EXE... anyways Good work!
PS Sorry if i wasnt too optimist
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Trick : Working out mana producing abilities

Postby Epiphany » 21 Jul 2010, 07:09

One thing that immediately springs to mind:

Perhaps it's also possible to have the land tokens deal one damage to you if it leaves play untapped? To represent mana burn.
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Trick : Working out mana producing abilities

Postby Huggybaby » 21 Jul 2010, 18:31

Mana burn is no longer in the rules.
User avatar
Huggybaby
Administrator
 
Posts: 3207
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 702 times
Been thanked: 595 times

Re: Magic Trick : Working out mana producing abilities

Postby Yanna » 21 Jul 2010, 19:41

Bump for the Updated DLC :lol:

Cards now included for test purposes :

- Llanowar Elves
- Ebon Stronghold
- Havenwood Battlegrounds
- Golgari Rot Farm
- Mox Jet
- Mox Emerald
- Sacrifice
- Dark Ritual
- Black Lotus

Plus the deck should be a little more fun to play, and the AI, while taking a bit more time to play, sucessfully understands that it can speed up the game with mana-producing abilities ^^

As for the Mana Burn, the one concern i had in mind (thus not including the damage for unspent mana) is that you can't control what mana is going to be tapped. If it's one of your lands instead of the produced mana, you're pretty screwed...
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: Magic Trick : Working out mana producing abilities

Postby Yanna » 21 Jul 2010, 20:12

Uresti wrote:now what if we could use MC_COLOUR to choose what color of mana we need..or if theres a way to use MC_MANA that its on the EXE...
Nice idea indeed, i'll take a look at it. Especially when it comes to dual lands.
Btw, have you got any idea on how the AI can pick up a colour ? it doesn't make any choice for example when a blacklotus is in play (and it could burn it to play a spell).

Uresti wrote:PS Sorry if i wasnt too optimist
No problem mate ^^
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: Magic Trick : Working out mana producing abilities

Postby Epiphany » 22 Jul 2010, 07:15

Huggybaby wrote:Mana burn is no longer in the rules.
Wow, shows how out of touch I am! :D
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Trick : Working out mana producing abilities

Postby kevlahnota » 23 Jul 2010, 02:52

add mana burn effect. please check the code if it works for you(example of black mana token below):

<?xml version="1.0"?>
<MULTICARDS>
<CARD>

<!--
///////////////////////////////////////////////////////////////////////////////////

CARD INFORMATIONS

///////////////////////////////////////////////////////////////////////////////////
-->

<FILENAME text = "_BLACK_MANA_Token" />
<ARTID value = "77789999" />

<TITLE text = "_COMMON_BLANKLINE" />
<TYPE metaname = "Land" />
<SUB_TYPE metaname = "Swamp" />
<SUPERTYPE metaname = "Basic"/>
<COLOR value = "C" />
<FRAMECOLOUR name = "_MANATOKEN_B" />

<EXPANSION metaname = "NOVATEST" />
<ARTIST name = "NOVA 2010" />

<!--
///////////////////////////////////////////////////////////////////////////////////

START OF CARD ABILITIES

///////////////////////////////////////////////////////////////////////////////////
-->

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<TRIGGERED_ABILITY layer="8" internal="1" pre_trigger="1">

<TRIGGER value="CARD_CONSIDERED_FOR_TARGETTING">
return SelfTriggered()
</TRIGGER>

</TRIGGERED_ABILITY>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<TRIGGERED_ABILITY internal="1" auto_skip="1" layer="8">

<TRIGGER value="END_OF_STEP">
return true
</TRIGGER>

<EFFECT>
if Object():Tapped() == 0 then
Object():RemoveFromGame()
YouGainLife( -1 )
else
Object():RemoveFromGame()
end
</EFFECT>


</TRIGGERED_ABILITY>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<!--
///////////////////////////////////////////////////////////////////////////////////

END OF CARD ABILITIES

///////////////////////////////////////////////////////////////////////////////////
-->

</CARD>
</MULTICARDS>
User avatar
kevlahnota
Programmer
 
Posts: 825
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 14 times
Been thanked: 264 times

Re: Magic Trick : Working out mana producing abilities

Postby Marek14 » 23 Jul 2010, 08:34

But there IS no mana burn!
Marek14
Tester
 
Posts: 2763
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Magic Trick : Working out mana producing abilities

Postby kevlahnota » 23 Jul 2010, 08:45

Marek14 wrote:But there IS no mana burn!
i see, i'm an old mtg player and i checked that they removed the mana burn rule. oh well...
User avatar
kevlahnota
Programmer
 
Posts: 825
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 14 times
Been thanked: 264 times

Re: Magic Trick : Working out mana producing abilities

Postby whismer » 27 Jul 2010, 19:50

I try to code Pyretic Ritual the way you do Dark Ritual but in game, it doesn'T do anything except going to graveyard...

DOes I need to do a file manipulation like put RED_MANA token in my rep/CARDS?


Whismer


EDIT : It'S work if you add to the functions.LUA in 7778 expansion the other MANA TOKEN (only black and green for now)
whismer
 
Posts: 64
Joined: 23 Jul 2010, 02:36
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Trick : Working out mana producing abilities

Postby Yanna » 27 Jul 2010, 22:36

whismer wrote: EDIT : It'S work if you add to the functions.LUA in 7778 expansion the other MANA TOKEN (only black and green for now)
Yes indeed, it was more of a test version than a real one.
In my next release every ProduceXMana is included ^^

Glad you found it :)
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: Magic Trick : Working out mana producing abilities

Postby logoliv » 28 Jul 2010, 13:05

nice idea Yanna :)
perhaps we need to make these mana tokens invisible to be more correct : lands are permanents and generate mana, so it's visually strange that mana appears nearby lands, and get tapped like permanents... I will try to set an empty framecolor and no artid to see.
User avatar
logoliv
 
Posts: 130
Joined: 26 Jul 2010, 11:15
Has thanked: 4 times
Been thanked: 1 time

Next

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 5 guests

cron

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 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 5 guests

Login Form