Page 174 of 253

Re: Community Wad

PostPosted: 22 Jan 2017, 10:51
by Splinterverse
A couple questions about coding and AI . . .

I was playing a game yesterday, and the AI played three copies of Browbeat in a row, which is fine, but it then chose to take the 5 damage each time. I think it would be helpful to add something to this card that overrides the AI's choice if the player is AI and is on the same team as the Effect Controller. I've never added anything like this to a card, is that something we should do? (Willing to do it, just wanted to make sure it wasn't frowned upon).

Also, I'm wondering if we should add something to cards like Mutavault or vehicles to instruct the AI not to activate the creature ability when the card is tapped. I see that frequently and it's a waste of mana for them. With the vehicles, it also taps out their creatures. I'm happy to do it and/or proliferate the code.

Re: Community Wad

PostPosted: 22 Jan 2017, 13:46
by Splinterverse
I have completed my work to update mana-producing artifacts, enchantments, and creatures. See the second post at viewtopic.php?f=109&t=20023 for more info.

Re: Community Wad

PostPosted: 22 Jan 2017, 18:11
by Xander9009
Yeah, those both sound fine. For Mutavault and the vehicles, just an availability block with "return EffectController():IsHuman() or EffectSource():IsTapped() == false" should do it.

I'll update Browbeat if you'd like. Otherwise, go for it. Helping the AI isn't frowned upon. It tends to do relatively well, but often needs reined in a bit.

Re: Community Wad

PostPosted: 22 Jan 2017, 18:24
by Splinterverse
Xander9009 wrote:Yeah, those both sound fine. For Mutavault and the vehicles, just an availability block with "return EffectController():IsHuman() or EffectSource():IsTapped() == false" should do it.

I'll update Browbeat if you'd like. Otherwise, go for it. Helping the AI isn't frowned upon. It tends to do relatively well, but often needs reined in a bit.
Cool. I'll add the man land/vehicle availability block to my to-do list (likely done within the next week or so).

I'll leave Browbeat to you so that I can learn from how you did it.

Also, a bug to report: Chandra, Torch of Defiance does not do damage to opponent's if you don't cast the card pulled on her first ability. I looked at the code and couldn't figure out where the problem is.

Re: Community Wad

PostPosted: 22 Jan 2017, 18:32
by Xander9009
Browbeat will be pretty simple. Basically exactly what you said. Just have to use that condition in the multiple choice RTA to disable the query, and then in the processing RTA to force a result.

EDIT: Well, it's apparently a repeating action, so it's the same RTA, but the idea remains. It's updated. It may need tested to be certain.

Re: Community Wad

PostPosted: 22 Jan 2017, 19:01
by Parabolic
Wanted to mention that Reap had an error. It would only let you return two cards at most (never bothered to check if it only ever 2 cards)

I changed it in my copy of the WAD and it appears to be working.

Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
   <FILENAME text="REAP_CW_4781" />
   <CARDNAME text="REAP" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Reap]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="4781" />
   <ARTID value="REAP" />
   <ARTIST name="Ron Chironna" />
   <CASTING_COST cost="{1}{G}" />
   <FLAVOURTEXT>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
   </FLAVOURTEXT>
   <TYPE metaname="Instant" />
   <EXPANSION value="TE" />
   <RARITY metaname="U" />
    <SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <TARGET tag="SPL_CARD_QUERY_CHOOSE_OPPONENT" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:SetFilterType(FILTER_TYPE_PLAYERS)
         filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
      </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
         local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
         local filter = ClearFilter()
         filter:Add( FE_COLOUR, OP_IS, COLOUR_BLACK )
         filter:Add( FE_CONTROLLER, OP_IS, target_player )
         local subfilter = filter:AddSubFilter_Or()
         subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
         subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
         subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
         CW_Filter_AddEnchantments(subfilter)
         CW_Filter_AddPlaneswalkers(subfilter)
         local count = filter:Count()
         filter = ClearFilter()
         filter:SetZone(ZONE_GRAVEYARD, EffectController())
         EffectController():SetItemCount(count)
         if filter:CountStopAt(1) == 1 then
            for i = 0,(count-1) do
               EffectController():SetItemPrompt (i, "SPL_CARD_QUERY_CHOOSE_A_CARD_TO_PUT_INTO_YOUR_HAND" )
            end
            EffectController():ChooseItems( EffectDC():Make_Targets(1) )
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local targets = EffectDC():Get_Targets(1)
         local count = targets:Count()
         local player = EffectController()
         if player ~= nil then
            for i = 0,(count-1) do
               local target_card = EffectDC():Get_Targets(1):Get_CardPtr(i)
               if target_card ~= nil  then
                  target_card:PutInHand()
               end
            end
         end
      </RESOLUTION_TIME_ACTION>
   </SPELL_ABILITY>
   <AUTHOR><![CDATA[Splinterverse]]></AUTHOR>
   <EDITORS><![CDATA[Splinterverse]]></EDITORS>
   <DATE><![CDATA[28-09-16]]></DATE>
</CARD_V2>
This line:
Code: Select all
EffectController():SetItemCount(count)
originally had a 2 instead of count. I'm guessing it was a leftover from a copy-paste.

Re: Community Wad

PostPosted: 22 Jan 2017, 20:25
by Xander9009
Parabolic wrote:Wanted to mention that Reap had an error. It would only let you return two cards at most (never bothered to check if it only ever 2 cards)

I changed it in my copy of the WAD and it appears to be working.

Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
   <FILENAME text="REAP_CW_4781" />
   <CARDNAME text="REAP" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Reap]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Reap]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="4781" />
   <ARTID value="REAP" />
   <ARTIST name="Ron Chironna" />
   <CASTING_COST cost="{1}{G}" />
   <FLAVOURTEXT>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[“Let Volrath choke on his crop of hatred.”
Eladamri, Lord of Leaves]]></LOCALISED_TEXT>
   </FLAVOURTEXT>
   <TYPE metaname="Instant" />
   <EXPANSION value="TE" />
   <RARITY metaname="U" />
    <SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Return up to X target cards from your graveyard to your hand, where X is the number of black permanents target opponent controls as you cast Reap.]]></LOCALISED_TEXT>
      <TARGET tag="SPL_CARD_QUERY_CHOOSE_OPPONENT" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:SetFilterType(FILTER_TYPE_PLAYERS)
         filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
      </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
         local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
         local filter = ClearFilter()
         filter:Add( FE_COLOUR, OP_IS, COLOUR_BLACK )
         filter:Add( FE_CONTROLLER, OP_IS, target_player )
         local subfilter = filter:AddSubFilter_Or()
         subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
         subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND )
         subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
         CW_Filter_AddEnchantments(subfilter)
         CW_Filter_AddPlaneswalkers(subfilter)
         local count = filter:Count()
         filter = ClearFilter()
         filter:SetZone(ZONE_GRAVEYARD, EffectController())
         EffectController():SetItemCount(count)
         if filter:CountStopAt(1) == 1 then
            for i = 0,(count-1) do
               EffectController():SetItemPrompt (i, "SPL_CARD_QUERY_CHOOSE_A_CARD_TO_PUT_INTO_YOUR_HAND" )
            end
            EffectController():ChooseItems( EffectDC():Make_Targets(1) )
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local targets = EffectDC():Get_Targets(1)
         local count = targets:Count()
         local player = EffectController()
         if player ~= nil then
            for i = 0,(count-1) do
               local target_card = EffectDC():Get_Targets(1):Get_CardPtr(i)
               if target_card ~= nil  then
                  target_card:PutInHand()
               end
            end
         end
      </RESOLUTION_TIME_ACTION>
   </SPELL_ABILITY>
   <AUTHOR><![CDATA[Splinterverse]]></AUTHOR>
   <EDITORS><![CDATA[Splinterverse]]></EDITORS>
   <DATE><![CDATA[28-09-16]]></DATE>
</CARD_V2>
This line:
Code: Select all
EffectController():SetItemCount(count)
originally had a 2 instead of count. I'm guessing it was a leftover from a copy-paste.
Fixed. (Also, I marked you as the editor. Just FYI.)

Re: Community Wad

PostPosted: 22 Jan 2017, 22:12
by Splinterverse
Xander,

I went and populated all of the manlands/vehicles with this code . . .

Code: Select all
<AVAILABILITY>
         return EffectController():IsHuman() or EffectSource():IsTapped() == false
      </AVAILABILITY>
It worked for human players, but then I noticed that the cards weren't available for the AI players. (I know this for certain because I played alongside AI in 2HG mode and the cards never glowed yellow.)

Then I tried this . . .

Code: Select all
<AVAILABILITY>
            return EffectController():IsAI() == false or EffectSource():IsTapped() == false
         </AVAILABILITY>
Didn't work. Then I tried adding LKI to both of the above -- that didn't work either.

The final version I tried was this . . .

Code: Select all
<AVAILABILITY>
         if EffectController():IsAI() == true and EffectSourceLKI():IsTapped() == false then
            return true
         elseif EffectController():IsAI() == false then
            return true
         end
      </AVAILABILITY>
Still didn't work. All three versions work for human players, but not AI. :(

This error kept appearing in the log (in the first code block above, I also got errors with the cards by name, but they were all nil errors in the availability block):

Code: Select all
[lua] ?:0: attempt to index a nil value
I'm not sure what is going on. Once we get a working version, I can easily proliferate as I have all the cards in question ready for a mass find/replace.

I've attached one vehicle and one manland in case you want to try some other options that I haven't thought of.

Re: Community Wad

PostPosted: 23 Jan 2017, 08:34
by Xander9009
Can't access EffectSource() from an availability block, apparently. Use Object() instead. (Tested)
Code: Select all
      <AVAILABILITY>
         return EffectController():IsHuman() or Object():IsTapped() == false
      </AVAILABILITY>
However, for vehicles, there was a MUCH easier way to get that code to all vehicles (including all of them made in the future with TFM's universal generator): since I coded the vehicles using vehicle-specific functions and one of those functions is a cost prerequisite, you can just add the code to the function.
It's even more efficient that way since the code can be (and has been, just now) put before the complicated filters that determine if the player has enough combined power among creatures they control. It short-circuits the prereq in cases where the rest isn't needed. I would have mentioned it earlier, but I only remembered the functions when I opened the Sky Skiff you sent.

Re: Community Wad

PostPosted: 23 Jan 2017, 10:53
by Splinterverse
Xander9009 wrote:Can't access EffectSource() from an availability block, apparently. Use Object() instead. (Tested)
Code: Select all
      <AVAILABILITY>
         return EffectController():IsHuman() or Object():IsTapped() == false
      </AVAILABILITY>
However, for vehicles, there was a MUCH easier way to get that code to all vehicles (including all of them made in the future with TFM's universal generator): since I coded the vehicles using vehicle-specific functions and one of those functions is a cost prerequisite, you can just add the code to the function.
It's even more efficient that way since the code can be (and has been, just now) put before the complicated filters that determine if the player has enough combined power among creatures they control. It short-circuits the prereq in cases where the rest isn't needed. I would have mentioned it earlier, but I only remembered the functions when I opened the Sky Skiff you sent.
Thanks, Xander. I have modified all of the manlands (both MM and non-MM versions) and uploaded them. I will work with the Vehicle functions when I have more time (probably Wednesday).

For those following along, this change means the AI will not turn a manland into a creature if it is tapped (example: Mutavault). Soon, vehicles will have the same consideration.

Re: Community Wad

PostPosted: 23 Jan 2017, 10:54
by Xander9009
Splinterverse wrote:
Xander9009 wrote:Can't access EffectSource() from an availability block, apparently. Use Object() instead. (Tested)
Code: Select all
      <AVAILABILITY>
         return EffectController():IsHuman() or Object():IsTapped() == false
      </AVAILABILITY>
However, for vehicles, there was a MUCH easier way to get that code to all vehicles (including all of them made in the future with TFM's universal generator): since I coded the vehicles using vehicle-specific functions and one of those functions is a cost prerequisite, you can just add the code to the function.
It's even more efficient that way since the code can be (and has been, just now) put before the complicated filters that determine if the player has enough combined power among creatures they control. It short-circuits the prereq in cases where the rest isn't needed. I would have mentioned it earlier, but I only remembered the functions when I opened the Sky Skiff you sent.
Thanks, Xander. I have modified all of the manlands (both MM and non-MM versions) and uploaded them. I will work with the Vehicle functions when I have more time (probably Wednesday).

For those following along, this change means the AI will not turn a manland into a creature if it is tapped (example: Mutavault). Soon, vehicles will have the same consideration.
The function has already been updated. All you need to do is remove any extra code you added to them and they should work fine.

Re: Community Wad

PostPosted: 23 Jan 2017, 12:10
by Splinterverse2
Xander9009 wrote:
Splinterverse wrote:
Xander9009 wrote:Can't access EffectSource() from an availability block, apparently. Use Object() instead. (Tested)
Code: Select all
      <AVAILABILITY>
         return EffectController():IsHuman() or Object():IsTapped() == false
      </AVAILABILITY>
However, for vehicles, there was a MUCH easier way to get that code to all vehicles (including all of them made in the future with TFM's universal generator): since I coded the vehicles using vehicle-specific functions and one of those functions is a cost prerequisite, you can just add the code to the function.
It's even more efficient that way since the code can be (and has been, just now) put before the complicated filters that determine if the player has enough combined power among creatures they control. It short-circuits the prereq in cases where the rest isn't needed. I would have mentioned it earlier, but I only remembered the functions when I opened the Sky Skiff you sent.
Thanks, Xander. I have modified all of the manlands (both MM and non-MM versions) and uploaded them. I will work with the Vehicle functions when I have more time (probably Wednesday).

For those following along, this change means the AI will not turn a manland into a creature if it is tapped (example: Mutavault). Soon, vehicles will have the same consideration.
The function has already been updated. All you need to do is remove any extra code you added to them and they should work fine.
So that means the CW versions are already good to go. Awesome!

Re: Community Wad

PostPosted: 24 Jan 2017, 21:32
by MasterXploder7
Scrap Trawler - ability is using "less than or equal to" instead of "lesser"

Re: Community Wad

PostPosted: 25 Jan 2017, 11:06
by Splinterverse
MasterXploder7 wrote:Scrap Trawler - ability is using "less than or equal to" instead of "lesser"
This has been corrected and will be uploaded today. It should appear in the next CW update. Thanks for reporting!

Re: Community Wad

PostPosted: 25 Jan 2017, 11:34
by Splinterverse
All cards with Exploit or Extort have been updated to include the More Info text for their keyword ability. (To that end, I have also updated CW_MORE_INFO.lol).

If there are any other keyword abilities that are missing their More Info block please let me know. I may update those as well.