It is currently 23 Apr 2024, 19:08
   
Text Size

Possibly faulty keyword and locating code for cards

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

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

Possibly faulty keyword and locating code for cards

Postby Serra » 07 Feb 2011, 22:31

Hi.

I'll have to keep this short, hope you'll forgive my Spartan style.

Since this is my first post on this forum, here is a short presentation of myself: I've played this game for 1+ years, and really enjoyed it. Now, other things must take priority, but I thought I'd help out with the program a little before leaving. Basically my way of saying "thanks for keeping this updated".

Therefore I've fixed a couple of bugs (most of the fixes can be found in the recent patch), and I'm going to update the coding-wiki to facilitate for the community and new coders to help out in the future.

Because of the above I have two questions:

1. The code for Sylvan Library, Armadillo Cloak and a couple of other cards cannot be found in the card code files. I assume they are located in the exe, but they are not listed as such in the manalink.h file. Therefore I conjecture that not all cards in the exe are written in the manalink.h file. My question is thus, how would one recode a card in the exe that is not listed in manalink.h? Can you just rewrite the card with new C code using SkyMagic Editor, or do you have to do something else?

2. The lifelink keyword seems to be faulty. To be more precise, in the following code:
Code: Select all
card_data_t card_d = get_card_data(player, card);
if(card_d.static_ability & KEYWORD_LIFELINK){
   life[player] = 1337;
}
the conditional never seems to evaluate to true. Is this correct, and if so, are there any more known problems with the keywords?
Serra
 
Posts: 5
Joined: 02 Jan 2011, 13:25
Has thanked: 0 time
Been thanked: 0 time

Re: Possibly faulty keyword and locating code for cards

Postby jatill » 08 Feb 2011, 16:50

1. Yes, you can just recode a card from scratch in C and abandon the code in the exe.
2. LIFELINK is not a keyword originally built into the game. It's just a bolt-on I added for convenience, so it won't work the way you are trying.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Possibly faulty keyword and locating code for cards

Postby Serra » 08 Feb 2011, 19:32

OK. Thanks for the fast response.

Edit: Are there any other keywords that have the same restrictions on their use as lifelink?
Serra
 
Posts: 5
Joined: 02 Jan 2011, 13:25
Has thanked: 0 time
Been thanked: 0 time

Re: Possibly faulty keyword and locating code for cards

Postby jatill » 08 Feb 2011, 20:09

Haste and vigilance
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Possibly faulty keyword and locating code for cards

Postby Serra » 13 Feb 2011, 13:59

I'll add that to the wiki update. Thanks.
Serra
 
Posts: 5
Joined: 02 Jan 2011, 13:25
Has thanked: 0 time
Been thanked: 0 time

Re: Possibly faulty keyword and locating code for cards

Postby Serra » 16 Feb 2011, 22:22

The "Coding Cards in C"-wiki has now been substantially updated. Hope you like it! That is probably the last contribution to the manalink project I have time to make. Although you never know, maybe one day I'll have time to spare once again.

Untill then,
See you around!
Serra
 
Posts: 5
Joined: 02 Jan 2011, 13:25
Has thanked: 0 time
Been thanked: 0 time

Re: Possibly faulty keyword and locating code for cards

Postby Salbei » 16 Feb 2011, 22:46

Thanks for doing this.
Enjoy your time out :)
Retired a long time ago. I will not reply.
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: Possibly faulty keyword and locating code for cards

Postby Serra » 21 Feb 2011, 00:52

No problem, and I will.
Serra
 
Posts: 5
Joined: 02 Jan 2011, 13:25
Has thanked: 0 time
Been thanked: 0 time


Return to Development

Who is online

Users browsing this forum: No registered users and 13 guests


Who is online

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

Login Form