主页
论坛
新帖
最新消息
新帖
最新动态
制作互助群
登录
注册
Toggle sidebar
Toggle sidebar
菜单
安装应用
安装
回复主题
【进站必读】宝可饭堂社区全局规定v1.10
关于坚决维护同人创作社群秩序与共识的公告
论坛
独立开发
进阶教程
【新天气套组】黑夜套组分享
禁用JavaScript。为了获得更好的体验,请在运行之前启用浏览器中的JavaScript。
您正在使用一款已经过时的浏览器!部分功能不能正常使用。
请尝试升级或使用
其他浏览器
。
信息
<blockquote data-quote="韩英鑫1111" data-source="post: 2963" data-attributes="member: 2566"><p>[CODE=ruby] #2-2.2:子午夜(√)</p><p> #2-2.2.1:恶作剧之心可以对恶系生效 (√)</p><p> #写在# Dark-type immunity to moves made faster by Prankster</p><p> if Settings::MECHANICS_GENERATION >= 7 && user.effects[PBEffects::Prankster] &&</p><p> target.pbHasType?(:DARK) && target.opposes?(user) && target.effectiveWeather != :Midnight</p><p> PBDebug.log("[Target immune] #{target.pbThis} is Dark-type and immune to Prankster-boosted moves")</p><p> @battle.pbDisplay(_INTL("对于{1},好像没有效果……", target.pbThis(true))) if show_message</p><p> return false</p><p> end</p><p> #2-2.2.2:(新增特性)光饵:午夜时每次登场当回合对方的单体招式都会攻击自己 (√)</p><p> Battle::AbilityEffects::OnSwitchIn.add(:BRAIT,</p><p> proc { |ability, battler, battle, switch_in|</p><p> if user.effectiveWeather == :Midnight</p><p> battler.effects[PBEffects::FollowMe] = 1</p><p> end</p><p> }</p><p> )</p><p> #2-2.2.3:(新增特性)扫把星:午夜下自身处于异常状态时,每回合结束都可能将异常状态传染给其他场上的宝可梦 (√)</p><p> Battle::AbilityEffects::EndOfRoundWeather.add(:UNLUCKYBODY,</p><p> proc { |ability, weather, battler, battle|</p><p> next if weather != :Midnight</p><p> next if battle.pbRandom(100) >= 30</p><p> can_status = []</p><p> battle.allBattlers.each do |b|</p><p> next if b.index == battle.index</p><p> next if !b.pbCanInflictStatus?(battler.status, battler, false)</p><p> can_status.push(b)</p><p> end</p><p> next if can_status.empty?</p><p> battle.pbShowAbilitySplash(battler)</p><p> can_status.sample.pbInflictStatus(battler.status, (battler.statusCount >= 1 ) ? 1 : 0, nil, battler)</p><p> battle.pbHideAbilitySplash(battler)</p><p> }</p><p> )</p><p> #2-2.3:惊魂夜</p><p> #2-2.3.1:胆怯先制度+1,被攻击就会下场 (√)</p><p> #写在 battler.effects[PBEffects::Prankster] = false下面</p><p> battler.effects[PBEffects::RATTLED] = false</p><p> #写在 @effects[PBEffects::Prankster] = false下面</p><p> @effects[PBEffects::RATTLED] = false</p><p> #写在 module PBEffects的Yawn = 116下面</p><p> RATTLED = 117 </p><p> Battle::AbilityEffects::PriorityChange.add(:RATTLED, #先制度+1</p><p> proc { |ability, battler, move, pri|</p><p> if battler.effectiveWeather == :ScaryNight</p><p> battler.effects[PBEffects::RATTLED] = true</p><p> next pri + 1</p><p> end</p><p> }</p><p> )</p><p></p><p> Battle::AbilityEffects::OnBeingHit.add(:RATTLED,</p><p> proc { |ability, user, target, move, battle|</p><p> if [:BUG, :DARK, :GHOST].include?(move.calcType)</p><p> target.pbRaiseStatStageByAbility(:SPEED, 1, target)</p><p> end</p><p> </p><p> if target.effectiveWeather == :ScaryNight</p><p> next false if target.effects[PBEffects::SkyDrop] >= 0 ||</p><p> target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSkyTargetCannotAct") # Sky Drop</p><p> </p><p> # In wild battles</p><p> if battle.wildBattle?</p><p> next false if !battle.pbCanRun?(target.index)</p><p> battle.pbShowAbilitySplash(target, true)</p><p> battle.pbHideAbilitySplash(target)</p><p> pbSEPlay("Battle flee")</p><p> battle.pbDisplay(_INTL("{1}脱离了战斗!", target.pbThis))</p><p> battle.decision = 3 # Escaped</p><p> next true</p><p> end</p><p></p><p> # In trainer battles</p><p> next false if battle.pbAllFainted?(target.idxOpposingSide)</p><p> next false if !battle.pbCanSwitchOut?(target.index) # Battler can't switch out</p><p> next false if !battle.pbCanChooseNonActive?(target.index) # No Pokémon can switch in</p><p> </p><p> battle.pbShowAbilitySplash(target, true)</p><p> battle.pbHideAbilitySplash(target)</p><p> if !Battle::Scene::USE_ABILITY_SPLASH</p><p> battle.pbDisplay(_INTL("{1}的{2}发动!", target.pbThis, target.abilityName))</p><p> end</p><p> battle.pbDisplay(_INTL("{1}要回到{2}的身边了!", target.pbThis, battle.pbGetOwnerName(target.index)))</p><p></p><p> if battle.endOfRound # Just switch out</p><p> battle.scene.pbRecall(target.index) if !target.fainted?</p><p> target.pbAbilitiesOnSwitchOut # Inc. primordial weather check</p><p> next true</p><p> end</p><p></p><p> newPkmn = battle.pbGetReplacementPokemonIndex(target.index) # Owner chooses</p><p> next false if newPkmn < 0 # Shouldn't ever do this</p><p></p><p> battle.pbRecallAndReplace(target.index, newPkmn)</p><p> battle.pbClearChoice(target.index) # Replacement Pokémon does nothing this round</p><p> battle.moldBreaker = false if user && target.index == user.index</p><p> battle.pbOnBattlerEnteringBattle(target.index)</p><p> next true</p><p> end</p><p> next false</p><p> }</p><p> )</p><p> #2-2.3.2:(新增特性)鬼打墙:惊魂夜中登场造成三回合的踩影和再来一次效果 (√)</p><p> #(写在B_I——# Creating a battler——SLOWSTART下面一行)</p><p> @effects[PBEffects::SpookyCircle] = 0</p><p> #(写在PBEffects)</p><p> SpookyCircle = 118 #看你这一段最后一个是几,总之连续的补在最后就行</p><p> #(写在battle_battler的def trappedInBattle?上面)</p><p> def can_spooky_circle?</p><p> @effects[PBEffects::SpookyCircle] != 3</p><p> end</p><p> </p><p> def circled?</p><p> return false if pbHasType?(:GHOST)</p><p> return false if hasActiveAbility?(:SHADOWTAG)</p><p> return true @effects[PBEffects::SpookyCircle] > 0</p><p> return false</p><p> end</p><p></p><p></p><p> #(写在End Of Round end self-inflicted effects on battler)</p><p> #鬼打墙结束</p><p> if battler.effects[PBEffects::SpookyCircle] > 0</p><p> battler.effects[PBEffects::SpookyCircle] -= 1</p><p> if battler.effects[PBEffects::SpookyCircle] == 0</p><p> pbDisplay(_INTL("{1}不再迷失了!", battler.pbThis))</p><p> end</p><p> end</p><p></p><p> </p><p> #写在# Battler_UseMoveSuccessChecks中 Choice Band/Gorilla Tactics,整段这样改。</p><p> @effects[PBEffects::ChoiceBand] = nil if !pbHasMove?(@effects[PBEffects::ChoiceBand])</p><p> if @effects[PBEffects::ChoiceBand] && move.id != @effects[PBEffects::ChoiceBand]</p><p> choiced_move = GameData::Move.try_get(@effects[PBEffects::ChoiceBand])</p><p> if choiced_move</p><p> if hasActiveItem?([:CHOICEBAND, :CHOICESPECS, :CHOICESCARF])</p><p> if showMessages</p><p> msg = _INTL("因为{1}的效果,只能使出{2}!", itemName, choiced_move.name)</p><p> (commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg)</p><p> end</p><p> return false</p><p> elsif hasActiveAbility?(:GORILLATACTICS)</p><p> if showMessages</p><p> msg = _INTL("{1}只能使出{2}!", pbThis, choiced_move.name)</p><p> (commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg)</p><p> end</p><p> return false </p><p> # 鬼打墙</p><p> elsif @effects[PBEffects::SpookyCircle] > 0</p><p> if showMessages</p><p> msg = _INTL("{1}迷失在循环中只能使出{2}!", pbThis, choiced_move.name)</p><p> (commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg)</p><p> end</p><p> return false</p><p> end</p><p> end</p><p> end</p><p> #写在Battler_UseMove中def pbEndTurn(_choice),整段这样改</p><p> def pbEndTurn(_choice)</p><p> @lastRoundMoved = @battle.turnCount # Done something this round</p><p> if !@effects[PBEffects::ChoiceBand] &&</p><p> (hasActiveItem?([:CHOICEBAND, :CHOICESPECS, :CHOICESCARF]) ||</p><p> hasActiveAbility?(:GORILLATACTICS) || @effects[PBEffects::SpookyCircle] > 0)</p><p> if @lastMoveUsed && pbHasMove?(@lastMoveUsed)</p><p> @effects[PBEffects::ChoiceBand] = @lastMoveUsed</p><p> elsif @lastRegularMoveUsed && pbHasMove?(@lastRegularMoveUsed)</p><p> @effects[PBEffects::ChoiceBand] = @lastRegularMoveUsed</p><p> end</p><p> end</p><p> @effects[PBEffects::BeakBlast] = false</p><p> @effects[PBEffects::Charge] = 0 if @effects[PBEffects::Charge] == 1</p><p> @effects[PBEffects::GemConsumed] = nil</p><p> @effects[PBEffects::ShellTrap] = false</p><p> @battle.allBattlers.each { |b| b.pbContinualAbilityChecks } # Trace, end primordial weathers</p><p> end </p><p></p><p></p><p></p><p> Battle::AbilityEffects::OnSwitchIn.add(:SPOOKYCIRCLE,</p><p> proc { |ability, battler, battle, switch_in|</p><p> next unless battler.effectiveWeather == :ScaryNight</p><p> circled = []</p><p> battler.eachOpposing do |b|</p><p> next unless b.can_spooky_circle?</p><p> b.effects[PBEffects::SpookyCircle] = 3</p><p> circled << b</p><p> end</p><p> next if circled.empty?</p><p> battle.pbShowAbilitySplash(battler)</p><p> circled.each { |b| battle.pbDisplay(_INTL("{1}迷失在了循环里!", b.pbThis) }</p><p> battle.pbHideAbilitySplash(battler)</p><p> }</p><p> )</p><p> </p><p> #2-2.3.3:(新增特性)装神弄鬼:惊魂夜满HP状态下幽灵系招式会导致对手畏缩 (√)</p><p> #写在def pbFlinchChance(user, target)</p><p> if user.hasActiveAbility?(:JUMPSCARE, true) && target.effectiveWeather == :ScaryNight && user.moveType == :GHOST && user.hp == user.totalhp</p><p> ret = 100</p><p> end[/CODE]</p></blockquote><p></p>
[QUOTE="韩英鑫1111, post: 2963, member: 2566"] [CODE=ruby] #2-2.2:子午夜(√) #2-2.2.1:恶作剧之心可以对恶系生效 (√) #写在# Dark-type immunity to moves made faster by Prankster if Settings::MECHANICS_GENERATION >= 7 && user.effects[PBEffects::Prankster] && target.pbHasType?(:DARK) && target.opposes?(user) && target.effectiveWeather != :Midnight PBDebug.log("[Target immune] #{target.pbThis} is Dark-type and immune to Prankster-boosted moves") @battle.pbDisplay(_INTL("对于{1},好像没有效果……", target.pbThis(true))) if show_message return false end #2-2.2.2:(新增特性)光饵:午夜时每次登场当回合对方的单体招式都会攻击自己 (√) Battle::AbilityEffects::OnSwitchIn.add(:BRAIT, proc { |ability, battler, battle, switch_in| if user.effectiveWeather == :Midnight battler.effects[PBEffects::FollowMe] = 1 end } ) #2-2.2.3:(新增特性)扫把星:午夜下自身处于异常状态时,每回合结束都可能将异常状态传染给其他场上的宝可梦 (√) Battle::AbilityEffects::EndOfRoundWeather.add(:UNLUCKYBODY, proc { |ability, weather, battler, battle| next if weather != :Midnight next if battle.pbRandom(100) >= 30 can_status = [] battle.allBattlers.each do |b| next if b.index == battle.index next if !b.pbCanInflictStatus?(battler.status, battler, false) can_status.push(b) end next if can_status.empty? battle.pbShowAbilitySplash(battler) can_status.sample.pbInflictStatus(battler.status, (battler.statusCount >= 1 ) ? 1 : 0, nil, battler) battle.pbHideAbilitySplash(battler) } ) #2-2.3:惊魂夜 #2-2.3.1:胆怯先制度+1,被攻击就会下场 (√) #写在 battler.effects[PBEffects::Prankster] = false下面 battler.effects[PBEffects::RATTLED] = false #写在 @effects[PBEffects::Prankster] = false下面 @effects[PBEffects::RATTLED] = false #写在 module PBEffects的Yawn = 116下面 RATTLED = 117 Battle::AbilityEffects::PriorityChange.add(:RATTLED, #先制度+1 proc { |ability, battler, move, pri| if battler.effectiveWeather == :ScaryNight battler.effects[PBEffects::RATTLED] = true next pri + 1 end } ) Battle::AbilityEffects::OnBeingHit.add(:RATTLED, proc { |ability, user, target, move, battle| if [:BUG, :DARK, :GHOST].include?(move.calcType) target.pbRaiseStatStageByAbility(:SPEED, 1, target) end if target.effectiveWeather == :ScaryNight next false if target.effects[PBEffects::SkyDrop] >= 0 || target.inTwoTurnAttack?("TwoTurnAttackInvulnerableInSkyTargetCannotAct") # Sky Drop # In wild battles if battle.wildBattle? next false if !battle.pbCanRun?(target.index) battle.pbShowAbilitySplash(target, true) battle.pbHideAbilitySplash(target) pbSEPlay("Battle flee") battle.pbDisplay(_INTL("{1}脱离了战斗!", target.pbThis)) battle.decision = 3 # Escaped next true end # In trainer battles next false if battle.pbAllFainted?(target.idxOpposingSide) next false if !battle.pbCanSwitchOut?(target.index) # Battler can't switch out next false if !battle.pbCanChooseNonActive?(target.index) # No Pokémon can switch in battle.pbShowAbilitySplash(target, true) battle.pbHideAbilitySplash(target) if !Battle::Scene::USE_ABILITY_SPLASH battle.pbDisplay(_INTL("{1}的{2}发动!", target.pbThis, target.abilityName)) end battle.pbDisplay(_INTL("{1}要回到{2}的身边了!", target.pbThis, battle.pbGetOwnerName(target.index))) if battle.endOfRound # Just switch out battle.scene.pbRecall(target.index) if !target.fainted? target.pbAbilitiesOnSwitchOut # Inc. primordial weather check next true end newPkmn = battle.pbGetReplacementPokemonIndex(target.index) # Owner chooses next false if newPkmn < 0 # Shouldn't ever do this battle.pbRecallAndReplace(target.index, newPkmn) battle.pbClearChoice(target.index) # Replacement Pokémon does nothing this round battle.moldBreaker = false if user && target.index == user.index battle.pbOnBattlerEnteringBattle(target.index) next true end next false } ) #2-2.3.2:(新增特性)鬼打墙:惊魂夜中登场造成三回合的踩影和再来一次效果 (√) #(写在B_I——# Creating a battler——SLOWSTART下面一行) @effects[PBEffects::SpookyCircle] = 0 #(写在PBEffects) SpookyCircle = 118 #看你这一段最后一个是几,总之连续的补在最后就行 #(写在battle_battler的def trappedInBattle?上面) def can_spooky_circle? @effects[PBEffects::SpookyCircle] != 3 end def circled? return false if pbHasType?(:GHOST) return false if hasActiveAbility?(:SHADOWTAG) return true @effects[PBEffects::SpookyCircle] > 0 return false end #(写在End Of Round end self-inflicted effects on battler) #鬼打墙结束 if battler.effects[PBEffects::SpookyCircle] > 0 battler.effects[PBEffects::SpookyCircle] -= 1 if battler.effects[PBEffects::SpookyCircle] == 0 pbDisplay(_INTL("{1}不再迷失了!", battler.pbThis)) end end #写在# Battler_UseMoveSuccessChecks中 Choice Band/Gorilla Tactics,整段这样改。 @effects[PBEffects::ChoiceBand] = nil if !pbHasMove?(@effects[PBEffects::ChoiceBand]) if @effects[PBEffects::ChoiceBand] && move.id != @effects[PBEffects::ChoiceBand] choiced_move = GameData::Move.try_get(@effects[PBEffects::ChoiceBand]) if choiced_move if hasActiveItem?([:CHOICEBAND, :CHOICESPECS, :CHOICESCARF]) if showMessages msg = _INTL("因为{1}的效果,只能使出{2}!", itemName, choiced_move.name) (commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg) end return false elsif hasActiveAbility?(:GORILLATACTICS) if showMessages msg = _INTL("{1}只能使出{2}!", pbThis, choiced_move.name) (commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg) end return false # 鬼打墙 elsif @effects[PBEffects::SpookyCircle] > 0 if showMessages msg = _INTL("{1}迷失在循环中只能使出{2}!", pbThis, choiced_move.name) (commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg) end return false end end end #写在Battler_UseMove中def pbEndTurn(_choice),整段这样改 def pbEndTurn(_choice) @lastRoundMoved = @battle.turnCount # Done something this round if !@effects[PBEffects::ChoiceBand] && (hasActiveItem?([:CHOICEBAND, :CHOICESPECS, :CHOICESCARF]) || hasActiveAbility?(:GORILLATACTICS) || @effects[PBEffects::SpookyCircle] > 0) if @lastMoveUsed && pbHasMove?(@lastMoveUsed) @effects[PBEffects::ChoiceBand] = @lastMoveUsed elsif @lastRegularMoveUsed && pbHasMove?(@lastRegularMoveUsed) @effects[PBEffects::ChoiceBand] = @lastRegularMoveUsed end end @effects[PBEffects::BeakBlast] = false @effects[PBEffects::Charge] = 0 if @effects[PBEffects::Charge] == 1 @effects[PBEffects::GemConsumed] = nil @effects[PBEffects::ShellTrap] = false @battle.allBattlers.each { |b| b.pbContinualAbilityChecks } # Trace, end primordial weathers end Battle::AbilityEffects::OnSwitchIn.add(:SPOOKYCIRCLE, proc { |ability, battler, battle, switch_in| next unless battler.effectiveWeather == :ScaryNight circled = [] battler.eachOpposing do |b| next unless b.can_spooky_circle? b.effects[PBEffects::SpookyCircle] = 3 circled << b end next if circled.empty? battle.pbShowAbilitySplash(battler) circled.each { |b| battle.pbDisplay(_INTL("{1}迷失在了循环里!", b.pbThis) } battle.pbHideAbilitySplash(battler) } ) #2-2.3.3:(新增特性)装神弄鬼:惊魂夜满HP状态下幽灵系招式会导致对手畏缩 (√) #写在def pbFlinchChance(user, target) if user.hasActiveAbility?(:JUMPSCARE, true) && target.effectiveWeather == :ScaryNight && user.moveType == :GHOST && user.hp == user.totalhp ret = 100 end[/CODE] [/QUOTE]
验证
649-493=?
回复帖子
最新帖子
全
我想切换视角讲述故事
最新更新:全民制作人
星期三,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
论坛
独立开发
进阶教程
【新天气套组】黑夜套组分享
顶部