Page 1 of 1

[fixed/closed]Suppression Field

PostPosted: 05 Dec 2013, 12:53
by stassy
Describe the Bug:
Suppression Field seems to only work on creature activated ability or land ability, not enchantment nor special effect like Cycling

Which card did behave improperly ?
Suppression Field

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
PTT

What exactly should be the correct behavior/interaction ?
Suppression Field work all activated abilities

Are any other cards possibly affected by this bug ?
-

Image

Image

Image

Image

Tested also successfully on Academy Ruins

Re: Suppression Field

PostPosted: 05 Dec 2013, 13:25
by Korath
The way activated ability cost modifiers are coded, they need to be fixed for each individual card the added cost isn't applied to, and won't work with asm-coded cards like Holy Armor.

Though, looking at Gloom, it seems it could've been done by just having the source cards respond to EVENT_MODIFY_AB_COST_GL:
Code: Select all
int card_gloom(int player, int card, event_t event)
{
  if (event == EVENT_MODIFY_COST_GLOBAL)
    {
      int color = get_color(affected_card_controller, affected_card);
      if (color & (1 << get_sleighted_color(player, card, COLOR_WHITE)))
        COST_COLORLESS += 3;
    }

  if (event == EVENT_MODIFY_AB_COST_GL)
    {
      card_instance_t* aff_inst = get_card_instance(affected_card_controller, affected_card);
      int color = get_color(affected_card_controller, affected_card);

      if (color & (1 << get_sleighted_color(player, card, COLOR_WHITE))
          && (card_data_pointers[aff_inst->internal_card_id]->type & TYPE_ENCHANTMENT))
        byte_55CF28 += 3;
    }

  if (event == EVENT_CAN_CAST)
    return 1;

  if ((event == EVENT_CAST_SPELL || event == EVENT_SHOULD_AI_PLAY)
      && affect_me(player, card))
    {
      int color = get_sleighted_color(player, card, COLOR_WHITE);

      ai_modifier += 12 * (1 + landsofcolor_controlled[1-player][color] - 2 * landsofcolor_controlled[player][color]);
    }

  return 0;
}

Re: Suppression Field

PostPosted: 05 Dec 2013, 14:59
by Aswan jaguar
korath about Gloom the activated abilities part doesn't work even with original cards.It got broken at a point maybe as early as Manalink 1.32 was out.In Shandalar though it works as intended.
We had this discussion 2 years ago and Stassy finally found that it works in Shandalar:
viewtopic.php?f=86&t=7131&p=89562&hilit=Gloom#p89562

I don't know if this post from Xenias in development todo forum helps:
viewtopic.php?f=56&t=11152&p=128884&hilit=Gloom#p128884

Re: Suppression Field

PostPosted: 05 Dec 2013, 18:10
by Korath
Hrm. EVENT_MODIFY_AB_COST doesn't actually get dispatched anywhere that I can find, though the byte Gloom sets in response to it does get checked in all the right places. The Shandalar version (at least, the Shandalar.exe that's been included in recent patches) of Gloom sets the variable Xenias mentions in EVENT_COUNT_MANA, and the original enchantments check for it in their card functions.

In any case, will need to know specific card names the current implementation doesn't work with in order to fix them.

Re: Suppression Field

PostPosted: 05 Dec 2013, 18:44
by Aswan jaguar
Of course you mean White Enchantments of the original game,right?

Re: Suppression Field

PostPosted: 05 Dec 2013, 19:44
by Korath
I mean all enchantments of the original game that have activated abilities (though that isn't really very many). They need to to support Sleight of Mind.

Re: Suppression Field

PostPosted: 07 Dec 2013, 07:47
by Aswan jaguar
Either I don't get what you mean or you didn't notice that Gloom is supposed to affect activated abilities of White enchantments only.
So reasonably it has to be tested against them.

TESTED :
DUEL Gloom - White Enchantments only (Original Microprose cards) it doesn't work with no original card
Anyway tested with all Original Enchantment cards that have activated abilities:
1- Blessing
2- Circle of Protection: Black
3- Circle of Protection: Blue
4- Circle of Protection: Green
5- Circle of Protection: Red
6- Circle of Protection: White
7- Circle of Protection: Artifacts
8- Deathgrip
9- Holy Armor
10- Flood
11- Firebreathing
12- Regeneration
13- Lifeforce
14- Greed
15- Greater Realm of Preservation
16- The Brute
17- Instill Energy
18- Pestilence
19- Gate to Phyrexia

There probably are more ASM coded Enchantment cards that were coded by Mok and Jatill (and haven't been recoded)which I didn't check but I don't expect them to work with Gloom either.

* Shandalar Gloom - White Enchantments ?

Or you mean to test Suppression Field which though has to be tested with any card with activated abilities from original game and not only Enchantments.
Suppression Field has been tested with all above cards so only Enchantments and it doesn't work either of course.


* Also do you want to check them in Shandalar,too (where at least Circle of Protection: Black is tested by Stassy and works with Gloom)?
I won't be able to do so as I am a novice in Shandalar and it will take me forever to test them there.If you want I will ask Stassy or anyone else familiar with Shandalar to help.

Re: [new info-list submitted]Suppression Field

PostPosted: 07 Dec 2013, 13:08
by Korath
What I meant is that e.g. Firebreathing has to look at these variables because someone might cast Sleight of Mind on Gloom to change it to affect red enchantments instead of white ones.

There's no point testing them in Shandalar; if they're broken there they're not going to get fixed. If Shandalar ever gets further development, it'll be by moving its adventure mode into Manalink, not by working on it directly.

The list I need is for the originally-reported bug - individual cards with nonmana activated abilities whose cost Suppression Field* doesn't affect; and whether they're enchantments or not won't have any impact at all on whether they're affected or not. I don't think it's a good use of tester time to specifically look for nonworking cards, but we'll certainly fix any that happen to get noticed in passing.

We already know that none of the exe or asm-coded cards will work with these effects, so there's no need to report them.


*Or Power Artifact, Training Grounds, or Heartstone, which all share its code.

Re: [new info-list submitted]Suppression Field

PostPosted: 09 Dec 2013, 02:34
by Gargaroz
For now, I've fixed the interaction of "Cycling" and related abilities with Suppression Field.

Re: [part fixed - part need info]Suppression Field

PostPosted: 02 Jun 2014, 14:00
by Gargaroz
Well, all the rest of the ASM coded cards with this problems are now recoded and waiting to be inserted at some point in the future, so we could consider this fixed.