Page 5 of 15

Re: Card wishlist

PostPosted: 28 Jun 2012, 04:01
by melvin
mecheng wrote:1. Can you put more code info in there. Like the codes for colors for instance. I looked at a few cards to figure it out, but might be nice to list. Also, on Mountain for instance mana=r4 but on your Bloodcrypt example, the mana was b3r3 - why 3 vs 4?
I'm not too sure about that field either, we'll do some research to figure out the meaning and add it to the docs. It is safe to assume that for dual lands it should be in the style of b3r3 (black or red). The color codes are w (white), u (blue), b (black), r (red), green (green).

mecheng wrote:2. How to get new cards into the game itself?
I was thinking I'd just add a txt file with my new script into the scripts folder and then when game loaded up, do a download for new image.
Except the game will not get past splash screen with new file added. But once I take file out and start again, it loads (but of course, no new card).
That's the correct steps. Unfortunately the card parser is rather strict on the format and would fail if something is not right. Normally we check the Magarena/crash.log file to figure out what is happening, you can also post it here and we can help you figure out the problem.

mecheng wrote:3. You mentioned to "post your scripts" - is there a forum for that already? If so, perhaps others have done what I am trying and it would be faster for all us to get that way.
Thanks for the reminder, the official thread for posting card script is viewtopic.php?f=82&t=5894

Re: Card wishlist

PostPosted: 28 Jun 2012, 17:06
by ubeefx
The mana property is used to determine the ease a permanent can produce mana of a certain color.
- r4 means it is very suitable to produce red mana, like a Mountain.
- r3 could be for instance : can easily produce red mana, but land comes into play tapped
- r2 could be for instance : the land deals 1 damage to you when producing red mana
- r1 could be for instance : a charge counter is removed to produce red mana
- r0 means it cannot produce red mana at all, but this is omitted.

In the deck generator, to determine if a land is suitable for your deck, the sum is calculated for all the colors of the profile. This sum must be larger than 4 in case of a land producing mana of multiple colors. Take for instance Vivid Crag : b1g1r3u1w1. That land will only be included in decks of profiles that have 3 colors and contain red.

Code: Select all
if (isLand()) {
            int source = 0;
            for (final MagicColor color : profile.getColors()) {
                source += getManaSource(color);
            }
            return source > 4;
}

Re: Card wishlist

PostPosted: 29 Jun 2012, 01:52
by mecheng
Thanks for the color code clarifications

Thanks for pointing out the fail log. By using that I found 2 errors. One typo and also since I was using an exiting card txt file in Notepad I didn't notice the extra carriage returns.
Moving to Word showed me the split line causing hte problem and now fixed the game works.

Thanks for the scripts submission forum link. I don't see anything there yet, but maybe I'll start it off.
Do we just paste in, or is there an attachment option?

Re: Card wishlist

PostPosted: 29 Jun 2012, 03:00
by melvin
Thanks for the clarifications, ubeefx. I've added it to the wiki at https://code.google.com/p/magarena/wiki/ManaProperty and linked it from the card scripting page.

For card script posting, it is best to upload an attachment. In the full post editor, there is an "Upload attachment" tab just below the text area, use that to upload your script.

Thanks for contributing your scripts, mecheng, and giving us feedback on the process. It has helped us to make it better.

Re: Card wishlist

PostPosted: 30 Jun 2012, 17:18
by mecheng
Been trying the scripting. So along those lines, perhaps you can tell me which Revised cards are scriptable that aren't already there. I made a list of Black cards as a start:

Animate Dead
Cursed Land
Deathgrip
Demonic Hordes
Demonic Tutor
Drain Life
El-Hajjaj
Erg Raiders
Frozen Shade
Howl From Beyond
Mind Twist
Nether Shadow
Nettling Imp
Paralyze
Pestilence
Plague Rats
Scavenging Ghoul
Sengir Vampire
Simulacrum
Sorceress Queen
Warp Artifact
Zombie Master

Thanks!

Re: Card wishlist

PostPosted: 01 Jul 2012, 02:22
by melvin
Scriptable cards are:
El-Hajjaj - ability=lifelink
Frozen Shade - ability=pump {B} +1/+1

Right now, our card script is fairly limited, only creatures with common abilities and some auras are scriptable. We have plans to allow scripting of instants and sorcery .

Re: Card wishlist

PostPosted: 01 Jul 2012, 17:55
by mecheng

Re: Card wishlist

PostPosted: 01 Jul 2012, 18:13
by mecheng
Cards with Banding ability? Or is this too hard to program?
A question related to that sort of as well. I was playing a game against AI and I attacked with 1 creature and it blocked with 2 creatures. No creature had Banding ability. Yet the AI decided the damage point split on his creatures, not me. Is this the way the rules work these days, or a bug? Back in the day, I would get to assign damage to his creatures (thus another fun part for Banding).
Thanks

Re: Card wishlist

PostPosted: 01 Jul 2012, 18:38
by Huggybaby
Magarena has always decided damage to itself (although I'd like to see this changed one day). It's against the rules, but it's not a bug, it's a design consideration, just like Magarena doesn't allow ties and leaves out some phases.

Re: Card wishlist

PostPosted: 02 Jul 2012, 16:14
by mecheng
Thanks for the note on AI creature damage assignment. Quite the advantage for the AI, but there you are.

more requests
Revised: White
Circle of Protection: all colors
Reverse Damage

Revised: Green
Aspect of Wolf
Fastbond
Force of Nature
Fungusaur
Gaea’s Liege
Ley Druid
Lifeforce
Lure
Regrowth
Stream of Life
Verduran Enchantress
Wanderlust
Wild Growth

In addition to the above requests (and blue before), can you verify if these are scriptable?
Phantom Monster
Northern Paladin
Savannah Lions
Cockatrice
Scryb Sprites
War Mammoth
Web

Re: Card wishlist

PostPosted: 02 Jul 2012, 16:25
by mecheng

Re: Card wishlist

PostPosted: 03 Jul 2012, 06:23
by melvin
mecheng wrote:Cards with Banding ability? Or is this too hard to program?
It is too complex both from an implementation POV and for the AI, the combat AI is not very good so we want to keep combat simple.

mecheng wrote:Thanks for the note on AI creature damage assignment. Quite the advantage for the AI, but there you are.
To add on to what Huggybaby mentioned, you can refer to https://code.google.com/p/magarena/wiki/GameRules for details on how combat damage is assigned and other differences with the paper card game. There is no unfair advantage for the AI, as the damage assignment is applied consistently for both players.

mecheng wrote:Revised, Blue
Control Magic - in 1.27
Phantom Monster - scriptable

Lord of Atlantis - implementable
Unstable Mutation - implementable
Animate Artifact - implementable
Lifetap - implementable
Phantasmal Forces - implementable
Pirate Ship - implementable
Psychic Venom - implementable
Serendib Efreet - implementable

Blue Elemental Blast - no support for modal spells
Stasis - no support for skipping steps
Copy Artifact - no support for copy permanent
Clone - no support for copy permanent
Vesuvan Doppelganger - no support for copy permanent
Volcanic Eruption - no support for multiple targets by design
Drain Power - no mana pool by design
Sleight of Mind - not supported
Magical Hack - not supported
Siren's Call - not supported

mecheng wrote:Revised: White
Circle of Protection: all colors - implementable
Reverse Damage - implementable

mecheng wrote:Revised: Green
Aspect of Wolf - implementable
Fastbond - implementable
Force of Nature - implementable
Fungusaur - implementable
Ley Druid - implementable
Lifeforce - implementable
Lure - not supported
Regrowth - implementable
Stream of Life - implementable
Verduran Enchantress - implementable
Wanderlust - implementable

Gaea’s Liege - no support for become forest
Wild Growth - no mana pool by design

mecheng wrote:In addition to the above requests (and blue before), can you verify if these are scriptable?
Phantom Monster - scriptable
Savannah Lions - scriptable
Scryb Sprites - scriptable
War Mammoth - scriptable
Web - scriptable

Cockatrice - implementable
Northern Paladin - implementable

mecheng wrote:Revised: Red
Atog - implementable
Dragon Whelp - implementable
Dwarven Warriors - implementable
Goblin King - implementable
Keldon Warlord - implementable
Orcish Oriflamme - implementable
Sedge Troll - implementable
Shatter - implementable

Manabarbs - no support for "whenever a player tap a land for mana"
Rock Hydra - no support for "activate this ability only during your upkeep"
Mana Flare - no mana pool by design

mecheng wrote:Revised: Artifact
Dragon Engine - scriptable, ability=pump {2} +1/+0

Aladdin’s Ring - implementable
Ankh of Mishra - implementable
Brass Man - implementable
Ivory Tower - implementable
Juggernaut - implementable
Millstone - implementable
Nevinyrral's Disk - implementable
Onulet - implementable
Rocket Launcher - implementable
Rod of Ruin - implementable

Winter Orb - not supported

mecheng wrote:In addition, wondering if the following are scriptable:
Granite Gargoyle - scriptable, ability=pump {R} +0/+1
Roc of Kher Ridges - scriptable

Sol Ring - no mana pool by design

Re: Card wishlist

PostPosted: 03 Jul 2012, 06:39
by Huggybaby
Cool, someone add Goblin King then please, and a deck that uses him.

Re: Card wishlist

PostPosted: 03 Jul 2012, 07:42
by melvin
We already have Goblin Chieftain, so I started from that and added Goblin King.

Re: Card wishlist

PostPosted: 03 Jul 2012, 19:00
by mecheng
Thanks for the quick and detailed replies. Loving this game.
I'm not sure I understand all the "no mana pool" things though. I can understand how playing Dark Ritual by itself might cause problems, but I don't understand Manaflare being a problem. That is, since Land already creates a mana pool, I don't see how doubling it is an issue. Now you can't tap Land without something else first, but that would still apply with Manaflare. I understand manaburn issues like Drain Power or Powersurge though.
And I'm wondering if some cards, like Dark Ritual and Sol Ring, could be used if they had a new sub-subtype. That is, you've clearly coded Land in a way such that we can only access it if something else is done, so could that code be applied to mana cards as well?

Duel - can we save in middle?
I'm having slow issues with the AI right now and I want to quit and save in middle, is that possible?