It is currently 29 Oct 2025, 21:20
   
Text Size

Charming

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Charming

Postby Sloth » 06 Nov 2010, 10:48

I just wanted to mention that one of the features of the ability factory that Sol forecasted now "magicaly works": Charms.

Example:
Code: Select all
Name:Evolution Charm
ManaCost:1 G
Types:Instant
Text:no text
A:SP$Fetch|Cost$1 G|Destination$Hand|FetchType$Land.Basic|FetchNum$1|PrecostDesc$Choose one - |SpellDescription$Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library;
A:SP$Retrieve|Cost$1 G|TgtPrompt$Choose target creature card in your graveyard|ValidTgts$Creature|Destination$Hand|SpellDescription$or return target creature card from your graveyard to your hand;
A:SP$Pump|Cost$1 G|ValidTgts$Creature|KW$Flying|TgtPrompt$Select target creature|SpellDescription$or target creature gains flying until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/evolution_charm.jpg
End
¡muchas gracias Sol!
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Charming

Postby friarsol » 06 Nov 2010, 14:52

Hah. Rob did most of the work setting it up, it just seemed apparent that we'd be able to use it better than other forms of Abilities.

I'm not sure if we do this now, but we should probably change the AI code to grab all the SAs on all it's cards, filter all them down to the playable ones and then choose which one to play. This would allow them to play all of the abilities of Charms.

I'm not certain this doesn't happen now, but I recall that Funeral Charm had a restriction where the AI would only play the first choice.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Charming

Postby Rob Cashwalker » 06 Nov 2010, 15:04

But what doesn't work is AI for charms.

We could have done simple charms like this before with the keyword approach.

The magic of the ability factory is that it will provide the ability in a uniform manner to anybody who asks for one.
Therefore, I intended that a specific Charm Ability be created. It would link to SVar's containing the actual ability strings. Its AI would query each of the ability's AI function, then choose 1 (or 2) of any that return true. Its resolve method would call upon the resolve of the chosen ability.

Edit - Guess I took too long to type...
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 19 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 19 users online :: 0 registered, 0 hidden and 19 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 19 guests

Login Form