Nether Shadow & friends
Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!
PLEASE DO NOT REPORT BUGS HERE!
Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins
Nether Shadow & friends
by Gargaroz » 27 Dec 2009, 18:18
Just finished writing and testing a new code for Nether Shadow, it seems to work nicely :
And here's a Shadow's fried, Ashen Ghoul :
- Code: Select all
int card_nshadow(int player, int card, event_t event){
haste(player, card);
if( event == EVENT_GRAVEYARD_ABILITY_UPKEEP ){
int position = 0;
int *graveyard = graveyard_ptr[player];
int victims = 0;
int count = count_graveyard(player) - 1;
while( count > -1 ){
if( cards_data[ graveyard[count] ].id == 171 ){
position = count;
}
count--;
}
count = count_graveyard(player) - 1;
while( count > position ){
if( (cards_data[ graveyard[count] ].type & TYPE_CREATURE) ){
victims++;
}
count--;
}
if( victims >= 3){
int choice = do_dialog(player, player, card, -1, -1," Return Nether Shadow\n Do not return Nether Shadow\n", 0);
if( choice == 0 ){
put_into_play(player, card);
return -1;
}
}
return -2;
}
return 0;
}
And here's a Shadow's fried, Ashen Ghoul :
- Code: Select all
int card_ashen_ghoul(int player, int card, event_t event){
haste(player, card);
if( event == EVENT_GRAVEYARD_ABILITY_UPKEEP ){
int position = 0;
int *graveyard = graveyard_ptr[player];
int victims = 0;
int count = count_graveyard(player) - 1;
while( count > -1 ){
if( cards_data[ graveyard[count] ].id == 750 ){
position = count;
}
count--;
}
count = count_graveyard(player) - 1;
while( count > position ){
if( (cards_data[ graveyard[count] ].type & TYPE_CREATURE) ){
victims++;
}
count--;
}
if( victims >= 3){
int choice = do_dialog(player, player, card, -1, -1," Return Ashen Ghoul\n Do not return Ashen Ghoul\n", 0);
if( choice == 0 ){
charge_mana_multi(player, 0, 1, 0, 0, 0, 0);
if( spell_fizzled != 1){
put_into_play(player, card);
return -1;
}
}
}
return -2;
}
return 0;
}
----
- 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
- 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
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests