2.jpg (243.99 KB, 下载次数: 39)
3.jpg (78.79 KB, 下载次数: 41)
skill_items = { 28 => {41=>1}, #28号技能消耗41号物品1个 29 => {41=>2}, #29号技能消耗41号物品2个 30 => {41=>1}, #30号技能消耗41号物品1个 31 => {41=>2}, #31号技能消耗41号物品2个 32 => {46=>1}, #32号技能消耗46号物品1个,以此类推 38 => {41=>2}, 39 => {41=>4}, 40 => {41=>2}, 41 => {41=>4}, 42 => {46=>2}, 49 => {40=>1}, 55 => {40=>1}, 60 => {42=>1,46=>1}, #60号技能消耗42号物品1个和46号物品1个 61 => {42=>2}, 62 => {46=>3}, 66 => {42=>2,46=>2}, 67 => {42=>4}, 68 => {46=>5}, 71 => {41=>1}, 72 => {46=>1}, 73 => {40=>1}, 74 => {48=>1}, 75 => {46=>2}, 77 => {41=>2}, 78 => {46=>2}, 79 => {40=>2}, 80 => {48=>2}, 81 => {46=>4}, 86 => {49=>1}, 87 => {49=>1}, 91 => {40=>2}, 92 => {42=>1}, 93 => {43=>1}, 94 => {41=>1}, 95 => {44=>1}, 96 => {49=>2}, 97 => {49=>2}, 98 => {40=>1}, 101 => {40=>4} } class Game_Battler def item_condition?(skill_id) skill_items = skill_items[skill_id] return true if skill_items.nil? skill_items.keys.each do |key| return false if $game_party.item_number(key) < skill_items[key] end return true end end
灰色的 发表于 2016-1-13 19:50
问一下,为什么在战斗测试的时候提示第46行发生错误 nomethod Error undefined nomethod '□' for nil :nil ...
link756367658 发表于 2017-11-2 10:18
skill_Items = {
25 => {32 => 2}, #25号技能消耗32号物品2个
29 => {41 => 2 }, ...
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |