Commit c07c2961 authored by salix5's avatar salix5
parent 1c9b1071
......@@ -1423,7 +1423,7 @@ void field::adjust_self_destroy_set() {
for(auto cit = cset.begin(); cit != cset.end(); ++cit) {
card* pcard = *cit;
if((!pcard->get_status(STATUS_DISABLED | STATUS_FORBIDDEN) && (peffect = check_unique_onfield(pcard, pcard->current.controler, pcard->current.location)))
|| (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY))) {
|| (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY)) && !pcard->is_status(STATUS_BATTLE_DESTROYED)) {
core.self_destroy_set.insert(pcard);
pcard->temp.reason_effect = pcard->current.reason_effect;
pcard->temp.reason_player = pcard->current.reason_player;
......
......@@ -182,6 +182,7 @@ void field::special_summon_complete(effect* reason_effect, uint8 reason_player)
//core.special_summoning.clear();
add_process(PROCESSOR_SPSUMMON_COMP_S, 0, reason_effect, ng, reason_player, 0);
}
// destroy: 1st arg is card or card_set=>card version, otherwise=>step version
// destroy in script: here->PROCESSOR_DESTROY, step 0
// set current.reason
void field::destroy(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence) {
......@@ -2667,6 +2668,7 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
}
return TRUE;
}
// destroy: step version
// PROCESSOR_DESTROY_STEP goes here
int32 field::destroy(uint16 step, group * targets, card * target, uint8 battle) {
if(target->current.location & (LOCATION_GRAVE | LOCATION_REMOVED)) {
......
......@@ -3458,7 +3458,6 @@ int32 field::process_battle_command(uint16 step) {
return FALSE;
}
case 29: {
core.selfdes_disabled = FALSE;
if(core.battle_destroy_rep.size())
destroy(&core.battle_destroy_rep, 0, REASON_EFFECT | REASON_REPLACE, PLAYER_NONE);
if(core.desrep_chain.size())
......@@ -3474,6 +3473,7 @@ int32 field::process_battle_command(uint16 step) {
(*cit)->filter_disable_related_cards();
}
}
core.selfdes_disabled = FALSE;
adjust_all();
//EVENT_BATTLE_END was here, but this timing does not exist in Master Rule 3
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment