2022-05-22_220939.png (97.93 KB, 下载次数: 38)
#-------------------------------------------------------------------------- # ● 获取属性抗性 #-------------------------------------------------------------------------- def element_rate(element_id) features_pi(FEATURE_ELEMENT_RATE, element_id) end #-------------------------------------------------------------------------- # ● 获取弱化抗性 #-------------------------------------------------------------------------- def debuff_rate(param_id) features_pi(FEATURE_DEBUFF_RATE, param_id) end #-------------------------------------------------------------------------- # ● 获取状态抗性 #-------------------------------------------------------------------------- def state_rate(state_id) features_pi(FEATURE_STATE_RATE, state_id) end #-------------------------------------------------------------------------- # ● 获取免疫状态数组 #-------------------------------------------------------------------------- def state_resist_set features_set(FEATURE_STATE_RESIST) end #-------------------------------------------------------------------------- # ● 判定状态是否免疫 #-------------------------------------------------------------------------- def state_resist?(state_id) state_resist_set.include?(state_id) end
$target = $game_troop.members[0] $data_system.elements.drop(1).each_with_index { |val, ind| p "#{val}×#{$target.element_rate(ind)}" }
不死鸟之翼 发表于 2022-5-22 22:22
简单说一下,RPG::System里面有各种用语,比如属性的数组,然后Game_Battler里有查询各种抗性的方法,两者 ...
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |