Possibly faulty keyword and locating code for cards
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
Possibly faulty keyword and locating code for cards
by 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:
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;
}
- 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
by 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.
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.
Apps by jatill: http://www.slightlymagic.net/wiki/Other_Apps_by_jatill
Re: Possibly faulty keyword and locating code for cards
by 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?
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
by jatill » 08 Feb 2011, 20:09
Haste and vigilance
Apps by jatill: http://www.slightlymagic.net/wiki/Other_Apps_by_jatill
Re: Possibly faulty keyword and locating code for cards
by 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
by 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!
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
by Salbei » 16 Feb 2011, 22:46
Thanks for doing this.
Enjoy your time out
Enjoy your time out
Retired a long time ago. I will not reply.
-
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
by 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
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 13 guests