[fixed]Jayemdae Tome AI activates with no mana infinite loop
Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins
Re: [fixed]Jayemdae Tome AI activates with no mana infinite
by FastEddie » 14 Nov 2020, 10:34
Let's look at this in more detail in case someone is still interested.
generic_activated_ability() is just a wrapper for granted_generic_activated_ability():
Edit: removed the last comment which was wrong.
generic_activated_ability() is just a wrapper for granted_generic_activated_ability():
- Code: Select all
int generic_activated_ability(int player, int card, event_t event, int mode, int cless, int black, int blue, int green, int red, int white,
uint32_t variable_costs, target_definition_t *td, const char *prompt)
{
return granted_generic_activated_ability(player, card, player, card, event, mode, cless, black, blue, green, red, white, variable_costs, td, prompt);
}
- Code: Select all
int granted_generic_activated_ability(int granting_player, int granting_card, int granted_to_player, int granted_to_card, event_t event, int mode,
int cless, int black, int blue, int green, int red, int white,
uint32_t variable_costs, target_definition_t *td, const char *prompt)
{
/* Removing some code that is not relevant for us */
if(event == EVENT_ACTIVATE ){
/* Removing some more code that is not relevant for us */
if( mode & GAA_UNTAPPED ){
add_state(granted_to_player, granted_to_card, STATE_TAPPED);
}
/* Removing even more code that is not relevant for us */
return 1;
/* Yes, it doesn't end here but we are done */
}
- Code: Select all
if( event == EVENT_ACTIVATE ){
ai_modifier += (count_subtype(player, TYPE_LAND, -1) * 8);
}
- Code: Select all
if( event == EVENT_ACTIVATE ){
generic_activated_ability(player, card, event, GAA_UNTAPPED, MANACOST_X(4), 0, NULL, NULL);
/* What generic_activated_ability did was to set the STATE_TAPPED flag*/
if( cancel != 1 ){
ai_modifier += (count_subtype(player, TYPE_LAND, -1) * 8);
}
}
Edit: removed the last comment which was wrong.
---
Argivian Archaeologist in the Library of Leng studying the Spells of the Ancients
Argivian Archaeologist in the Library of Leng studying the Spells of the Ancients
16 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 9 guests