主页
论坛
新帖
最新消息
新帖
最新动态
制作互助群
登录
注册
Toggle sidebar
Toggle sidebar
菜单
安装应用
安装
回复主题
【进站必读】宝可饭堂社区全局规定v1.10
关于坚决维护同人创作社群秩序与共识的公告
论坛
独立开发
进阶教程
添加传说形态阿尔宙斯
禁用JavaScript。为了获得更好的体验,请在运行之前启用浏览器中的JavaScript。
您正在使用一款已经过时的浏览器!部分功能不能正常使用。
请尝试升级或使用
其他浏览器
。
信息
<blockquote data-quote="ES泽洛" data-source="post: 15" data-attributes="member: 2"><p><span style="color: rgb(255, 0, 0)"><span style="font-size: 18px">使用或转载请注明出自宝可饭堂社区</span><u><a href="https://bbs.pokefans.xyz/threads/9/" target="_blank"><span style="font-size: 18px">https://bbs.pokefans.xyz/threads/9/</span></a></u></span></p><p><span style="font-size: 15px"><span style="color: rgb(65, 168, 95)">此教程适用于目前主流的Essentials18.1~20.1,其他版本的ESS未测试。</span></span></p><p><span style="font-size: 15px">道具的PBS什么的,自己照着其他石板抄一遍。</span></p><p><span style="font-size: 15px">代码的插入位置在变幻自如附近,全局搜Protean就行了。</span></p><p>[SPOILER="18.1的代码"]</p><p>[CODE=ruby]#传说阿尔宙斯 by ES泽洛</p><p>#由鸭灭骡优化</p><p> if isSpecies?(:ARCEUS) && move.id==getID(PBMoves,:JUDGMENT) && hasActiveItem?(:LEGENDPLATE) #当是阿尔宙斯,且特性是多属性,携带传说石板时</p><p> current_form = 0 #默认初始形态</p><p> current_type = "一般" #默认初始属性名称</p><p> result_types = [] #克制属性</p><p> resistance_type = [] #抵抗属性</p><p> type3 = targets[0].effects[PBEffects::Type3]==-1 ? nil : targets[0].effects[PBEffects::Type3] #获取第三属性,第三属性是一种状态</p><p> #处理克制属性</p><p> for type in 0..PBTypes.maxValue</p><p> e=PBTypes.getCombinedEffectiveness(type,targets[0].type1,targets[0].type2,type3) #计算克制倍率,基础为8,每克制一个属性x2</p><p> if e>=64 #8倍克制</p><p> result_types.push(type)</p><p> else</p><p> if e>=32 #4倍克制</p><p> result_types.push(type)</p><p> else</p><p> if e>=16 #2倍克制</p><p> result_types.push(type)</p><p> end</p><p> end</p><p> end</p><p> end</p><p> #处理抵抗属性</p><p> result_types.each do |type|</p><p> e1 = PBTypes.getCombinedEffectiveness(targets[0].type1,type)</p><p> e2 = PBTypes.getCombinedEffectiveness(targets[0].type2,type)</p><p> e3 = (type3!=nil) ? PBTypes.getCombinedEffectiveness(type3,type) : 0</p><p> if resistance_type==[]</p><p> resistance_type.push(type)</p><p> resistance_type.push(e1+e2+e3)</p><p> else</p><p> unless resistance_type[1] <= e1+e2+e3</p><p> resistance_type=[type,e1+e2+e3]</p><p> end</p><p> end</p><p> end</p><p> current_form = resistance_type[0]</p><p> current_type = PBTypes.getName(current_form)</p><p> move.calcType = current_form #改变制裁光砾的属性</p><p> if user.form != current_form</p><p> pbChangeForm(current_form,_INTL("{1}变成了{2}属性!",pbThis,current_type)) #改变阿尔宙斯的形态</p><p> end</p><p> end[/CODE]</p><p>[/SPOILER]</p><p>[SPOILER="19.1的代码"]</p><p>[CODE=ruby]#传说阿尔宙斯 by ES泽洛</p><p>#屎山不屎山的,就交给诸位去优化了</p><p>#=================================================================================================================</p><p>=begin</p><p>#注意:不知道为什么原版的hasActiveItem?(:LEGENDPLATE)会返回false,所以我改了下面这部分代码</p><p> def hasActiveItem?(check_item, ignore_fainted = false)</p><p> return false if !itemActive?(ignore_fainted)</p><p> return check_item.include?(@item_id) if check_item.is_a?(Array)</p><p> #return check_item == self.item #原版</p><p> return check_item == @item_id #我改的</p><p> end</p><p>=end</p><p>#=================================================================================================================</p><p> if isSpecies?(:ARCEUS) && move.id == :JUDGMENT && hasActiveItem?(:LEGENDPLATE) #当是阿尔宙斯,且特性是多属性,携带传说石板时</p><p> current_type = :NORMAL #默认初始形态</p><p> current_typeName = "一般" #默认初始属性名称</p><p> result_types = [] #克制属性</p><p> resistance_type = [] #抵抗属性</p><p> type3 = targets[0].effects[PBEffects::Type3]==-1 ? nil : targets[0].effects[PBEffects::Type3] #获取第三属性,第三属性是一种状态</p><p> #处理克制属性</p><p> typeList = [</p><p> :NORMAL,:FIGHTING,:FLYING,:POISON,:GROUND,</p><p> :ROCK,:BUG,:GHOST,:STEEL,:QMARKS,</p><p> :FIRE,:WATER,:GRASS,:ELECTRIC,:PSYCHIC,</p><p> :ICE,:DRAGON,:DARK,:FAIRY</p><p> ]</p><p> for type in typeList</p><p> e=Effectiveness.calculate(type,targets[0].type1,targets[0].type2,type3) #计算克制倍率,基础为8,每克制一个属性x2</p><p> if e>=64 #8倍克制</p><p> result_types.push(type)</p><p> else</p><p> if e>=32 #4倍克制</p><p> result_types.push(type)</p><p> else</p><p> if e>=16 #2倍克制</p><p> result_types.push(type)</p><p> end</p><p> end</p><p> end</p><p> end</p><p> #处理抵抗属性</p><p> result_types.each do |type|</p><p> e1 = Effectiveness.calculate(targets[0].type1,type)</p><p> e2 = Effectiveness.calculate(targets[0].type2,type)</p><p> e3 = (type3!=nil) ? Effectiveness.calculate(type3,type) : 0</p><p> if resistance_type==[]</p><p> resistance_type.push(type)</p><p> resistance_type.push(e1+e2+e3)</p><p> else</p><p> unless resistance_type[1] <= e1+e2+e3</p><p> resistance_type=[type,e1+e2+e3]</p><p> end</p><p> end</p><p> end</p><p> current_type = resistance_type[0]</p><p> current_typeName = GameData::Type.get(current_type).name</p><p> move.calcType = current_type #改变制裁光砾的属性</p><p> current_type_id = typeList.index(current_type)</p><p> if user.form != current_type_id</p><p> pbChangeForm(current_type_id,_INTL("{1}变成了{2}属性!",pbThis,current_typeName)) #改变阿尔宙斯的形态</p><p> end</p><p> end[/CODE]</p><p>[/SPOILER]</p><p>[SPOILER="20.1的代码"]</p><p>[CODE=ruby]#传说阿尔宙斯 by ES泽洛</p><p> if isSpecies?(:ARCEUS) && move.id == :JUDGMENT && hasActiveItem?(:LEGENDPLATE) #当是阿尔宙斯,且特性是多属性,携带传说石板时</p><p> current_type = :NORMAL #默认初始形态</p><p> current_typeName = "一般" #默认初始属性名称</p><p> result_types = [] #克制属性</p><p> resistance_type = [] #抵抗属性</p><p> target_types = targets[0].pbTypes(true)</p><p> #处理克制属性</p><p> typeList = [</p><p> :NORMAL, :FIGHTING, :FLYING, :POISON, :GROUND,</p><p> :ROCK, :BUG, :GHOST, :STEEL, :QMARKS,</p><p> :FIRE, :WATER, :GRASS, :ELECTRIC, :PSYCHIC,</p><p> :ICE, :DRAGON, :DARK, :FAIRY</p><p> ]</p><p> typeList.each do |type|</p><p> e=Effectiveness.calculate(type, target_types[0], target_types[1], target_types[2]) #计算克制倍率,基础为8,每克制一个属性x2</p><p> if e>=64 #8倍克制</p><p> result_types.push(type)</p><p> else</p><p> if e>=32 #4倍克制</p><p> result_types.push(type)</p><p> else</p><p> if e>=16 #2倍克制</p><p> result_types.push(type)</p><p> end</p><p> end</p><p> end</p><p> end</p><p> #处理抵抗属性</p><p> result_types.each do |type|</p><p> e1 = Effectiveness.calculate(target_types[0], type)</p><p> e2 = Effectiveness.calculate(target_types[1], type)</p><p> e3 = (target_types[1] != nil) ? Effectiveness.calculate(target_types[2], type) : 0</p><p> if resistance_type == []</p><p> resistance_type.push(type)</p><p> resistance_type.push(e1 + e2 + e3)</p><p> else</p><p> unless resistance_type[1] <= e1 + e2 + e3</p><p> resistance_type = [type, e1 + e2 + e3]</p><p> end</p><p> end</p><p> end</p><p> current_type = resistance_type[0]</p><p> current_typeName = GameData::Type.get(current_type).name</p><p> move.calcType = current_type #改变制裁光砾的属性</p><p> current_type_id = typeList.index(current_type)</p><p> if user.form != current_type_id</p><p> pbChangeForm(current_type_id, _INTL("{1}变成了{2}属性!", pbThis, current_typeName)) #改变阿尔宙斯的形态</p><p> end</p><p> end[/CODE]</p><p>[/SPOILER]</p><p><span style="font-size: 18px">最后,不要忘了让它结束战斗恢复成默认形态,搜索:ARCEUS,找到一个和Form有关的,点进去,在下面加上框中的代码。</span></p><p>[CODE=ruby],</p><p> "getFormOnLeavingBattle" => proc { |pkmn, battle, usedInBattle, endBattle|</p><p> next 0 if pkmn.hasItem?(:LEGENDPLATE)</p><p> }[/CODE]</p><p>[ATTACH=full]563[/ATTACH]</p><p>会考虑第三属性(森林诅咒、万圣夜等附加的属性),例如下图对吉利蛋变格斗属性,对被附加了幽灵属性的吉利蛋变圣光属性(原创属性,克制幽灵属性)</p><p>[ATTACH=full]35[/ATTACH]</p><p>[ATTACH=full]36[/ATTACH]</p><p>[ATTACH=full]37[/ATTACH]</p><p><span style="color: rgb(255, 0, 0)"><span style="font-size: 15px">注意:不要制作一个???属性的精灵,更不要用传说制裁光砾打他,会报错,实在需要就自己判断一下。</span></span></p></blockquote><p></p>
[QUOTE="ES泽洛, post: 15, member: 2"] [COLOR=rgb(255, 0, 0)][SIZE=5]使用或转载请注明出自宝可饭堂社区[/SIZE][U][URL='https://bbs.pokefans.xyz/threads/9/'][SIZE=5]https://bbs.pokefans.xyz/threads/9/[/SIZE][/URL][/U][/COLOR] [SIZE=4][COLOR=rgb(65, 168, 95)]此教程适用于目前主流的Essentials18.1~20.1,其他版本的ESS未测试。[/COLOR] 道具的PBS什么的,自己照着其他石板抄一遍。 代码的插入位置在变幻自如附近,全局搜Protean就行了。[/SIZE] [SPOILER="18.1的代码"] [CODE=ruby]#传说阿尔宙斯 by ES泽洛 #由鸭灭骡优化 if isSpecies?(:ARCEUS) && move.id==getID(PBMoves,:JUDGMENT) && hasActiveItem?(:LEGENDPLATE) #当是阿尔宙斯,且特性是多属性,携带传说石板时 current_form = 0 #默认初始形态 current_type = "一般" #默认初始属性名称 result_types = [] #克制属性 resistance_type = [] #抵抗属性 type3 = targets[0].effects[PBEffects::Type3]==-1 ? nil : targets[0].effects[PBEffects::Type3] #获取第三属性,第三属性是一种状态 #处理克制属性 for type in 0..PBTypes.maxValue e=PBTypes.getCombinedEffectiveness(type,targets[0].type1,targets[0].type2,type3) #计算克制倍率,基础为8,每克制一个属性x2 if e>=64 #8倍克制 result_types.push(type) else if e>=32 #4倍克制 result_types.push(type) else if e>=16 #2倍克制 result_types.push(type) end end end end #处理抵抗属性 result_types.each do |type| e1 = PBTypes.getCombinedEffectiveness(targets[0].type1,type) e2 = PBTypes.getCombinedEffectiveness(targets[0].type2,type) e3 = (type3!=nil) ? PBTypes.getCombinedEffectiveness(type3,type) : 0 if resistance_type==[] resistance_type.push(type) resistance_type.push(e1+e2+e3) else unless resistance_type[1] <= e1+e2+e3 resistance_type=[type,e1+e2+e3] end end end current_form = resistance_type[0] current_type = PBTypes.getName(current_form) move.calcType = current_form #改变制裁光砾的属性 if user.form != current_form pbChangeForm(current_form,_INTL("{1}变成了{2}属性!",pbThis,current_type)) #改变阿尔宙斯的形态 end end[/CODE] [/SPOILER] [SPOILER="19.1的代码"] [CODE=ruby]#传说阿尔宙斯 by ES泽洛 #屎山不屎山的,就交给诸位去优化了 #================================================================================================================= =begin #注意:不知道为什么原版的hasActiveItem?(:LEGENDPLATE)会返回false,所以我改了下面这部分代码 def hasActiveItem?(check_item, ignore_fainted = false) return false if !itemActive?(ignore_fainted) return check_item.include?(@item_id) if check_item.is_a?(Array) #return check_item == self.item #原版 return check_item == @item_id #我改的 end =end #================================================================================================================= if isSpecies?(:ARCEUS) && move.id == :JUDGMENT && hasActiveItem?(:LEGENDPLATE) #当是阿尔宙斯,且特性是多属性,携带传说石板时 current_type = :NORMAL #默认初始形态 current_typeName = "一般" #默认初始属性名称 result_types = [] #克制属性 resistance_type = [] #抵抗属性 type3 = targets[0].effects[PBEffects::Type3]==-1 ? nil : targets[0].effects[PBEffects::Type3] #获取第三属性,第三属性是一种状态 #处理克制属性 typeList = [ :NORMAL,:FIGHTING,:FLYING,:POISON,:GROUND, :ROCK,:BUG,:GHOST,:STEEL,:QMARKS, :FIRE,:WATER,:GRASS,:ELECTRIC,:PSYCHIC, :ICE,:DRAGON,:DARK,:FAIRY ] for type in typeList e=Effectiveness.calculate(type,targets[0].type1,targets[0].type2,type3) #计算克制倍率,基础为8,每克制一个属性x2 if e>=64 #8倍克制 result_types.push(type) else if e>=32 #4倍克制 result_types.push(type) else if e>=16 #2倍克制 result_types.push(type) end end end end #处理抵抗属性 result_types.each do |type| e1 = Effectiveness.calculate(targets[0].type1,type) e2 = Effectiveness.calculate(targets[0].type2,type) e3 = (type3!=nil) ? Effectiveness.calculate(type3,type) : 0 if resistance_type==[] resistance_type.push(type) resistance_type.push(e1+e2+e3) else unless resistance_type[1] <= e1+e2+e3 resistance_type=[type,e1+e2+e3] end end end current_type = resistance_type[0] current_typeName = GameData::Type.get(current_type).name move.calcType = current_type #改变制裁光砾的属性 current_type_id = typeList.index(current_type) if user.form != current_type_id pbChangeForm(current_type_id,_INTL("{1}变成了{2}属性!",pbThis,current_typeName)) #改变阿尔宙斯的形态 end end[/CODE] [/SPOILER] [SPOILER="20.1的代码"] [CODE=ruby]#传说阿尔宙斯 by ES泽洛 if isSpecies?(:ARCEUS) && move.id == :JUDGMENT && hasActiveItem?(:LEGENDPLATE) #当是阿尔宙斯,且特性是多属性,携带传说石板时 current_type = :NORMAL #默认初始形态 current_typeName = "一般" #默认初始属性名称 result_types = [] #克制属性 resistance_type = [] #抵抗属性 target_types = targets[0].pbTypes(true) #处理克制属性 typeList = [ :NORMAL, :FIGHTING, :FLYING, :POISON, :GROUND, :ROCK, :BUG, :GHOST, :STEEL, :QMARKS, :FIRE, :WATER, :GRASS, :ELECTRIC, :PSYCHIC, :ICE, :DRAGON, :DARK, :FAIRY ] typeList.each do |type| e=Effectiveness.calculate(type, target_types[0], target_types[1], target_types[2]) #计算克制倍率,基础为8,每克制一个属性x2 if e>=64 #8倍克制 result_types.push(type) else if e>=32 #4倍克制 result_types.push(type) else if e>=16 #2倍克制 result_types.push(type) end end end end #处理抵抗属性 result_types.each do |type| e1 = Effectiveness.calculate(target_types[0], type) e2 = Effectiveness.calculate(target_types[1], type) e3 = (target_types[1] != nil) ? Effectiveness.calculate(target_types[2], type) : 0 if resistance_type == [] resistance_type.push(type) resistance_type.push(e1 + e2 + e3) else unless resistance_type[1] <= e1 + e2 + e3 resistance_type = [type, e1 + e2 + e3] end end end current_type = resistance_type[0] current_typeName = GameData::Type.get(current_type).name move.calcType = current_type #改变制裁光砾的属性 current_type_id = typeList.index(current_type) if user.form != current_type_id pbChangeForm(current_type_id, _INTL("{1}变成了{2}属性!", pbThis, current_typeName)) #改变阿尔宙斯的形态 end end[/CODE] [/SPOILER] [SIZE=5]最后,不要忘了让它结束战斗恢复成默认形态,搜索:ARCEUS,找到一个和Form有关的,点进去,在下面加上框中的代码。[/SIZE] [CODE=ruby], "getFormOnLeavingBattle" => proc { |pkmn, battle, usedInBattle, endBattle| next 0 if pkmn.hasItem?(:LEGENDPLATE) }[/CODE] [ATTACH type="full" alt="1674127193325.png"]563[/ATTACH] 会考虑第三属性(森林诅咒、万圣夜等附加的属性),例如下图对吉利蛋变格斗属性,对被附加了幽灵属性的吉利蛋变圣光属性(原创属性,克制幽灵属性) [ATTACH type="full" width="70%" height="70%" alt="psc.jpg"]35[/ATTACH] [ATTACH type="full" width="70%" height="70%" alt="psc (1).jpg"]36[/ATTACH] [ATTACH type="full" width="70%" height="70%" alt="psc (2).jpg"]37[/ATTACH] [COLOR=rgb(255, 0, 0)][SIZE=4]注意:不要制作一个???属性的精灵,更不要用传说制裁光砾打他,会报错,实在需要就自己判断一下。[/SIZE][/COLOR] [/QUOTE]
验证
宝可梦系列正统游戏的制作公司是?
回复帖子
最新帖子
全
我想切换视角讲述故事
最新更新:全民制作人
星期三,21:43
开发问题
Z
将GBA打包成APK
最新更新:zheyeyeye
星期三,21:27
GBA教程
Z
【进站必读】宝可饭堂社区全局规定v1.10
最新更新:z1652646304
星期三,20:25
公告规定
雨
pokeemerald怎么改箱子数
最新更新:雨落天晴
星期二,10:16
开发问题
[讨论]什么契机导致你想做游戏的
最新更新:A原翼
星期一,00:12
其他相关讨论
论坛统计
主题
559
消息
2,422
成员
3,879
最新成员
stonezz
联系我们
QQ
2201858342
邮箱
pokefans@qq.com
论坛
独立开发
进阶教程
添加传说形态阿尔宙斯
顶部