Thread: [Essentials script] Pokémon TCG mod
View Single Post
  #108    
Old January 31st, 2013, 06:36 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Quote:
Originally Posted by donavannj View Post
Speaking as someone who actively collects and plays the TCG, every booster after Base Set has had to include a rare card, due to allegations of it basically being gambling targeted at kids.

While I do not know the exact odds of secret rare card pulls, I do know that it has changed over the years and I do know which secret rare types are rarer than others.

I have very limited knowledge of programming, but I do have extensive knowledge about the workings of the TCG and would be willing to lend my knowledge with regards to how some situations would and should play out.
Your knowledge would be very helpful.

Here's a couple of questions to start off with:
  1. Are the Metronome attacks for Clefairy and Clefable intended to be identical? Clefable also says to ignore costs of attack (e.g. Charizard's "discard 2 energy"), whereas Clefairy doesn't.
  2. Should Raticate's Super Fang attack ignore all effects/weaknesses/resistances and always deal the amount of damage it says, or is that calculation just for the base damage and it would then be affected by PlusPower and the like?
I'm sure I'll come across more questions when I get round to the various effects. If you can think of any cards/effects/interactions from Base/Jungle/Fossil that you think might be tricky, please let me know.

One thing I was pleased to discover was how cards like Pokémon Breeder should work - the intermediate card (if skipping from Basic to Stage 2) must exist as a card, even if it's not in the deck, and it doesn't work on Baby Pokémon. That makes things more convenient to code.

If possible, could you have a look at the order in which things happen during an attack? It's as follows:

Code:
  def pbUseAttack(user)
    @battle.pbDisplay(_INTL("{1} used {2}!",user.name,self.name))
    target=pbGetTarget(user)                      # Usually done automatically.
    return if !pbBabyCheck(user,target)
    return if !pbOnStartUse(user)                 # e.g. Flip a coin. If Tails, this attack does nothing.
    pbPayAttackCost(user,target)                  # e.g. Discard 2 energy.
    pbCheckEffects(user,target)
    return if !pbConfusionCheck(user)
    if target
      dmg=pbBaseDamage(user,target)
      dmg=pbModifyDamageBefore(dmg,user,target)   # Modifiers on attacker
      dmg=pbEffectiveness(dmg,user,target)        # Weakness/resistance
      dmg=pbModifyDamageAfter(dmg,user,target)    # Modifiers on target
      pbDealDamage(dmg,user,target)
    end
    pbEffect(user,target)
  end
I've tried to take account of whatever I can think of, but I'm sure there'll be things I've overlooked. If an attack can't be used (e.g. don't have enough energy, Farfetch'd's Leek Slap), it can't even be chosen to be used in the first place, so the above code assumes the attack can be used. Checking fainting cards is a separate thing that happens immediately after the attack (as well as on other occasions).


Quote:
Originally Posted by donavannj View Post
EDIT: Okay, something that stands out - there is no limit to how much energy can be attached in a single turn in your game engine. In the physical TCG, you can only attach 1 energy per turn unless a PokePower/Ability (Ability technically being the proper current name for PokePowers & PokeBodies), an effect of a card, or an effect of an attack allows you to attach additional energy.
Yes, it's an alpha. There aren't yet any limits on what you can do in your turn - it helps with debugging, they're easy enough to implement, and I've got other things to worry about at the moment.
__________________