Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Restoration Angel
Moderator: CCGHQ Admins
Restoration Angel
by Nargrimm » 22 Oct 2012, 22:17
I've tried coding Restoration Angel and most of it is no problem as the basic functionalty is already there with Cloudshift. What I can't really find a way to work for is the non-Angel requirement. Does the engine allow for specific sub-types to be filtered out during the selection?
I have looked at a few cards which seemed similar in their target choosing but none of the ways they were coded seemed to work properly.
Does anyone have an idea how this could be implemented?
Maybe I'm just being stupid here.
Nargrimm
I have looked at a few cards which seemed similar in their target choosing but none of the ways they were coded seemed to work properly.
Does anyone have an idea how this could be implemented?
Maybe I'm just being stupid here.
Nargrimm
- Nargrimm
- Posts: 3
- Joined: 13 Sep 2012, 03:16
- Has thanked: 0 time
- Been thanked: 0 time
Re: Restoration Angel
by RiiakShiNal » 23 Oct 2012, 00:00
In the filter you set the sub-type as Angel then add an extra to the filter (FILTER_EXTRA_FLIP_SUB_TYPES). That will essentially make the filter choose anything but angels (choose non-angels).
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
Re: Restoration Angel
by BlindWillow » 23 Oct 2012, 06:10
Here's the target definition I use for her:
- Code: Select all
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_CREATURE )
filter:AddSubType( CREATURE_TYPE_ANGEL )
filter:AddExtra( FILTER_EXTRA_FLIP_SUB_TYPES )
filter:SetController( EffectController() )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ALLIED, EffectController() )
</TARGET_DEFINITION>
- BlindWillow
- Posts: 213
- Joined: 19 Jul 2012, 00:26
- Has thanked: 11 times
- Been thanked: 46 times
Re: Restoration Angel
by pcastellazzi » 23 Oct 2012, 13:13
You may find Restoration Angel and a few cards here. I try to keep the code updated and bug free as much as posible. If you have any problems please let me know.
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
— Ben Kuchera, Mordern Warfare 3 review.
-
pcastellazzi - Posts: 184
- Joined: 25 Apr 2012, 00:40
- Location: Montevideo, Uruguay
- Has thanked: 11 times
- Been thanked: 30 times
Re: Restoration Angel
by Nargrimm » 29 Oct 2012, 22:28
Thanks for the advice everyone, worked like a charm.
And thanks for that list pcastellazzi, I was actually looking for a few of these cards.
Nargrimm
And thanks for that list pcastellazzi, I was actually looking for a few of these cards.
Nargrimm
- Nargrimm
- Posts: 3
- Joined: 13 Sep 2012, 03:16
- Has thanked: 0 time
- Been thanked: 0 time
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 10 guests