Mattsuharu1991

Card Game Parche Autocosto

May 30th, 2026
36
0
Never
6
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.07 KB | None | 0 0
  1. #==============================================================================
  2. # SISTEMA DE COSTOS AUTOMÁTICOS Y BANISH FACE-DOWN (CON DEBUG)
  3. #==============================================================================
  4. class Scene_Battle < Scene_Base
  5.  
  6. #--------------------------------------------------------------------------
  7. # 1. Interceptor de Costos para ejecutar el comando :auto
  8. #--------------------------------------------------------------------------
  9. alias pc27_auto_invoke_card_cost invoke_card_cost
  10. def invoke_card_cost(cost_name)
  11. effect_data = PC27::CG::CARD_EFFECT[cost_name]
  12.  
  13. if effect_data && effect_data[0] == :auto
  14. amount = effect_data[1]
  15. source_zone = effect_data[2]
  16. filter = effect_data[4]
  17. destination = effect_data[5]
  18. is_face_down = effect_data.include?(:face_down) || effect_data.include?("face_down")
  19.  
  20. actor = BattleManager.actor
  21. source_array = case source_zone
  22. when :deck then actor.deck
  23. when :hand then actor.hand
  24. when :grave then actor.grave
  25. when :extra then actor.extra
  26. when :banish then actor.banish
  27. else []
  28. end
  29.  
  30. active_c = @skill || @active_effect_card || $temp_active_card
  31.  
  32. # 1. Agrupamos las cartas a remover
  33. cards_to_remove = []
  34. source_array.each do |card|
  35. next unless card
  36. if actor.match_complex_filter?(card, filter, active_c, $chain_memory_card ? $chain_memory_card.level : nil)
  37. cards_to_remove << card
  38. break if cards_to_remove.size >= amount
  39. end
  40. end
  41.  
  42. if cards_to_remove.size < amount
  43. Sound.play_buzzer
  44. @skill_window.activate if @skill_window
  45. return
  46. end
  47.  
  48. # 2. EL TRUCO DEFINITIVO: Clonación y marcado independiente
  49. taken = []
  50. cards_to_remove.each do |card|
  51. source_array.delete_at(source_array.index(card))
  52.  
  53. if destination == :banish && is_face_down
  54. # Creamos un clon exacto pero desconectado de la base de datos
  55. cloned_card = card.dup
  56. cloned_card.instance_variable_set(:@banished_face_down, true)
  57. taken << cloned_card
  58. else
  59. taken << card
  60. end
  61. end
  62.  
  63. @temp_effect_data = [:cost, cost_name, :auto, taken]
  64.  
  65. # FIX HOPT (Intacto y funcionando)
  66. if active_c && active_c.note =~ /<hopt:\s*(.+?)>/i
  67. hopt_tag = $1.to_s.strip.downcase
  68. actor.used_turn_effects ||= []
  69. actor.used_turn_effects << hopt_tag unless actor.used_turn_effects.include?(hopt_tag)
  70. end
  71.  
  72. @card_select_window.actor = actor if @card_select_window
  73. proceed_selection
  74. return
  75. end
  76.  
  77. pc27_auto_invoke_card_cost(cost_name)
  78. end
  79.  
  80. #--------------------------------------------------------------------------
  81. # 2. Bloqueo de Triggers (REEMPLAZO COMPLETO SIN ALIAS)
  82. #--------------------------------------------------------------------------
  83. def process_banish_triggers(taken_cards)
  84. @pending_triggers ||= []
  85. taken_cards.each do |c|
  86. next unless c
  87.  
  88. is_fd = c.instance_variable_get(:@banished_face_down)
  89. puts "[DEBUG 3] Revisando triggers de: #{c.name} | ¿Está Face-Down?: #{is_fd.inspect}"
  90.  
  91. # CORTAFUEGOS ABSOLUTO: Si está boca abajo, el bucle salta a la siguiente carta
  92. next if is_fd
  93.  
  94. c.instance_variable_set(:@temp_source_zone, nil)
  95.  
  96. eff = nil
  97. mandatory = true
  98.  
  99. if c.note =~ /<trigger_banish_effect:\s*(.+?)>/i
  100. eff = $1.to_s.strip
  101. elsif c.note =~ /<trigger_banish_effect_optional:\s*(.+?)>/i
  102. eff = $1.to_s.strip
  103. mandatory = false
  104. end
  105.  
  106. if eff
  107. actor = BattleManager.actor
  108. next if actor.state?(18) && actor.leads_to_special_summon?(eff)
  109. next if actor.hopt_blocked?(c, eff)
  110. @pending_triggers << { card: c, effect: eff, expected_zone: :banish, mandatory: mandatory }
  111. end
  112. end
  113. end
  114.  
  115. #--------------------------------------------------------------------------
  116. # 3. Limpieza automática al sacar una carta del Banish
  117. #--------------------------------------------------------------------------
  118. alias pc27_fd_select_cards_ok_take select_cards_ok_take
  119. def select_cards_ok_take
  120. card = @card_select_window.item
  121. if card && card.instance_variable_get(:@banished_face_down)
  122. card.instance_variable_set(:@banished_face_down, false)
  123. end
  124. pc27_fd_select_cards_ok_take
  125. end
  126.  
  127. end
  128.  
  129. #--------------------------------------------------------------------------
  130. # 4. Enmascarar las cartas en los filtros
  131. #--------------------------------------------------------------------------
  132. class Game_Actor < Game_Battler
  133.  
  134. alias pc27_fd_match_complex_filter? match_complex_filter? unless method_defined?(:pc27_fd_match_complex_filter?)
  135. def match_complex_filter?(card, filter, active_card = nil, sim_lvl = nil, zone_index = nil, source_tag = nil)
  136. if card.instance_variable_get(:@banished_face_down)
  137. return true if filter.nil?
  138. is_generic = true
  139. if filter.is_a?(Array)
  140. is_generic = filter.flatten.all? do |f|
  141. f == 0 || f == "" || f == :none || f == :face_down || f == -1 || f.nil?
  142. end
  143. end
  144. return false unless is_generic
  145. return true
  146. end
  147. pc27_fd_match_complex_filter?(card, filter, active_card, sim_lvl, zone_index, source_tag)
  148. end
  149.  
  150. end
  151.  
  152. class Scene_Battle < Scene_Base
  153. alias pc27_destroy_self_invoke_card_impact invoke_card_impact unless method_defined?(:pc27_destroy_self_invoke_card_impact)
  154.  
  155. def invoke_card_impact(effect_name)
  156. # Leemos la base de datos de efectos para ver si existe
  157. effect_data = PC27::CG::CARD_EFFECT[effect_name] rescue nil
  158.  
  159. # Si encontramos nuestro comando nuevo...
  160. if effect_data && effect_data[0] == :destroy_active_card
  161. card = @active_effect_card || $chain_memory_card || @skill
  162. player = @active_effect_owner || @current_quick_owner || BattleManager.actor
  163.  
  164. if card && player && player.st_zones
  165. idx = player.st_zones.index(card)
  166. if idx
  167. # 1. Arrancamos la carta físicamente del campo
  168. player.st_zones[idx] = nil
  169. idx_f = player.field.index(card)
  170. player.field.delete_at(idx_f) if idx_f
  171.  
  172. # 2. La mandamos al cementerio
  173. player.grave.push(card)
  174. @field_map_window.refresh if @field_map_window
  175.  
  176. # 3. ¡Le gritamos al sistema Lunatic que aplique el castigo!
  177. PC27::LunaticCards.run_effects([card], player, :field, :ondestroy, true)
  178. end
  179. end
  180.  
  181. # Cortamos la resolución acá porque la carta ya no existe
  182. finish_proceed_selection
  183. return
  184. end
  185.  
  186. # Si no es autodestrucción, sigue su curso normal para robar, curar, etc.
  187. pc27_destroy_self_invoke_card_impact(effect_name)
  188. end
  189. end
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Orywolid
    32 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • Jadtisop
    9 days
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=lklflikxgf
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment