主页
论坛
新帖
最新消息
新帖
最新动态
制作互助群
登录
注册
Toggle sidebar
Toggle sidebar
菜单
安装应用
安装
回复主题
【进站必读】宝可饭堂社区全局规定v1.10
关于坚决维护同人创作社群秩序与共识的公告
论坛
独立开发
进阶教程
【场地】秘蕈场地(虫场)分享
禁用JavaScript。为了获得更好的体验,请在运行之前启用浏览器中的JavaScript。
您正在使用一款已经过时的浏览器!部分功能不能正常使用。
请尝试升级或使用
其他浏览器
。
信息
<blockquote data-quote="韩英鑫1111" data-source="post: 2468" data-attributes="member: 2566"><p>首先感谢社区里很多大佬的协助,让我这个场地平稳落地了,在这里把这个我个人觉得挺有趣的场地分享出来</p><p>##########屎山代码警告##########</p><p>[CODE=ruby]#定义秘蕈场地</p><p>#①:写在016_BattleTerrain</p><p>GameData::BattleTerrain.register({</p><p> :id => :Bugy,</p><p> :name => _INTL("秘蕈"),</p><p> :animation => "BugyTerrain"</p><p>})</p><p></p><p>#②:写在def pbStartBattleCore</p><p>when :Bugy</p><p> pbDisplay(_INTL("幽闭的密林气息从脚下传来!"))</p><p></p><p>#③:写在def pbStartTerrain</p><p>when :Bugy</p><p> pbDisplay(_INTL("幽闭的密林气息从脚下传来!"))</p><p></p><p>#④:写在def pbEOREndTerrain</p><p>when :Bugy</p><p> pbDisplay(_INTL("森林的气息消失了!"))</p><p></p><p>#⑤:定义域同上</p><p>when :Bugy then pbDisplay(_INTL("森林依旧繁茂!"))</p><p></p><p>#虫场效果</p><p>#①虫系1.5倍增伤</p><p>#写在Terrain moves</p><p>when :Bugy</p><p> multipliers[:power_multiplier] *= 1.5 if type == :BUG && user.affectedByTerrain?</p><p>#②虫系毒系命中率*1.1</p><p>#写在def pbCalcAccuracyModifiers</p><p>if @battle.field.terrain == :Bugy</p><p> if user.pbHasType?(:BUG) || user.pbHasType?( :POISON)</p><p> if user.affectedByTerrain?</p><p> modifiers[:accuracy_multiplier] *= 1.1</p><p> end</p><p> end</p><p>end</p><p>#③多段攻击会多打一次</p><p>#连环巴掌,连续拳,乱击等方法:HitTwoToFiveTimes(√)</p><p>#鳞射:HitTwoToFiveTimesRaiseUserSpd1LowerUserDef1(√)</p><p>class Battle::Move::HitTwoToFiveTimes < Battle::Move</p><p> def multiHitMove?; return true; end</p><p> def pbNumHits(user, targets)</p><p> hitChances = [</p><p> 2, 2, 2, 2, 2, 2, 2,</p><p> 3, 3, 3, 3, 3, 3, 3,</p><p> 4, 4, 4,</p><p> 5, 5, 5</p><p> ]</p><p> ret = hitChances.sample</p><p> if @battle.field.terrain == :Bugy</p><p> if user.affectedByTerrain?</p><p> @battle.pbShowAbilitySplash(user)</p><p> @battle.pbHideAbilitySplash(user)</p><p> ret += 1</p><p> end</p><p> if user.hasActiveAbility?(:SKILLLINK)</p><p> if @battle.field.terrain == :Bugy && user.affectedByTerrain?</p><p> ret = 6</p><p> else</p><p> ret = 5</p><p> end</p><p> end</p><p> return ret</p><p> end</p><p>end</p><p>#飞水手里剑:HitTwoToFiveTimesOrThreeForAshGreninja(√)</p><p>class Battle::Move::HitTwoToFiveTimesOrThreeForAshGreninja < Battle::Move::HitTwoToFiveTimes</p><p> def pbNumHits(user, targets)</p><p> if user.isSpecies?(:GRENINJA) && user.form == 2</p><p> if @battle.field.terrain == :Bugy && user.affectedByTerrain?</p><p> return 4</p><p> else</p><p> return 3</p><p> end</p><p> end</p><p> return super</p><p> end</p><p>#水流连打:HitThreeTimesAlwaysCriticalHit(√)</p><p>class Battle::Move::HitThreeTimesAlwaysCriticalHit < Battle::Move</p><p> def multiHitMove?; return true; end</p><p> def pbNumHits(user, targets)</p><p> if @battle.field.terrain == :Bugy && user.affectedByTerrain?</p><p> return 4</p><p> else</p><p> return 3</p><p> end</p><p> end</p><p> def pbOnStartUse(user, targets)</p><p> user.check_every_hit = true</p><p> end</p><p> def pbCritialOverride(user, target)</p><p> case user.current_hit</p><p> when 0 then return 1</p><p> when 1 then return 1</p><p> when 2 then return 1</p><p> when 3 then return -1 </p><p> end</p><p> end</p><p> def pbEffectAfterAllHits(user, target)</p><p> user.check_every_hit = false</p><p> user.current_hit = 0</p><p> end</p><p>end</p><p>#(# Attack a single target)</p><p>user.current_hit = hitNum</p><p>#(# Things the battler has done in battle)</p><p> attr_accessor :current_hit</p><p> attr_accessor :check_every_hit</p><p>#三连钻:HitThreeTimes(√)</p><p>def multiHitMove?; return true; end</p><p> def pbNumHits(user, targets)</p><p> if @battle.field.terrain == :Bugy && user.affectedByTerrain?</p><p> return 4</p><p> else</p><p> return 3</p><p> end</p><p> end</p><p>#二连踢等:HitTwoTimes(√)</p><p>#双针:HitTwoTimesPoisonTarget(√)</p><p>#钢拳双击:HitTwoTimesFlinchTarget(√)</p><p> def pbNumHits(user, targets)</p><p> if @battle.field.terrain == :Bugy && user.affectedByTerrain?</p><p> return 3</p><p> else</p><p> return 2</p><p> end</p><p>end</p><p>#龙箭:HitTwoTimesTargetThenTargetAlly(做不到不可能)</p><p>#三连踢:HitThreeTimesPowersUpWithEachHit(√)</p><p>class Battle::Move::HitThreeTimesPowersUpWithEachHit < Battle::Move</p><p> def multiHitMove?; return true; end</p><p> def pbNumHits(user, targets)</p><p> if @battle.field.terrain == :Bugy && user.affectedByTerrain?</p><p> return 4</p><p> else</p><p> return 3</p><p> end</p><p> end</p><p> def successCheckPerHit?</p><p> return @accCheckPerHit</p><p> end</p><p> def pbOnStartUse(user, targets)</p><p> @calcBaseDmg = 0</p><p> @accCheckPerHit = !user.hasActiveAbility?(:SKILLLINK)</p><p> user.check_every_hit = true</p><p> end</p><p> def pbBaseDamage(baseDmg, user, target)</p><p> case user.current_hit</p><p> when 0 then @calcBaseDmg += baseDmg</p><p> when 1 then @calcBaseDmg += baseDmg</p><p> when 2 then @calcBaseDmg += baseDmg</p><p> when 3 then @calcBaseDmg += 0</p><p> return @calcBaseDmg</p><p> end</p><p> end</p><p>end</p><p>#鼠数儿:HitTenTimes(√)</p><p>class Battle::Move::HitTenTimes < Battle::Move</p><p> def multiHitMove?; return true; end</p><p> def pbNumHits(user, targets)</p><p> if user.hasActiveItem?(:LOADEDDICE)</p><p> if @battle.field.terrain == :Bugy && user.affectedByTerrain?</p><p> 200.times { puts (5 + rand(7)) }</p><p> return 5 + rand(7)</p><p> else</p><p> return 4 + rand(7)</p><p> end</p><p> end</p><p> if @battle.field.terrain == :Bugy && user.affectedByTerrain?</p><p> return 11</p><p> else</p><p> return 10</p><p> end</p><p> end</p><p> def successCheckPerHit?</p><p> return @accCheckPerHit</p><p> end</p><p> def pbOnStartUse(user, targets)</p><p> @accCheckPerHit = !user.hasActiveAbility?(:SKILLLINK) && !user.hasActiveItem?(:LOADEDDICE)</p><p> end</p><p>end</p><p>#机变骰子:Loaded Dice(√)</p><p>class Battle::Move::HitTwoToFiveTimes < Battle::Move</p><p> alias paldea_pbNumHits pbNumHits</p><p> def pbNumHits(user, targets)</p><p> if user.hasActiveItem?(:LOADEDDICE)</p><p> if @battle.field.terrain == :Bugy && user.affectedByTerrain?</p><p> return 5 + rand(2)</p><p> else</p><p> return 4 + rand(2)</p><p> end</p><p> end</p><p> return paldea_pbNumHits(user, targets)</p><p> end</p><p>end</p><p></p><p>#秘蕈制造者</p><p>Battle::AbilityEffects::OnSwitchIn.add(:BUGYSURGE,</p><p> proc { |ability, battler, battle, switch_in|</p><p> next if battle.field.terrain == :Bugy</p><p> battle.pbShowAbilitySplash(battler)</p><p> battle.pbStartTerrain(battler, :Bugy)</p><p> # NOTE: The ability splash is hidden again in def pbStartTerrain.</p><p> }</p><p>)[/CODE]</p></blockquote><p></p>
[QUOTE="韩英鑫1111, post: 2468, member: 2566"] 首先感谢社区里很多大佬的协助,让我这个场地平稳落地了,在这里把这个我个人觉得挺有趣的场地分享出来 ##########屎山代码警告########## [CODE=ruby]#定义秘蕈场地 #①:写在016_BattleTerrain GameData::BattleTerrain.register({ :id => :Bugy, :name => _INTL("秘蕈"), :animation => "BugyTerrain" }) #②:写在def pbStartBattleCore when :Bugy pbDisplay(_INTL("幽闭的密林气息从脚下传来!")) #③:写在def pbStartTerrain when :Bugy pbDisplay(_INTL("幽闭的密林气息从脚下传来!")) #④:写在def pbEOREndTerrain when :Bugy pbDisplay(_INTL("森林的气息消失了!")) #⑤:定义域同上 when :Bugy then pbDisplay(_INTL("森林依旧繁茂!")) #虫场效果 #①虫系1.5倍增伤 #写在Terrain moves when :Bugy multipliers[:power_multiplier] *= 1.5 if type == :BUG && user.affectedByTerrain? #②虫系毒系命中率*1.1 #写在def pbCalcAccuracyModifiers if @battle.field.terrain == :Bugy if user.pbHasType?(:BUG) || user.pbHasType?( :POISON) if user.affectedByTerrain? modifiers[:accuracy_multiplier] *= 1.1 end end end #③多段攻击会多打一次 #连环巴掌,连续拳,乱击等方法:HitTwoToFiveTimes(√) #鳞射:HitTwoToFiveTimesRaiseUserSpd1LowerUserDef1(√) class Battle::Move::HitTwoToFiveTimes < Battle::Move def multiHitMove?; return true; end def pbNumHits(user, targets) hitChances = [ 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5 ] ret = hitChances.sample if @battle.field.terrain == :Bugy if user.affectedByTerrain? @battle.pbShowAbilitySplash(user) @battle.pbHideAbilitySplash(user) ret += 1 end if user.hasActiveAbility?(:SKILLLINK) if @battle.field.terrain == :Bugy && user.affectedByTerrain? ret = 6 else ret = 5 end end return ret end end #飞水手里剑:HitTwoToFiveTimesOrThreeForAshGreninja(√) class Battle::Move::HitTwoToFiveTimesOrThreeForAshGreninja < Battle::Move::HitTwoToFiveTimes def pbNumHits(user, targets) if user.isSpecies?(:GRENINJA) && user.form == 2 if @battle.field.terrain == :Bugy && user.affectedByTerrain? return 4 else return 3 end end return super end #水流连打:HitThreeTimesAlwaysCriticalHit(√) class Battle::Move::HitThreeTimesAlwaysCriticalHit < Battle::Move def multiHitMove?; return true; end def pbNumHits(user, targets) if @battle.field.terrain == :Bugy && user.affectedByTerrain? return 4 else return 3 end end def pbOnStartUse(user, targets) user.check_every_hit = true end def pbCritialOverride(user, target) case user.current_hit when 0 then return 1 when 1 then return 1 when 2 then return 1 when 3 then return -1 end end def pbEffectAfterAllHits(user, target) user.check_every_hit = false user.current_hit = 0 end end #(# Attack a single target) user.current_hit = hitNum #(# Things the battler has done in battle) attr_accessor :current_hit attr_accessor :check_every_hit #三连钻:HitThreeTimes(√) def multiHitMove?; return true; end def pbNumHits(user, targets) if @battle.field.terrain == :Bugy && user.affectedByTerrain? return 4 else return 3 end end #二连踢等:HitTwoTimes(√) #双针:HitTwoTimesPoisonTarget(√) #钢拳双击:HitTwoTimesFlinchTarget(√) def pbNumHits(user, targets) if @battle.field.terrain == :Bugy && user.affectedByTerrain? return 3 else return 2 end end #龙箭:HitTwoTimesTargetThenTargetAlly(做不到不可能) #三连踢:HitThreeTimesPowersUpWithEachHit(√) class Battle::Move::HitThreeTimesPowersUpWithEachHit < Battle::Move def multiHitMove?; return true; end def pbNumHits(user, targets) if @battle.field.terrain == :Bugy && user.affectedByTerrain? return 4 else return 3 end end def successCheckPerHit? return @accCheckPerHit end def pbOnStartUse(user, targets) @calcBaseDmg = 0 @accCheckPerHit = !user.hasActiveAbility?(:SKILLLINK) user.check_every_hit = true end def pbBaseDamage(baseDmg, user, target) case user.current_hit when 0 then @calcBaseDmg += baseDmg when 1 then @calcBaseDmg += baseDmg when 2 then @calcBaseDmg += baseDmg when 3 then @calcBaseDmg += 0 return @calcBaseDmg end end end #鼠数儿:HitTenTimes(√) class Battle::Move::HitTenTimes < Battle::Move def multiHitMove?; return true; end def pbNumHits(user, targets) if user.hasActiveItem?(:LOADEDDICE) if @battle.field.terrain == :Bugy && user.affectedByTerrain? 200.times { puts (5 + rand(7)) } return 5 + rand(7) else return 4 + rand(7) end end if @battle.field.terrain == :Bugy && user.affectedByTerrain? return 11 else return 10 end end def successCheckPerHit? return @accCheckPerHit end def pbOnStartUse(user, targets) @accCheckPerHit = !user.hasActiveAbility?(:SKILLLINK) && !user.hasActiveItem?(:LOADEDDICE) end end #机变骰子:Loaded Dice(√) class Battle::Move::HitTwoToFiveTimes < Battle::Move alias paldea_pbNumHits pbNumHits def pbNumHits(user, targets) if user.hasActiveItem?(:LOADEDDICE) if @battle.field.terrain == :Bugy && user.affectedByTerrain? return 5 + rand(2) else return 4 + rand(2) end end return paldea_pbNumHits(user, targets) end end #秘蕈制造者 Battle::AbilityEffects::OnSwitchIn.add(:BUGYSURGE, proc { |ability, battler, battle, switch_in| next if battle.field.terrain == :Bugy battle.pbShowAbilitySplash(battler) battle.pbStartTerrain(battler, :Bugy) # NOTE: The ability splash is hidden again in def pbStartTerrain. } )[/CODE] [/QUOTE]
验证
898+7=?
回复帖子
最新帖子
全
我想切换视角讲述故事
最新更新:全民制作人
星期三,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
论坛
独立开发
进阶教程
【场地】秘蕈场地(虫场)分享
顶部