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

Additional combat phase

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

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

Additional combat phase

Postby Xenias » 01 Aug 2013, 12:01

Yes Relentless Assault, Hellkite Charger, etc does not work for now.
It allows you to take an additional combat, but no damage resolved.
I found land_can_be_played is also a flag for combat.

visions.c
Code: Select all
int card_relentless_assault(int player, int card, event_t event){

    if( event == EVENT_CAN_CAST && current_phase == PHASE_MAIN2 ){
        return 1;
    }
    else if( event == EVENT_RESOLVE_SPELL ){
            test_definition_t this_test;
            default_test_definition(&this_test, TYPE_CREATURE);
            this_test.state = STATE_ATTACKED; //Originally STATE_ATTACKING, fixed.
            new_manipulate_all(player, card, player, &this_test, ACT_UNTAP);
            current_phase = PHASE_MAIN1;
            /*
            land_can_be_played is a flag for land, and also for combat.
            bit0 -> land can be played
            bit3 -> can combat
            Maybe I think bit1 and bit2...and so on also has a flag.
            (It seems Pyramids uses bit9, Reverse Polarity and Healing Salve, Reverse Damage uses bit2, but I don't know any details)
            */
            land_can_be_played &= ~(1<<3); // = land_can_be_played & 11110111
            kill_card(player, card, KILL_DESTROY);
    }

   return 0;
}
Relentless Assault works fine.

Thanks for read.

For moderators, I'm sorry I have no idea where to post this topic.
Please move.
Last edited by Xenias on 02 Aug 2013, 22:02, edited 1 time in total.
Xenias
 
Posts: 8
Joined: 13 Jul 2013, 16:41
Has thanked: 0 time
Been thanked: 3 times

Re: Additional combat phase

Postby Gargaroz » 02 Aug 2013, 20:03

WOW ! Amazing find ! Thanx a lot Xenias ! Please check the "Manalink TODO list" and try to help us with other stuff too !
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times


Return to Development

Who is online

Users browsing this forum: No registered users and 20 guests


Who is online

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

Login Form