赞 | 1 |
VIP | 255 |
好人卡 | 52 |
积分 | 1 |
经验 | 77416 |
最后登录 | 2016-1-18 |
在线时间 | 1269 小时 |
Lv1.梦旅人 薄凉看客
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1269 小时
- 注册时间
- 2010-6-20
- 帖子
- 1316
|
本帖最后由 恋′挂机 于 2014-2-3 05:15 编辑
- class Battle_End_Command < Window_Selectable
- def initialize
-
- 牌图_未开启 = "001-Fighter01.png"
-
- super(100, 50, 440, 220)
- @item_max = 4
- @column_max = 4
- self.contents = Bitmap.new(width - 32, height - 32)
-
- bmp = RPG::Cache.picture(牌图_未开启)
- for i in 0...4
- self.contents.blt(
- (width - 32) / 4 * i, 0, bmp, Rect.new(
- 0, 0, (width - 32) / 4, height - 32))
- end
-
- self.index = 0
- end
-
- def refresh
- end
-
- def update_cursor_rect
- self.cursor_rect.set(
- [url=home.php?mod=space&uid=370741]@Index[/url] * ((width - 32) / 4), 0, (width - 32) / 4, height - 32)
- end
-
- end
- class Scene_Battle
- alias battle_end_old battle_end
- def battle_end(result)
- if result == 0
- [url=home.php?mod=space&uid=133944]@w[/url] = Battle_End_Command.new
- return
- end
- battle_end_old(result)
- end
- alias update_old_end update
- def update
- if [url=home.php?mod=space&uid=133944]@w[/url] != nil
- @w.update
- if @w.active
- w_update
- return
- end
- end
- update_old_end
- end
- def w_update
-
- 翻牌奖励_G = [100, 200, 300, 400] # 奖励钱数
- 翻牌奖励_W = [*1..10] # 奖励武器 数字为id
- 翻牌奖励_A = [*5..9] # 奖励防具 数字为id
- 翻牌奖励_E = [20, 50, 90, 99, 100, 200, 600, 10000] # 奖励经验
- 翻牌奖励_I = [*3..15] # 奖励物品 数字为id
-
- 概率 = 50 # 50% 有奖励 随机上边的数组
-
- if Input.trigger?(Input::C)
- $game_system.se_play($data_system.decision_se)
- if rand(100) + 1 < 概率
- case rand(5)
- when 0
- n = 翻牌奖励_G[rand(翻牌奖励_G.size)]
- $game_party.gain_gold(n)
- print "Gain Gold #{n}"
- when 1
- n = 翻牌奖励_W[rand(翻牌奖励_W.size)]
- $game_party.gain_weapon(n, 1)
- name = $data_weapons[n].name
- print "Gain weapon #{name}"
- when 2
- n = 翻牌奖励_A[rand(翻牌奖励_A.size)]
- $game_party.gain_armor(n, 1)
- name = $data_armors[n].name
- print "Gain armor #{name}"
- when 3
- exp = 翻牌奖励_E[rand(翻牌奖励_E.size)]
- for i in 0...$game_party.actors.size
- actor = $game_party.actors[i]
- actor.exp += exp
- end
- print "Gain exp #{exp}"
- when 4
- n = 翻牌奖励_I[rand(翻牌奖励_I.size)]
- $game_party.gain_item(n, 1)
- name = $data_items[n].name
- print "Gain item #{name}"
- end
- @w.dispose
- battle_end_old(0)
- return
- else
- print "Good luck!"
- @w.dispose
- battle_end_old(0)
- return
- end
- end
- end
- end
复制代码 未完成版,我也没心思继续写下去了,没有动力
如果你能改就用吧,至于翻牌后变化图片等 @w.refreh 即可 在那里 先清除 contents 重新描绘下就好
思路给你了
胜利翻牌.rar
(235.66 KB, 下载次数: 48)
|
评分
-
查看全部评分
|