It is currently 01 Aug 2025, 12:40
   
Text Size

Community Wad

Moderator: CCGHQ Admins

Re: Community Wad

Postby nguyenxthinh » 29 Oct 2015, 17:00

Bug report: Decree of Silence won't be sacrificed when it has three or more depletion counters.
nguyenxthinh
 
Posts: 45
Joined: 02 Nov 2014, 10:21
Has thanked: 33 times
Been thanked: 1 time

Re: Community Wad

Postby Xander9009 » 30 Oct 2015, 02:32

"Can attack as though it didn't have defender" is an approximation. I came up with the idea, but I didn't implement it myself, so I don't know the specifics of how it works. However, if I recall correctly, it's supposed to remove defender and then add a fake characteristic for defender (but without the "can't attack" bit, so basically just the text). All cards which count or target defenders are supposed to count both the defender characteristic and the fake defender characteristic. So, Assault Formation OR Axebane Guardian may be messed up. I'll look into them.

I'll also check Emeria SHepherd when I get a chance. If you want to make sure I don't forget (I won't have time for a few days), post a bug report (link in my signature).
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby nivmizzet1 » 30 Oct 2015, 16:14

Xander9009 wrote:"Can attack as though it didn't have defender" is an approximation. I came up with the idea, but I didn't implement it myself, so I don't know the specifics of how it works. However, if I recall correctly, it's supposed to remove defender and then add a fake characteristic for defender (but without the "can't attack" bit, so basically just the text). All cards which count or target defenders are supposed to count both the defender characteristic and the fake defender characteristic. So, Assault Formation OR Axebane Guardian may be messed up. I'll look into them.

thanks, it would be really good if we can get them to work how you say they should be.

in other news, I got this error log --
[lua] [string "GUIDED_PASSAGE_CW_27169_TITLE (RESOLUTION_TIME_ACTION)~0x000014d6"]:7:
parameter mismatch or too few parameters [expected bzS32]
nivmizzet1
 
Posts: 617
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Community Wad

Postby Xander9009 » 30 Oct 2015, 18:21

Guided Passage should be fixed in the next update.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby Parabolic » 31 Oct 2015, 00:04

Nova Chaser was bugged: it's code was unfinished. I stole code from another working Champion creature and got a working version:

Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
   <FILENAME text="NOVA_CHASER_CW_140239" />
   <CARDNAME text="NOVA_CHASER" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Nova Chaser]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Chasse-nova]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cazadora de novas]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Nova-Verfolger]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Cacciatrice di Stelle]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[新星追い]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Nova Chaser]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Охотница на Новые Звезды]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Caçador de Nova]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="140239" />
   <ARTID value="CW140239" />
   <ARTIST name="Dan Scott" />
   <CASTING_COST cost="{3}{R}" />
   <TYPE metaname="Creature" />
   <SUB_TYPE metaname="Elemental" />
   <SUB_TYPE metaname="Warrior" />
   <EXPANSION value="LRW" />
   <RARITY metaname="R" />
   <POWER value="10" />
   <TOUGHNESS value="2" />
   <STATIC_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Trample]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Piétinement]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Arrolla.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verursacht Trampelschaden]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Travolgere]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[トランプル]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[돌진]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Пробивной удар]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Atropelar]]></LOCALISED_TEXT>
      <INTRINSIC characteristic="CHARACTERISTIC_TRAMPLE" />
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY linked_ability_group="1">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Champion an Elemental]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Appui d’élémental]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Amparar un Elemental.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Beschütze ein Elementarwesen]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Battersi per un Elementale]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[覇権(エレメンタル)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Champion an Elemental]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Заступитесь за Элементаля]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Acuda um Elemental]]></LOCALISED_TEXT>
      <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
       <RESOLUTION_TIME_ACTION>
       local filter = ClearFilter()
         filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
         filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
         filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
         local subfilter = filter:AddSubFilter_Or()
         subfilter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_ELEMENTAL )
         EffectController():ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_TO_EXILE", EffectDC():Make_Targets(0), QUERY_FLAG_MAY )
    </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       LinkedDC():Set_CardPtr(0, target)
       LinkedDC():Protect_CardPtr(0)
       target:Exile()
    else
       EffectController():Sacrifice(EffectSource())
    end
    </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
    local target = LinkedDC():Get_CardPtr(0)
    local source = EffectSource()
    if target ~= nil and source ~= nil then
       target:NailOnto(source)
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <TRIGGERED_ABILITY linked_ability_group="1">
      <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_BATTLEFIELD" />
      <RESOLUTION_TIME_ACTION>
    local target = LinkedDC():Get_CardPtr(0)
    if target ~= nil then
       target:PutOntoBattlefield( target:GetOwner() )
    end
    </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
   <HELP title="MORE_INFO_TITLE_CHAMPION" body="MORE_INFO_BODY_CHAMPION" zone="ZONE_ANY" />
   <HELP title="MORE_INFO_BADGE_TITLE_1" body="MORE_INFO_BADGE_BODY_1" zone="ZONE_ANY" />
   <SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
   <SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
   <AUTHOR><![CDATA[migookman]]></AUTHOR>
   <EDITORS><![CDATA[migookman]]></EDITORS>
   <DATE><![CDATA[05-10-15]]></DATE>
</CARD_V2>
I found a few other bugs as well, but they're more out of my league. Living Inferno, for example, will only ever do 1 damage to each creature you target with it, no matter how many times that creature gets targeted.
Parabolic
 
Posts: 74
Joined: 12 Jul 2013, 19:22
Has thanked: 10 times
Been thanked: 10 times

Re: Community Wad

Postby zhupiter » 31 Oct 2015, 05:12

For Conflagrate ,I now changed the code to this,but even the normal cost can't deal damage.I tried using ObjectDC and LinkedDC() ,either works.It almost drive me crazy #-o
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
   <FILENAME text="CONFLAGRATE_CW_114909" />
   <CARDNAME text="CONFLAGRATE" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Conflagrate]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Conflagration]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Conflagrar]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Flammenbrunst]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Conflagrazione]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[燃焼]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Conflagrate]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Поджог]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conflagrar]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="114909" />
   <ARTID value="CW114909" />
   <ARTIST name="Warren Mahy" />
   <CASTING_COST cost="{X}{X}{R}" />
   <TYPE metaname="Sorcery" />
   <EXPANSION value="TSP" />
   <RARITY metaname="U" />
   <SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Conflagrate deals X damage divided as you choose among any number of target creatures and/or players.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La Conflagration inflige X blessures réparties comme vous le désirez entre n’importe quel nombre de cibles, créatures et/ou joueurs.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Conflagrar hace X puntos de daño divididos como elijas entre cualquier número de criaturas y/o jugadores objetivo.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Flammenbrunst fügt X Schadenspunkte zu, deren Verteilung auf eine beliebige Anzahl an Kreaturen und/oder Spielern deiner Wahl du bestimmst.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La Conflagrazione infligge X danni suddivisi a tua scelta tra un qualsiasi numero di creature e/o giocatori bersaglio.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[望む数のクリーチャーかプレイヤー(またはその組み合わせ)を対象とする。燃焼は、それらにX点のダメージを好きなように割り振って与える。]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Conflagrate deals X damage divided as you choose among any number of target creatures and/or players.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Поджог наносит X повреждений, разделенных по вашему выбору между любым количеством целевых существ и/или игроков.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conflagrar causa X pontos de dano, distribuídos à sua escolha a qualquer número de criaturas alvo e/ou jogadores alvo.]]></LOCALISED_TEXT>
      <TARGET tag="CARD_QUERY_CHOOSE_DEAL_1_DAMAGE" definition="0" compartment="0" damage_assignment="1">
         if EffectSource():GetErstwhileZone() ~= ZONE_GRAVEYARD then
            LinkedDC():Set_Int(100, GetEffectX() )
         end
         MTG():SetTargetCount( LinkedDC():Get_Int(100) )
      </TARGET>
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:SetFilterType(FILTER_TYPE_CARDS + FILTER_TYPE_PLAYERS)
         filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
         local source = EffectSourceLKI()
         local targetDC = EffectDC():Get_Targets(0)
         local num = LinkedDC():Get_Int(100)
         for i=0,num-1 do
            local target_creature = targetDC:Get_CardPtr(i)
            local target_player = targetDC:Get_PlayerPtr(i)
            local damage = targetDC:Get_Assignment(i)
            if target_creature ~= nil then
               source:DealDamageTo(damage, target_creature)
            elseif target_player ~= nil then
               source:DealDamageTo(damage, target_player)
            end
         end
      </RESOLUTION_TIME_ACTION>
      <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
      <SFX text="GLOBAL_DISASTER_PLAY" />
   </SPELL_ABILITY>
   <UTILITY_ABILITY qualifier="Flashback" active_zone="ZONE_GRAVEYARD">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flashback—{R}{R}, Discard X cards.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Flashback — {R}{R}, défaussez-vous de X cartes.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Retrospectiva—{R}{R}, descartar X cartas.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Rückblende—{R}{R}, wirf X Karten aus deiner Hand ab.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Flashback-{R}{R}, Scarta X carte.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[フラッシュバック ― {R}{R}, カードをX枚捨てる。 (あなたはフラッシュバック・コストで、このカードをあなたの墓地からプレイしてもよい。 その後それをゲームから取り除く)]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Flashback—{R}{R}, Discard X cards.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Воспоминание—{R}{R}, Сбросьте X карт.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Recapitular—{R}{R}, Descarte X cards.]]></LOCALISED_TEXT>
      <COST mana_cost="{R}{R}" type="Mana" />
      <COST type="Generic">
         <PREREQUISITE>
            return true
         </PREREQUISITE>
         <RESOLUTION_TIME_ACTION>
            local filter = ClearFilter()
            filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
            filter:SetZone( ZONE_HAND, EffectController() )
            local handCount = filter:Count()
            EffectController():SetItemCount( handCount )
            for i=0, (handCount-1) do
               EffectController():SetItemPrompt( i, "CARD_QUERY_CHOOSE_CARD_TO_DISCARD" )
            end
            EffectController():ChooseItems( EffectDC():Make_Targets(1), QUERY_FLAG_UP_TO )
         </RESOLUTION_TIME_ACTION>
         <RESOLUTION_TIME_ACTION>
            local targetDC = EffectDC():Get_Targets(1)
            if targetDC ~= nil then
               local number = targetDC:Count()
               LinkedDC():Set_Int(100, number )
               for i = 0,(number-1) do
                  local target_card = targetDC:Get_CardPtr(i)
                  target_card:Discard()
               end
            end
         </RESOLUTION_TIME_ACTION>
      </COST>
   </UTILITY_ABILITY>
   <AUTHOR><![CDATA[migookman]]></AUTHOR>
   <EDITORS><![CDATA[migookman]]></EDITORS>
   <DATE><![CDATA[06-07-15]]></DATE>
</CARD_V2>
zhupiter
 
Posts: 33
Joined: 09 Apr 2015, 06:23
Has thanked: 2 times
Been thanked: 3 times

Re: Community Wad

Postby Xander9009 » 31 Oct 2015, 06:16

That calls LinkedDC() without setting linked_ability_group="1". Not sure if that will fix it though.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby nivmizzet1 » 01 Nov 2015, 12:05

I'm hoping someone can help with some AUTO_SKIP functions that I want to implement. I've made a few that work, but some others that I tried aren't working as I'd like, and there are still more that I haven't even attempted because I know I don't know how to code them.

So, here are the ones that are working:

> skip if there are 15 or more cards in opponents graveyard (used on Jace's Erasure)
Code: Select all
      <AUTO_SKIP>
      local filter = ClearFilter()
      filter:SetZone(ZONE_GRAVEYARD)
      local total = filter:Count()
      if total &gt;= 15 then
      return true
      end
      return false
      </AUTO_SKIP>
> skip if you have 20 or more life, (or 30 or more in 2HG) -- this was taken from an already working Soul Warden. I've used it on things like Kitchen Finks.
Code: Select all
      <AUTO_SKIP>
         local effectController = EffectController()
         if effectController:GetTeam():IsSharedLifeTotal() == true then
            if effectController:GetLifeTotal() &gt;= 30 then
               return true
            end
         else
            if effectController:GetLifeTotal() &gt;= 20 then
               return true
            end
         end
         return false
      </AUTO_SKIP>
> skip unless opponent has 10 or less life (used TFMs "bloodied" code from Vampire Lacerator). Used on things like Murderous Redcap and Deathbringer Thoctar
Code: Select all
      <AUTO_SKIP>
         if TFM_AnyOpponentBloodied() == false then
            return true
         end
         return false
      </AUTO_SKIP>
but I would also like to make it check if opponent has any creatures with 1 toughness (but 1 toughness after damage is taken into account, e.g. if there is a creature that naturally has 5 toughness but has been dealt 4 damage), and only skip if not

Here are the ones that I tried and don't work that I want to get working:

> check for free mana -- if there is 8 mana or more available then skip (for use with things like Axebane Guardian, Bloom Tender, Wild Growth, and other mana producers, and I want to add it to Nettle Sentinel also because I use it in an infinite mana combo with Heritage Druid, and Palinchron which I also use in an infinite mana combo)
Code: Select all
      <AUTO_SKIP>
      local effectController = EffectController()
      if effectController:CanPayManaCost("{8}") then
      return true
      end
      return false
      </AUTO_SKIP>
at the moment the code is acting like <AUTO_SKIP always="1" />

> skip if the card has 5 or more counters on it (whatever type of counter, I mostly want it for cards that add +1/+1 counters though). For use with cards like Deathbringer Thoctar, Carrion Feeder
Code: Select all
      <AUTO_SKIP no_effect_source="1">
         return EffectSourceLKI():CountCounters(MTG():GetCountersType("PlusOnePlusOne")) &gt;= 5
      </AUTO_SKIP>
I tried to adapt this from the AUTO_SKIP code on Pyromancer Ascension
Code: Select all
      <AUTO_SKIP no_effect_source="1">
         return EffectSourceLKI():CountCounters(MTG():GetCountersType("Quest")) &gt;= 2
      </AUTO_SKIP>
but for some reason it doesn't seem to work, maybe it doesn't recognise "PlusOnePlusOne" as a counter type?

> skip if you have 7 or more cards in hand. For use with cards like River Kelpie and Staff of Domination.
Code: Select all
      <AUTO_SKIP>
      local effectController = EffectController()
      if effectController():Hand_Count() == total &gt;=7 then
      return true
      end
      return false
      </AUTO_SKIP>
And now the ones that I haven't tried but want:

> skip if there are 5 or more tokens of a particular kind that the card produces, for use with cards like Titania, Protector of Argoth, Rampaging Baloths, Presence of Gond, Sprouting Phytohydra, etc.


> skip if it's opponent creature that entered the battlefield, or if you have 9 or more creatures under your control, for GRAFT cards.


> skip only if opponent doesn't have any creatures with 1 toughness (but 1 toughness after damage is taken into account, e.g. if there is a creature that naturally has 5 toughness but has been dealt 4 damage). For use with things like Deathbringer Thoctar and Murderous Redcap.


> skip persist effect based on some condition, I don't know what though. Ideally I'd want it to only skip after the first or second time it's been activated in a turn, but I don't know if this is possible, so some other condition may need to be used, but I can't think of anything suitable.


Any and help with these will be greatly appreciated!
nivmizzet1
 
Posts: 617
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Community Wad

Postby Xander9009 » 01 Nov 2015, 17:38

For the mana auto skip: I'm not sure why that's not working, but at the very least, you could make that a lot cleaner by simplifying/condensing the code into a single line.
return EffectController():CanPayManaCost("{8}")

For the counter auto skip: You're right that it doesn't recognize the way you're specifying the +1/+1 counters. I fyou look earlier at any of the cards that add +1/+1 counters, they all do the same thing: MTG():PlusOnePlusOneCounters()

Hand count auto skip: The code is messed up. The game will read that main line from left to right.
Code: Select all
<AUTO_SKIP>
  local effectController = EffectController()
  if effectController():Hand_Count() == total &gt;=7 then
    return true
  end
  return false
</AUTO_SKIP>
becomes (example is a 9-card hand)
Code: Select all
<AUTO_SKIP>
  local effectController = EffectController()
  if 9 == total &gt;=7 then
    return true
  end
  return false
</AUTO_SKIP>
becomes
Code: Select all
<AUTO_SKIP>
  local effectController = EffectController()
  if 9 == nil &gt;=7 then ;Hand count is 9. "total" isn't a known variable, so it'll be nil.
    return true
  end
  return false
</AUTO_SKIP>
becomes
Code: Select all
<AUTO_SKIP>
  local effectController = EffectController()
  if nil &gt;=7 then ;"9 == nil" doesn't make any sense, so it'll be nil.
    return true
  end
  return false
</AUTO_SKIP>
Code: Select all
<AUTO_SKIP>
  local effectController = EffectController()
  if nil then ;"nil &gt;=7" also doesn't make any sense, so it becomes nil, which is false, and it'll always return false.
    return true
  end
  return false
</AUTO_SKIP>
You need
Code: Select all
<AUTO_SKIP>
  return EffectController():Hand_Count() &gt;= 7
</AUTO_SKIP>
Tokens:
Code: Select all
<AUTO_SKIP>
  local filter = ClearFilter()
  filter:Add(FE_CONTROLLER, OP_IS, EffectController())
  filter:Add(FE_CARD_NAME, OP_IS, "KNIGHT ALLY")
  filter:Add(FE_IS_TOKEN, true)
  return filter:CountStopAt(5) == 5
</AUTO_SKIP>
That would return true if you control 5 or more Knight Ally tokens. You can add the creature filter if desired.

Graft:
Code: Select all
<AUTO_SKIP>
  local filter = ClearFilter()
  filter:Add(FE_CONTROLLER, OP_IS, EffectController())
  filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
  return filter:CountStopAt(9) == 9 or (TriggerObject() ~= nil and TriggerObject():GetController():GetTeam() ~= EffectController():GetTeam())
</AUTO_SKIP>
For the toughness auto skip: not easily doable. You can't (as far as I know) check the current amount of damage a creature has taken. The only way to manage it would be to set up a triggered ability to detect a creature taking damage and store the creature and the amount in an ObjectDC (in case it changes zones). Then, in the auto skip, check each creature's toughness, and if it's more than 1, check if it is in the chest, and if so, subtract its corresponding damage-taken count. Obviously clearing the chest at the end of the turn. Protect the ObjectDC (look at the very end of most manifest cards).

For persist, I haven't tested it, but I have an idea to make it do what you want. Whenever its persist ability activates, increment an ObjectDC() counter. Make the Auto_Skip check that counter. Protect the ObjectDC.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby nivmizzet1 » 01 Nov 2015, 18:50

Xander9009 wrote:
| Open
For the mana auto skip: I'm not sure why that's not working, but at the very least, you could make that a lot cleaner by simplifying/condensing the code into a single line.
return EffectController():CanPayManaCost("{8}")

For the counter auto skip: You're right that it doesn't recognize the way you're specifying the +1/+1 counters. I fyou look earlier at any of the cards that add +1/+1 counters, they all do the same thing: MTG():PlusOnePlusOneCounters()

Hand count auto skip: The code is messed up. The game will read that main line from left to right.
Code: Select all
<AUTO_SKIP>
  local effectController = EffectController()
  if effectController():Hand_Count() == total &gt;=7 then
    return true
  end
  return false
</AUTO_SKIP>
becomes (example is a 9-card hand)
Code: Select all
<AUTO_SKIP>
  local effectController = EffectController()
  if 9 == total &gt;=7 then
    return true
  end
  return false
</AUTO_SKIP>
becomes
Code: Select all
<AUTO_SKIP>
  local effectController = EffectController()
  if 9 == nil &gt;=7 then ;Hand count is 9. "total" isn't a known variable, so it'll be nil.
    return true
  end
  return false
</AUTO_SKIP>
becomes
Code: Select all
<AUTO_SKIP>
  local effectController = EffectController()
  if nil &gt;=7 then ;"9 == nil" doesn't make any sense, so it'll be nil.
    return true
  end
  return false
</AUTO_SKIP>
Code: Select all
<AUTO_SKIP>
  local effectController = EffectController()
  if nil then ;"nil &gt;=7" also doesn't make any sense, so it becomes nil, which is false, and it'll always return false.
    return true
  end
  return false
</AUTO_SKIP>
You need
Code: Select all
<AUTO_SKIP>
  return EffectController():Hand_Count() &gt;= 7
</AUTO_SKIP>
Tokens:
Code: Select all
<AUTO_SKIP>
  local filter = ClearFilter()
  filter:Add(FE_CONTROLLER, OP_IS, EffectController())
  filter:Add(FE_CARD_NAME, OP_IS, "KNIGHT ALLY")
  filter:Add(FE_IS_TOKEN, true)
  return filter:CountStopAt(5) == 5
</AUTO_SKIP>
That would return true if you control 5 or more Knight Ally tokens. You can add the creature filter if desired.

Graft:
Code: Select all
<AUTO_SKIP>
  local filter = ClearFilter()
  filter:Add(FE_CONTROLLER, OP_IS, EffectController())
  filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
  return filter:CountStopAt(9) == 9 or (TriggerObject() ~= nil and TriggerObject():GetController():GetTeam() ~= EffectController():GetTeam())
</AUTO_SKIP>
For the toughness auto skip: not easily doable. You can't (as far as I know) check the current amount of damage a creature has taken. The only way to manage it would be to set up a triggered ability to detect a creature taking damage and store the creature and the amount in an ObjectDC (in case it changes zones). Then, in the auto skip, check each creature's toughness, and if it's more than 1, check if it is in the chest, and if so, subtract its corresponding damage-taken count. Obviously clearing the chest at the end of the turn. Protect the ObjectDC (look at the very end of most manifest cards).


Thanks for all that Xander. I'll go and implement them now (well, maybe not right now, but soon).

Xander9009 wrote:For persist, I haven't tested it, but I have an idea to make it do what you want. Whenever its persist ability activates, increment an ObjectDC() counter. Make the Auto_Skip check that counter. Protect the ObjectDC.
cool, do you know any cards that have something similar that I could cheat off? or does this mean you've implemented (or at least coded) it already and it just needs to be tested?
nivmizzet1
 
Posts: 617
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Community Wad

Postby Xander9009 » 02 Nov 2015, 16:16

I don't know of any card that uses this and I haven't made the code myself at all. It should be pretty simple though.

Code: Select all
   -- Put this in an RTA inside the persist ability
   <RESOLUTION_TIME_ACTION>
      RSN_ObjectDC():Int_Inc(0)
   </RESOLUTION_TIME_ACTION>
Code: Select all
   -- Put this inside the persist ability as well
   <AUTO_SKIP>
      return RSN_ObjectDC():Get_Int(0) &gt;= 2
   </AUTO_SKIP
Code: Select all
   -- Make this a new ability entirely (obviously). Copied directly from Soul Summons.
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY"> -- Permanently protect ObjectDC
      <TRIGGER value="ZONECHANGE_CONSIDERED" pre_trigger="1" simple_qualifier="self" />
      <RESOLUTION_TIME_ACTION>
         RSN_ProtectObjectDC()
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
In case it's not obvious, my previous "this isn't tested" still applies lol.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby nivmizzet1 » 03 Nov 2015, 11:12

Xander9009 wrote:I don't know of any card that uses this and I haven't made the code myself at all. It should be pretty simple though.

Code: Select all
   -- Put this in an RTA inside the persist ability
   <RESOLUTION_TIME_ACTION>
      RSN_ObjectDC():Int_Inc(0)
   </RESOLUTION_TIME_ACTION>
Code: Select all
   -- Put this inside the persist ability as well
   <AUTO_SKIP>
      return RSN_ObjectDC():Get_Int(0) &gt;= 2
   </AUTO_SKIP
Code: Select all
   -- Make this a new ability entirely (obviously). Copied directly from Soul Summons.
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY"> -- Permanently protect ObjectDC
      <TRIGGER value="ZONECHANGE_CONSIDERED" pre_trigger="1" simple_qualifier="self" />
      <RESOLUTION_TIME_ACTION>
         RSN_ProtectObjectDC()
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
In case it's not obvious, my previous "this isn't tested" still applies lol.
It doesn't seem to be working :-( I might have a closer look and try to figure out why.
nivmizzet1
 
Posts: 617
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Community Wad

Postby Xander9009 » 03 Nov 2015, 12:28

Put this after the increment: MTG():MessageAllPlayers(RSN_ObjectDC():Get_Int(0))

Make sure it's increasing properly.

Also, it's missing the reset, because I forgot about it. You'll just need to make a trigger for end of turn that calls RSN_ObjectDC():Set_Int(0, 0).

EDIT: You could even make that reset every step, rather than at the end of every turn. This way, it'll start auto-skipping if used in an infinite combo, but otherwise is unlikely to ever auto-skip.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby alexandreonly » 03 Nov 2015, 16:23

Hi, i made some mods in the past and i want to back, but first i need to know some things:

1 - Planeswalker cards work well now?
2 - The AI know how to deal with infect and wither now?
3 - It's possible to play online against other people with modded cards? How?
4 - Can you recommend the easiest to use tools to mod?
5 - What's the easiest way to verify what cards are already avaiable here, to prevent making them again?

I want to make the cards from the older sets, something between 4th and 7th edition.
alexandreonly
 
Posts: 145
Joined: 04 Jul 2011, 17:27
Has thanked: 0 time
Been thanked: 8 times

Re: Community Wad

Postby Xander9009 » 03 Nov 2015, 16:39

Awesome. More modders is always a good thing. Welcome back. :)

1: They work relatively well. I never have any problems with them, but others occasionally do. The AI doesn't always use them the most effectively, but it will use them. It'll also prioritize attacking them in order to kill them.

2: I don't know if it handles infect and wither both particularly effectively, but I do know that it understands it to an extent. I haven't personally played using infect often enough to really gauge it.

3: Various people have done this. The requirements are that you and the other player must have the EXACT same wad files. The CW is updated every day, so make sure you have the newest version. Make sure you're either both using or neither using Riiak's Manual Mana Mod (using it will give basic lands the manual mana ability but shouldn't have any other effect). Also make sure you both have the same deck was and content pack enablers. Also, it's only been achieved with the official game. Doesn't seem to want to work with cracked games, which is largely what stopped the multiplayer event being planned recently.

4: Riiak's Deck Builder and Notepad++ are all you really need. Notepad++ can be replaced by any programming text editor, but the deck builder is pretty much essential. You CAN mod without it, but it's a LOT easier. If you're modding for the CW, then you don't need anything else. Otherwise, you'll need Gibbed Tools to convert the images (and sort of to pack your wad, but the deck builder actually has that ability).

5: Migookman made a post recently listing all of the currently missing cards. The list includes cards that haven't been done and card's that can't be done, with no distinction, but the list is still VERY useful. It's a few pages back. (Or just search for a post by migookman and see his signature).

Feel free to make any cards you want. Older cards are probably the majority of the missing ones, so that works out.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 4 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 4 guests

Login Form