It is currently 14 May 2025, 09:48
   
Text Size

[fixed]Emberwilde caliph doesn't trigger vs planeswalkers

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

[fixed]Emberwilde caliph doesn't trigger vs planeswalkers

Postby travolter » 11 Jun 2019, 20:16

Describe the Bug:
Wizard does not lose life each time Emberwilde Caliph does damage

Which card did behave improperly ?
Emberwilde Caliph

Which update are you using?
dev version 250c78bd updated to 11-5-19 /DUEL
Attachments
emberwilde caliph.rar
(2.08 KiB) Downloaded 135 times
Last edited by Aswan jaguar on 17 Jun 2019, 09:08, edited 2 times in total.
Reason: fixed
travolter
 
Posts: 259
Joined: 26 Mar 2012, 17:56
Has thanked: 6 times
Been thanked: 8 times

Re: Emberwilde caliph

Postby Aswan jaguar » 16 Jun 2019, 16:17

I solved the bug by putting the correct DDBM flag in commit 0d56ea9e but although I tried a lot can't make it trigger for damage made to planeswalkers. Only 1 function for cards that deal damage to anything seems to work correctly with planeswalkers the spirit_link_effect but uses a different approach.

current code | Open
int card_emberwilde_caliph(int player, int card, event_t event){
/* CARD_ID_EMBERWILDE_CALIPH 2463
Emberwilde Caliph |2|U|R
Creature - Djinn 4/4
Flying, trample
~ attacks each turn if able.
Whenever ~ deals damage, you lose that much life. */

attack_if_able(player, card, event);

check_damage_test(player, card, event, DDBM_REPORT_DAMAGE_DEALT, player, card, 0, NULL);

if( resolve_damage_trigger(player, card, event, DDBM_REPORT_DAMAGE_DEALT, player, card) ){
int amount = get_card_instance(player, card)->targets[16].player;
get_card_instance(player, card)->targets[16].player = 0;

lose_life(player, amount);
}

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

Re: Emberwilde caliph doesn't trigger /damage to planeswalke

Postby travolter » 16 Jun 2019, 20:28

Nice job Aswan!!! ;)
At least you found a working solution. With current fix the card is perfectly playable in a block like "Mirage" one where no planeswalkers are present.

Im reading teh code and I think that sooner or later Ill have to help you with the code. At least with simple tasks and learning from currently working coded cards to reuse code.
travolter
 
Posts: 259
Joined: 26 Mar 2012, 17:56
Has thanked: 6 times
Been thanked: 8 times

Re: Emberwilde caliph doesn't trigger /damage to planeswalke

Postby Korath » 17 Jun 2019, 04:09

Setting |DDBM_MUST_DAMAGE_PLANESWALKER (which, to be fair, would be better named DDBM_DONT_FORBID_DAMAGE_TO_PLANESWALKER) doesn't work?
User avatar
Korath
DEVELOPER
 
Posts: 3708
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1108 times

Re: Emberwilde caliph doesn't trigger /damage to planeswalke

Postby Aswan jaguar » 17 Jun 2019, 06:51

I had tried DDBM_MUST_DAMAGE_PLANESWALKER flag before but I must have made a silly mistake and didn't apply it also to resolve_damage_trigger. Anyway now it works, thanks for the help Korath.

edit: Fixed in commit 27695511 also fixed same bug for Tamanoa and fix Sunhome Enforcer that triggered on all damage.
Last edited by Aswan jaguar on 17 Jun 2019, 09:07, edited 1 time in total.
Reason: edit
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8129
Joined: 13 May 2010, 12:17
Has thanked: 748 times
Been thanked: 477 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 29 guests


Who is online

In total there are 29 users online :: 0 registered, 0 hidden and 29 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 29 guests

Login Form