如何判断玩家是否拥有某只宝可梦的某种形态?

Sinistea

宝可梦训练家
2025/01/02
12
0
180
已经查到检测玩家是否拥有某只宝可梦的脚本是$player.owned?:)PIKACHU),可以更具体地检测地区形态吗?
直接在这句脚本的宝可梦名字后面加“_数字”似乎不生效……
 

TAAAAAAA

冠军
管理成员
2024/06/16
286
4
40
1,635
你找到的这个方法并不是检查玩家是否有某只精灵的。
使用这个方法:
Ruby:
    # Returns true if there is a Pokémon of the given species in the trainer's
    # party. You may also specify a particular form it should be.
    def has_species?(species, form = -1)
      return pokemon_party.any? { |p| p && p.isSpecies?(species) && (form < 0 || p.form == form) }
    end
 

在线成员

现在没有成员在线。

论坛统计

主题
560
消息
2,537
成员
3,250
最新成员
hyddn