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 Sep 2016, 10:27
Ah ok. Scared me for a minute there.Xander9009 wrote:It's currently in the process of uploading.Splinterverse wrote:Xander -- the .wad file is missing. Just logged into the Community Wad folder and the only thing in it is the dll.

---------------------------------------------
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 tmxk2012917 » 22 Sep 2016, 15:12
got some errors after I downloaded the lastest version
9/22/2016 11:10:38: Low: System.Xml - The 'CONTINUOUS_ACTION' start tag on line 186 position 4 does not match the end tag of 'RESOLUTION_TIME_ACTION'. Line 200, position 5.:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at RSN.DotP.CardInfo.ParseXML(String strXML)
at RSN.DotP.CardInfo..ctor(String strFilename, String strXML, String strWad, GameDirectory gdData)
at RSN.DotP.WadWrapper.LoadCards(FileStream fsInput, GameDirectory gdData)
Extra Information:
Unable to load card: SAVAGE_ALLIANCE_CW_414439.xml in DATA_DLC_COMMUNITY_CORE
9/22/2016 11:10:38: Low: System.Xml - The 'CONTINUOUS_ACTION' start tag on line 186 position 4 does not match the end tag of 'RESOLUTION_TIME_ACTION'. Line 200, position 5.:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at RSN.DotP.CardInfo.ParseXML(String strXML)
at RSN.DotP.CardInfo..ctor(String strFilename, String strXML, String strWad, GameDirectory gdData)
at RSN.DotP.WadWrapper.LoadCards(FileStream fsInput, GameDirectory gdData)
Extra Information:
Unable to load card: SAVAGE_ALLIANCE_CW_414439.xml in DATA_DLC_COMMUNITY_CORE
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Xander9009 » 22 Sep 2016, 15:21
I actually just fixed that a few minutes ago. Thanks. 

_______________________________
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 TheWrath » 22 Sep 2016, 16:07
overload cost not count MOX_ RUBY_ CW_ 383022 as mana
mountain x5 and mox ruby x1 : It can't be cast Mizzium Mortars's overload
mountain x6 : It can be cast Mizzium Mortars's overload
mountain x5 and mox ruby x1 : It can't be cast Mizzium Mortars's overload
mountain x6 : It can be cast Mizzium Mortars's overload
- TheWrath
- Posts: 3
- Joined: 21 Aug 2016, 07:48
- Has thanked: 0 time
- Been thanked: 0 time
Re: Community Wad
by Splinterverse » 22 Sep 2016, 19:30
Fixed a couple of bugs I found:
Anger of the Gods -- was allowing player targeting and should only be creatures
Beligerent Whiptail -- triggered ability did not have end of turn for duration
Pain Kami -- was allowing player targeting and should only be creatures
Anger of the Gods -- was allowing player targeting and should only be creatures
Beligerent Whiptail -- triggered ability did not have end of turn for duration
Pain Kami -- was allowing player targeting and should only be creatures
---------------------------------------------
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 Dargenom » 22 Sep 2016, 22:23
Idle Thoughts & Scroll of Origins: The ability of either card can only be activated if you have the stated number of cards in hand, and the ability draws you a card regardless of how many cards are in your hand when the ability resolves.
Re: Community Wad
by Xander9009 » 23 Sep 2016, 01:34
Idle Thoughts and Scroll of Origins are fixed.
Mizzium Mortars can't be fixed. At least not very effectively. We can't easily reduce the cost of abilities.
Mizzium Mortars can't be fixed. At least not very effectively. We can't easily reduce the cost of abilities.
_______________________________
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 Xander9009 » 23 Sep 2016, 14:43
I've added a thread in the Programming section for the CW Progress Google Sheet I worked on a few days ago. I updated it a few minutes ago.
viewtopic.php?f=63&t=19172
viewtopic.php?f=63&t=19172
_______________________________
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 Xander9009 » 24 Sep 2016, 07:19
Splinterverse wrote:Cards Where I Need Help:
Abandon Hope
Alliance of Arms
Krovikan Horror
Leovold, Emissary of Trest
Naya Soulbeast -- tried your recommendation Xander and it didn't work (but maybe I did it wrong)
Selvala, Heart of the Wilds
Wormfang Behemoth
Wormfang Manta
Worms of the Earth
Wretched Banquet
I've zipped the cards I'm having issues with and attached them below.
NOTE: The cards have XML comments at the top explaining what the issues are.
Any help would be greatly appreciated. I will be back tomorrow working on more of the missing cards!
- Abandon Hope | Open
- Two things.
1: Line 51 has "generic" instead of "Generic".
2: player:Discard() isn't telling the engine what to discard. I think you might have pulled that from Devestating Dreams, but that's a random card. For this one, the player chooses which ones, which means you need to ask them. Also, discard is actually an inherent cost you can define. Try this code instead.- Code: Select all
<UTILITY_ABILITY qualifier="Additional">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[As an additional cost to cast Abandon Hope, discard X cards.]]></LOCALISED_TEXT>
<COST type="Discard" definition="0" compartment="1" query_tag="CARD_QUERY_CHOOSE_CARD_TO_DISCARD" item_count_any_number_of="1" />
<COST_DEFINITION id="0">
local oFilter = ClearFilter()
oFilter:SetZone(ZONE_HAND, EffectController())
</COST_DEFINITION>
</UTILITY_ABILITY>
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Look at target opponent’s hand and choose X cards from it. That player discards those cards.]]></LOCALISED_TEXT>
<TARGET tag="CHOOSE_A_PLAYER_TO_LOOK_AT_HAND" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local oFilter = ClearFilter()
oFilter:SetFilterType(FILTER_TYPE_PLAYERS)
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local oTarget = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if oTarget ~= nil then
oTarget:RevealHand()
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local oTarget = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_PlayerPtr(0)
local oController = EffectController()
local iEffectX = EffectDC():Get_Targets(1) and EffectDC():Get_Targets(1):Count()
if oTarget ~= nil and oController ~= nil and iEffectX ~= nil then
local oFilter = ClearFilter()
oFilter:SetZone(ZONE_HAND, oTarget)
local iCount = oFilter:Count()
if iCount > 0 then
if iCount > iEffectX then
iCount = iEffectX
end
oController:SetItemCount(iCount)
for i=0,iCount-1 do
oController:SetItemPrompt(i, "CARD_QUERY_CHOOSE_CARD_TO_DISCARD")
end
oController:ChooseItems(EffectDC():Make_Targets(2))
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local oCardChest = EffectDC():Get_Targets(2)
if oCardChest ~= nil then
local iCount = EffectDC():Get_Targets(2):Count()
for i=0,iCount-1 do
local oCard = oCardChest:Get_CardPtr(i)
if oCard ~= nil then
oCard:Discard()
end
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
- Krovikan Horror | Open
- In the intervening if block, variable 'Player' is used but never assigned.
Leovold, Emissary of Trest:- Code: Select all
<MAY tag="CARD_QUERY_DRAW_A_CARD" always_prompt="1">
<RESOLUTION_TIME_ACTION>
if EffectController():Library_Count() < 10 then
return false
else
return true
end
</RESOLUTION_TIME_ACTION>
</MAY>
- Code: Select all
<MAY tag="CARD_QUERY_DRAW_A_CARD" always_prompt="1">
-- AI behaviour
return EffectController():Library_Count() > 9
</MAY>
- Code: Select all
EffectController():DrawCards(1)
- Naya Soulbeast | Open
- The "When you cast this card" trigger is "<TRIGGER value="SPELL_PLAYED" simple_qualifier="self" />". This should store the information in a LinkedDC() for the "enters the battlefield" trigger to deal with. Corrected but untested code:
- Code: Select all
<TRIGGERED_ABILITY linked_ability_group="1" active_zone="ZONE_ANY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When you cast Naya Soulbeast, each player reveals the top card of his or her library. Naya Soulbeast enters the battlefield with X +1/+1 counters on it, where X is the total converted mana cost of all cards revealed this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand vous lancez l’Animâme de Naya, chaque joueur révèle la carte du dessus de sa bibliothèque. L’Animâme de Naya arrive sur le champ de bataille avec X marqueurs +1/+1 sur lui, X étant le coût converti de mana total de toutes les cartes révélées de cette manière.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando lances la Animalma de Naya, cada jugador muestra la primera carta de su biblioteca. La Animalma de Naya entra al campo de batalla con X contadores +1/+1 sobre ella, donde X es el coste de maná convertido total de todas las cartas mostradas de esta manera.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn du die Naya-Seelenbestie wirkst, zeigt jeder Spieler die oberste Karte seiner Bibliothek offen vor. Die Naya-Seelenbestie kommt mit X +1/+1-Marken ins Spiel, wobei X die Summe der umgewandelten Manakosten aller Karten ist, die auf diese Weise aufgedeckt wurden.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando lanci la Bestia degli Spiriti di Naya, ogni giocatore rivela la prima carta del suo grimorio. La Bestia degli Spiriti di Naya entra nel campo di battaglia con X segnalini +1/+1, dove X è pari al costo di mana convertito totale di tutte le carte rivelate in questo modo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[When you cast Naya Soulbeast, each player reveals the top card of his or her library. Naya Soulbeast enters the battlefield with X +1/+1 counters on it, where X is the total converted mana cost of all cards revealed this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When you cast Naya Soulbeast, each player reveals the top card of his or her library. Naya Soulbeast enters the battlefield with X +1/+1 counters on it, where X is the total converted mana cost of all cards revealed this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When you cast Naya Soulbeast, each player reveals the top card of his or her library. Naya Soulbeast enters the battlefield with X +1/+1 counters on it, where X is the total converted mana cost of all cards revealed this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[When you cast Naya Soulbeast, each player reveals the top card of his or her library. Naya Soulbeast enters the battlefield with X +1/+1 counters on it, where X is the total converted mana cost of all cards revealed this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[When you cast Naya Soulbeast, each player reveals the top card of his or her library. Naya Soulbeast enters the battlefield with X +1/+1 counters on it, where X is the total converted mana cost of all cards revealed this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[When you cast Naya Soulbeast, each player reveals the top card of his or her library. Naya Soulbeast enters the battlefield with X +1/+1 counters on it, where X is the total converted mana cost of all cards revealed this way.]]></LOCALISED_TEXT>
<TRIGGER value="SPELL_PLAYED" simple_qualifier="self" />
<RESOLUTION_TIME_ACTION>
local iPlayerCount = MTG():GetNumberOfPlayers()
local iTotal = 0
for i=0,iPlayerCount-1 do
local oPlayer = MTG():GetNthPlayer(i)
if oPlayer ~= nil then
local oCard = oPlayer:Library_GetTop()
if oCard ~= nil then
oCard:Reveal()
iTotal = iTotal + oCard:GetConvertedManaCost()
end
end
end
LinkedDC():Set_Int(0, iTotal)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY replacement_effect="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_STACK" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
local oSource = EffectSource()
if oSource ~= nil then
oSource:AddCounters(MTG():PlusOnePlusOneCounters(), LinkedDC():Get_Int(0))
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- Wormfang Behemoth | Open
- Resource abilities (those with resource_id="#") aren't actually visible on the card until they're active, which will make this really misleading when viewed anywhere but on the battlefield (which also means it'll be misleading in the deckbuilder). This shouldn't be done with a delayed trigger, but rather with a linkedDC().
Remove line 54, then replace delayDC with LinkedDC().
In the 'leaves the battlefield' ability, remove 'resource_id="2"', and replace EffectDC() with LinkedDC().
Make sure you add 'linked_ability_group="1"' to both abilities so LinkedDC() exists.
Finally, there's nothing in the ability that says those cards are face-down or to draw a card, so turning them face-up in the second ability means nothing, and drawing a card is incorrect.
- Wormfang Manta | Open
- This isn't working because you have an ability inside another ability. In fact, you've got two abilities inside another ability. Move both abilities outside of the one they're in, and give the now empty ability this code.
- Code: Select all
<RESOLUTION_TIME_ACTION>
MTG():CreateDelayedTrigger(1, nil)
</RESOLUTION_TIME_ACTION>
- Code: Select all
<RESOLUTION_TIME_ACTION>
local oController = EffectController()
if oController ~= nil then
oController:GetTeam():TakeExtraTurn()
end
</RESOLUTION_TIME_ACTION>
- Wretched Banquet | Open
- Try this.
- Code: Select all
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_DESTROY" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local oTarget = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if oTarget ~= nil then
local oFilter = ClearFilter()
oFilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
oFilter:Add(FE_POWER, OP_LESS_THAN_OR_EQUAL_TO, oTarget:GetCurrentPower())
if oFilter:CountStopAt(2) == 1 then
oTarget:Destroy()
end
end
</RESOLUTION_TIME_ACTION>
Worms of the Earth - This one's going to be really complicated.
On lines 103 and 104, where are those targets supposed to be coming from? They're also being used the in the filter below, even though they shouldn't exist.
The actual reason it probably wasn't working is because those variables were being used on the variable 'subfilter', but 'subfilter' doesn't exist. Finding a variable that doesn't exist causes teh code to stop, preventing everything else from working once it tries to access that variable.
Remove the references to subfilter, remove those extra target variables, and it should theoretically work. At least up to the point of the last RTA. The last RTA is also referencing those targets that don't exist. Remove those variables, and replace everything in the if section at line 122 with code making the land's controller sacrifice it and destroying EffectSource().
Now, it should work. However, it will have two problems. The first problem is this: the ability says that any player may have this deal damage to him or her or sacrifice lands. Not just the current player. This means you need to cycle through each player and ask each one.
So, here's how repeating actions work. To make an RTA repeat, simply add 'repeating="1"' to the RESOLUTION_TIME_ACTION line. Now, if at any point "return" is called with a "true" parameter, it will restart and run again.
Inside of a repeating action, you can call 'MTG():GetActionRepCount()'. This will return the number of times it has repeated. So, the first time, it returns 0, because it hasn't repeated yet. It just counts up from 0.
Also very useful in a repeating action, especially when you need to ask questions, is parity. While it's not strictly used correctly here, the word generally means "even or odd" in this case. You can get that in Lua with %2 (% in Lua is "remainder of division by"; so 8%2 => 0; 3%2 => 1). So, MTG():GetActionRepCount()%2 will alternate each time the action repeats between 0 and 1.
This gives you a method of alternating between certain sections of code within a single RTA back and forth until you're done. So, the first time it runs, you'll need to ask a player a question. The second time it runs, you'll need to respond to that question. In this case, simply checking if they answered with "do nothing". If they answered with anything else, store the player, store their answer, and exit.
In order to determine which player you're working with, you take half the number of repetitions rounded down. So, 0 and 1 both give you 0. 2 and 3 give you 1. Etc.
Now, you've got this:
- Code: Select all
<RESOLUTION_TIME_ACTION repeating="1">
local iRepCount = MTG():GetActionRepCount()
local iParity = iRepCount%2
local iPlayerIndex = math.floor(iRepCount/2)
local oPlayer == MTG():GetNthPlayer(iPlayerIndex)
if oPlayer ~= nil then
if iParity == 0 then
--Ask the question...
return true -- Any time you ask a question, you must deal with the answer. So always reutrn true when asking.
else
--Process their answer...
if WANTS TO ACT then
STORE PLAYER
STORE ANSWER
return false
else
return true --Player didn't want to do anything, so continue running to ask the next player.
end
end
end
-- If nothing up above returned already, then fall back to the only safe option: stop running.
return false -- This will happen when we run out of valid players.
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
-- Here, get the stored player and their choice. If they're nil, then no one wanted to do anything.
-- If they want to pay life, do so and destroy EffectSource()
-- If they want to sacrifice lands, make them choose 2 lands they control and store those lands.
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
-- Get the player and the lands they chose. If they're both valid, then sacrifice the lands and destroy EffectSource().
</RESOLUTION_TIME_ACTION>
To choose two items, you'll need this code:
- Code: Select all
oPlayer:SetItemCount(2)
oPlayer:SetItemPrompt(0, "CARD_QUERY_CHOOSE_LAND_TO_SACRIFICE")
oPlayer:SetItemPrompt(1, "CARD_QUERY_CHOOSE_LAND_TO_SACRIFICE")
oPlayer:ChooseItems(EffectDC():Make_Targets(1))
- Code: Select all
oPlayer:SetItemCount(2)
for i=0,1 do
oPlayer:SetItemPrompt(i, "CARD_QUERY_CHOOSE_LAND_TO_SACRIFICE")
end
oPlayer:ChooseItems(EffectDC():Make_Targets(1))
_______________________________
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 Xander9009 » 24 Sep 2016, 14:26
I rechecked Alliance of Arms. It looked to me that the AI was in fact working correctly, and it seems it was. Actually, it just seemed like it was paying free mana because there were lots of tokens that weren't paid for. It wasn't the AI making those tokens, though. It was everyone.
The section of code that actually makes the tokens is here:
The solution is simply to remove that inner for loop. I also changed it to CW_Tokens().
The section of code that actually makes the tokens is here:
- Code: Select all
<RESOLUTION_TIME_ACTION>
local total = EffectDC():Get_Int(10)
if total ~= nil and total ~= 0 then
for i=0,MTG():GetNumberOfPlayers()-1 do
local player = MTG():GetNthPlayer(i)
for n = 0, total - 1 do
MTG():PutTokensOntoBattlefield( "TOKEN_SOLDIER_C_1_1_W_CW_1", total, player)
end
end
end
</RESOLUTION_TIME_ACTION>
The solution is simply to remove that inner for loop. I also changed it to CW_Tokens().
- Code: Select all
<RESOLUTION_TIME_ACTION>
local total = EffectDC():Get_Int(10)
if total ~= nil and total ~= 0 then
for i=0,MTG():GetNumberOfPlayers()-1 do
local player = MTG():GetNthPlayer(i)
CW_Tokens("SOLDIER_C_1_1_W", total, player)
end
end
</RESOLUTION_TIME_ACTION>
_______________________________
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 » 24 Sep 2016, 16:49
Thanks, Xander for the Alliance of Arms fix! 
I just uploaded a couple bug fixes:
Dwarven Trader -- had extra text on card from an empty static ability
Kor Skyfisher -- was making the return target permanent optional when it shouldn't be.
I also noticed the Animist's Awakening appears to be missing the code for its Spell Mastery, but I didn't have time to work on fixing it.

I just uploaded a couple bug fixes:
Dwarven Trader -- had extra text on card from an empty static ability
Kor Skyfisher -- was making the return target permanent optional when it shouldn't be.
I also noticed the Animist's Awakening appears to be missing the code for its Spell Mastery, but I didn't have time to work on fixing it.
---------------------------------------------
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 » 24 Sep 2016, 17:41
You're welcome. And actually, don't worry about Animist's Awakening. Armodeus put the code for the Spell Mastery ability directly in with the rest of the code because it's a lot easier that trying to pass the pointers around to another ability block for the exact same effect. It's in there.Splinterverse wrote:Thanks, Xander for the Alliance of Arms fix!
I just uploaded a couple bug fixes:
Dwarven Trader -- had extra text on card from an empty static ability
Kor Skyfisher -- was making the return target permanent optional when it shouldn't be.
I also noticed the Animist's Awakening appears to be missing the code for its Spell Mastery, but I didn't have time to work on fixing it.
_______________________________
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 tmxk2012917 » 25 Sep 2016, 01:21
docent of perfection did not give me token when I cast a sorcery or instant spell
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Xander9009 » 25 Sep 2016, 05:39
Fixed, but untested. Its triggered ability was labeled static.tmxk2012917 wrote:docent of perfection did not give me token when I cast a sorcery or instant spell
_______________________________
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 » 25 Sep 2016, 16:59
While coding some Kaladesh cards, I fixed a few bugs.
All have been uploaded:
Arcbound Ravager -- was not checking sacrifice target for control first.
Balthor the Defiled -- typo I believe
Oviya Pashiri, Sage Lifecrafter -- typo
All have been uploaded:
Arcbound Ravager -- was not checking sacrifice target for control first.
Balthor the Defiled -- typo I believe
Oviya Pashiri, Sage Lifecrafter -- typo
---------------------------------------------
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 3 guests