Consolidation of Auras
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
2 posts
• Page 1 of 1
Consolidation of Auras
by 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?
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
by Sloth » 31 May 2011, 20:59
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.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?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 32 guests