Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Crucible of Worlds
Moderator: CCGHQ Admins
Crucible of Worlds
by gopher » 26 Mar 2013, 11:56
Hi People.
I'm trying to code Crucible of Worlds and it seems rather obvious to start from Future Sight code, but I cant' figure out which characteristic would permit to play lands from the graveyard.... Of course I've tried PLAY_LAND_FROM_GRAVEYARD and a couple of others syntaxes but without success.
There's also something like Sporoloth Ancient which grants an ability to filtered cards, but I find this kind of solution particularly heavy and inelegant.
Would someone have an idea ?
Many thanks in advance,
G.
I'm trying to code Crucible of Worlds and it seems rather obvious to start from Future Sight code, but I cant' figure out which characteristic would permit to play lands from the graveyard.... Of course I've tried PLAY_LAND_FROM_GRAVEYARD and a couple of others syntaxes but without success.
- Code: Select all
<CONTINUOUS_ACTION layer="8">
local player = Object():GetController()
if player ~= nil then
local top = player:Library_GetNth(0)
if top ~= nil then
player:GetCurrentCharacteristics():Bool_Set( PLAYER_CHARACTERISTIC_PLAY_WITH_TOP_CARD_OF_LIBRARY_REVEALED, 1 )
end
end
</CONTINUOUS_ACTION>
There's also something like Sporoloth Ancient which grants an ability to filtered cards, but I find this kind of solution particularly heavy and inelegant.
Would someone have an idea ?
Many thanks in advance,
G.
- gopher
- Posts: 11
- Joined: 17 Mar 2013, 08:41
- Has thanked: 0 time
- Been thanked: 0 time
Re: Crucible of Worlds
by thefiremind » 26 Mar 2013, 11:59
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Crucible of Worlds
by gopher » 26 Mar 2013, 12:32
Thanks for the quick answer, I should have used the forum's search engine more thoroughly. Sorry to always ask about functions that can't actually be implemented...thefiremind wrote:This is my progress about Crucible of Worlds:
viewtopic.php?f=64&t=4557&p=109340#p109340
G.
- gopher
- Posts: 11
- Joined: 17 Mar 2013, 08:41
- Has thanked: 0 time
- Been thanked: 0 time
Re: Crucible of Worlds
by thefiremind » 26 Mar 2013, 12:44
Always better asking rather than not: sometimes things that seem impossible to implement can be actually implemented (maybe with some degree of approximation) with the right idea.gopher wrote:Thanks for the quick answer, I should have used the forum's search engine more thoroughly. Sorry to always ask about functions that can't actually be implemented...
I forgot something: when you talked about Sporoloth Ancient, be aware that granting activated abilities works good only for cards on the battlefield. If you do that for cards in hand or in a graveyard, the text won't appear, so there will be nothing to click on (unless the card has a flavor text, in that case the flavor text will become clickable for that ability, which is really confusing and bad to see).
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Crucible of Worlds
by RiiakShiNal » 26 Mar 2013, 15:38
Additionally, be careful when granting mana abilities (even if only to cards on the battlefield). If you grant a mana ability from a card that does not have an active mana ability it will cause the game to crash. Joraga Treespeaker is a good example, at level 0 Joraga Treespeaker does not have a mana ability, but because of higher levels it can grant itself and/or other elves a mana ability. If the abilities are coded as MANA_ABILITY then it will cause the game to crash, if they are coded as ACTIVATED_ABILITY and use mana tokens then you don't have to worry about a crash (but you have the issue with Burning-Tree Shaman).thefiremind wrote:I forgot something: when you talked about Sporoloth Ancient, be aware that granting activated abilities works good only for cards on the battlefield. If you do that for cards in hand or in a graveyard, the text won't appear, so there will be nothing to click on (unless the card has a flavor text, in that case the flavor text will become clickable for that ability, which is really confusing and bad to see).
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 33 guests