Cards

Add new cards

To add new cards you need to create your cards as a child of Card class. Action to be done on card use is to be contained in play() method.

 1class Take_Cover(Card):
 2    def __init__(self):
 3        # card name / .webp image name
 4        self.name = "Take Cover"
 5        # spirituality cost
 6        self.sp = 2
 7        # category: Offensive, Defensive, Ability, Power, Tarot
 8        self.ca = "Defensive"
 9        # rarity: Ordinary, Extraordinary, Mythical, Angelic, Divine, Unique, Tarot
10        self.ra = "Extraordinary"
11        # Help to be displayed when card is hovered
12        self.tip = '>   Block:\n'+str(player.eff['Block'][1])+'\n\n>   Dodge:\n' + str(player.eff['Dodge'][1])
13
14    def play(self, **kwargs):
15        self.block(amt = 10, target = player)
16        self.dodge(amt = 10, target = player)
17        return


Cards Images

Start by either creating your own or downloading vanilla card templates:

When using my template you should:

  • Put card art behind the template (so it’s visible in the middle)

  • Name the card at the top

  • Define card spirit cost to the right of card name

  • Choose correct card rarity & type from templates

  • Describe it’s effects below card type

Cards need to be:

  • Named like the card name attribute

  • Placed in AstralLust\game\images\Cards\ directory

  • Saved in .webp format, I recommend using Bulk Images to WebP Converter for Chrome with 90% quality

  • Resolution should follow: 13:20 proportions. Default resolution for 4K is 650x1000, for 1080p 325x500. It’s not recommended to make cards above 4K default resolution for optimization reasons. You don’t need to make two sets of cards for 4K and 1080p, but low res cards will help optimization.

You can make cards in any image editor like paint, paint.net, gimp, photoshoot, etc.



Status Effects

Status effects are granted using buff(), it takes three arguments:

  • buff - required, name of status effect - string,

  • amt - required, status effect will be changed by this amount - depends on buff, either integer or boolean,

  • minus - if status effect can take negative value - boolean, default True

1    def play(self, **kwargs):
2        player.buff("Fire Immunity", True)
3        enemy.buff("Ressurect", 1)
4        return

Make new status effect



Exhaust and Destroy

Cards can be destroyed with self.destroy(). To exhaust a card you need to return “exhaust” with play(). Take note that destroy() removes card from your deck not hand/any pile, to make card disappear from combat return "exhaust".

1def play(self, **kwargs):
2    ... card action ...
3
4    self.destroy()
5    return "exhaust"


X card cost

Set card cost to 0 and execute your action x times, at the end set player.spirit to 0:

 1def play(self, **kwargs):
 2    # Attack x times
 3    self.atk(dmg = 4, target = enemy, times = player.spirit)
 4
 5    # Do something x times
 6    for x in range(player.spirit):
 7        ... action ...
 8
 9    # Set player spirit to 0
10    player.spirit = 0
11
12    return


Complex Effects

Returning “complex” with play() will skip using card cost and removing it from hand, it can be used with complex card effects that move/exhaust the card before return statement.



Other Card class methods

  • draw() - draw x cards:
    • amt - required, amount of cards to draw

    • min - minimum amount of cards to draw, default 0

    • discard - if discard hand before drawing cards, default False

    • skip_discarded - if skip shuffling discard pile into draw pile if not enough cards, default True

  • steal() - steal enemy status effects:
    • times - how many effects to steal, default 1

  • enemy_intention() - change enemy intention



List of all status effects

Add our own status effects

Integer:

  • Armor -Each turn increase block by x.

  • Critic - Increase next damage dealt multiplied x times.

  • Bleeding - Each turn deals x damage. Damage doubled if target has Frail. Decreases by 1 every turn.

  • Block - Block up to x points of damage. Lasts till next turn.

  • Dodge - Gives x% to avoid damage. Lasts till next turn. Dodge chance capped at 80%.

  • Burning - Each turn deals 5 damage. Lasts x turns.

  • Frail - Gain x less block. Decreases by 1 every turn.

  • Invulnerability - Become immune to all damage. Lasts x turns.

  • Life Steal - Heal for x% damage dealt.

  • Poison - Each turn deals x damage. Damage doubled if target is bleeding. Decreases by 1 every turn.

  • Regeneration - Each turn heals x health. Decreases by 1 after taking damage.

  • Resurrect - Will resurrect with 50% of health after death.

  • Strength - Deal x more damage. Decreases by 1 every turn.

  • Stun - Unable to act for x turns.

  • Thorns - Deal x before being attacked. Lasts till next turn.

  • Weak - Deal 50% less damage. Lasts x turns.

  • Vulnerable - Receive 50% more damage. Lasts x turns.

  • Empower - Gain x strength every turn.

  • Card Draw - Draw x more cards each turn.

  • Clarity - Gain x spirituality each turn.

  • Forbid Offensive - Can’t play offensive cards for x turns.

  • Forbid Defensive - Can’t play defensive cards for x turns.

  • Forbid Ability - Can’t play ability cards for x turns.

  • Forbid Power - Can’t play power cards for x turns.

  • Stealth - Gain x% dodge each turn.

  • Spikes - Gain x thorns every turn.

  • Forbid Tarot - Can’t play tarot cards for x turns.

  • Terror - 45% chance to lose turn. Lasts for x turns.

  • Fury - Gain x strength on taking unblocked damage.

Boolean:

  • Poison Immunity - Immune to poison.

  • Bleeding Immunity - Immune to bleeding.

  • Stun Immunity - Can’t be stunned.

  • Burning Immunity - Immune to burning.

  • Freedom - Free from corruption and madness.