赞 | 4 |
VIP | 44 |
好人卡 | 11 |
积分 | 12 |
经验 | 54954 |
最后登录 | 2021-10-2 |
在线时间 | 1276 小时 |
Lv3.寻梦者 ○赛
- 梦石
- 0
- 星屑
- 1249
- 在线时间
- 1276 小时
- 注册时间
- 2013-1-22
- 帖子
- 2246
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 天地有正气 于 2015-8-29 17:01 编辑
本脚本有许多bug,请勿下载!!!下周修复!
@learn @Index
题外话:怎么一大堆都是VA发布的呢!来个XP的吧!
XP貌似没有敌人图鉴呢!于是我就写了个……功能没有VA那么强大……
也许会有一些bug,请大家多报告吧!- # XZZH 6
- # 敌人图鉴
- # 作者:天地有正气
- # 版本号:0.1
- # 说明:使用$scene = Scene_EnemyBook.new来呼出。
- # 注意:一旦和敌人战斗过,就会被记载在图鉴里。
- class Scene_Battle
- alias xz_battle_end battle_end
- def battle_end(result)
- for i in 0..$game_troop.enemies.size
- if $game_troop.enemies[i] != nil
- id = $game_troop.enemies[i].id
- $data_enemies[id].learn = true
- end
- end
- xz_battle_end(result)
- end
- end
- module RPG
- class Enemy
- alias xz_initialize initialize
- def initialize
- xz_initialize
- @learn = false
- end
- attr_accessor :learn
- end
- end
- class Window_EnemyName < Window_Selectable
- def initialize
- super(0,0,240,480)
- self.contents = Bitmap.new(width - 32, height - 32)
- @column_max = 1
- @index = 0
- refresh
- end
- def get_id(index)
- @id = []
- for i in 0..$data_enemies.size
- if $data_enemies[i] != nil
- if $data_enemies[i].learn
- @id.push($data_enemies[i].id)
- end
- end
- end
- return @id[index]
- end
- def refresh
- self.contents.clear
- @data = []
- for i in 1..$data_enemies.size
- if $data_enemies[i] != nil
- if $data_enemies[i].learn
- @data.push($data_enemies[i].name)
- end
- end
- end
- @item_max = @data.size
- if @item_max > 0
- self.contents = Bitmap.new(width - 32, row_max * 32)
- for i in 0...@item_max
- draw_name(i)
- end
- end
- end
- def draw_name(index)
- self.contents.draw_text(20,index*32,240,32,@data[index])
- end
- end
- class Window_EnemyStatus < Window_Base
- def initialize
- super(240,0,400,480)
- self.contents = Bitmap.new(width - 32, height - 32)
- end
- def set_enemy(id)
- self.contents.clear
- text = $data_enemies[id].maxhp
- self.contents.draw_text(10,0,400,32,"最大生命值:#{text}")
- text = $data_enemies[id].maxsp
- self.contents.draw_text(10,32,400,32,"最大魔力值:#{text}")
- text = $data_enemies[id].str
- self.contents.draw_text(10,64,400,32,"力量:#{text}")
- text = $data_enemies[id].dex
- self.contents.draw_text(10,96,400,32,"灵巧:#{text}")
- text = $data_enemies[id].agi
- self.contents.draw_text(10,128,400,32,"速度:#{text}")
- text = $data_enemies[id].int
- self.contents.draw_text(10,160,400,32,"魔力:#{text}")
- text = $data_enemies[id].atk
- self.contents.draw_text(10,192,400,32,"攻击力:#{text}")
- text = $data_enemies[id].pdef
- self.contents.draw_text(10,224,400,32,"物理防御:#{text}")
- text = $data_enemies[id].mdef
- self.contents.draw_text(10,256,400,32,"魔法防御:#{text}")
- name = $data_enemies[id].battler_name
- hue = $data_enemies[id].battler_hue
- bmp = RPG::Cache.battler(name,hue)
- rect = Rect.new(0,0,400,480)
- self.contents.blt(120,60,bmp,rect,160)
- end
- end
- class Scene_EnemyBook
- def main
- @name = Window_EnemyName.new
- @status = Window_EnemyStatus.new
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @name.dispose
- @status.dispose
- end
- def update
- @name.update
- if Input.trigger?(Input::B)
- $scene = Scene_Map.new
- end
- if Input.trigger?(Input::C)
- $game_system.se_play($data_system.decision_se)
- id = @name.get_id(@name.index)
- @status.set_enemy(id)
- end
- end
- end
复制代码 @protosssonny
url请自行去掉 = = |
评分
-
查看全部评分
|