It is currently 20 Jul 2019, 12:17
   
Text Size

More ability icons

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

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

Re: More ability icons

Postby stassy » 24 Jun 2013, 06:22

Ah ok, right, I though the last slots you were talking were including those you mentioned earlier.

I think we can safely discard the legend one since the new legend rules it's no longer used as an "active" ability (aka destroy a legend opponent)
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: More ability icons

Postby Korath » 24 Jun 2013, 23:41

Aswan jaguar wrote:- Defender rather it's predecessor Wall (ability)is in the engine and csv can't you make a call to the asm code that already exists.
- Legendary as above, is in the engine and csv can't you make a call to the asm code that already exists.(unless that is what you mean with: "Not currently flagged in an easily accessible way"
Defender is added in at least three different ways by the exe and C, and Legendary in at least two. One of these ways for each isn't easy to check; rather than being a flag set on the card, the card responds to a specific event. Accidentally sending events to cards was what made the initial version of this crash so frequently.
Aswan jaguar wrote:edit-I have noticed also that some icons with some cards with(till the end of turn and such abilities)sometimes work as intended and others not.When this gets incorporated in next patch are we going to report them in bug forum so that maybe cards code can be improved or here?
When it's incorporated in a mainline release please report them in the main forum. Sometimes it'll be a problem with the display being wrong; sometimes the card will actually still have the ability and it was just less obvious before.
User avatar
Korath
DEVELOPER
 
Posts: 3407
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: More ability icons

Postby Gargaroz » 25 Jun 2013, 15:11

Well, usually for checking if a card is legendary you should check the "family / subtype" field of "cards_data". If it's 0xE or 0xF, it's legendary. It won't work with cards like Leyline of Singularity in play, but oh well...
Also, in order to implement the new legend rule for all the old cards, they will be slowly recoded, so we could add another SP_KEYWORD if it's more easy for you, there's still space.
For checking "defender", there's a specific code used by Overgrown Battlement, "count_defenders()", that you could use. Plus, add a check if the same field used for Legendary is "0" : that means that the creature cannot attack unless something like Rolling Stones or Animate Wall is invoked (too bad I have no idea of how they work, I remade a new piece of code to emulate that for some cards).
----
- 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: 7095
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 593 times

Re: More ability icons

Postby Sonic » 26 Jun 2013, 23:27

Been having a few problems with the mod up and running.

The damage number doesn't appear in the right hand top corner of the card anymore - although the dagger icon does.
And I've been having a few error issues when 'unblockable' is involved. I'll try and post some pics when I next catch it.

Can anyone else confirm similar experiences?
Working On: Life, the Universe, and Everything.
User avatar
Sonic
Apprentice
 
Posts: 827
Joined: 27 Feb 2010, 00:37
Has thanked: 3 times
Been thanked: 160 times

Re: More ability icons

Postby Korath » 27 Jun 2013, 00:34

I only see the top half of the damage numeral... but I do with the PoDMNv2 executable and dlls, too. Investigating.
User avatar
Korath
DEVELOPER
 
Posts: 3407
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: More ability icons

Postby Korath » 27 Jun 2013, 02:16

Not only did I have an early edit of ManalinkEx.dll in my pristine executables dir, there was an exceptionally careless error in it. (8 + 4 isn't 0x12. Argh.)

Changing byte 0x203DD1 of ManalinkEx.dll from 0x12 to 0x0C fixes it. I'm attaching both the repatched dll, and an updated patch_icons.pl for the source distribution.
Attachments
manalinkex-38ed2e7.zip
(26.11 KiB) Downloaded 211 times
User avatar
Korath
DEVELOPER
 
Posts: 3407
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: More ability icons

Postby Aswan jaguar » 15 Jul 2013, 14:16

Korath wrote:Unblockable problem doesn't surprise me too much; PtM didn't add the bit in unblockable() (and may in fact have been calling the version in the exe), so I added it in. Same with intimidate. I haven't found where the bits in targets[16].card are removed yet, though.
Edit: At least hexproof (e.g. from Glaring Spotlight) does the same thing. I suspect all the targets[16].card abilities do.

Same problems with Fear for exe/asm creatures and effects as Unblockable, etc.: Gluttonous Zombie, Severed Legion, and Fear itself.
Korath are these abilities Unblockable,hexproof,Fear,intimidate still having a bad behaviour causing the icon of a "till the end of turn" cases to remain on the card although the ability has ended.
I am asking so I won't post bugs about these 4 abilities-icons (if we know that they can't be fixed) in bug forum.I just encountered this with Riverfall Mimic unblocable icon staying for ever though the ability ended and it could be correctly blocked next turn.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 6384
Joined: 13 May 2010, 12:17
Has thanked: 539 times
Been thanked: 274 times

Re: More ability icons

Postby Korath » 16 Jul 2013, 16:27

Icons appearing where they shouldn't or not appearing where they should is always a bug. Some of them can be fixed in big chunks (the same bug affecting many cards); some will be specific to the card. It's not going to be at all obvious which is which. If someone could start assembling a list so I could have them all in front of me in the same place when I have some time freed up, I'd appreciate it.
User avatar
Korath
DEVELOPER
 
Posts: 3407
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: More ability icons

Postby stassy » 17 Jul 2013, 11:47

Well, starting the list, should another new thread be sticked in the bug section or list can be put here?

Vizkopa Guildmage (only when cast, when using any of his ability all the icons but lifelink disappear)
Image
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: More ability icons

Postby stassy » 17 Jul 2013, 12:06

Wall of Shards (appeared on the 2nd cumulative upkeep and stayed until buried)
Image
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: More ability icons

Postby Gargaroz » 17 Jul 2013, 13:45

Checked both card code, and everything is fine, so the bug is in another spot.
----
- 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: 7095
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 593 times

Re: More ability icons

Postby Korath » 17 Jul 2013, 14:03

I can't reproduce Vizkopa Guildmage or Wall of Shards, either one. I haven't updated my source tree to OtI yet, though.

Do the extra icons disappear if you momentarily move another window or card over them?
User avatar
Korath
DEVELOPER
 
Posts: 3407
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: More ability icons

Postby stassy » 17 Jul 2013, 18:34

Nope, they stay on the creatures until another real effect affect them.

Ok got the culprit, it's Smoldering Spires, once the effect on opponent targeted creature wear off, the icons appear.

Image
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: More ability icons

Postby Korath » 17 Jul 2013, 22:40

Aha - yes, that would do it. Most other temporary cannot-block effects (any that go through the standard pump_ability_until_eot function) will do the same.

The reason is that we use one of the flags for new special abilities, SP_KEYWORD_CANNOT_BLOCK, to tell pump_ability_until_eot() to add this effect; but instead of actually adding that flag, it calls a function in the exe instead. At end of turn, though, that bit is removed. The problem is that the field we use for all the new abilities except double strike and infect doesn't default to 0 (no bits set) when a card is created; it defaults to -1 (ALL bits set). There's a check when adding bits (and when determining what icons to display) to see whether the current value is below zero (i.e., the highest bit, SP_KEYWORD_DOES_NOT_END_AT_EOT, is set); if so, the add-a-bit functions first zero the field entirely, and the icon-display function doesn't show anything.

A quick and dirty fix for this, a likely similar problem with haste-until-eot, and anything similar we do in the future:
Code: Select all
diff --git a/src/functions/functions.c b/src/functions/functions.c
index cd0df23..e5ded8c 100644
--- a/src/functions/functions.c
+++ b/src/functions/functions.c
@@ -1216,6 +1216,10 @@ int block_if_able(int player, int card, event_t event){

 int special_abilities(int player, int card, event_t event, int sp_abilities ){

+    card_instance_t* instance = get_card_instance(player, card);
+    if (instance->targets[16].card < 0)
+        instance->targets[16].card = 0;
+
     if( sp_abilities & SP_KEYWORD_FEAR ){
         fear(player, card, event);
     }
Incidental bug: Smoldering Spires doesn't let you target your own creature, nor force you to target your own creature if that's the only valid target. Awful hard to come up with situations where it's relevant, though. Maybe with Skulking Ghost and its variants; or cheating lands into play during your opponent's turn while he has shrouded/hexproof creatures to attack with.
User avatar
Korath
DEVELOPER
 
Posts: 3407
Joined: 02 Jun 2013, 05:57
Has thanked: 482 times
Been thanked: 948 times

Re: More ability icons

Postby Gargaroz » 18 Jul 2013, 00:29

It's not a big deal : I'll make a wrapper function for the hardcoded one that set the required bits. And I'll fix Smoldering Spires ;)
Apart from this, I'll add the dirty fix too, so we'll be sure that card code doesnt't messes with the icons.
----
- 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: 7095
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 593 times

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 2 guests

Login Form