It is currently 19 Jul 2025, 07:46
   
Text Size

Community Wad

Moderator: CCGHQ Admins

Re: Community Wad

Postby tmxk2012917 » 14 Sep 2016, 15:32

Silumgar's Command could not count noncreature spells. And Harmless Offering did not work
tmxk2012917
 
Posts: 164
Joined: 15 Mar 2015, 09:52
Has thanked: 20 times
Been thanked: 12 times

Re: Community Wad

Postby Xander9009 » 14 Sep 2016, 20:19

http://magic.wizards.com/en/articles/ar ... 2016-09-12

I'm strongly considering incorporating the art from this reprint set. If anyone is opposed, please let me know. If so, I'll simply make an alternate art version of the various ones I'm interested in (which would not be part of the CW, but would be publicly available).
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby Splinterverse » 15 Sep 2016, 01:56

tmxk2012917 wrote:Silumgar's Command could not count noncreature spells. And Harmless Offering did not work
I coded Harmless Offering and it was working for me when I tested it. I will test it again tomorrow. Do you remember what type of permanent you tried to control and it didn't work? I tested it with creatures and it worked, but maybe you were trying another type?
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby tmxk2012917 » 15 Sep 2016, 02:02

Splinterverse wrote:
tmxk2012917 wrote:Silumgar's Command could not count noncreature spells. And Harmless Offering did not work
I coded Harmless Offering and it was working for me when I tested it. I will test it again tomorrow. Do you remember what type of permanent you tried to control and it didn't work? I tested it with creatures and it worked, but maybe you were trying another type?
Demonic Pact
tmxk2012917
 
Posts: 164
Joined: 15 Mar 2015, 09:52
Has thanked: 20 times
Been thanked: 12 times

Re: Community Wad

Postby Xander9009 » 15 Sep 2016, 02:35

Harmless Offering is fixed. The problem was my own fault, actually. I noticed when checking out the new cards that it was using a bad method. When a permanent's controller is being changed permanently, it should use SetBaseController() in a RESOLUTION_TIME_ACTION. Many cards need corrected, because they change control permanently, but do so in a Continuous_Action. However, when I switched the function name, I forgot to change CONTINUOUS_ACTION to RESOLUTION_TIME_ACTION. It's been fixed and I"m testing it now to make sure. It'll be fixed for certain one way or another by tomorrow.

EDIT: Done and tested.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby tmxk2012917 » 15 Sep 2016, 03:20

Thanks for your reply and glad to see so many beautiful arts will be added in the future
tmxk2012917
 
Posts: 164
Joined: 15 Mar 2015, 09:52
Has thanked: 20 times
Been thanked: 12 times

Re: Community Wad

Postby Xander9009 » 15 Sep 2016, 03:49

I should note that regarding harmless offering, it was coded the same as many other cards. So it wasn't anyone's fault that it was using the wrong function. Just wanted to be clear I'm not blaming anyone for that.

Anyway, for the arts, I'm really hoping we can find some HQ pics for them. They're really awesome and they're for a lot of cards I actually use a lot. I really like them all.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby Splinterverse » 15 Sep 2016, 21:11

Death Spark is missing it's check for cards above it in the graveyard. The AI is playing the card over and over without this check. I'm not sure how to check cards above/below or I would try to fix it. If there is a way to do it, that means we can also code Krovikan Horror.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby Xander9009 » 15 Sep 2016, 21:20

Splinterverse wrote:Death Spark is missing it's check for cards above it in the graveyard. The AI is playing the card over and over without this check. I'm not sure how to check cards above/below or I would try to fix it. If there is a way to do it, that means we can also code Krovikan Horror.
Player:Graveyard_GetNth(i) will get the card in slot i of Player's graveyard.
Player:Graveyard_Count() will tell you how many cards are in the graveyard.
Remember that all of the "GetNth" type functions start at 0 like most programming arrays (except, incidentally, in Lua...), and you can use that to sort through the graveyard from the bottom up or the top down just by using a for loop.

Code: Select all
local iCount = Player:Graveyard_Count()
for i=0,iCount-1 do
    local oCard = Player:Graveyard_GetNth(i)
    if oCard == EffectSource() and i > 0 then
        -- Make sure it's not the top card.
        -- Now, you know that card 'i' is this card, so card 'i-1' needs to be a creature.
        local oCardAbove = Player:Graveyard_GetNth(i-1)
        -- Now return whether it's a creautre or not.
        return oCardAbove ~= nil and oCardAbove:GetCardType():Test(CARD_TYPE_CREATURE)
    end
end
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby nachonal986 » 16 Sep 2016, 05:55

Hey there, months that I didnt touch this excelent game, and Im a little confused...

All the arts show as last modified on feb 2016, and I didn't find de core file as before...

What happen? :(
User avatar
nachonal986
 
Posts: 83
Joined: 27 Jul 2015, 21:13
Has thanked: 17 times
Been thanked: 1 time

Re: Community Wad

Postby Xander9009 » 16 Sep 2016, 06:19

nachonal986 wrote:Hey there, months that I didnt touch this excelent game, and Im a little confused...

All the arts show as last modified on feb 2016, and I didn't find de core file as before...

What happen? :(
I'm not sure what's wrong, but I'm 100% sure it's on your end. I just checked using incognito mode and by sending the link to a friend and they checked also. The art wads were updated in May, with the art update being updated just a few days ago (and will be again tonight, since I added a few art files and splinterverse did too). The core was updated today.

Three things you could try:
1: If you've got the CW folders added to your google drive, then maybe try removing them from yours and re-adding them?
2: Try using incognito mode (or whatever the version is for your browser if you're not in chrome). You'll be seen as a new user, which should fix any issues associated with your google account.
3: Try clearing your browser cache. If you delete your cookies, then you'll probably be logged out of whatever websites you're logged into, mind. So, don't delete those. But if it's a problem with your browser, that will probably fix it.

Let me know if you manage to fix it. If not, I'll see if there's anything I can do from my end.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby Splinterverse » 16 Sep 2016, 14:38

Xander, I sent you the following message as PM but it seems to be stuck in my outbox:

I'm back working on stuff. I'm trying to do some Conspiracy 2 cards as well as some of the missing cards.

I've been working on Selvala from Conspiracy 2, and I'm trying to figure out how to omit a specific card (in this case the TriggerObject) from a filter.

Maybe something like this . . . ?
Code: Select all
local testedName = TriggerObject():GetCardName()
filter:Add(FE_CARDNAME, OP_NOT, testedName)
Here's my current code: http://pastebin.com/2GRNWBQa

It's in the first trigger area for drawing a card.

You might find other issues too. This is a complicated card. Once I have the filter piece, I'll definitely test all of it's pieces.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby Xander9009 » 16 Sep 2016, 16:10

Your message wasn't stuck, I was just asleep. :lol: It'll stay in your outbox until it's read.

To check a particular card, use FE_CARD_INSTANCE. Like all others, when you want it to not be the card, use OP_NOT, and when you want it to be the card, use OP_IS.

Also, in XML '>' will not work. '>' and '<' must be replaced with '&gt;' and '&lt;' because '>' and '<' are used for the tags. Note that the equal signs stay the same, so &gt;= is greater than or equal to. So lines 52 and 57 are fine, but 63 needs corrected.

Line 69 has an extraneous 'else'.

----

The code looks pretty good, and with the '>' fix on L63 and the FE_CARD_INSTANCE check in the filter, it'd probably work. But there's a much simpler and easier way to manage this particular kind of effect. Since you have the power of the creature that just entered, you can just add to the filter a requirement that the filtered cards must have power greater than or equal to the new creature's power, and then you just have to count the filter. If the filter returns 1 or more, then it's not the most powerful. If it returns exactly 0, then there are no other creatures with a power value that meets or beats TriggerObject's.

The code for checking power:
Code: Select all
filter:Add(FE_POWER, OP_GREATER_THAN_OR_EQUAL_TO, testedPower)
So try this code instead:
Code: Select all
local oTriggerObject = TriggerObject()
if oTriggerObject ~= nil then
   local oFilter = ClearFilter()
   oFilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
   oFilter:Add(FE_CARD_INSTANCE, OP_NOT, oTriggerObject)
   oFilter:Add(FE_POWER, OP_GREATER_THAN_OR_EQUAL_TO, oTriggerObject:GetCurrentPower())
   if oFilter:Count() &gt;= 1 then
      local oPlayer = oTriggerObject:GetController()
      oPlayer:BeginNewMultipleChoice()
         oPlayer:AddMultipleChoiceAnswer("CARD_QUERY_SELVALA_HEART_OF_THE_WILDS_OPTION_DRAW")
         oPlayer:AddMultipleChoiceAnswer("CARD_QUERY_SELVALA_HEART_OF_THE_WILDS_OPTION_DONT_DRAW")
      oPlayer:AskMultipleChoiceQuestion("CARD_QUERY_SELVALA_HEART_OF_THE_WILDS", EffectSource())
   end
end
I did make three unnecessary changes. Two just cleans up the code a tiny amount.
I changed TriggerObject():GetCurrentCharacteristics():Power_Get() to TriggerObject():GetCurrentPower(). GetCurrentPower() and GetCurrentToughness() are shortcuts for GetCurrentCharacteristics():Power_Get() and GetCurrentCharacteristics():Toughness_Get(). (Although, if you find it's causing problems, revert that change.)

I renamed the variables to start with an indication of what they contain ('o' is 'object', for the record). Something I picked up from Riiak, and it's very helpful for looking at code later. It allows you to at a glance see more information about the various variables in the file. This isn't something you have to do, but I've been getting myself in the habit of it, so I started doing it without even thinking about it. I then finished just because, well, that's what looks normal to me, now.

The last change I made was not strictly cosmetic, but slightly functional. It was to make a variable out of TriggerObject(). When you call the same function many times, but it's expected to give the exact same result every time, you should use a variable to store that result the first time instead. This reduces the number of function calls, which, when done consistently on all cards, can reduce lag in games with lots of cards. Any one card is unlikely to ever have a big effect on its own, but overall it can be really helpful (theoretically...).
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby Splinterverse » 16 Sep 2016, 16:21

Cool. I will try your suggestions, Xander.

New question for you. I am working on Leovold, Emissary of Trest. His first ability is working perfectly. His second one isn't firing. It's not firing when a spell is cast (haven't even tried abilities).

http://pastebin.com/upBsAQhT

I have a few missing and Take the Crown cards that are tested that will be uploaded later today. :)
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby Xander9009 » 16 Sep 2016, 16:31

Also, I just noticed the name code in your post. That's actually a thing you can do, but it's missing an underscore: FE_CARD_NAME. If you look here (you can get to that via the wiki link in the top left and going to 2014>Decompilable lol contents), you can actually see a list of all possible filter arguments. They all start with FE_ for the first parameter and OP_ for the second. So you could just Ctrl-f for "FE_" and find them all (they're listed together).

Anyway, the only thing I see at a glance that might make it not work is that it doesn't have any RTAs or CAs. Add in the RTA to actually draw the card and see if that helps. If not, I'll test it out and see what's wrong.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: Google [Bot] and 2 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 3 users online :: 1 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: Google [Bot] and 2 guests

Login Form