It is currently 19 Apr 2024, 20:00
   
Text Size

Progress towards v0.7.1c

by Incantus

Moderator: CCGHQ Admins

Progress towards v0.7.1c

Postby MageKing17 » 21 Feb 2011, 20:24

In case you're wondering what I'm working on: http://deviance.duckish.net/wiki/index/ ... xtVersion/

Key

+ Feature to be added
- Feature to be removed
? Feature changed
! Bufix

Progress towards v0.7.1c

Completed

+ Added Mirrodin Besieged creature types
! Fixed a typo in the subtype symbol file
+ Added placeholder functions for Mirrodin Besieged keywords
+ Created a new MemoryVariable for tracking what entered a given zone this turn (with one instance, battlefield_tracker)
+ Added a .concede() method to Player classes
! Attempted bugfix for an error thrown if you started the game too quickly.
+ Allowed MultipleTargets to select 0 targets (can now specify a minimum number of targets when up_to=True by using the "min" argument)
! Fixed Player.choose_creature_type() being able to return subtypes that weren't creature types (now uses all_creatures to filter them out)
! Fixed card execution bug on non-Windows machines (thank you, Incantus!)
+ Added InstantLimit for cards like Lion's Eye Diamond
! Fixed a potential bug (trying to read a folder (not the contents of the folder, the folder itself) for card data) in CardDatabase.py
! Fixed a real bug (not clearing the current card text if encountering a duplicate of a card, which could lead to odd things) in CardDatabase.py
! Finally figured out and fixed a longstanding bug with isToken and isNonToken.
+ Added every card present in the decks in the /decks/ folder to the card database (except for ones that require cost-reduction)
! Fixed bugs with Level up and Annihilator (Level up helper abilities were treating the passed ability improperly, and Annihilator was named "annihilatior")
! Fixed CyclingCost (wasn't sending a timestep; what it was doing instead caused a crash)
! Fixed a possible bug in DissentionAbility.py with graft (it was either a bug or counter to preferred formatting)
! Fixed a bug (typo, really, but would cause a crash) in RavnicaAbility.py with transmute
+ Added a cast_from_graveyard_tracker for River Kelpie
+ Added the ability to read card files in subfiles of the /data/cards/ folder (subfolders also take priority over base folders, useful for testing purposes)
? Changed basic land abilities to put curly braces around symbols (doesn't actually change anything, but makes it work with the new rendering system)
! planeswalker_abilities would crash if you tried to add to it (due to a logic error)
! Fixed a bug that caused a crash if a player had to pick from more than one replacement effect applying to a single card
+ Updated subtype lists for Innistrad.
+ Added Mirrodin Besieged keywords
+ Added M12's hexproof.
+ Added an override for creatures attacking specific players/planeswalkers, so that cards like Teferi's Moat can work.
? Made Player.force_sacrifice() pass the result of .sacrifice() through.
? Minor change to .cda_power_toughness() so that passing None results in no CDA-handling for that attribute, rather than a CDA setting None (shouldn't affect any existing cards).
+ Made card_environment.py import random (which, really, it should have done a long time ago).
+ Re-added the old token image code from the SVN version, minus retrieving images from magiccards.info (since they no longer have perfectly-sized thumbnails). This allows different images for a 1/1 Green Elf Warrior token and a 1/1 White/Green Elf Warrior token, and I have included all known token images up to... whatever set was newest at the time... in the /data/tokenimg/ folder.
! Fixed a bug with stacked_abilities.remove_by_tag() that caused it to crash if the first ability found didn't have a tag.
! Fixed longstanding Planeswalker bug that allowed loyalty abilities to be activated limitlessly.
+ Added Totem Armor.
? Changed doesntUntapAbility to this_card_doesnt_untap in line with this_card_is_indestructible (and others).
! Fixed typo with ExileFromLibraryCost (there isn't an "exhile" zone, right?).
+ Added GraveyardFromLibraryCost.
! Fixed CombatTrackingVariable (it was only clearing local combat variables at end of turn, instead of at the beginning of combat).
+ Added undying.
+ Added miracle and soulbond to UnimplementedAbility.py
! Fixed typo with Player.discard_at_random() that made it always discard 3 cards.
+ Added "random" argument to DiscardCost.
! Fixed CardRole.attach() not checking to see if it was already attached to the target (rule 701.3b).
+ Added Karn, Tamiyo, and Tibalt as planeswalker types.

Incomplete

+ Add the ability to concede (can only be done when you have priority and needs testing)

Not in this version

+ Add the capability for cost-reduction abilities
+ Add cost-reduction keywords
+ Phyrexian Mana

Unlikely to be added before v0.8

+ Add poison counters
+ Add variable hand size
+ Add mana with restrictions
+ Add colored mana restrictions (Consume Spirit for example)
+ Runtime card rendering (although this is starting to look really cool!)
I'll try to keep this page updated as I work. Also, if anybody wants to see a card in v0.7.1c, you can either ask for it, or if you can write code, add it yourself. If you don't already have an account (which would be most people) you can ask me for an invitation. With the new parser, simple permanent cards have a tendency to write themselves.
Last edited by MageKing17 on 27 May 2012, 21:43, edited 5 times in total.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Progress towards v0.7.1c

Postby Hellfish » 21 Feb 2011, 23:03

I'm still wondering, can't access the wiki without logging in to Django ;)
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Progress towards v0.7.1c

Postby MageKing17 » 18 Mar 2011, 15:42

Hellfish wrote:I'm still wondering, can't access the wiki without logging in to Django ;)
...D'oh! Forgot the wiki required an account. Well, I'll just copy it over here for now. :P

EDIT March 18th, 2011: Just updated this post up to the latest changes (revision 1416, if you're curious).
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Progress towards v0.7.1c

Postby drekonja » 23 Mar 2011, 14:32

How long it's until c release? I'm mostly asking because you keep changing some cards like those with battlecry so they fit the new version, which is not out yet. :p
drekonja
 
Posts: 41
Joined: 05 Jun 2009, 19:53
Has thanked: 0 time
Been thanked: 0 time

Re: Progress towards v0.7.1c

Postby MageKing17 » 24 Mar 2011, 20:01

drekonja wrote:How long it's until c release? I'm mostly asking because you keep changing some cards like those with battlecry so they fit the new version, which is not out yet. :p
When it's done. ;)
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Progress towards v0.7.1c

Postby drekonja » 04 May 2011, 18:30

Any news of progress? Just want to say that I still care and no posts in this forum for 2 weeks and hoping it's still being developed.
drekonja
 
Posts: 41
Joined: 05 Jun 2009, 19:53
Has thanked: 0 time
Been thanked: 0 time

Re: Progress towards v0.7.1c

Postby MageKing17 » 09 May 2011, 04:43

drekonja wrote:Any news of progress? Just want to say that I still care and no posts in this forum for 2 weeks and hoping it's still being developed.
Still being worked on, in tiny glimpses of free time. Which are incredibly infrequent. In fact, the last thing I can remember doing is making it so you don't need an account on the web editor to download cards.

Speaking of, click this link for the latest card database at any time: http://mk.incantus.net/?filter=implemen ... __0&export
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Progress towards v0.7.1c

Postby Ricochet » 22 Jun 2011, 15:54

I'd like to see hypnotic specter in the next release, i tryed adding it myself but failed, at the most i could make it as abyssal specter with dif cost and toughness.
if i can see how to make random discard i'm prety sure i can add some other cards(hymm to tourach, balduvian horde, stupor)
Ricochet
 
Posts: 12
Joined: 21 Jun 2011, 20:23
Has thanked: 0 time
Been thanked: 0 time

Re: Progress towards v0.7.1c

Postby MageKing17 » 22 Jun 2011, 18:25

Ricochet wrote:I'd like to see hypnotic specter in the next release, i tryed adding it myself but failed, at the most i could make it as abyssal specter with dif cost and toughness.
if i can see how to make random discard i'm prety sure i can add some other cards(hymm to tourach, balduvian horde, stupor)
There should be some random discard cards in the card database already; if there's not, here's some code for a random discard effect:

Code: Select all
        import random
        for i in range(2): player.discard(random.choice(player.hand))
Remember, you can always download the latest card database from the web editor, or more quickly through this direct link.

Specifically, Hymn to Tourach and Hypnotic Specter are now in the database, albeit untested.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Progress towards v0.7.1c

Postby gumgod » 27 Jun 2011, 00:37

MageKing17 wrote:
Ricochet wrote:I'd like to see hypnotic specter in the next release, i tryed adding it myself but failed, at the most i could make it as abyssal specter with dif cost and toughness.
if i can see how to make random discard i'm prety sure i can add some other cards(hymm to tourach, balduvian horde, stupor)
There should be some random discard cards in the card database already; if there's not, here's some code for a random discard effect:

Code: Select all
        import random
        for i in range(2): player.discard(random.choice(player.hand))
Remember, you can always download the latest card database from the web editor, or more quickly through this direct link.

Specifically, Hymn to Tourach and Hypnotic Specter are now in the database, albeit untested.
I was excited to see hymn and hippy posted on the site, but when I tried them I got the following error:

Code: Select all
  File "engine\Ability\StackAbility.pyo", line 42, in resolve
File "<string>", line 21, in effects
File "random.pyo", line 261, in choice
TypeError: 'HandZone' object does not support indexing
Idk if this is related to my version of Incantus or the cards... But thought I'd let you know. I Also, I haven't seen another card coded yet that forces a random discard, so I was really hoping this would work. I'd like to get gamble working.
gumgod
 
Posts: 16
Joined: 18 Jun 2011, 16:49
Has thanked: 1 time
Been thanked: 0 time

Re: Progress towards v0.7.1c

Postby MageKing17 » 27 Jun 2011, 15:48

Sorry... should be .hand.get(). I'm fixing it in the database.
User avatar
MageKing17
Programmer
 
Posts: 473
Joined: 12 Jun 2008, 20:40
Has thanked: 5 times
Been thanked: 9 times

Re: Progress towards v0.7.1c

Postby gumgod » 27 Jun 2011, 20:25

I downloaded the latest versions of hippy and hymn, and it still doesn't seem to work for me(same error). I also tried
Code: Select all
to.discard(random.to.hand.get())
(on hippy), which also resulted in the same error. I'll download the whole cards list again and keep trying to play with it a little later.
gumgod
 
Posts: 16
Joined: 18 Jun 2011, 16:49
Has thanked: 1 time
Been thanked: 0 time

Re: Progress towards v0.7.1c

Postby Ricochet » 29 Jun 2011, 02:34

sry i hadn't feedback before, i made an hypnotic specter tested and working on "B" version. i had beed trying to make black vise and ivory tower but failed. i also made sinkhole and rain of tears (prety easy using magekings choking sands as model) and "almost" made icequake ( i used isSnowCoveredLand as designation but it doesnt exist).

Hypnotic Specter(tested and working on B version)
Code: Select all
name = 'Hypnotic Specter'
cost = '1BB'
types = Creature
subtypes = Specter
power = 2
toughness = 2
text = ['Flying', 'Whenever ~ deals damage to an opponent, that player discards a card at random.']


#################################


abilities.add(flying())


@triggered(txt=text[1])
def ability():
    def condition(source, sender, to):
        return sender == source and isPlayer(to)
    def effects(controller, source, to):
        target = yield NoTarget()
        import random
        if len(to.hand) > 1: [to.discard(card) for card in random.sample(to.hand, 1)]
        else: to.force_discard(-1)
        yield
    return DealsDamageToTrigger(condition), effects
abilities.add(ability)
--------------- Hypnotic Specter
Ricochet
 
Posts: 12
Joined: 21 Jun 2011, 20:23
Has thanked: 0 time
Been thanked: 0 time

Re: Progress towards v0.7.1c

Postby Ricochet » 30 Jun 2011, 04:24

i was wandering if that code would only work on "C" version, but i made the ivory tower using that code and it works on "B" version
Code: Select all
@triggered(txt=text[0])
def ability():
    def effects(controller, source):
        target = yield NoTarget()
        number = 0
        for card in controller.hand.get():
            number += 1
        controller.life += number -4
        yield   
    return YourUpkeepTrigger(), effects
abilities.add(ability)
Ricochet
 
Posts: 12
Joined: 21 Jun 2011, 20:23
Has thanked: 0 time
Been thanked: 0 time

Re: Progress towards v0.7.1c

Postby gumgod » 02 Jul 2011, 17:42

Ricochet wrote:sry i hadn't feedback before, i made an hypnotic specter tested and working on "B" version. i had beed trying to make black vise and ivory tower but failed. i also made sinkhole and rain of tears (prety easy using magekings choking sands as model) and "almost" made icequake ( i used isSnowCoveredLand as designation but it doesnt exist).

Hypnotic Specter(tested and working on B version)
Code: Select all
name = 'Hypnotic Specter'
cost = '1BB'
types = Creature
subtypes = Specter
power = 2
toughness = 2
text = ['Flying', 'Whenever ~ deals damage to an opponent, that player discards a card at random.']


#################################


abilities.add(flying())


@triggered(txt=text[1])
def ability():
    def condition(source, sender, to):
        return sender == source and isPlayer(to)
    def effects(controller, source, to):
        target = yield NoTarget()
        import random
        if len(to.hand) > 1: [to.discard(card) for card in random.sample(to.hand, 1)]
        else: to.force_discard(-1)
        yield
    return DealsDamageToTrigger(condition), effects
abilities.add(ability)
--------------- Hypnotic Specter
I actually had a backup of the cards database in the same folder which was being loaded and causing me problems. I moved that out of the folder and both the hippy and the hymn posted on the site are working. Your version also works. :)

edit: added gamble and your ivory tower (as untested), land tax, goblin lore, control of the court, bottomless pit, and burning inquiry.

edit2: I did modify your ivory tower slightly.

Code: Select all
name = 'Ivory Tower'
cost = '1'
types = Artifact
text = ['At the beginning of your upkeep, you gain X life, where X is the number of cards in your hand minus four.']

@triggered(txt=text[0])
def ability():
    def effects(controller, source):
        target = yield NoTarget()
        number = len(controller.hand) - 4
        if number > 0 :
            controller.life += number
        yield   
    return YourUpkeepTrigger(), effects
abilities.add(ability)
gumgod
 
Posts: 16
Joined: 18 Jun 2011, 16:49
Has thanked: 1 time
Been thanked: 0 time

Next

Return to Incantus

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