本帖最后由 张咚咚 于 2017-7-23 20:38 编辑
进入战斗每个敌人有20%几率变成你说的形态,放大两倍,气血提高10倍
class Game_BattlerBase attr_accessor :hp # HP #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh state_resist_set.each {|state_id| erase_state(state_id) } @hp = [@hp, 0].max @mp = [[@mp, mmp].min, 0].max @hp == 0 ? add_state(death_state_id) : remove_state(death_state_id) end end class Spriteset_Battle #-------------------------------------------------------------------------- # ● 敌人精灵生成 #-------------------------------------------------------------------------- def create_enemies @enemy_sprites = $game_troop.members.collect do |enemy| Sprite_Battler.new(@viewport1, enemy) end 0.upto(@enemy_sprites.length-1){|i| e = @enemy_sprites[i] if rand(100) > 80 #20%几率 e.zoom_x = 2.0 #提醒放大两倍 e.zoom_y = 2.0 $game_troop.members[i].hp *= 10 #气血提高十倍 end } end end
class Game_BattlerBase
attr_accessor :hp # HP
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
state_resist_set.each {|state_id| erase_state(state_id) }
@hp = [@hp, 0].max
@mp = [[@mp, mmp].min, 0].max
@hp == 0 ? add_state(death_state_id) : remove_state(death_state_id)
end
end
class Spriteset_Battle
#--------------------------------------------------------------------------
# ● 敌人精灵生成
#--------------------------------------------------------------------------
def create_enemies
@enemy_sprites = $game_troop.members.collect do |enemy|
Sprite_Battler.new(@viewport1, enemy)
end
0.upto(@enemy_sprites.length-1){|i|
e = @enemy_sprites[i]
if rand(100) > 80 #20%几率
e.zoom_x = 2.0 #提醒放大两倍
e.zoom_y = 2.0
$game_troop.members[i].hp *= 10 #气血提高十倍
end
}
end
end
|