设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2368|回复: 5
打印 上一主题 下一主题

[通用发布] 文字创意一个,场景技能?状态?★

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1323
在线时间
831 小时
注册时间
2007-12-25
帖子
1558
跳转到指定楼层
1
发表于 2012-7-26 13:35:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
发在原创技术???

写的脚本呢??

不解释!!!!!!

早就有预谋想写这玩意,一直以为这东西的兼容性那叫1B!!!!

场景技能!其实是用在战斗中的一种技能!!
这种技能是附加一个状态(我去!状态?这么老土)
是在场景上附加一个状态。。。
打个比方说:飓风。
这个飓风可不是一阵,吹过了掉点血就完事,而是一段时间一直在刮风。风停则所有敌人的状态取消,无法单个解除,即使死亡复活,新来的敌人,都会中这个状态。
这么一说大概明白了 吧。

意思就是这个技能使用在战斗场地上,所有在这场地上的人都会受到这个技能(状态 )的影响,解除的话,也只能对场景解除。

当然解除方式可以是回合,解除技能,或者绑定角色等等等等。

总之!估计会增加战斗的趣味性吧!
精卫赤龙腾   
总是存在一种强大,去完成似乎不可能的事情.
无畏战乾程   
或是需要一种勇气,去挑战几乎不存在的胜利.
一味玄真魂     
这是拥有一种恒心,去化解根本没有解的困难.
烈卫开天径    
只是带着一种决心,去争取残存的最后的希望。

Lv1.梦旅人

梦石
0
星屑
95
在线时间
440 小时
注册时间
2012-6-5
帖子
96
2
发表于 2012-7-26 13:58:22 | 只看该作者
本帖最后由 紫菜豆腐煲 于 2012-7-28 11:00 编辑

在脚本合集,好像已经有了
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Field State Effects v1.00
  4. # -- Last Updated: 2012.01.11
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-FieldStateEffects"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.11 - Started Script and Finished.
  15. #
  16. #==============================================================================
  17. # ▼ Introduction
  18. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  19. # Field States are states that are applied to all actors and enemies without
  20. # discrimination. Field states cannot be removed through usual means and can
  21. # only be applied through certain skills and items. Multiple field states can
  22. # be added at once whether side by side or overwriting any previous field
  23. # states. Skills and items can also alter the turns of existing field states.
  24. #
  25. #==============================================================================
  26. # ▼ Instructions
  27. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  28. # To install this script, open up your script editor and copy/paste this script
  29. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  30. #
  31. # -----------------------------------------------------------------------------
  32. # Skill Notetags - These notetags go in the skill notebox in the database.
  33. # -----------------------------------------------------------------------------
  34. # <add field state: x>
  35. # <add field state: x, x>
  36. # Causes the action to add state x to the field, making it apply to everyone
  37. # and cannot be removed through normal state removal means. Insert multiples of
  38. # this tag to have the action cause multiple field states.
  39. #
  40. # <remove field state: x>
  41. # <remove field state: x, x>
  42. # Causes the action to remove state x from the field. This does not remove
  43. # states that were inflicted normally. Insert multiples of this tag to remove
  44. # multiple field states.
  45. #
  46. # <remove all field states>
  47. # Causes the action to remove all field states. This does not remove states
  48. # that were inflicted normally.
  49. #
  50. # <overwrite field state: x>
  51. # <overwrite field state: x, x>
  52. # Causes the action to remove all field states and then add field states x,
  53. # making it apply to everyone and cannot be removed through normal state
  54. # removal means. Insert multiples of this tag to have the action overwrite and
  55. # add more field states.
  56. #
  57. # <field state x turns: +y>
  58. # <field state x turns: -y>
  59. # Changes the remaining turns on field state x by y amount. If a field state
  60. # is to reach 0 or less turns through this process, the field state is removed.
  61. # This effect does not add turns to field states that weren't inflicted. Insert
  62. # multiples of this tag to adjust multiple field states at once.
  63. #
  64. # <all field state turns: +x>
  65. # <all field state turns: -x>
  66. # Changes the remaining turns on all field states by x amount. If a field state
  67. # is to reach 0 or less turns through this process, the field state is removed.
  68. #
  69. # -----------------------------------------------------------------------------
  70. # Item Notetags - These notetags go in the items notebox in the database.
  71. # -----------------------------------------------------------------------------
  72. # <add field state: x>
  73. # <add field state: x, x>
  74. # Causes the action to add state x to the field, making it apply to everyone
  75. # and cannot be removed through normal state removal means. Insert multiples of
  76. # this tag to have the action cause multiple field states.
  77. #
  78. # <remove field state: x>
  79. # <remove field state: x, x>
  80. # Causes the action to remove state x from the field. This does not remove
  81. # states that were inflicted normally. Insert multiples of this tag to remove
  82. # multiple field states.
  83. #
  84. # <remove all field states>
  85. # Causes the action to remove all field states. This does not remove states
  86. # that were inflicted normally.
  87. #
  88. # <overwrite field state: x>
  89. # <overwrite field state: x, x>
  90. # Causes the action to remove all field states and then add field states x,
  91. # making it apply to everyone and cannot be removed through normal state
  92. # removal means. Insert multiples of this tag to have the action overwrite and
  93. # add more field states.
  94. #
  95. # <field state x turns: +y>
  96. # <field state x turns: -y>
  97. # Changes the remaining turns on field state x by y amount. If a field state
  98. # is to reach 0 or less turns through this process, the field state is removed.
  99. # This effect does not add turns to field states that weren't inflicted. Insert
  100. # multiples of this tag to adjust multiple field states at once.
  101. #
  102. # <all field state turns: +x>
  103. # <all field state turns: -x>
  104. # Changes the remaining turns on all field states by x amount. If a field state
  105. # is to reach 0 or less turns through this process, the field state is removed.
  106. #
  107. # -----------------------------------------------------------------------------
  108. # State Notetags - These notetags go in the states notebox in the database.
  109. # -----------------------------------------------------------------------------
  110. # <field back 1: string>
  111. # <field back 2: string>
  112. # If this state is being used as a field state and this state is the state with
  113. # the highest priority, these notetags will determine the battlebacks used
  114. # while the field state is in effect. If this notetag is not used, there will
  115. # be no changes to the battleback.
  116. #
  117. #==============================================================================
  118. # ▼ Compatibility
  119. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  120. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  121. # it will run with RPG Maker VX without adjusting.
  122. #
  123. #==============================================================================

  124. module YEA
  125.   module FIELD_STATES
  126.    
  127.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  128.     # - Visual Settings -
  129.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  130.     # This setting causes a wave effect to play whenever the battlebacks change
  131.     # due to field state effects.
  132.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  133.     WAVE_EFFECT = true  # Plays a wave effect when the battleback changes.
  134.    
  135.   end # FIELD_STATES
  136. end # YEA

  137. #==============================================================================
  138. # ▼ Editting anything past this point may potentially result in causing
  139. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  140. # halitosis so edit at your own risk.
  141. #==============================================================================

  142. module YEA
  143.   module REGEXP
  144.   module USABLEITEM
  145.    
  146.     ADD_FIELD_STATE =
  147.       /<(?:ADD_FIELD_STATE|add field state):[ ](\d+(?:\s*,\s*\d+)*)>/i
  148.     REMOVE_FIELD_STATE =
  149.       /<(?:REMOVE_FIELD_STATE|remove field state):[ ](\d+(?:\s*,\s*\d+)*)>/i
  150.     REMOVE_ALL_FIELD_STATES =
  151.       /<(?:REMOVE_ALL_FIELD_STATES|remove all field states)>/i
  152.     OVERWRITE_FIELD_STATE =
  153.     /<(?:OVERWRITE_FIELD_STATE|OVERWRITE field state):[ ](\d+(?:\s*,\s*\d+)*)>/i
  154.     CHANGE_FIELD_STATE_TURN =
  155.       /<(?:FIELD state)[ ](\d+)[ ](?:TURN|turns):[ ]([\+\-]\d+)>/i
  156.     CHANGE_ALL_FIELD_STATE_TURN =
  157.       /<(?:ALL_FIELD_STATE_TURNS|all field state turns):[ ]([\+\-]\d+)>/i
  158.    
  159.   end # USABLEITEM
  160.   module STATE
  161.    
  162.     FIELD_BATTLEBACK1 = /<(?:FIELD_BACK1|field back1|field back 1):[ ](.*)>/i
  163.     FIELD_BATTLEBACK2 = /<(?:FIELD_BACK2|field back2|field back 2):[ ](.*)>/i
  164.    
  165.   end # STATE
  166.   end # REGEXP
  167. end # YEA

  168. #==============================================================================
  169. # ■ DataManager
  170. #==============================================================================

  171. module DataManager
  172.   
  173.   #--------------------------------------------------------------------------
  174.   # alias method: load_database
  175.   #--------------------------------------------------------------------------
  176.   class <<self; alias load_database_fse load_database; end
  177.   def self.load_database
  178.     load_database_fse
  179.     load_notetags_fse
  180.   end
  181.   
  182.   #--------------------------------------------------------------------------
  183.   # new method: load_notetags_fse
  184.   #--------------------------------------------------------------------------
  185.   def self.load_notetags_fse
  186.     groups = [$data_skills, $data_items, $data_states]
  187.     for group in groups
  188.       for obj in group
  189.         next if obj.nil?
  190.         obj.load_notetags_fse
  191.       end
  192.     end
  193.   end
  194.   
  195. end # DataManager

  196. #==============================================================================
  197. # ■ RPG::UsableItem
  198. #==============================================================================

  199. class RPG::UsableItem < RPG::BaseItem
  200.   
  201.   #--------------------------------------------------------------------------
  202.   # public instance variables
  203.   #--------------------------------------------------------------------------
  204.   attr_accessor :add_field_state
  205.   attr_accessor :remove_field_state
  206.   attr_accessor :remove_all_field_states
  207.   attr_accessor :change_field_state_turns
  208.   
  209.   #--------------------------------------------------------------------------
  210.   # common cache: load_notetags_fse
  211.   #--------------------------------------------------------------------------
  212.   def load_notetags_fse
  213.     @add_field_state = []
  214.     @remove_field_state = []
  215.     @remove_all_field_states = false
  216.     @change_field_state_turns = {}
  217.     #---
  218.     self.note.split(/[\r\n]+/).each { |line|
  219.       case line
  220.       #---
  221.       when YEA::REGEXP::USABLEITEM::ADD_FIELD_STATE
  222.         $1.scan(/\d+/).each { |num|
  223.         @add_field_state.push(num.to_i) if num.to_i > 0 }
  224.       when YEA::REGEXP::USABLEITEM::REMOVE_FIELD_STATE
  225.         $1.scan(/\d+/).each { |num|
  226.         @remove_field_state.push(num.to_i) if num.to_i > 0 }
  227.       when YEA::REGEXP::USABLEITEM::REMOVE_ALL_FIELD_STATES
  228.         @remove_all_field_states = true
  229.       when YEA::REGEXP::USABLEITEM::OVERWRITE_FIELD_STATE
  230.         @remove_all_field_states = true
  231.         $1.scan(/\d+/).each { |num|
  232.         @add_field_state.push(num.to_i) if num.to_i > 0 }
  233.       when YEA::REGEXP::USABLEITEM::CHANGE_FIELD_STATE_TURN
  234.         @change_field_state_turns[$1.to_i] = $2.to_i
  235.       when YEA::REGEXP::USABLEITEM::CHANGE_ALL_FIELD_STATE_TURN
  236.         for i in 1...$data_states.size
  237.           @change_field_state_turns[i] = $1.to_i
  238.         end
  239.       end
  240.     } # self.note.split
  241.     #---
  242.   end
  243.   
  244. end # class RPG::UsableItem

  245. #==============================================================================
  246. # ■ RPG::State
  247. #==============================================================================

  248. class RPG::State < RPG::BaseItem
  249.   
  250.   #--------------------------------------------------------------------------
  251.   # public instance variables
  252.   #--------------------------------------------------------------------------
  253.   attr_accessor :field_battlebacks
  254.   
  255.   #--------------------------------------------------------------------------
  256.   # common cache: load_notetags_fse
  257.   #--------------------------------------------------------------------------
  258.   def load_notetags_fse
  259.     @field_battlebacks = ["", ""]
  260.     #---
  261.     self.note.split(/[\r\n]+/).each { |line|
  262.       case line
  263.       #---
  264.       when YEA::REGEXP::STATE::FIELD_BATTLEBACK1
  265.         @field_battlebacks[0] = $1.to_s
  266.       when YEA::REGEXP::STATE::FIELD_BATTLEBACK2
  267.         @field_battlebacks[1] = $1.to_s
  268.       end
  269.     } # self.note.split
  270.     #---
  271.   end
  272.   
  273. end # RPG::State

  274. #==============================================================================
  275. # ■ BattleManager
  276. #==============================================================================

  277. module BattleManager
  278.   
  279.   #--------------------------------------------------------------------------
  280.   # alias method: init_members
  281.   #--------------------------------------------------------------------------
  282.   class <<self; alias battlemanager_init_members_fse init_members; end
  283.   def self.init_members
  284.     battlemanager_init_members_fse
  285.     clear_field_states
  286.   end
  287.   
  288.   #--------------------------------------------------------------------------
  289.   # new method: field_states
  290.   #--------------------------------------------------------------------------
  291.   def self.field_states
  292.     return @field_states.collect {|id| $data_states[id] }
  293.   end
  294.   
  295.   #--------------------------------------------------------------------------
  296.   # new method: field_state_turns
  297.   #--------------------------------------------------------------------------
  298.   def self.field_state_turns(state_id)
  299.     return @field_state_turns[state_id]
  300.   end
  301.   
  302.   #--------------------------------------------------------------------------
  303.   # new method: field_state?
  304.   #--------------------------------------------------------------------------
  305.   def self.field_state?(state_id)
  306.     return @field_states.include?(state_id)
  307.   end
  308.   
  309.   #--------------------------------------------------------------------------
  310.   # new method: sort_field_states
  311.   #--------------------------------------------------------------------------
  312.   def self.sort_field_states
  313.     @field_states = @field_states.sort_by { |id|
  314.       [-$data_states[id].priority, id] }
  315.     set_field_battlebacks
  316.     set_field_state_icons
  317.   end
  318.   
  319.   #--------------------------------------------------------------------------
  320.   # new method: clear_field_states
  321.   #--------------------------------------------------------------------------
  322.   def self.clear_field_states
  323.     @field_states = []
  324.     @field_state_turns = {}
  325.     @field_state_battleback = ["", ""]
  326.     @field_state_icons = []
  327.   end
  328.   
  329.   #--------------------------------------------------------------------------
  330.   # new method: add_field_state
  331.   #--------------------------------------------------------------------------
  332.   def self.add_field_state(state_id)
  333.     return if $data_states[state_id].nil?
  334.     return if @field_states.include?(state_id)
  335.     @field_states.push(state_id)
  336.     state = $data_states[state_id]
  337.     variance = 1 + [state.max_turns - state.min_turns, 0].max
  338.     @field_state_turns[state_id] = state.min_turns + rand(variance)
  339.     sort_field_states
  340.   end
  341.   
  342.   #--------------------------------------------------------------------------
  343.   # new method: remove_field_state
  344.   #--------------------------------------------------------------------------
  345.   def self.remove_field_state(state_id)
  346.     return if $data_states[state_id].nil?
  347.     return unless @field_states.include?(state_id)
  348.     @field_states.delete(state_id)
  349.     @field_state_turns.delete(state_id)
  350.     sort_field_states
  351.   end
  352.   
  353.   #--------------------------------------------------------------------------
  354.   # new method: change_field_state_turns
  355.   #--------------------------------------------------------------------------
  356.   def self.change_field_state_turns(state_id, value)
  357.     return unless field_state?(state_id)
  358.     state_id = state_id.id if state_id.is_a?(RPG::State)
  359.     return if $data_states[state_id].auto_removal_timing <= 0
  360.     @field_state_turns[state_id] = 0 if @field_state_turns[state_id].nil?
  361.     @field_state_turns[state_id] = [value, 0].max
  362.     remove_field_state(state_id) if @field_state_turns[state_id] <= 0
  363.   end
  364.   
  365.   #--------------------------------------------------------------------------
  366.   # alias method: turn_end
  367.   #--------------------------------------------------------------------------
  368.   class <<self; alias battlemanager_turn_end_fse turn_end; end
  369.   def self.turn_end
  370.     battlemanager_turn_end_fse
  371.     update_field_states
  372.     remove_field_states_auto
  373.   end
  374.   
  375.   #--------------------------------------------------------------------------
  376.   # new method: update_field_states
  377.   #--------------------------------------------------------------------------
  378.   def self.update_field_states
  379.     for state_id in @field_states
  380.       next unless @field_state_turns[state_id] > 0
  381.       @field_state_turns[state_id] -= 1
  382.     end
  383.   end
  384.   
  385.   #--------------------------------------------------------------------------
  386.   # new method: remove_field_states_auto
  387.   #--------------------------------------------------------------------------
  388.   def self.remove_field_states_auto
  389.     for state_id in @field_states
  390.       next if $data_states[state_id].auto_removal_timing <= 0
  391.       remove_field_state(state_id) if @field_state_turns[state_id] <= 0
  392.     end
  393.   end
  394.   
  395.   #--------------------------------------------------------------------------
  396.   # new method: field_battlebacks
  397.   #--------------------------------------------------------------------------
  398.   def self.field_battlebacks
  399.     return @field_state_battleback
  400.   end
  401.   
  402.   #--------------------------------------------------------------------------
  403.   # new method: set_field_battlebacks
  404.   #--------------------------------------------------------------------------
  405.   def self.set_field_battlebacks
  406.     @field_state_battleback = ["", ""]
  407.     for state in field_states
  408.       next if state.field_battlebacks == ["", ""]
  409.       @field_state_battleback = state.field_battlebacks
  410.       return
  411.     end
  412.   end
  413.   
  414.   #--------------------------------------------------------------------------
  415.   # new method: field_state_icons
  416.   #--------------------------------------------------------------------------
  417.   def self.field_state_icons
  418.     return @field_state_icons
  419.   end
  420.   
  421.   #--------------------------------------------------------------------------
  422.   # new method: set_field_state_icons
  423.   #--------------------------------------------------------------------------
  424.   def self.set_field_state_icons
  425.     icons = field_states.collect {|state| state.icon_index }
  426.     icons.delete(0)
  427.     @field_state_icons = icons
  428.   end
  429.   
  430. end # BattleManager

  431. #==============================================================================
  432. # ■ Game_BattlerBase
  433. #==============================================================================

  434. class Game_BattlerBase
  435.   
  436.   #--------------------------------------------------------------------------
  437.   # public instance variables
  438.   #--------------------------------------------------------------------------
  439.   attr_accessor :anti_field_states
  440.   
  441.   #--------------------------------------------------------------------------
  442.   # alias method: states
  443.   #--------------------------------------------------------------------------
  444.   alias game_battlerbase_states_fse states
  445.   def states
  446.     result = game_battlerbase_states_fse
  447.     result |= field_states unless @anti_field_states
  448.     return result
  449.   end
  450.   
  451.   #--------------------------------------------------------------------------
  452.   # new method: field_states
  453.   #--------------------------------------------------------------------------
  454.   def field_states
  455.     return [] unless SceneManager.scene_is?(Scene_Battle)
  456.     return BattleManager.field_states
  457.   end
  458.   
  459.   #--------------------------------------------------------------------------
  460.   # alias method: state?
  461.   #--------------------------------------------------------------------------
  462.   alias game_battlerbase_state_fse state?
  463.   def state?(state_id)
  464.     return true if field_states.include?($data_states[state_id])
  465.     return game_battlerbase_state_fse(state_id)
  466.   end
  467.   
  468. end # Game_BattlerBase

  469. #==============================================================================
  470. # ■ Game_Battler
  471. #==============================================================================

  472. class Game_Battler < Game_BattlerBase
  473.   
  474.   #--------------------------------------------------------------------------
  475.   # alias method: item_apply
  476.   #--------------------------------------------------------------------------
  477.   alias game_battler_item_apply_fse item_apply
  478.   def item_apply(user, item)
  479.     game_battler_item_apply_fse(user, item)
  480.     apply_field_state_effect(item)
  481.   end
  482.   
  483.   #--------------------------------------------------------------------------
  484.   # new method: apply_field_state_effect
  485.   #--------------------------------------------------------------------------
  486.   def apply_field_state_effect(item)
  487.     return if item.nil?
  488.     return unless $game_party.in_battle
  489.     return unless SceneManager.scene_is?(Scene_Battle)
  490.     return @result.success = true if item.add_field_state != []
  491.     return @result.success = true if item.remove_field_state != []
  492.     return @result.success = true if item.remove_all_field_states
  493.     for key in item.change_field_state_turns
  494.       return @result.success = true if BattleManager.field_state?(key[0])
  495.     end
  496.   end
  497.   
  498.   #--------------------------------------------------------------------------
  499.   # alias method: on_restrict
  500.   #--------------------------------------------------------------------------
  501.   alias game_battler_on_restrict_fse on_restrict
  502.   def on_restrict
  503.     @anti_field_states = true
  504.     game_battler_on_restrict_fse
  505.     @anti_field_states = nil
  506.   end
  507.   
  508.   #--------------------------------------------------------------------------
  509.   # alias method: update_state_turns
  510.   #--------------------------------------------------------------------------
  511.   alias game_battler_update_state_turns_fse update_state_turns
  512.   def update_state_turns
  513.     @anti_field_states = true
  514.     game_battler_update_state_turns_fse
  515.     @anti_field_states = nil
  516.   end
  517.   
  518.   #--------------------------------------------------------------------------
  519.   # alias method: remove_battle_states
  520.   #--------------------------------------------------------------------------
  521.   alias game_battler_remove_battle_states_fse remove_battle_states
  522.   def remove_battle_states
  523.     @anti_field_states = true
  524.     game_battler_remove_battle_states_fse
  525.     @anti_field_states = nil
  526.   end
  527.   
  528.   #--------------------------------------------------------------------------
  529.   # alias method: remove_states_auto
  530.   #--------------------------------------------------------------------------
  531.   alias game_battler_remove_states_auto_fse remove_states_auto
  532.   def remove_states_auto(timing)
  533.     @anti_field_states = true
  534.     game_battler_remove_states_auto_fse(timing)
  535.     @anti_field_states = nil
  536.   end
  537.   
  538.   #--------------------------------------------------------------------------
  539.   # alias method: remove_states_by_damage
  540.   #--------------------------------------------------------------------------
  541.   alias game_battler_remove_states_by_damage_fse remove_states_by_damage
  542.   def remove_states_by_damage
  543.     @anti_field_states = true
  544.     game_battler_remove_states_by_damage_fse
  545.     @anti_field_states = nil
  546.   end
  547.   
  548. end # Game_Battler

  549. #==============================================================================
  550. # ■ Spriteset_Battle
  551. #==============================================================================

  552. class Spriteset_Battle
  553.   
  554.   #--------------------------------------------------------------------------
  555.   # alias method: create_viewports
  556.   #--------------------------------------------------------------------------
  557.   alias spriteset_battle_create_viewports_fse create_viewports
  558.   def create_viewports
  559.     spriteset_battle_create_viewports_fse
  560.     create_field_state_effect
  561.   end
  562.   
  563.   #--------------------------------------------------------------------------
  564.   # new method: create_field_state_effect
  565.   #--------------------------------------------------------------------------
  566.   def create_field_state_effect
  567.     @field_state_battleback = ["", ""]
  568.     @field_state_effect_sprite1 = Sprite.new(@viewport1)
  569.     @field_state_effect_sprite1.bitmap = Bitmap.new(640, 480)
  570.     @field_state_effect_sprite1.opacity = 0
  571.     @field_state_effect_sprite1.z = 3
  572.     @field_state_effect_sprite2 = Sprite.new(@viewport1)
  573.     @field_state_effect_sprite2.bitmap = Bitmap.new(640, 480)
  574.     @field_state_effect_sprite2.opacity = 0
  575.     @field_state_effect_sprite2.z = 4
  576.   end
  577.   
  578.   #--------------------------------------------------------------------------
  579.   # alias method: dispose
  580.   #--------------------------------------------------------------------------
  581.   alias spriteset_battle_dispose_fse dispose
  582.   def dispose
  583.     dispose_field_state_effect
  584.     spriteset_battle_dispose_fse
  585.   end
  586.   
  587.   #--------------------------------------------------------------------------
  588.   # new method: dispose_field_state_effect
  589.   #--------------------------------------------------------------------------
  590.   def dispose_field_state_effect
  591.     @field_state_effect_sprite1.bitmap.dispose
  592.     @field_state_effect_sprite1.dispose
  593.     @field_state_effect_sprite2.bitmap.dispose
  594.     @field_state_effect_sprite2.dispose
  595.   end
  596.   
  597.   #--------------------------------------------------------------------------
  598.   # alias method: update
  599.   #--------------------------------------------------------------------------
  600.   alias spriteset_battle_update_fse update
  601.   def update
  602.     update_field_state_effect
  603.     spriteset_battle_update_fse
  604.   end
  605.   
  606.   #--------------------------------------------------------------------------
  607.   # new method: update_field_state_effect
  608.   #--------------------------------------------------------------------------
  609.   def update_field_state_effect
  610.     update_field_battleback_images
  611.     update_field_battleback_opacity
  612.     #---
  613.     @field_state_effect_sprite1.update
  614.     @field_state_effect_sprite2.update
  615.   end
  616.   
  617.   #--------------------------------------------------------------------------
  618.   # new method: update_field_battleback_images
  619.   #--------------------------------------------------------------------------
  620.   def update_field_battleback_images
  621.     return if @field_state_battleback == BattleManager.field_battlebacks
  622.     @field_state_battleback = BattleManager.field_battlebacks.clone
  623.     change_field_battleback_images
  624.   end
  625.   
  626.   #--------------------------------------------------------------------------
  627.   # new method: change_field_battleback_images
  628.   #--------------------------------------------------------------------------
  629.   def change_field_battleback_images
  630.     #---
  631.     @field_state_effect_sprite1.bitmap.dispose
  632.     @field_state_effect_sprite1.bitmap =  @back1_sprite.bitmap.clone
  633.     @field_state_effect_sprite1.opacity = 255
  634.     @field_state_effect_sprite1.wave_amp = 0
  635.     center_sprite(@field_state_effect_sprite1)
  636.     #---
  637.     @field_state_effect_sprite2.bitmap.dispose
  638.     @field_state_effect_sprite2.bitmap = @back2_sprite.bitmap.clone
  639.     @field_state_effect_sprite2.opacity = 255
  640.     @field_state_effect_sprite2.wave_amp = 0
  641.     center_sprite(@field_state_effect_sprite2)
  642.     #---
  643.     if YEA::FIELD_STATES::WAVE_EFFECT
  644.       @field_state_effect_sprite1.wave_amp = 16
  645.       @field_state_effect_sprite2.wave_amp = 16
  646.     end
  647.     #---
  648.     @back1_sprite.bitmap.dispose
  649.     @back2_sprite.bitmap.dispose
  650.     if BattleManager.field_battlebacks == ["", ""]
  651.       bb1 = battleback1_bitmap
  652.       bb2 = battleback2_bitmap
  653.     else
  654.       bb1 = Cache.battleback1(BattleManager.field_battlebacks[0])
  655.       bb2 = Cache.battleback2(BattleManager.field_battlebacks[1])
  656.     end
  657.     @back1_sprite.bitmap = bb1
  658.     @back2_sprite.bitmap = bb2
  659.     center_sprite(@back1_sprite)
  660.     center_sprite(@back2_sprite)
  661.   end
  662.   
  663.   #--------------------------------------------------------------------------
  664.   # new method: update_field_battleback_opacity
  665.   #--------------------------------------------------------------------------
  666.   def update_field_battleback_opacity
  667.     return if @field_state_effect_sprite1.opacity <= 0
  668.     @field_state_effect_sprite1.opacity -= 1
  669.     @field_state_effect_sprite2.opacity -= 1
  670.   end
  671.   
  672. end # Spriteset_Battle

  673. #==============================================================================
  674. # ■ Scene_Battle
  675. #==============================================================================

  676. class Scene_Battle < Scene_Base
  677.   
  678.   #--------------------------------------------------------------------------
  679.   # alias method: use_item
  680.   #--------------------------------------------------------------------------
  681.   alias scene_battle_use_item_fse use_item
  682.   def use_item
  683.     item = @subject.current_action.item
  684.     scene_battle_use_item_fse
  685.     apply_field_state_effects(item)
  686.   end
  687.   
  688.   #--------------------------------------------------------------------------
  689.   # new method: apply_field_state_effects
  690.   #--------------------------------------------------------------------------
  691.   def apply_field_state_effects(item)
  692.     return if item.nil?
  693.     remove_all_field_state_effects(item)
  694.     remove_field_state_effects(item)
  695.     add_field_state_effects(item)
  696.     change_field_state_turns(item)
  697.     refresh_all_battlers
  698.   end
  699.   
  700.   #--------------------------------------------------------------------------
  701.   # new method: remove_all_field_state_effects
  702.   #--------------------------------------------------------------------------
  703.   def remove_all_field_state_effects(item)
  704.     return unless item.remove_all_field_states
  705.     BattleManager.clear_field_states
  706.   end
  707.   
  708.   #--------------------------------------------------------------------------
  709.   # new method: remove_field_state_effects
  710.   #--------------------------------------------------------------------------
  711.   def remove_field_state_effects(item)
  712.     return if BattleManager.field_states == []
  713.     return if item.remove_field_state == []
  714.     for state_id in item.remove_field_state
  715.       BattleManager.remove_field_state(state_id)
  716.     end
  717.   end
  718.   
  719.   #--------------------------------------------------------------------------
  720.   # new method: add_field_state_effects
  721.   #--------------------------------------------------------------------------
  722.   def add_field_state_effects(item)
  723.     return if item.add_field_state == []
  724.     for state_id in item.add_field_state
  725.       BattleManager.add_field_state(state_id)
  726.     end
  727.   end
  728.   
  729.   #--------------------------------------------------------------------------
  730.   # new method: change_field_state_turns
  731.   #--------------------------------------------------------------------------
  732.   def change_field_state_turns(item)
  733.     return if item.change_field_state_turns == {}
  734.     for key in item.change_field_state_turns
  735.       state_id = key[0]
  736.       next unless BattleManager.field_state?(state_id)
  737.       next unless $data_states[state_id].auto_removal_timing > 0
  738.       turns = BattleManager.field_state_turns(state_id)
  739.       BattleManager.change_field_state_turns(state_id, turns + key[1])
  740.     end
  741.   end
  742.   
  743.   #--------------------------------------------------------------------------
  744.   # new method: change_field_state_turns
  745.   #--------------------------------------------------------------------------
  746.   def refresh_all_battlers
  747.     all_battle_members.each { |battler| battler.refresh }
  748.     @status_window.refresh
  749.   end
  750.   
  751. end # Scene_Battle

  752. #==============================================================================
  753. #
  754. # ▼ End of File
  755. #
  756. #==============================================================================
复制代码
地球村
http://rpg.blue/thread-225130-1-1.html

点评

UI> 你敢带链接么。  发表于 2012-7-27 21:24
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
6855
在线时间
1666 小时
注册时间
2008-10-29
帖子
6710

贵宾

3
发表于 2012-7-26 14:04:53 | 只看该作者
在梦幻西游里分白天和晚上.
在白天的时候所有人的攻击力都是100%
晚上的时候所有人(带夜战技能的除外)的攻击力都是70%.
梦幻西游是2000年还是2001年的游戏.
再说个比较老的.上个世纪90年代的FC平台的《吞食天地2》
免击计.使用后敌方全体无法普通物理攻击.
免策计.敌方全体无法使用谋略.
特殊环境.火.每回合结束时全体被火烧.诸葛亮用六甲天书解除该状况.











你知道得太多了

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
68
在线时间
931 小时
注册时间
2009-5-25
帖子
430

开拓者

4
发表于 2012-7-26 15:43:25 | 只看该作者
口袋的天气系统么?
不同的天气对不同的pm影响也不一样。

当然也可以下一场暴雷雨,
每回合随机有一个人被雷电伤害,
全体水系攻击力增加,
全体视野降低,命中率减少之类的
回复 支持 反对

使用道具 举报

Lv1.梦旅人

追从自然的旅行者
奇特空·煦

梦石
0
星屑
107
在线时间
1387 小时
注册时间
2010-12-31
帖子
4944

开拓者贵宾

5
发表于 2012-7-27 09:23:20 | 只看该作者
本帖最后由 Kimu 于 2012-7-27 09:24 编辑

场景(天气,场地)技能如果只是统一放地图炮也没多少意思,最好还是和PM学不同对象不同效果

在我的坑里面是作为最常用的增加魔法(暂且这么叫)的每回合回复效果的技能

点评

那一个地图里弄得像世界末日里面那样一个地图西边下雪西边人被冰冻,东边火山爆发人时不时被陨石砸了怎么搞···  发表于 2012-9-2 17:06
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
59 小时
注册时间
2012-3-4
帖子
86
6
发表于 2012-9-1 12:02:26 | 只看该作者
好东西,我也一直在想在战斗中能有种持续性的阵法技能类似DNF鬼泣的阵谢谢我回去试试
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-15 17:33

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表