Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2014




Community Wad
Moderator: CCGHQ Admins
Re: Community Wad
by Splinterverse » 22 Jan 2017, 10:51
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.
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.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Splinterverse » 22 Jan 2017, 13:46
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.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Xander9009 » 22 Jan 2017, 18:11
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.
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.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Community Wad
by Splinterverse » 22 Jan 2017, 18:24
Cool. I'll add the man land/vehicle availability block to my to-do list (likely done within the next week or so).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.
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.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Xander9009 » 22 Jan 2017, 18:32
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.
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.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Community Wad
by Parabolic » 22 Jan 2017, 19:01
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.
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>
- Code: Select all
EffectController():SetItemCount(count)
Re: Community Wad
by Xander9009 » 22 Jan 2017, 20:25
Fixed. (Also, I marked you as the editor. Just FYI.)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.This line:
- 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>originally had a 2 instead of count. I'm guessing it was a leftover from a copy-paste.
- Code: Select all
EffectController():SetItemCount(count)
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Community Wad
by Splinterverse » 22 Jan 2017, 22:12
Xander,
I went and populated all of the manlands/vehicles with this code . . .
Then I tried this . . .
The final version I tried was this . . .

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):
I've attached one vehicle and one manland in case you want to try some other options that I haven't thought of.
I went and populated all of the manlands/vehicles with this code . . .
- Code: Select all
<AVAILABILITY>
return EffectController():IsHuman() or EffectSource():IsTapped() == false
</AVAILABILITY>
Then I tried this . . .
- Code: Select all
<AVAILABILITY>
return EffectController():IsAI() == false or EffectSource():IsTapped() == false
</AVAILABILITY>
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>

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've attached one vehicle and one manland in case you want to try some other options that I haven't thought of.
- Attachments
-
AI_AVAILABILITY_MANLAND_VEHICLES.zip
- (4.81 KiB) Downloaded 289 times
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Xander9009 » 23 Jan 2017, 08:34
Can't access EffectSource() from an availability block, apparently. Use Object() instead. (Tested)
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.
- Code: Select all
<AVAILABILITY>
return EffectController():IsHuman() or Object():IsTapped() == false
</AVAILABILITY>
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.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Community Wad
by Splinterverse » 23 Jan 2017, 10:53
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).Xander9009 wrote:Can't access EffectSource() from an availability block, apparently. Use Object() instead. (Tested)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.
- Code: Select all
<AVAILABILITY>
return EffectController():IsHuman() or Object():IsTapped() == false
</AVAILABILITY>
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.
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 DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Xander9009 » 23 Jan 2017, 10:54
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.Splinterverse wrote: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).Xander9009 wrote:Can't access EffectSource() from an availability block, apparently. Use Object() instead. (Tested)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.
- Code: Select all
<AVAILABILITY>
return EffectController():IsHuman() or Object():IsTapped() == false
</AVAILABILITY>
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.
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.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Community Wad
by Splinterverse2 » 23 Jan 2017, 12:10
So that means the CW versions are already good to go. Awesome!Xander9009 wrote: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.Splinterverse wrote: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).Xander9009 wrote:Can't access EffectSource() from an availability block, apparently. Use Object() instead. (Tested)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.
- Code: Select all
<AVAILABILITY>
return EffectController():IsHuman() or Object():IsTapped() == false
</AVAILABILITY>
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.
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.
- Splinterverse2
- Posts: 52
- Joined: 20 Sep 2016, 13:52
- Has thanked: 13 times
- Been thanked: 0 time
Re: Community Wad
by MasterXploder7 » 24 Jan 2017, 21:32
Scrap Trawler - ability is using "less than or equal to" instead of "lesser"
"Hate is an everlasting wellspring from which it is eternally sustained." - Nirkana Revenant
- MasterXploder7
- Posts: 293
- Joined: 18 Jan 2014, 10:55
- Has thanked: 28 times
- Been thanked: 11 times
Re: Community Wad
by Splinterverse » 25 Jan 2017, 11:06
This has been corrected and will be uploaded today. It should appear in the next CW update. Thanks for reporting!MasterXploder7 wrote:Scrap Trawler - ability is using "less than or equal to" instead of "lesser"
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Splinterverse » 25 Jan 2017, 11:34
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.
If there are any other keyword abilities that are missing their More Info block please let me know. I may update those as well.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Who is online
Users browsing this forum: No registered users and 8 guests