Defined AbilityHost for granted abilities
I'm trying to add the support to allow Defined to call the original card granting an ability (specifically for Rakdos Riteknife). My first attempt was a dismal failure that added the source card to a RememberedHost list on the target of an attach AF if the params contained RememberHost$True and could be called via Defined$AbHost. That bit worked but if two Riteknives were on the card it caused problems because the remembered objects weren't actually linked to the ability.
So onto attempt route 2: I now know I'm in way over my head with this but its been fun trying so far, so I just want to see if I'm pointing in the right direction before I go any further. The way I can see it working properly follows this logic:
- in StaticAbilityContinuous where abilities are granted, an additional line/block needs to be added that sets the hostCard as AbHost for the spell ability. Something along the lines of this just before the sa is actually added to the affectedCard:
It just doesn't seem to work. I don't know whether it's just completely wrong or if I've made a stupid mistake. I've attached a patch in case anyone has the time to have a look.
So onto attempt route 2: I now know I'm in way over my head with this but its been fun trying so far, so I just want to see if I'm pointing in the right direction before I go any further. The way I can see it working properly follows this logic:
- in StaticAbilityContinuous where abilities are granted, an additional line/block needs to be added that sets the hostCard as AbHost for the spell ability. Something along the lines of this just before the sa is actually added to the affectedCard:
- Code: Select all
sa.setAbHost(hostCard);
It just doesn't seem to work. I don't know whether it's just completely wrong or if I've made a stupid mistake. I've attached a patch in case anyone has the time to have a look.
