好的鬼佬,我电脑拿去修了,今天刚看论坛,请问是这么改对吗
#寒气
Battle::AbilityEffects::OnEndOfUsingMove.add(:FROZENAIR,
  proc { |ability, user, targets, move, battle|
      next if move.type != :ICE
      next if !move.contactMove?
      next if battle.pbRandom(100) >= 99
      battle.pbShowAbilitySplash(user)
      if targets.hasActiveAbility?(:SHIELDDUST) && !battle.moldBreaker
        battle.pbShowAbilitySplash(targets)
        if !Battle::Scene::USE_ABILITY_SPLASH
          battle.pbDisplay(_INTL("对于{1},完全没有效果!", targets.pbThis))
        end
        battle.pbHideAbilitySplash(targets)
      elsif targets.pbCanFreeze?(user, Battle::Scene::USE_ABILITY_SPLASH)
        msg = nil
        if !Battle::Scene::USE_ABILITY_SPLASH
          msg = _INTL("{1}的{2}让{3}冰冻了!", user.pbThis, user.abilityName, targets.pbThis(true))
        end
        targets.pbFreeze(msg)
      end
   battle.pbHideAbilitySplash(user)
  }
)
Battle::AbilityEffects::OnDealingHit.add(:FROZENAIR,
  proc { |ability, user, target, move, battle|
    next if !move.contactMove?
    next if battle.pbRandom(100) >= 99
    battle.pbShowAbilitySplash(user)
    if target.hasActiveAbility?(:SHIELDDUST) && !battle.moldBreaker
      battle.pbShowAbilitySplash(target)
      if !Battle::Scene::USE_ABILITY_SPLASH
        battle.pbDisplay(_INTL("对于{1},完全没有效果!", target.pbThis))
      end
      battle.pbHideAbilitySplash(target)
    elsif target.pbCanFreeze?(user, Battle::Scene::USE_ABILITY_SPLASH)
      msg = nil
      if !Battle::Scene::USE_ABILITY_SPLASH
        msg = _INTL("{1}的{2}让{3}冰冻了!", user.pbThis, user.abilityName, target.pbThis(true))
      end
      target.pbFreeze(msg)
    end
    battle.pbHideAbilitySplash(user)
  }
)
Battle::AbilityEffects::OnBeingHit.add(:FROZENAIR,
  proc { |ability, user, target, move, battle|
    next if !move.pbContactMove?(user)
    next if user.frozen? || battle.pbRandom(100) >= 99
    battle.pbShowAbilitySplash(target)
    if user.pbCanFreeze?(target, Battle::Scene::USE_ABILITY_SPLASH) &&
       user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
      msg = nil
      if !Battle::Scene::USE_ABILITY_SPLASH
        msg = _INTL("{1}的{2}让{3}被冰冻了!", target.pbThis, target.abilityName, user.pbThis(true))
      end
      user.pbFreeze(msg)
    end
    battle.pbHideAbilitySplash(target)
  }
)
	请问是像这样吗?不能对数组调用hasActiveAbility?方法,这是一个battler级的方法。
Battle::AbilityEffects::OnDealingHit.add(:FROZENAIR,
  proc { |ability, user, target, move, battle|
    next if !move.contactMove? || move.type != :ICE
    next if battle.pbRandom(100) >= 99
    battle.pbShowAbilitySplash(user)
    if target.hasActiveAbility?(:SHIELDDUST) && !battle.moldBreaker
      battle.pbShowAbilitySplash(target)
      if !Battle::Scene::USE_ABILITY_SPLASH
        battle.pbDisplay(_INTL("对于{1},完全没有效果!", target.pbThis))
      end
      battle.pbHideAbilitySplash(target)
    elsif target.pbCanFreeze?(user, Battle::Scene::USE_ABILITY_SPLASH)
      msg = nil
      if !Battle::Scene::USE_ABILITY_SPLASH
        msg = _INTL("{1}的{2}让{3}冰冻了!", user.pbThis, user.abilityName, target.pbThis(true))
      end
      target.pbFreeze(msg)
    end
    battle.pbHideAbilitySplash(user)
  }
)
Battle::AbilityEffects::OnBeingHit.add(:FROZENAIR,
  proc { |ability, user, target, move, battle|
    next if !move.pbContactMove?(user)
    next if user.frozen? || battle.pbRandom(100) >= 99
    battle.pbShowAbilitySplash(target)
    if user.pbCanFreeze?(target, Battle::Scene::USE_ABILITY_SPLASH) &&
       user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
      msg = nil
      if !Battle::Scene::USE_ABILITY_SPLASH
        msg = _INTL("{1}的{2}让{3}被冰冻了!", target.pbThis, target.abilityName, user.pbThis(true))
      end
      user.pbFreeze(msg)
    end
    battle.pbHideAbilitySplash(target)
  }
)
	不是,next if !move.contactMove? || move.type != :ICE改成next if !move.contactMove? && move.type != :ICE。请问是像这样吗?
代码:Battle::AbilityEffects::OnDealingHit.add(:FROZENAIR, proc { |ability, user, target, move, battle| next if !move.contactMove? || move.type != :ICE next if battle.pbRandom(100) >= 99 battle.pbShowAbilitySplash(user) if target.hasActiveAbility?(:SHIELDDUST) && !battle.moldBreaker battle.pbShowAbilitySplash(target) if !Battle::Scene::USE_ABILITY_SPLASH battle.pbDisplay(_INTL("对于{1},完全没有效果!", target.pbThis)) end battle.pbHideAbilitySplash(target) elsif target.pbCanFreeze?(user, Battle::Scene::USE_ABILITY_SPLASH) msg = nil if !Battle::Scene::USE_ABILITY_SPLASH msg = _INTL("{1}的{2}让{3}冰冻了!", user.pbThis, user.abilityName, target.pbThis(true)) end target.pbFreeze(msg) end battle.pbHideAbilitySplash(user) } ) Battle::AbilityEffects::OnBeingHit.add(:FROZENAIR, proc { |ability, user, target, move, battle| next if !move.pbContactMove?(user) next if user.frozen? || battle.pbRandom(100) >= 99 battle.pbShowAbilitySplash(target) if user.pbCanFreeze?(target, Battle::Scene::USE_ABILITY_SPLASH) && user.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH) msg = nil if !Battle::Scene::USE_ABILITY_SPLASH msg = _INTL("{1}的{2}让{3}被冰冻了!", target.pbThis, target.abilityName, user.pbThis(true)) end user.pbFreeze(msg) end battle.pbHideAbilitySplash(target) } )