本帖用于记录如何添加一些具体的特性、道具、招式,并不是通用模板。
每一个都单独开帖有些没必要,所以就集合在一个帖子里发。
这些特性、道具、招式的创意不一定是我原创,但代码基本都是我自己写的。
不是一次性发完,而是想到什么就写什么。
			
			每一个都单独开帖有些没必要,所以就集合在一个帖子里发。
这些特性、道具、招式的创意不一定是我原创,但代码基本都是我自己写的。
不是一次性发完,而是想到什么就写什么。
			
				最后编辑: 
				
		
	
							[INFINITEREPEL]
Name = 无限喷雾
NamePlural = 无限喷雾
Pocket = 8
Price = 0
FieldUse = Direct
Flags = Repel,KeyItem
Description = 开启后弱小的野生宝可梦 将完全不会出现。效果会持续存在。
	attr_accessor :infiniteRepel  #无限喷雾
	
@infiniteRepel        = false #无限喷雾
	
repel_active = ($PokemonGlobal.infiniteRepel || $PokemonGlobal.repel > 0)
	
#无限喷雾
ItemHandlers::UseInField.add(:INFINITEREPEL, proc { |item|
  $PokemonGlobal.repel = 0
  infinite = $PokemonGlobal.infiniteRepel
  if infinite
    pbMessage(_INTL("已关闭无限喷雾。"))
  else
    pbMessage(_INTL("已开启无限喷雾。"))
  end
  $PokemonGlobal.infiniteRepel = !infinite
  next true
})
	
  if $PokemonGlobal.repel > 0
    pbMessage(_INTL("但是之前使用的喷雾效果仍然存在。"))
    return false
  end
	
[AQUAROD]
Name = 海王钓竿
NamePlural = 海王钓竿
Pocket = 8
Price = 0
FieldUse = Direct
Flags = KeyItem
Description = 传说中的钓竿。在有水的地方使用的话, 容易钓到异色宝可梦或稀有道具。
	attr_accessor :fishing_shiny        # 海王钓竿
	
@fishing_shiny                 = 0   # 海王钓竿
	shiny_retries += $stats.fishing_shiny      #海王钓竿
	
#海王钓竿
ItemHandlers::UseInField.add(:AQUAROD, proc { |item|
  notCliff = $game_map.passable?($game_player.x, $game_player.y, $game_player.direction, $game_player)
  if !$game_player.pbFacingTerrainTag.can_fish || (!$PokemonGlobal.surfing && !notCliff)
    pbMessage(_INTL("不能在这里使用"))
    next false
  end
  encounter = $PokemonEncounters.has_encounter_type?(:SuperRod)
  if pbFishing(encounter, 3)
    if rand(100) < 50
      $stats.fishing_battles += 1
      $stats.fishing_shiny = 2   #异色额外判定次数,2和闪耀护符一样,最好不要超过65536,公式是 1-(4095/4096)^次数
      pbEncounter(:SuperRod)
      $stats.fishing_shiny = 0   #遭遇完就置0,避免影响其他野怪
    else
      items = [
          #在此处编辑你想要的道具,自行增减条目
          :RARECANDY,:BIGPEARL,:PEARLSTRING,
          :COMETSHARD,:HELIXFOSSIL,:DOMEFOSSIL
      ]
      pbReceiveItem(items[rand(items.length)])
      pbMessage(_INTL("原来只是个道具。"))
    end
  end
  next true
})
	