- Joined
- Mar 7, 2024
- Posts
- 2
I'm trying to make a signature move for a Water/Poison Croconaw Regional evo, and my idea was that it deals damage but also lays down Toxic Spikes, like the move of the same name. However, I'm having trouble making the new battle effect that allows it to create the Toxic Spikes. I tried copying "AddToxicSpikesToFoeSide" from Toxic Spikes, then realized that that battle effect doesn't allow for damage, so I'm making a new one, but it isn't working.
Here's my current code:
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
I added the code on lines 9, 10, and 16.
				
			Here's my current code:
			
				Ruby:
			
		
		
		class Battle::Move::DamageAndAddToxicSpikes < Battle::Move
  def pbMoveFailed?(user, targets)
    if user.pbOpposingSide.effects[PBEffects::ToxicSpikes] >= 2
      @battle.pbDisplay(_INTL("But it failed!"))
      return true
    end
      return false
    end
  def pbAdditionalEffect(user, target)
  return if target.damageState.substitute
    def pbEffectGeneral(user)
      user.pbOpposingSide.effects[PBEffects::ToxicSpikes] += 1
      @battle.pbDisplay(_INTL("Poison spikes were scattered all around {1}'s feet!",
                              user.pbOpposingTeam(true)))
    end
  end
endI added the code on lines 9, 10, and 16.
 
	