Alpha Brawl targeted creature also damage to itself
Describe the Bug:
Alpha Brawl targeted creature for the 2nd part of the ability it counts also itself and so deals also damage to itself as all others do.
Alpha Brawl
Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Manalink dev 51094f68 version - duel
What exactly should be the correct behavior/interaction?
Alpha Brawl:
Target creature an opponent controls deals damage equal to its power to each other creature that player controls, then each of those(dealt damage creatures) deals damage equal to its power to that creature.
Are any other cards possibly affected by this bug?
-
Alpha Brawl targeted creature for the 2nd part of the ability it counts also itself and so deals also damage to itself as all others do.
- Code: Select all
int card_alpha_brawl(int player, int card, event_t event){
/*
Alpha Brawl |6|R|R
Sorcery
Target creature an opponent controls deals damage equal to its power to each other creature that player controls,
then each of those creatures deals damage equal to its power to that creature.
*/
if( ! IS_GS_EVENT(player, card, event) ){
return 0;
}
target_definition_t td;
default_target_definition(player, card, &td, TYPE_CREATURE);
td.allowed_controller = 1-player;
card_instance_t *instance = get_card_instance(player, card);
if(event == EVENT_RESOLVE_SPELL ){
if( valid_target(&td) ){
int my_damage = get_power(instance->targets[0].player, instance->targets[0].card);
if( my_damage > 0 ){
test_definition_t test;
default_test_definition(&test, TYPE_CREATURE);
test.not_me = 1;
new_damage_all(instance->targets[0].player, instance->targets[0].card, instance->targets[0].player, my_damage, 0, &test);
}
int count = active_cards_count[instance->targets[0].player]-1;
while(count > -1 ){
if( in_play(instance->targets[0].player, count) && is_what(instance->targets[0].player, count, TYPE_CREATURE) ){
int dmg = get_power(instance->targets[0].player, count);
if( dmg > 0 ){
damage_creature(instance->targets[0].player, instance->targets[0].card, dmg,
instance->targets[0].player, count);
}
}
count--;
}
}
kill_card(player, card, KILL_DESTROY);
}
return generic_spell(player, card, event, GS_CAN_TARGET, &td, "TARGET_CREATURE", 1, NULL);
}
Alpha Brawl
Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Manalink dev 51094f68 version - duel
What exactly should be the correct behavior/interaction?
Alpha Brawl:
Target creature an opponent controls deals damage equal to its power to each other creature that player controls, then each of those(dealt damage creatures) deals damage equal to its power to that creature.
Are any other cards possibly affected by this bug?
-