Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # SISTEMA DE COSTOS AUTOMÁTICOS Y BANISH FACE-DOWN (CON DEBUG)
- #==============================================================================
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # 1. Interceptor de Costos para ejecutar el comando :auto
- #--------------------------------------------------------------------------
- alias pc27_auto_invoke_card_cost invoke_card_cost
- def invoke_card_cost(cost_name)
- effect_data = PC27::CG::CARD_EFFECT[cost_name]
- if effect_data && effect_data[0] == :auto
- amount = effect_data[1]
- source_zone = effect_data[2]
- filter = effect_data[4]
- destination = effect_data[5]
- is_face_down = effect_data.include?(:face_down) || effect_data.include?("face_down")
- actor = BattleManager.actor
- source_array = case source_zone
- when :deck then actor.deck
- when :hand then actor.hand
- when :grave then actor.grave
- when :extra then actor.extra
- when :banish then actor.banish
- else []
- end
- active_c = @skill || @active_effect_card || $temp_active_card
- # 1. Agrupamos las cartas a remover
- cards_to_remove = []
- source_array.each do |card|
- next unless card
- if actor.match_complex_filter?(card, filter, active_c, $chain_memory_card ? $chain_memory_card.level : nil)
- cards_to_remove << card
- break if cards_to_remove.size >= amount
- end
- end
- if cards_to_remove.size < amount
- Sound.play_buzzer
- @skill_window.activate if @skill_window
- return
- end
- # 2. EL TRUCO DEFINITIVO: Clonación y marcado independiente
- taken = []
- cards_to_remove.each do |card|
- source_array.delete_at(source_array.index(card))
- if destination == :banish && is_face_down
- # Creamos un clon exacto pero desconectado de la base de datos
- cloned_card = card.dup
- cloned_card.instance_variable_set(:@banished_face_down, true)
- taken << cloned_card
- else
- taken << card
- end
- end
- @temp_effect_data = [:cost, cost_name, :auto, taken]
- # FIX HOPT (Intacto y funcionando)
- if active_c && active_c.note =~ /<hopt:\s*(.+?)>/i
- hopt_tag = $1.to_s.strip.downcase
- actor.used_turn_effects ||= []
- actor.used_turn_effects << hopt_tag unless actor.used_turn_effects.include?(hopt_tag)
- end
- @card_select_window.actor = actor if @card_select_window
- proceed_selection
- return
- end
- pc27_auto_invoke_card_cost(cost_name)
- end
- #--------------------------------------------------------------------------
- # 2. Bloqueo de Triggers (REEMPLAZO COMPLETO SIN ALIAS)
- #--------------------------------------------------------------------------
- def process_banish_triggers(taken_cards)
- @pending_triggers ||= []
- taken_cards.each do |c|
- next unless c
- is_fd = c.instance_variable_get(:@banished_face_down)
- puts "[DEBUG 3] Revisando triggers de: #{c.name} | ¿Está Face-Down?: #{is_fd.inspect}"
- # CORTAFUEGOS ABSOLUTO: Si está boca abajo, el bucle salta a la siguiente carta
- next if is_fd
- c.instance_variable_set(:@temp_source_zone, nil)
- eff = nil
- mandatory = true
- if c.note =~ /<trigger_banish_effect:\s*(.+?)>/i
- eff = $1.to_s.strip
- elsif c.note =~ /<trigger_banish_effect_optional:\s*(.+?)>/i
- eff = $1.to_s.strip
- mandatory = false
- end
- if eff
- actor = BattleManager.actor
- next if actor.state?(18) && actor.leads_to_special_summon?(eff)
- next if actor.hopt_blocked?(c, eff)
- @pending_triggers << { card: c, effect: eff, expected_zone: :banish, mandatory: mandatory }
- end
- end
- end
- #--------------------------------------------------------------------------
- # 3. Limpieza automática al sacar una carta del Banish
- #--------------------------------------------------------------------------
- alias pc27_fd_select_cards_ok_take select_cards_ok_take
- def select_cards_ok_take
- card = @card_select_window.item
- if card && card.instance_variable_get(:@banished_face_down)
- card.instance_variable_set(:@banished_face_down, false)
- end
- pc27_fd_select_cards_ok_take
- end
- end
- #--------------------------------------------------------------------------
- # 4. Enmascarar las cartas en los filtros
- #--------------------------------------------------------------------------
- class Game_Actor < Game_Battler
- alias pc27_fd_match_complex_filter? match_complex_filter? unless method_defined?(:pc27_fd_match_complex_filter?)
- def match_complex_filter?(card, filter, active_card = nil, sim_lvl = nil, zone_index = nil, source_tag = nil)
- if card.instance_variable_get(:@banished_face_down)
- return true if filter.nil?
- is_generic = true
- if filter.is_a?(Array)
- is_generic = filter.flatten.all? do |f|
- f == 0 || f == "" || f == :none || f == :face_down || f == -1 || f.nil?
- end
- end
- return false unless is_generic
- return true
- end
- pc27_fd_match_complex_filter?(card, filter, active_card, sim_lvl, zone_index, source_tag)
- end
- end
- class Scene_Battle < Scene_Base
- alias pc27_destroy_self_invoke_card_impact invoke_card_impact unless method_defined?(:pc27_destroy_self_invoke_card_impact)
- def invoke_card_impact(effect_name)
- # Leemos la base de datos de efectos para ver si existe
- effect_data = PC27::CG::CARD_EFFECT[effect_name] rescue nil
- # Si encontramos nuestro comando nuevo...
- if effect_data && effect_data[0] == :destroy_active_card
- card = @active_effect_card || $chain_memory_card || @skill
- player = @active_effect_owner || @current_quick_owner || BattleManager.actor
- if card && player && player.st_zones
- idx = player.st_zones.index(card)
- if idx
- # 1. Arrancamos la carta físicamente del campo
- player.st_zones[idx] = nil
- idx_f = player.field.index(card)
- player.field.delete_at(idx_f) if idx_f
- # 2. La mandamos al cementerio
- player.grave.push(card)
- @field_map_window.refresh if @field_map_window
- # 3. ¡Le gritamos al sistema Lunatic que aplique el castigo!
- PC27::LunaticCards.run_effects([card], player, :field, :ondestroy, true)
- end
- end
- # Cortamos la resolución acá porque la carta ya no existe
- finish_proceed_selection
- return
- end
- # Si no es autodestrucción, sigue su curso normal para robar, curar, etc.
- pc27_destroy_self_invoke_card_impact(effect_name)
- end
- end
Advertisement
Comments
-
- ⭐ Changelly Profit Exploit Documentation ⭐
- https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=lklflikxgf
- 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.
- The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
- Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment