| 赞 | 4 |
| VIP | |
| 好人卡 | |
| 积分 | 6 |
| 经验 | |
| 最后登录 | 2018-4-23 |
| 在线时间 | 830 小时 |
- 梦石
- 0
- 星屑
- 644
- 在线时间
- 830 小时
- 注册时间
- 2016-7-24
- 回帖
- 644

|
发表于 2016-9-29 04:48:20
|
显示全部楼层
本帖最后由 QQ蚊子湯 于 2016-10-24 06:43 编辑
覺得最近的提問都在叫人寫腳本啊{:2_277:}
效果圖
- #==================================
- # 腳本名:持有特定武器時格檔敵人攻擊
- #
- # 作者:QQ蚊子湯
- # [url]https://rpg.blue/home.php?mod=space&uid=2658226[/url]
- # 請勿刪除作者訊息
- # 不限遊戲類型
- # 不需要報告
- # 可以改造
- # 改造並保留作者訊息可以二次發布
- #===================================以下設定
- $QQweaponss = [1,2] #武器編號 (複數武器警加逗號, )
- QQne = true #是否在格檔時播放效果音 關:false 開:true
- $QQSE = "Cat.ogg" #格檔時的效果音檔名(請加副檔名)
- $QQmesegiT = "武器格檔!" #格檔時的文字提示(請使用雙引號 "像這樣")
- $QQrand = 100 #格檔機率 100=100%發動 20=20%發動
- #======================================設定到此為止
- $QQmesegi=0
- class Game_Battler < Game_BattlerBase
- alias QQ16_9_29_1 make_damage_value
- def make_damage_value(user, item)
- value = item.damage.eval(user, self, $game_variables)
- if item.is_a?(RPG::Skill)
- if !user.is_a?(Game_Actor)
- for $QQweapons in $QQweaponss
- if self.weapons.include?($data_weapons[$QQweapons])&&rand(100) < $QQrand
- value = 0
- $QQmesegi=1
- end
- end
- end
- end
- value *= item_element_rate(user, item)
- value *= pdr if item.physical?
- value *= mdr if item.magical?
- value *= rec if item.damage.recover?
- value = apply_critical(value) if @result.critical
- value = apply_variance(value, item.damage.variance)
- value = apply_guard(value)
- @result.make_damage(value.to_i, item)
- end
- end
- class Window_BattleLog < Window_Selectable
-
- alias QQ16_9_29_2 display_hp_damage
- def display_hp_damage(target, item)
- return if target.result.hp_damage == 0 && item && !item.damage.to_hp?
- if target.result.hp_damage > 0 && target.result.hp_drain == 0
- target.perform_damage_effect
- end
- if $QQmesegi==1
- add_text($QQmesegiT);$QQmesegi=0
- if QQne ==true
- Audio.se_play("Audio/SE/" + $QQSE , 80, 100)
- end
- end
- Sound.play_recovery if target.result.hp_damage < 0
- add_text(target.result.hp_damage_text)
- wait
- end
- end
复制代码 |
评分
-
查看全部评分
|