class Window_Base < Window def process_character(c, text, pos) case c when "\r" # 回车 return when "\n" # 换行 process_new_line(text, pos) when "\f" # 翻页 process_new_page(text, pos) when "\e" # 控制符 process_escape_character(obtain_escape_code(text), text, pos) when "\z"#红色 change_color(Color.new(255,0,0)) when "\y"#黑色 change_color(Color.new(255,255,255)) when "\a"#绿色 change_color(Color.new(0,255,0)) when "\w"#蓝色 change_color(Color.new(0,0,255)) else # 普通文字 process_normal_character(c, pos) end end end module Vocab ActorDamage = "%s受到了\z%s\y点的伤害!" ActorRecovery = "%s的%s恢复了\a%s\y点!" ActorMPRecovery = "%s的%s恢复了\w%s\y点!" ActorGain = "%s的%s恢复了\a%s\y点!" ActorLoss = "%s的%s失去了%s点!" ActorDrain = "%s的%s被夺走了%s点!" ActorNoDamage = "%s没有受到伤害!" ActorNoHit = "失误!%s毫发无伤!" EnemyDamage = "%s受到了\z%s\y点的伤害!" EnemyRecovery = "%s的%s恢复了\a%s\y点!" EnemyMPRecovery = "%s的%s恢复了\w%s\y点!" EnemyGain = "%s的%s恢复了\a%s\y点!" EnemyLoss = "%s的%s失去了%s点!" EnemyDrain = "%s的%s被夺走了%s点!" EnemyNoDamage = "%s没有受到伤害!" EnemyNoHit = "失误!%s毫发无伤!" end class Game_ActionResult def mp_damage_text if @mp_drain > 0 fmt = @battler.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain sprintf(fmt, @battler.name, Vocab::mp, @mp_drain) elsif @mp_damage > 0 fmt = @battler.actor? ? Vocab::ActorLoss : Vocab::EnemyLoss sprintf(fmt, @battler.name, Vocab::mp, @mp_damage) elsif @mp_damage < 0 fmt = @battler.actor? ? Vocab::ActorMPRecovery : Vocab::EnemyMPRecovery sprintf(fmt, @battler.name, Vocab::mp, -@mp_damage) else "" end end end
魔法丶小肉包 发表于 2017-2-16 21:39
帮楼主试着写了一个....即插即用,可自己添加颜色,照着脚本自己加就可以了=w=
脚本内部已经已经设定好了伤 ...
QQ图片20170224144324.png (235.34 KB, 下载次数: 20)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |