It is currently 24 Apr 2024, 00:51
   
Text Size

Restoration Angel

Moderator: CCGHQ Admins

Restoration Angel

Postby 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
Nargrimm
 
Posts: 3
Joined: 13 Sep 2012, 03:16
Has thanked: 0 time
Been thanked: 0 time

Re: Restoration Angel

Postby 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).
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Restoration Angel

Postby 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

Postby 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.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: Restoration Angel

Postby 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
Nargrimm
 
Posts: 3
Joined: 13 Sep 2012, 03:16
Has thanked: 0 time
Been thanked: 0 time


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 10 guests


Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 10 guests

Login Form