It is currently 27 Aug 2025, 19:42
   
Text Size

Consolidation of Auras

Post MTG Forge Related Programming Questions Here

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

Consolidation of Auras

Postby friarsol » 30 May 2011, 23:39

Recently, I added a Spell_Permanent constructor that takes Cost and Target as parameters just like in SpellAbility. I think we should take this opportunity to consolidate all of the Auras to use the same structure, which can be used in: A) initial Targeting, B) checking legality of attachment, and C) Auras coming into play via an AF_ChangeZone or similar Effect.

The way I was picturing to do this would to be similar how we do Static Effects, but if there's a better suggestion that's fine too.

The structure might look something like this:
K:Enchant:<ValidTgt>:<Description>:<Curse>

So the first slot would be filled into Target (and also used in situations B/C). The second slot would be how it was displayed in the Detail Panel, and if the last slot is Curse, than the AI would cast them on Human's Permanents instead of its own.

I know most of the logic for casting Auras is in enPump, so we would need enPump to actually parse a different keyword, but I think that's ok. Any thoughts?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Consolidation of Auras

Postby Sloth » 31 May 2011, 20:59

friarsol wrote:Recently, I added a Spell_Permanent constructor that takes Cost and Target as parameters just like in SpellAbility. I think we should take this opportunity to consolidate all of the Auras to use the same structure, which can be used in: A) initial Targeting, B) checking legality of attachment, and C) Auras coming into play via an AF_ChangeZone or similar Effect.

The way I was picturing to do this would to be similar how we do Static Effects, but if there's a better suggestion that's fine too.

The structure might look something like this:
K:Enchant:<ValidTgt>:<Description>:<Curse>

So the first slot would be filled into Target (and also used in situations B/C). The second slot would be how it was displayed in the Detail Panel, and if the last slot is Curse, than the AI would cast them on Human's Permanents instead of its own.

I know most of the logic for casting Auras is in enPump, so we would need enPump to actually parse a different keyword, but I think that's ok. Any thoughts?
I think we only need K:Enchant:<ValidTgt>:<Description>:<Curse>, everything else can be taken care of by stPumpEnchanted and enPump could be removed entirely.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 38 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 38 users online :: 0 registered, 0 hidden and 38 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 38 guests

Login Form