It is currently 18 Apr 2024, 23:01
   
Text Size

[fixed]Radjan Spirit 's ability doesn't remove flying.

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

[fixed]Radjan Spirit 's ability doesn't remove flying.

Postby Aswan jaguar » 21 Mar 2017, 15:12

Describe the Bug:
1- Radjan Spirit 's ability doesn't remove flying from targeted creature.
2- Radjan Spirit 's ability creates a legacy that doesn't go away at eot.
Which card did behave improperly?
Radjan Spirit

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Manalink 2016/08/27: Eldritch Moon v2, duel

What exactly should be the correct behavior/interaction?
1- Radjan Spirit 's ability removes flying from targeted creature.
2- Radjan Spirit 's ability lasts till eot.
Are any other cards possibly affected by this bug?
-
Attachments
radjan spirit ability not removing fly.rar
(3.89 KiB) Downloaded 137 times
Last edited by Aswan jaguar on 28 Jun 2019, 15:46, edited 2 times in total.
Reason: fixed
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: [confirmed]Radjan Spirit 's ability doesn't remove flyin

Postby Aswan jaguar » 28 Jun 2019, 13:45

I fixed this and all negate_ abilities by removing the check_status() from legacy_negate_ability_and_special_ability that was messing things up. Korath if check_status(player, card, STATUS_CONTROLLED) is needed to help with cases of control please help me to do this correctly if possible.
The code before the removal of check_status():
Code: Select all
int legacy_negate_ability_and_special_ability(int player, int card, event_t event){

   if (event == EVENT_ABILITIES && check_status(player, card, STATUS_CONTROLLED)){
      card_instance_t *instance = get_card_instance(player, card);
      if( instance->damage_target_player > -1 ){
         if (affect_me(instance->damage_target_player, instance->damage_target_card)){
            if( instance->targets[1].player > -1 ){
               event_result &= ~instance->targets[1].player;
            }
            if( instance->targets[1].card > -1 ){
               remove_special_ability(player, card, instance->targets[1].card);
            }
         }
      }
   }

   if( event == EVENT_CLEANUP ){
      card_instance_t *instance = get_card_instance(player, card);
      if( instance->targets[1].player > -1 && (instance->targets[1].player & 1) ){
         effect_on_all_negate_ability_and_special_ability_legacy_attached_to_me(instance->damage_target_player, instance->damage_target_card, 1);
      }
      kill_card(player, card, KILL_EXILE);
   }

   return 0;
}
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: [confirmed]Radjan Spirit 's ability doesn't remove flyin

Postby Korath » 28 Jun 2019, 14:26

The thing STATUS_CONTROLLED does in the executable is mark which of a set of mutually-exclusive effects is active. It's set, for example, on exactly one control-changing effect or Aura card attached to each controlled permanent (to indicate whether a change of control will happen if the effect wears off or the Aura is disenchanted); on exactly one base power/toughness-changing effect like Sorceress Queen's (so that if you queen a Hill Giant twice, only one of the Sorceress Queen effects changes its p/t by -3/-1, not both); on Raging River, so that if there are multiple copies on the bf, only one of them makes you choose which side to pick for each nonflying creature (though apparently the correct behavior would be to choose "left" or "right" for each creature separately for each Raging River).

Comments in effect_on_all_negate_ability_and_special_ability_legacy_attached_to_me() seem to indicate Gargaroz's new change-of-control system shares implementation with removal of abilities. Or perhaps that parts of the one were cut-and-pasted from the other. The whole change-of-control system in Magic.exe is held together with popsicle sticks and bubblegum, and Gargaroz's rewrite doesn't actually fix any of it, just hides it behind a curtain so it can be (mostly) safely ignored, so I'd be very leary of changing anything related to it without a great deal of testing.

So for the purpose of this functionality - merely removing abilities - my advice is to ignore what's there and start over. Write a simple effect card that does nothing except remove the abilities, and use that instead. It'll look essentially like legacy_negate_ability_and_special_ability(), without
  • the STATUS_CONTROLLED check, and
  • the call to effect_on_all_negate_ability_and_special_ability_legacy_attached_to_me() just before it removes itself at end-of-turn.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [confirmed]Radjan Spirit 's ability doesn't remove flyin

Postby Aswan jaguar » 28 Jun 2019, 15:43

Fixed this as suggested ( hopefully I followed instructions correctly - seems good in simple tests) in commit dcfbf873.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: [fixed]Radjan Spirit 's ability doesn't remove flying.

Postby Korath » 18 Jul 2019, 19:31

This broke the build; fixed in 22b5019a2.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 41 guests


Who is online

In total there are 41 users online :: 0 registered, 0 hidden and 41 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 41 guests

Login Form